Curious question, is it possible to switch to another distro while keeping your home directory if you have the partitions on separate disks? Currently I am running fedora and want to change to Manjaro or Arch. I have my / swap bios boot on a SSD while my home is on a separate hard drive. Is it simple as just installing the new distro on the SSD while leaving the hard drive alone since it is just a home partition?
Linux – How to Switch Distros While Keeping /home
installationlinuxpartitioning
Related Solutions
You can, but it's not a great idea.
In GRUB, what you would do is specify different kernel and initrd
files for each distribution installed on the system.
However, the boot configuration for one distro may conflict with the configuration for the other distro(s), depending on how each distro sets its boot configuration and names its files in /boot
. This could lead to a messed-up configuration and potentially leave one or more distros unbootable. Special care should be taken when updating the kernel or changing boot settings in any of the distros. If there are no conflicts, however, you should be able to boot both operating systems without issues.
Since you have copied all the required files to boot/efi/EFI/Microsoft/Boot
, you need to rebuild windows loader configuration. You will need a windows bootable usb or dvd (64 bit will be preferable).
1 : Boot from your bootable medium. Make sure that you are booting in UEFI mode.
2 : At the first screen (where it asks you to choose language and keyboard), press Shift + F10
. This will give you a command prompt.
3 : Type diskpart
and then list disk
(to list all available disks). Select appropriate hard drive by typing select disk #
.
4 : Now type list partition
and make sure that there is a partition of type system
(the efi partition). Select this partition by typing select partition #
and assign a temporary drive letter to it, say G
by typing assign letter=G
.
5 : Just to make sure that drive letter is correctly assigned, type list vol
. You should see a volume with drive letter (Ltr) as G
& file system (Fs) as FAT32
6 : Close diskpart
by typing exit. Make sure that you are in X:\Sources
.
7 : Type cd /d G:\EFI\Microsoft\Boot\
. Now run these commands one by one.
bootrec /scanos bootrec /fixmbr bootrec /fixboot bootrec /rebuildbcd bcdboot C:\Windows /l en-us /s G: /f ALL
8 : Close the command prompt and restart the system. You should now be booting into windows.
9 : Of course you may not or don't have the grub menu now. But installing grub is far more easy. Follow any one of these links for more info.
EDIT - Make sure that you remove the drive letter G assigned to efi partition as soon as possible to keep it from showing up in My Computer.
Best Answer
Yes. Separate disks or a partition on the same disk, if your
/home
data is stored on some form of other partition from/
then it is mostly a matter of replacing the OS and mounting the/home
partition.There are some minor qualifiers. If program versions are significantly different, then you might want to remove that program's configuration directory (saving a copy for reference, maybe) and starting the program configuration-less since the config version differences may be incompatible.
The only other potential pitfall is filesystem support. Most kernels are likely to have support for mounting most Linux-native filesystems, but the filesystem tools may not be installed by default during the initial install phase. So, you may have to install them after the first boot into the new distro. That first boot after install may appear to hang, trying to do an
fsck
of the partition, and you may have to choose to skip the filesystem check, then install the filesystem's tools to gain fsck for that filesystem type. This is typically an easy fix if it is a problem initially.