Is there a way to move the os to another disk but not /home?
Some years ago, I make the mistake of doing a single partition for the system (I'm using EndeavourOS). Now I have a new disk, and I want to move the OS there, but not /home, which I want to stay in the old drive. How can I do it?
Moving the OS is difficult because you would need to reinstall the bootloader which may or may not be easy depending on your skills.
keeping the OS and moving your home is much much easier. as simple as opening fstab and adding a new line entry
Even if I move the bootloader partition?
depends on if you copy over the partition table as well iirc. For this to work you'll have to have the /etc/fstab file be defined using UUIDs, not disk names. you can do this with something like:
dd if=/dev/mycurrentdrive of=/dev/newdrive bs=10Mreinstalling the bootloader isn't hard though, just make sure you know if your system is configured to boot via bios or uefi
if OP will use "dd" then they need to make sure that new disk is bigger than old disk.
Even then after the "dd" command is complete, the new disk would appear to be same size as old disk. OP would then need a disk resizing tool to reclaim the remaining disk space
In fact the new disk has the double size tham the old one. Could I use dd and then gparted to achieve this?
yes but I suggest running simulation first on a virtual machine or at least take a backup first
There is a few bytes at the beginning of the hard disk that tells the BIOS from where to load the OS.
These bytes don't belong to any particular partition.
What you want is very doable you just need to reinstall the bootloader after or else your system won't boot.
Try to find a Linux person near you to help or if you want to test for your self. Make a simulation using a virtual machine and see if you could accomplish what you want there before doing it in your real system
(First make and test backups, then) Clone the drive. Then point the OS on the new drive to /home on your old drive. Keep or remove old OS files.
Rsync -rav --exclude home / /destination