How to clean up full /boot safely?

Liam Proven lproven at gmail.com
Mon Feb 12 17:57:09 UTC 2018


On 12 February 2018 at 18:16, Colin Watson <cjwatson at ubuntu.com> wrote:

>  But if you
> claim that something flat-out doesn't work when it does - even if there
> are caveats - then I'll still point out the error.

My words were:

"Things GRUB might have problems with"

As I have emphasised before: *MIGHT*

Let me clarify with an example.

/ 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?

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.

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

Is it on both?

Can it be on both?

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?

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

I don't think it is. I could be wrong, of course.

GRUB supports this scenario, I believe. As far as what GRUB supports,
this is not problematic. It is clear cut and the answer is yes, it
works.

But the scenario in reality is significantly more complicated, as I
have explained. It is difficult to say what will happen in absolute
terms. It needs specific knowledge of the machine, the firmware and
more.

So *I* would say the answer here is at best "it might work".

And as I have explained, "it might work" is not good enough for me and
for many real life situations, so the answer in _reality_ is therefore
"no, do not do this", because although _yes_ GRUB supports it, it is
_not possible_ to say that yes this will work in all scenarios on all
hardware.

What it _is_ possible to say is:

Use a separate, non-mirrored /boot volume on a single drive. Have
arrangements to replace this if needed, have spares, have backups, but
if you need to _know_ it _will_ work, put /boot on a single unmirrored
hard disk and then _and only then_ is it possible to say "this will
work and it will boot your machine".

I have been shouted at and told off for saying "this _MIGHT_ not work"
because GRUB supports it. It doesn't matter if GRUB supports it. The
question is more complicated.

And the question here was, why use a /boot partition these days?

I have given an answer and I stand by it.

Am I wrong? Considering the additional factors I have outlined, am I wrong?






-- 
Liam Proven • Profile: https://about.me/liamproven
Email: lproven at cix.co.uk • Google Mail/Hangouts/Plus: lproven at gmail.com
Twitter/Facebook/Flickr: lproven • Skype/LinkedIn: liamproven
UK: +44 7939-087884 • ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053




More information about the ubuntu-users mailing list