unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Is there a way to write the bootloader to multiple drives?
@ 2017-05-16 14:23 myglc2
  2017-05-16 19:48 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: myglc2 @ 2017-05-16 14:23 UTC (permalink / raw)
  To: help-guix

I have a headless GuixSD server w/raided system drive ...

(operating-system
  (host-name "g1")
  (timezone "America/New_York")
  (locale "en_US.utf8")
  ;; RAID1 root using 1 NVMe SSD + 2 HDs
  (bootloader (grub-configuration (device "/dev/nvme0n1")))
  (initrd (lambda (file-systems . rest) (apply base-initrd file-systems
					       #:extra-modules '("raid1")
					       rest)))
  (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))
		      %base-file-systems))

It works great, but, when the bootloader device is lost, the system
won't boot :-( I looked at the doc and Mathieu Othacehe's current patch
-- (Re: bug#26339: [PATCH] doc: Adapt to multiple bootloader support) --
which doesn't seem to address this question, so I am wondering ...

Is there a way to have 'guix system reconfigure' write the bootloader to
multiple drives?

TIA - George

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is there a way to write the bootloader to multiple drives?
  2017-05-16 14:23 Is there a way to write the bootloader to multiple drives? myglc2
@ 2017-05-16 19:48 ` Ludovic Courtès
  2017-05-17  3:16   ` myglc2
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2017-05-16 19:48 UTC (permalink / raw)
  To: myglc2; +Cc: help-guix

Hello,

myglc2 <myglc2@gmail.com> 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’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is there a way to write the bootloader to multiple drives?
  2017-05-16 19:48 ` Ludovic Courtès
@ 2017-05-17  3:16   ` myglc2
  0 siblings, 0 replies; 3+ messages in thread
From: myglc2 @ 2017-05-17  3:16 UTC (permalink / raw)
  To: help-guix


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

> Hello,
>
> myglc2 <myglc2@gmail.com> 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")
					       rest)))
  (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))
		      %base-file-systems))

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-17  3:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-16 14:23 Is there a way to write the bootloader to multiple drives? myglc2
2017-05-16 19:48 ` Ludovic Courtès
2017-05-17  3:16   ` myglc2

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).