/home partition

5,012

Solution 1

If you have enough space somewhere you can

tar -cvjf home.tar.bz2 /home

And if anything goes wrong when you try to do it a more appropriate way you can be sure you'll still have your data.

Solution 2

I don't have experience with Arch Linux installation, but most distros let you choose if a partition needs formatting or not. For example both in Debian based distros and Red Hat based distros you can specifiy a /home partition and not format it.

Be careful to choose something like manual partitioning and don't let the installer guess "the best way to partition the disk".

Also, you should choose a different username, if asked, for the normal user as Arch installer could recreate the home directory and erase its contents... I don't really know, so play safe ;)

You can afterward create your usual user(s) and point it (them) to the correct home directories. And don't forget to upgrade the owners of the directories as new users could have different UIDs from the old system even with the same username.

Solution 3

I think you have two choices, the one you already mention, installing just in / and then adding /home to fstab later or do the "manual" installation where you create your storage layout then you don't format your /home and set it up from the beginning.

Solution 4

Another reason I bit the bullet and went for the 100 Gb dropbox account :D. With trucrypt for personal files, of course.

If dropbox (or other services) isn't an option, you could always not select a /home partition and only select your / partition. Then, after then installer is finished, add an entry on fstab pointing your home partition to /home. Reboot create a new user and move everything to the new account (this is to make sure the user is set up to use whatever OS you're installing).

A bit hackish, but the installer won't touch your home partition.

Share:
5,012

Related videos on Youtube

Santiago Rebella
Author by

Santiago Rebella

Updated on September 18, 2022

Comments

  • Santiago Rebella
    Santiago Rebella almost 2 years

    I am facing the following doubt.

    I installed Arch time ago with a home separate partition. My issue is that I need to reinstall the system and I don't have a backup of my /home.

    Would a new installation overwrite my home and leave it empty or keep my current files?

    The question is because theoretically keeping the data is the main purpose of having one I guess, but it happened to me before that left my home partition empty as new (had a back-up before, but not now). In the installation, when specifying the mounting points, I selected home as /home mounting point and deleted the previous data it had.

    I will appreciate if someone passed through a similar issue and knows for sure a safe way of reinstalling the system, selecting home mounting point in /home partition and managed to keep the old home data intact.

    Would installing the system with home included in the partition A / and then manually specify in fstab partition B /home mounting point the cleanest/safer way to do it?

    I finally backed up my data there as is the only real safe thing to do, and I don't feel so comfortable with luck. Anyway my old home partition I will divide it again, will left around 5 GB partition just to have my recovery partition and avoid having to deal with this again.

    I'm not sure if its correct to ask it here or should I open a new question but my doubt is if I copy *.* from my fresh installation / to my new 5 GB recovery partition, next time I run into a similar situation, I just boot with a live USB and copy *.* from recovery partition to normal / partition and it is restored as brand new, am I right?

    • Mikel
      Mikel almost 12 years
      What installation procedure are you using? If you're following the arch linux Installation Guide, I think you just need to skip the create the new file system step for your home partition.
    • Santiago Rebella
      Santiago Rebella almost 12 years
      I followed and will follow the arch installation guide in combination with the beginers guide. should i skip the 'Configure block devices, filesystems, and mountpoints'point doing only swapon /dev/sda2? so then just mount partitions and create fstab (im thinking in just copying my actual)? I will reinstall the system this weekend, i will let you know how it went, thanks PD jmathew i will try that tar -cpvjf home.tar.bz2 /home and see the size, im short of space.
  • Santiago Rebella
    Santiago Rebella almost 12 years
    thank you tripledes, the thing is that when this happened last time i made the manual installation specifying from there /home mounting point but wiped it.
  • tripledes
    tripledes almost 12 years
    If you do the archlinux manual installation, you use fdisk and mkfs for creating your own partitions and write your fstab by hand...so if you did that and wiped your partition, it was you using mkfs.
  • m4tm4t
    m4tm4t almost 12 years
    @jmathew: the -p option is ignored when creating an archive with tar; it is taken in consideration only when extracting.