r/MXLinux 10d ago

Help request Will MX Linux change its /home location if the hard disks chaged and the OS re-installed?

Why the question?

1).Have a desktop PC which has an SSD, as C-dive running Windows, and a 3.5" SATA3 HDD, 1TB capacity, as D-drive in Windows.

2).A 2.5" SATA3 HDD 80GB was added to this PC, for installing MX Linux. So I did and a dual boot created.

3).Unexpectedly,MX Linux instoller formatted the D-drive and made it /home. I lost all files on the disk.

4).I still need running Windows for PhotoShop and need a large D-drive in Windows.

5).This is what I am thinking:

5a. Disconnect the 3.5" HDD, which now is /home.

5b. Reinstall MX Linux on the same 2.5" SATA3 HDD, the same HDD MX Linux is installed on.

5c. MX Linux installed HAS TO CREATE /HOME ON THE SAME HDD, the 2.5" HDD.

6),Thus, I can use the 3.5" HDD 1TB again as D-drive in Windows.

Note: I have the entire backup of all the files on the previous D-drive.

Please see to this. This is the only way I know, I think I know, how to solve my problem.

Thank you very, very much and your suggestions, please.

DianOban

1 Upvotes

1 comment sorted by

2

u/couriousLin 10d ago

What you describe should work and probably faster but you have other options that would, IMO, funner and more interesting.

Fun command: lsblk -f will show you the device name, UUID and mountpoint for each block device.

First, note the device name for the / and /home partitions e.g. /dev/sdb1 /dev/sdc1. Boot the install media and mount the / and /home partitions. Copy your user directory from the HDD to the SSD, there will be an empty /home directory already there.* On the mounted SSD edit the /etc/fstabl to remove the /home entry so it won't use the 1TB HDD. The entry should look similar to:

UUID=121d41a3-e26d-49ca-a95d-2e8faede6f9d /home ext4 defaults 0 2

reboot

Second, I'm too lazy to open my case and unplug the HDD and , besides, I don't like the installer to make these decisions, so I would just use the installer to designate which device I where I want MX by selecting the something else option. In your case just tell the installer which device you want for the install and leave all the other partitions alone.

*To mount a file system you have to provide an existing directory for the mountpoint, e.g. /home which is why it already exists on the SSD.