[clug] How to make my server robust for booting
George at Clug
Clug at goproject.info
Thu Sep 12 00:21:11 UTC 2019
When you implement your solution in the real world, will you be using
UEFI or BIOS?
Are you using hardware RAID or Software RAID ? (I am guessing
Linux Software RAID from your comments)
What size disk drives will you be using as the boot drive?
Will they be SSD or HDD?
This is how I did it once, a long time ago. I had RAID1 for boot
drives (i.e. grub, /boot and OS) and RAID 6 for data (virtual
If the two disks are /dev/sda and /dev/sdb, run both grub-install
/dev/sda and grub-install /dev/sdb. Then both drives will be able to
It is my belief that you can only [successfully] use RAID 1 for grub
boot drives. I like Bob's point about using boot order for both
drives in BIOS.
I could be wrong but if I recall you could use RAID 5/6 but then you
would need grub copied to every drive in the RAID as there is no way
to know for sure with drive will be booted from after a failure.
Sometimes I just have two non-raided drives (grub, /boot and OS), one
gets a bit old due to no security updates, but easy to manage.
(YOUR_HOSTNAME)root at grml:/# grub-install /dev/sda Installation
finished. No error reported. (YOUR_HOSTNAME)root at grml:/# grub-install
/dev/sdb Installation finished. No error reported.
(YOUR_HOSTNAME)root at grml:/# update-initramfs -k all -u
update-initramfs: Generating /boot/initrd.img-3.14-1-amd64 df:
Warning: cannot read table of mounted file systems
(YOUR_HOSTNAME)root at grml:~# update-grub Generating grub.cfg ... Found
linux image: /boot/vmlinuz-3.14-1-amd64 Found initrd image:
Your /boot partition should either not be on RAID, or else be on a
RAID1 array, with no further layers of encryption or LVM.
(Alpine's default bootloader extlinux can't handle either. Grub2 can
handle /boot being on LVM.)
The usual practice is to create a small (32--100 MB) partition for
/boot. That can be a mirrored (RAID1) volume, however this is just for
That way, when you write a new kernel or bootloader config file to
/boot, it gets written to multiple physical partitions.
During the pre-init, bootloader phase, only one of those partitions
will be used (and it will be mounted read-only).
In the end I want to have the following situation:
/dev/md0 (made up of /dev/sda1 and /dev/sdb1): /boot
On Wednesday, 11-09-2019 at 08:49 Tony Lewis via linux wrote:
> I'm rebuilding my home server, and want to make it 'robust' for boot
> purposes. For example, if a disk fails, the system can continue to
> function until I replace it.
> I am testing my ideas in VirtualBox at the moment.
> The stuff I think I've sorted are:
> * encrypted RAID1 for /
> * RAID1 for /boot
> What I'm stuck on is how to handle a failure of the drive where GRUB
> installed. I thought it might be as simple as doing grub-install
> /dev/sd[bcd] (as well as on /dev/sda) and BIOS would just find *a*
> of GRUB and be able to continue the boot process.
> It's not working in VirtualBox at least. If I let it boot unaided,
> cannot find a bootable medium (expected behaviour). If I interrupt
> with F12 and choose the second hard drive to boot from, it locks
> might be a VirtualBox thing, and so the physical server would be
> more likely I don't understand what I'm doing.
> What's the best way to architect things so that a failed hard drive
> where GRUB is installed, is easily handled?
> linux mailing list
> linux at lists.samba.org
More information about the linux