From mboxrd@z Thu Jan 1 00:00:00 1970 From: myglc2 Subject: Re: Is there a way to write the bootloader to multiple drives? Date: Tue, 16 May 2017 23:16:07 -0400 Message-ID: <86efvoi360.fsf@gmail.com> References: <867f1ganib.fsf@gmail.com> <877f1g7fcr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dApRc-0007KY-CF for help-guix@gnu.org; Tue, 16 May 2017 23:16:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dApRZ-0004FB-78 for help-guix@gnu.org; Tue, 16 May 2017 23:16:12 -0400 Received: from mail-qk0-x230.google.com ([2607:f8b0:400d:c09::230]:35313) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dApRZ-0004F5-2s for help-guix@gnu.org; Tue, 16 May 2017 23:16:09 -0400 Received: by mail-qk0-x230.google.com with SMTP id a72so123276qkj.2 for ; Tue, 16 May 2017 20:16:09 -0700 (PDT) Received: from g1 (c-73-167-118-254.hsd1.ma.comcast.net. [73.167.118.254]) by smtp.gmail.com with ESMTPSA id g66sm529557qkb.55.2017.05.16.20.16.07 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 May 2017 20:16:07 -0700 (PDT) In-reply-to: <877f1g7fcr.fsf@gnu.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: help-guix On 05/16/2017 at 19:48 Ludovic Courtès writes: > Hello, > > myglc2 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))