Skip to contentSkip to conversation

now that i've screwed up and apparently get to start over ...

DISCUSSION David T-G 2 participants 3 messages Oct 17, 2022 – Oct 23, 2022 MD RAID

lore
Share & tools
lore

David T-G

author
#0 lore raw

Hi, all --

I have an existing system with a raw-partitioned /dev/sda (128G SSD) that I plan to convert to a mirrored boot drive. I installed /dev/sde (256G SSD) and sliced it the same way (well, with a bigger 4th slice) and set up half mirrors in each partition. I've been waiting for the opportunity to copy the sda partitions over to the new sde mirrors and then swap sda for a new 256G SSD and add the other half of each mirror.

So now I have just bought another 10T drive to add into the RAID-5 array (that's a whole separate project, of course), so I shut it all down and not only plugged in the big drive (but did nothing else with it) but also copied over each slice and figured hey, yippee, I'll reboot from the mirror and be another step forward.

Then GRUB puked all over itself and I can't get the stupid thing running at all now. I've disconnected /dev/sde, I've disconnected all USB external drives, I've disconnected all internal drives, I've swapped out /dev/sda and put /dev/sde back, and I get that GRUB can't boot from a GPT disk ... except that /dev/sda has always been that!

So now I might as well go ahead and install a fresh version into the alt-root slice in order to get GRUB working again and then figure out how to get back to the real-root original. But ... do I slice the disk and create four mirrors or do I mirror the disk and create four partitions therein? I was happy with four mirrors, but then there's the question of whether or not GRUB will work, and I don't really want to have to create another I've-lost-count partitions for /boot and /efi and whatever. I've seen so much advice both ways, much of it from 2011 and 2012, that I don't know which way to go!

My goal is to mirror two SSDs and have four

swap
real-root
alt-root
data

partitions; however I get there so that I can boot from either root works for me. Anyone have the "Simple Setup for Dummy David" instruction set?

Thanks in advance!

:-D

Signature · 3 lines
David T-G
See http://justpickone.org/davidtg/email/
See http://justpickone.org/davidtg/tofu.txt
#1 lore raw
Quoted 5 lines · David T-G

Then GRUB puked all over itself and I can't get the stupid thing running at all now. I've disconnected /dev/sde, I've disconnected all USB external drives, I've disconnected all internal drives, I've swapped out /dev/sda and put /dev/sde back, and I get that GRUB can't boot from a GPT disk ... except that /dev/sda has always been that!

GRUB can boot from GPT just fine. Assuming you are booting in EFI mode, it just has to have an EFI system partition, and be registered with the EFI firmware. You can't just copy the partitions to a new drive and remove the old drive and expect it to boot. You will need to grub-install on the new drive to register it with the EFI firmware.

author
#2 lore raw

Phillip, et al --

...and then Phillip Susi said...
%
% David T-G <[email protected]> writes:
%
% > Then GRUB puked all over itself and I can't get the stupid thing running
...
% > /dev/sda and put /dev/sde back, and I get that GRUB can't boot from a GPT % > disk ... except that /dev/sda has always been that!
%
% GRUB can boot from GPT just fine. Assuming you are booting in EFI mode, % it just has to have an EFI system partition, and be registered with the

Ah, but I'm not. I only have four partitions

jpo:~ # parted /dev/sda unit MiB p free
Model: ATA SAMSUNG MZ7LN128 (scsi)
Disk /dev/sda: 122104MiB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: pmbr_boot

Number Start End Size File system Name Flags

	  0.02MiB   1.00MiB    0.98MiB   Free Space
   1      1.00MiB   33793MiB   33792MiB  linux-swap(v1)  jpo-swap  swap
   2      33793MiB  66561MiB   32768MiB  xfs             jposuse
   3      66561MiB  99329MiB   32768MiB  xfs             jpoalt    legacy_boot
   4      99329MiB  122104MiB  22775MiB  xfs             jpo-ssd

(taken from an identical machine) and do not use that UEFI stuff that I don't know. Way simple.

% EFI firmware. You can't just copy the partitions to a new drive and % remove the old drive and expect it to boot. You will need to % grub-install on the new drive to register it with the EFI firmware.

Heck, I'd be happy to be booting from the old drive!

Thanks again & HANW

:-D

Signature · 3 lines
David T-G
See http://justpickone.org/davidtg/email/
See http://justpickone.org/davidtg/tofu.txt