Isolate the most essential files required for a normal boot? [SOLVED]

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
mrodent
Level 2
Level 2
Posts: 89
Joined: Sun Jan 01, 2017 7:59 am

Isolate the most essential files required for a normal boot? [SOLVED]

Post by mrodent »

In a dreary proprietary OS, which I'm extricating myself from with each passing day, to my delight, I put nothing of my own stuff on "drive C:" (partition) ... I install all apps and put all data and everything I possibly can on other partitions. Then I take regular disk images of the drive C: partition. The point about this is to isolate the stuff which actually allows the OS to boot from stuff which doesn't. If things go horribly wrong and booting is impossible then I can restore the latest disk image to the "drive C:". But it doesn't have to be that recent: I won't have lost precious data or even newly installed apps.

At the moment with my Linux setup I can't do that: everything is in one partition (ext4)... (and there is also a swap file of course). The size of this ext4 Linux partition is currently about 8 GB, and I'm expecting it to grow. Taking a disk image of that all the time (even if I could find a Linux app to do that) is a bit annoying, and syncing it to Cloud storage is not practical.

If I could isolate the things which change, and which are of value (i.e. my data, my installed apps, etc.) from the files which constitute the booting system I'd then only have to do a disk image of the booting-related system files occasionally.

Is there some simple way of identifying these files? For example, are certain subdirs of the root directory responsible for this, or something? I could then put everything else on a different ext4 partition. In particular it'd be nice to know how/if the installed software package "tree" could be isolated from the booting-related system files.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Version: Linux Mint 20 Ulyana, 64-bit; Cinnamon 4.6.6; Machine: ASUSTek, PRIME Z270-A, Quad Core, Intel Core i7-7700
GPU: NVIDIA GP106 [GeForce GTX 1060 6GB]; total drive space: 5.5 TB (2 SSDs + 1 internal HD + 1 external HD);
UEFI dual boot w/ W10
WharfRat

Re: Isolate the most essential files required for a normal boot?

Post by WharfRat »

mrodent,

You can retrofit a separate home partition for your files or just create a partition and store your files there.

As far as installed packages are concerned, you can't install them to other than where the package manager installs them.

For example dpkg -L gimp will list every file associated with the gimp package and where the files reside.

Unlike windows, the apt package manager controls where the files should reside and the user has no say over this.
ralplpcr
Level 6
Level 6
Posts: 1096
Joined: Tue Jul 28, 2015 10:11 am

Re: Isolate the most essential files required for a normal boot?

Post by ralplpcr »

I think what you're asking for is to separate your user data as much as possible from your OS data, correct?

If so, then the simplest option you'd have is to create your "/home" directory on a separate partition. The /home directory contains nearly all of "your" data by default, with the "/" (root) directory containing your OS files. You'd still want to keep a separate list of your installed packages, but that is pretty easy with the included "Backup Tool" that's included in most versions of Mint. If you need/decide to update your OS, it's a fairly simple matter of only formatting your "/" directory, and pointing to your "/home" partition for the user files. Once the reinstallation is complete, you run the backup tool to import your package list, and you're pretty much done.

There are some exceptions - a few limited program packages install "user" data in /etc, /opt, or /var - but the majority of the time having your /home in a separate partition will achieve what you're after.

The key is understanding that Linux doesn't recognize "drive letters" the same way Windows does. Everything appears as a mount point under the "/" directory. So you could have multiple additional physical drives attached under multiple mount points, and they'd all show as a path branching off of the root. :)
mrodent
Level 2
Level 2
Posts: 89
Joined: Sun Jan 01, 2017 7:59 am

Re: Isolate the most essential files required for a normal boot?

Post by mrodent »

Great, thanks for both your helps.
separate your user data as much as possible from your OS data
... yep, got it in one.
to create your "/home" directory on a separate partition
Yes... and found out a recipe here which worked first time! (although I freed up the unallocated space in W10 and then used the Gparted app to format it).

Gaddd... everything is so much less hassle with Linux. I'm a total convert.

Will check out backup tool... thanks for that.
Version: Linux Mint 20 Ulyana, 64-bit; Cinnamon 4.6.6; Machine: ASUSTek, PRIME Z270-A, Quad Core, Intel Core i7-7700
GPU: NVIDIA GP106 [GeForce GTX 1060 6GB]; total drive space: 5.5 TB (2 SSDs + 1 internal HD + 1 external HD);
UEFI dual boot w/ W10
User avatar
AndyMH
Level 21
Level 21
Posts: 13740
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Isolate the most essential files required for a normal boot? [SOLVED]

Post by AndyMH »

While you have a look at the backup tool also look at:
  • redo - for system or partition images, download, burn iso to CD or USB boot from that, easy to use. there are alternatives, e.g. clonezilla.
  • timeshift - backs up system files, i.e. /
  • backintime - backs up user files, i.e. /home
  • aptik - backup apps, ppas, and more, does some of what timeshift and backintime do.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
mrodent
Level 2
Level 2
Posts: 89
Joined: Sun Jan 01, 2017 7:59 am

Re: Isolate the most essential files required for a normal boot? [SOLVED]

Post by mrodent »

@AndyMH ... thanks, will investigate.
Version: Linux Mint 20 Ulyana, 64-bit; Cinnamon 4.6.6; Machine: ASUSTek, PRIME Z270-A, Quad Core, Intel Core i7-7700
GPU: NVIDIA GP106 [GeForce GTX 1060 6GB]; total drive space: 5.5 TB (2 SSDs + 1 internal HD + 1 external HD);
UEFI dual boot w/ W10
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Isolate the most essential files required for a normal boot? [SOLVED]

Post by Flemur »

mrodent wrote: Fri May 25, 2018 1:07 pm I install all apps and put all data and everything I possibly can on other partitions.
That's easy to do with data, including the configurations/custom-whatevers for your programs. For the programs themselves, not really; a nice exception is firefox, which you can install in a sort of "portable apps" way - everything is in one directory which can be anywhere (though that's NOT the default way of installing it). I wish more linux programs were like that, but as others have pointed out, the pieces are typically spread all over the place.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
AndyMH
Level 21
Level 21
Posts: 13740
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Isolate the most essential files required for a normal boot? [SOLVED]

Post by AndyMH »

Backintime and timeshift are in software manager. I've got them set up to automatically backup daily to a spare 1TB HDD in my laptop. Redo you have to search the web and download. I've installed it to a 1TB USB drive (using MKUSB - again search the web) and try to remember to take partition images once a month.

Good luck, you can't have too many backups.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
mrodent
Level 2
Level 2
Posts: 89
Joined: Sun Jan 01, 2017 7:59 am

Re: Isolate the most essential files required for a normal boot? [SOLVED]

Post by mrodent »

@AndyMH... tried redo... the "live USB" booted only to a sequence of gobbledy-gook messages which then ended, leaving only option a brutal shutdown (pressing the machine's off button).

But I've had more luck with the clonezilla "live USB" alternative.
Version: Linux Mint 20 Ulyana, 64-bit; Cinnamon 4.6.6; Machine: ASUSTek, PRIME Z270-A, Quad Core, Intel Core i7-7700
GPU: NVIDIA GP106 [GeForce GTX 1060 6GB]; total drive space: 5.5 TB (2 SSDs + 1 internal HD + 1 external HD);
UEFI dual boot w/ W10
Locked

Return to “Beginner Questions”