I have a new 2TB SSD I want to configure as root+home, with an extra partition for a Windows VM. My current setup is:
/dev/sda (an older 120GB SSD) which currently has /boot and / via LVM:
/dev/sda1 2048 1230847 1228800 600M EFI System /dev/sda2 1230848 3327999 2097152 1G Linux filesystem /dev/sda3 3328000 234440703 231112704 110.2G Linux LVM
$ df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 7.7G 0 7.7G 0% /dev tmpfs 7.7G 214M 7.5G 3% /dev/shm tmpfs 7.7G 1.7M 7.7G 1% /run /dev/mapper/fedora_localhost--live-root 68G 27G 38G 41% / tmpfs 7.7G 87M 7.7G 2% /tmp /dev/sda2 976M 233M 677M 26% /boot /dev/sda1 599M 20M 580M 4% /boot/efi /dev/sdb1 1.9T 1.5T 372G 81% /home tmpfs 1.6G 96K 1.6G 1% /run/user/1000
/dev/sdb is an ext4 HDD with /home /dev/sdc is a Windows HDD I mostly use under QEMU/KVM though can also boot directly.
This disk will be replaced by the new and larger SSD. My first thought was to use dd to clone the 3 partitions of the old SSD onto 3 identically-sized partitions on the new one, then add extra partitions for /home (which will shrink in size after splitting off a bunch of media files) and the Windows installation. The new SSD will then replace the old one, which will be retired.
Will this work without adjusting the EFI setup or grub2? If not, what other steps are required? Clearly /etc/fstab would also need some editing but I'm comfortable with that. EFI is the kicker as I've only just started to use it and really don't know what I'm doing.
poc
On 11/28/19 9:29 AM, Patrick O'Callaghan wrote:
Will this work without adjusting the EFI setup or grub2? If not, what other steps are required? Clearly /etc/fstab would also need some editing but I'm comfortable with that. EFI is the kicker as I've only just started to use it and really don't know what I'm doing.
Since you're cloning the partitions, grub and fstab shouldn't need adjusting because by default they use the filesystem label. However, EFI has to identify the disk drive, so the boot entry will need to be changed. "efibootmgr" is the tool. "efibootmgr -v" will show you the details of the current entries. If you still have your anaconda logs from the original install, you can find the command it used to create the boot entry originally. You might be able to use it again directly, or you might need to adjust it.
On Thu, 2019-11-28 at 10:56 -0800, Samuel Sieb wrote:
On 11/28/19 9:29 AM, Patrick O'Callaghan wrote:
Will this work without adjusting the EFI setup or grub2? If not, what other steps are required? Clearly /etc/fstab would also need some editing but I'm comfortable with that. EFI is the kicker as I've only just started to use it and really don't know what I'm doing.
Since you're cloning the partitions, grub and fstab shouldn't need adjusting because by default they use the filesystem label. However, EFI has to identify the disk drive, so the boot entry will need to be changed. "efibootmgr" is the tool. "efibootmgr -v" will show you the details of the current entries. If you still have your anaconda logs from the original install, you can find the command it used to create the boot entry originally. You might be able to use it again directly, or you might need to adjust it.
Thanks. The only line that looks relevant seems to be this one (from /var/log/anaconda/journal.log):
localhost-live anaconda[2737]: program: Running in chroot '/mnt/sysroot'... efibootmgr -c -w -L Fedora -d /dev/sda -p 1 -l \EFI\fedora\shimx64.efi
which doesn't look like it needs to be changed (given that the new drive will become /dev/sda on rebooting).
poc
On 11/28/19 2:50 PM, Patrick O'Callaghan wrote:
Thanks. The only line that looks relevant seems to be this one (from /var/log/anaconda/journal.log):
localhost-live anaconda[2737]: program: Running in chroot '/mnt/sysroot'... efibootmgr -c -w -L Fedora -d /dev/sda -p 1 -l \EFI\fedora\shimx64.efi
which doesn't look like it needs to be changed (given that the new drive will become /dev/sda on rebooting).
The problem is that the BIOS does not know about /dev/sda, it has an identifier for the physical disk. You're changing that, so you will most likely need to change the EFI boot entry. Look at the "Fedora" entry in "efibootmgr -v" to see what I mean.
On Thu, 2019-11-28 at 20:15 -0800, Samuel Sieb wrote:
On 11/28/19 2:50 PM, Patrick O'Callaghan wrote:
Thanks. The only line that looks relevant seems to be this one (from /var/log/anaconda/journal.log):
localhost-live anaconda[2737]: program: Running in chroot '/mnt/sysroot'... efibootmgr -c -w -L Fedora -d /dev/sda -p 1 -l \EFI\fedora\shimx64.efi
which doesn't look like it needs to be changed (given that the new drive will become /dev/sda on rebooting).
The problem is that the BIOS does not know about /dev/sda, it has an identifier for the physical disk. You're changing that, so you will most likely need to change the EFI boot entry. Look at the "Fedora" entry in "efibootmgr -v" to see what I mean.
It currently shows:
Boot0000* Fedora HD(1,GPT,7554722f-6e12-4c21-89da-5c43790ced1e,0x800,0x12c000)/File(\EFI\fedora\shimx64.efi)
However the man page for efibootmgr only talks about disks in terms of /dev/... so I'm not clear on how to a) identify the new SSD, and b) tell the boot manager about it.
poc
On Fri, 2019-11-29 at 11:35 +0000, Patrick O'Callaghan wrote:
On Thu, 2019-11-28 at 20:15 -0800, Samuel Sieb wrote:
On 11/28/19 2:50 PM, Patrick O'Callaghan wrote:
Thanks. The only line that looks relevant seems to be this one (from /var/log/anaconda/journal.log):
localhost-live anaconda[2737]: program: Running in chroot '/mnt/sysroot'... efibootmgr -c -w -L Fedora -d /dev/sda -p 1 -l \EFI\fedora\shimx64.efi
which doesn't look like it needs to be changed (given that the new drive will become /dev/sda on rebooting).
The problem is that the BIOS does not know about /dev/sda, it has an identifier for the physical disk. You're changing that, so you will most likely need to change the EFI boot entry. Look at the "Fedora" entry in "efibootmgr -v" to see what I mean.
It currently shows:
Boot0000* Fedora HD(1,GPT,7554722f-6e12-4c21-89da-5c43790ced1e,0x800,0x12c000)/File(\EFI\fedora\shimx64.efi)
However the man page for efibootmgr only talks about disks in terms of /dev/... so I'm not clear on how to a) identify the new SSD, and b) tell the boot manager about it.
Never mind, I figured it out (I think). I just use the *current* /dev entry for the new drive and efibootmgr figures out the proper id.
poc