Disable Automounting of Hard Drives with Rescue Disc

I’m trying to automate creating disk images of my OpenSUSE Tumbleweed system, using partclone with the Rescue CD. Here’s a synopsis of the script:

  1. Install partclone - WORKS
  2. Check filesystems for errors
  • fsck /dev/sda1: WORKS

(/dev/sda1 - boot partition) - btrfs check /dev/sda2: FAILS
(/dev/sda2 - / partition, btrfs) - fsck /dev/sda4: FAILS
(/dev/sda4 - /home partition, ext4)

  1. Create images - WORKS
    (as long as there are no issues with the filesystems)

It seems that the (2) failing partitions are being automounted as if they were removable drives. Even if I unmount them, I still can’t run fsck/btrfs check.
How do I disable this “feature” temporarily?

I’ll suggest two solutions (or perhaps “workaround” is a better term than “solution”:

  1. After booting the live rescue media, logout. And then login again, but choose “Icewm” as the desktop environment in which to login. You will find that “Icewm” does not have the “feature” that is causing you problems. I should add that it is a while since I last booted a live rescue system, so I can’t be sure that “Icewm” is still available.
  2. Use the live KDE media in place of the live Rescue media. The default for KDE is to not automatically mount.

Thanks for the tips; I’ll try this sometime this evening. I should probably learn how to customize these images so that I get the environment I need every time.
I really don’t need the GUI; All I’m doing is mounting my USB backup drive and running the script.

A thought popped into my head. I have not tried this. If you installed partclone on Tumbleweed then booted into the latest snapshot, hit CTL+ALT+F1 and mounted your USB drive could you not run partclone directly from the read-only file system to create a clone? Anyway, just a thought.

That’s another possibility, yes. I’m going to try the Live KDE image first; it seems like the easiest solution, but your idea is very intriguing.

If you boot into the latest snapshot right after installing partclone, it would be gone again :). Or you would need to put it in /home.

Just another thought: Create a live USB ( f.e. Leap 15 ), boot from it, install partclone on the USB and you’re the one that does the mounting.

That’s what I did with the Rescue CD, except that the system auto-mounted all of the local HD partitions. As long as the Live (KDE) doesn’t do that, I’ll be OK.

It doesn’t. Tested with the Leap 15 and Tumbleweed images.

On a slight tangent to what you’re doing,
FYI creating incremental backups using TAR was described at a local Linux UG…

Eg
https://gist.github.com/commuterjoy/1521474
https://gist.github.com/imatefx/5f5293ef5c58eeb0ec21
https://gist.github.com/alexcreek/907ce5553ee5b4078f74

Is an interesting backup alternative… Although the script can be modified to do more things, the basic functionality (first gist) can be very short and simple. And, of course since the backups are incremental, each successive backup is only the changes since the last backup (You need all incrementals in a set to do a full restore).

Is a fast alternative to cloning, and perhaps the biggest plus is that it’s based on a very basic, old functionality that is almost 100% guaranteed to always work over time, not subject to changes in applications, libraries, versions and more.

TSU