[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there a way to write the bootloader to multiple drives?

From: myglc2
Subject: Re: Is there a way to write the bootloader to multiple drives?
Date: Tue, 16 May 2017 23:16:07 -0400
User-agent: mu4e 0.9.18; emacs 25.2.1

On 05/16/2017 at 19:48 Ludovic Courtès writes:

> Hello,
> myglc2 <address@hidden> skribis:
>> Is there a way to have 'guix system reconfigure' write the bootloader to
>> multiple drives?
> Why would you want to do that?  (Honest question!)
> Ludo’.

When the drive with the bootloader fails (and you know it will, and at
the most embarrassing moment) the machine doesn't boot. My fantasy is
that if I could write the config as shown below, coaxing the machine
back into action will only involve reassembling the array with the good
drives. I know how to do this on Debian. I need to figure out how to do
it on GuixSD. ;-) Any advice?

You can achieve the save effect by manually replicating the bootloader
using dd. But you know that right before the drive fails you are going
to reconfig and 'guix gc' ;-) So having it in the config is better.

It would also be nice to enable optional automatic reassembly.

WDYT? - George

  (bootloader (grub-configuration (device "/dev/nvme0n1"))
  (bootloader (grub-configuration (device "/dev/sda")))
  (bootloader (grub-configuration (device "/dev/sdb")))
  (initrd (lambda (file-systems . rest) (apply base-initrd file-systems
                                               #:extra-modules '("raid1")
  (mapped-devices (list (mapped-device
                         (source '("/dev/nvme0n1p1" "/dev/sda1" "/dev/sdb1"))
                         (target "/dev/md3")
                         (type raid-device-mapping))))
  (file-systems (cons (file-system
                        (title 'device)
                        (device "/dev/md3")
                        (mount-point "/")
                        (type "ext4")
                        (dependencies mapped-devices))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]