In short: I have two physical hard disks (both SSDs) for my laptop. Both have several Linux distros installed. Both were installed when the respective disk was sitting on the laptop’s main SATA port, i.e. both were /dev/sda at the time of installation. I now want to put one of the disks into an external enclosure and have both running at the same time, making the second disk /dev/sdb (or any other). What steps would it take to get everything (the Linux OSs themselves, the GRUB2 bootings) work fine under all circumstances?
Long write-up:
Motivation behind having two physical hard disks:
One is for “real production”, i.e. it is updated thoroughly, has all SSD life-saving measures in place, and it holds all my precious data. The other hard disk is for “testing” purposes, i.e. try a new Kernel or Plasma version, try a program first here, evaluate other Linux distros etc. Yes, this does sound like it’s calling for VirtualBox with several Virtual Machines. However, I decided to try the separate-hard-disk approach since (1) a virtual machine is never the same as a physical one (graphics, audio, some packages maybe working differently), (2) the virtual machines would have to reside on the second hard disk and not on the “real” one for HD space reasons, and (3) laptop performance would be compromised a lot because of reason 2 and because of getting only half of the laptop resources (CPUs, RAM).
What I did up to now: Let’s call my two physical hard disks PH1 (the “real” thing) and PH2 (the “testing ground”):
[ul]
[li]PH1 is UEFI-booted and GPT-partitioned. It has Tumbleweed / Leap 42.2 / Linux Mint 18.1 on it across a total of seven partitions (root and home x3, joint swap). Its eighths partition holds my data. Of course, there is also an EFI partition holding all EFI boot stuff from GRUB2. When PH1 was installed, it was sitting on the laptop’s internal SATA port (6GB/s) as /dev/sda. [/li][li]PH2 is BIOS-booted and also GPT-partitioned. It has a total of six Linux distros (each with separate root and home) on it, plus a joint swap. It has a BIOS boot partition, but the GRUB2 bootloader stub is installed in the disk’s MBR. When installing PH2, it was sitting on the same internal SATA port, making it /dev/sda. [/li][/ul]
Both disks boot fine, and all Linux systems run fine.
What I want to do now:
[ul]
[li]I want to put PH2 into an external enclosure with eSATA 3GB/s connection type (takes half of the disk speed away, but seems faster and more reliable than USB 3.0). [/li][li]And PH1 shall go back into the laptop’s internal SATA port. [/li][li]I want to operate PH1 in the same manner as before, including OS and GRUB2 updates.[/li][LIST]
[li]This would work right away, and it would not require any changes if PH2 is removed during such updates. [/li][li]In case PH2 were connected during updates, I think I would have to insert the line[/li]```
GRUB_OS_PROBER_SKIP_LIST=“FSUUID1@/dev/sdb2 FSUUID2@/dev/sdb3 etc”
in each of the
/etc/default/grub
files of each operating system on PH1 in order to make the GRUB2 OS Prober ignore all operating systems on PH2 during any GRUB update from PH1 OSs, since I want the GRUB2 boot menu to show me only PH1 OSs when booting from PH1.
[li]One final step would be required: Update GRUB2 from within the "master" operating system on PH1, which happens to be Tumbleweed. [/li][/ul]
[li]The harder task is to prepare and run PH2 from the external enclosure, i.e. as /dev/sdb if there are no USB sticks or other media listed in front of it. [b]I am seeking community advice on what and how to do this in the best way possible.[/b][/li][ul]
[li]Of course, an appropriate [/li]```
GRUB_OS_PROBER_SKIP_LIST="FSUUID1@/dev/sda2 etc"
would have to be put into all
/etc/default/grub
files of each OS on PH2.
[li]What else needs to be done? Maybe modify device.map, fstab ? [/li][li]Would a grub update that is run from an OS on PH2 know that it should touch only PH2 which would be /dev/sdb now instead of /dev/sda at the time of installing PH2 ??? [/li][li]Would any Linux OS on PH2 know under all circumstances that the /dev/sda (which was PH2 at the time of installation) no longer is /dev/sda now, but /dev/sdb ? Any known hard-wired dependencies on /dev/sdX settings ??? [/li][li]I suppose my laptop would be able to first boot from the eSATA external disk when the laptop BIOS boot order calls it first, even when the eSATA is BIOS-booted and the internal SATA is UEFI-booted. Remark: This laptop doesn’t have an eSATA UEFI boot option, just eSATA BIOS; but it has both BIOS and UEFI boot modes for the internal hard disk. [/li][/ul]
[/LIST]
Please, I am seeking all expert advice on what to do for making my PH2 run properly from the external eSATA port as /dev/sdb or sdc. “Run properly” meaning (1) run the Linux OSs properly, (2) do all updates (in particular, Kernels and GRUB2 configs) properly, and (3) don’t touch anything on PH1 except when told explicitly to do so. This is what I mean by swapping physical hard disks (sda <-> sdb). I didn’t find much convincing advice in the various fora yet; most people look into transferring a system from one disk to another.
If you were to advise seriously to forget this idea of having two separate hard disks, I would ruefully turn to Virtual Machines (cf. above). Or I would keep my “real” PH1 only, since as of now I think Tumbleweed is the best KDE/Plasma implementation, better than Kubuntu, Fedora KDE, CentOS, Linux Mint KDE… But having a testing and play ground would be really nice…
Thanks a lot in advance.