How to clean up full /boot safely?

Tom H tomh0665 at gmail.com
Mon Feb 12 19:31:48 UTC 2018


On Mon, Feb 12, 2018 at 12:57 PM, Liam Proven <lproven at gmail.com> wrote:


> / is on /dev/md1, which is a mirrored pair of drives, /dev/sda and /dev/sdb
>
> (I have zero clue what the GRUB nomenclature is, which is the sort of
> reason I don't like it. hd(0,0) and hd(1,0) or something, who knows?

It's "(mduuid/the_array_uuid_which_is_not_the_fs_uuid)" in "grub.cfg"
and when you run "set" in the grub shell. But it's "(md/1)" when you
run "ls" in the grub shell.

[ BTW, it's "(hd0,msdos1)" - or "(hd0,gpt1)" - not "hd(0,0)". It used
to be - and can probably still be - "(hd0,0)". ]


> Root is on a mirror. The /etc/grub directory is therefore on both, as
> is /boot and the kernel.
>
> GRUB, to the best of my knowledge, supports this just fine. So does
> the kernel. It's not LVM, it's not GPT, it's nothing very fancy.
>
> Must GRUB be installed to /dev/md1? I don't think that would boot
> because that's a Linux kernel device, only visible when the kernel is
> running.

You install to the component disks.

<BEGIN>
# findmnt -n /
/ /dev/md0 ext4 rw,relatime,data=ordered

# grub-probe -t drive -d /dev/md0
(mduuid/ed094b5258f2ddc765f884cd13f62c44)

[ I can't find a way to output "(md/0)" using grub-probe. ]

# grub-install /dev/md0
Installing for i386-pc platform.
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible. GRUB can only be
installed in this setup by using blocklists. However, blocklists are
UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.

# grub-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.

# grub-install /dev/sdb
Installing for i386-pc platform.
Installation finished. No error reported.

#
</END>


> So where is the boot sector? Is it on /dev/sda or /dev/sdb?
>
> Is it on both?

AFAIR, Ubuntu's d-i installs to both and Debian's d-i installed to sda
but Debian's d-i now installs to both.


> Can it be on both?

Yes.


> If it is on both, and /dev/sda fails, if the firmware is configured so
> that the secondary boot device is /dev/sdb, will GRUB automatically
> failover and boot off /dev/sdb? If so, will it bring the kernel up
> normally with a degraded RAID pair?

Yes.


> Is it possible to give a definite canonical answer to this, without
> referring to firmware versions, BIOS restrictions, motherboard
> support, etc?

Yes because it doesn't matter. Unless both sda and sdb are broken.




More information about the ubuntu-users mailing list