Re: RAID + UEFI
Hi, I think we do have some customisation in the various scripts, including GRUB_EFI/10-setup, that may account for it. As our script for grub is quite custom to our use case, I'm not sure I can share it I'm afraid. But, that is where you need to start investigating. This is from vague recollection now, but I think essentially you have to make grug install directly to the individual disk devices, separately, and not try and use the raid device. Hopefully someone else has some more concise advice! Cheers, Just On Wed, 20 Sept 2023 at 10:44, Thomas Kloepfer < thomas.kloep...@iwr.uni-heidelberg.de> wrote: > Hello Justin, > > thanks for the quick answer. > > I tried to use your disk_config. And I get a a raid as expected. > But the script for settign up grup [ config/scipts/GRUP_EFI/10-setup ] > fails. > Hence I end up with a system tha can not boot. > > What I find in [ scripts.log ]: > --- > = shell: GRUB_EFI/10-setup = > ... > + echo Install grub on /dev/sda > + unshare --pid --fork --kill-child >--mount-proc chroot /target grub-install >--no-floppy --force-extra-removable /dev/sda > Installing for x86_64-efi platform. > grub-install: error: disk `md0' not found. > ++ error=1 > ... > Install grub on /dev/sdb > + unshare --pid --fork --kill-child > --mount-proc chroot /target grub-install > --no-floppy --force-extra-removable /dev/sdb > Installing for x86_64-efi platform. > grub-install: error: disk `md0' not found. > ++ error=1 > ... > done > + exit 1 > GRUB_EFI/10-setupFAILED with exit code 1. > --- > > So my question is: Have you twaked [ GRUP_EFI/10-setup ] ? > How can I fix this error? > Why is the script telling me it uses [sda] for installation bun then > trying [md0]? > > Perhaps some of the envirenment-variables might help, so I list a few: > FAI_VERSION=6.0.5 > disklist='sda sdb ' > > Regards > Thomas Kloepfer > > On 20.09.23 09:21, Justin Cattle wrote: > > Hi, > > > There's probably a few different ways to do this. Here is a fairly > generic disk_config example I created last time I was working on FAI. > I haven't used the config n a while, but it's should be some inspiration > even if it doesn't work for you as it is: > > $ cat disk_config/FAIBASE_EFI_RAID > # default EFI raid disk config > # > disk_config disk1 disklabel:gpt fstabkey:uuid align-at:1M > primary - 256M- - > primary - 256M- - - > primary - RAM:20% - - > > disk_config disk2 sameas:disk1 > > disk_config raid fstabkey:uuid > raid1 /boot/efi disk1.1,disk2.1 vfatrw > mdcreateopts="--metadata=1.0" > raid1 / disk1.2,disk2.2 ext4defaults,noatime,discard > raid1 swap disk1.3,disk2.3 swapsw > > > You can also use LVM as well on top if you like. Here is my example for > htat [ again, from last time I looked at this stuff ]: > > $ cat LVM_EFI_RAID > # default LVM EFI raid disk config > # > disk_config disk1 disklabel:gpt fstabkey:uuid align-at:1M > primary - 256M- - > primary - 1G - - > primary - 4G- - - > > disk_config disk2 sameas:disk1 > > disk_config raid fstabkey:uuid > raid1 /boot/efi disk1.1,disk2.1 vfatrw > mdcreateopts="--metadata=1.0" > raid1 /boot disk1.2,disk2.2 ext4defaults,noatime,discard > raid1 - disk1.3,disk2.3 - - > > disk_config lvm fstabkey:uuid > > vg vg md2 > vg-root / 256M- ext4defaults,noatime,discard > vg-swap swap RAM:20% swapsw > > > Hope that helps. > > Cheers, > Just > > > On Wed, 20 Sept 2023 at 08:14, Thomas Kloepfer < > thomas.kloep...@iwr.uni-heidelberg.de> wrote: > >> Hello, >> >> I am rather new to FAI. But I am impresst by this great tool. >> Especially by the documentation that commes with it. >> >> But I am suprised I do not find any working example on how to set up a >> simple RAID 1 with UEFI boot. >> >> I read all the discussions in this mailinglist (found two threads >> dealing with the problem). >> >> I am aware that RAID and UEFI do not get together well due to the fact >> that the RAID information is not available at boot-time and [grup] has >> to deal with a device [sda] rather than with a partition [md0]. Futher >> more [grup] needs a partition with partition type [vfat]. >> >> I can imaging a solution with FAI that needs special one-time treatment >> done manualy after FAI hast terminated, but this kills the aim of FAI : >> A=fully, A=automated . >> >> so my question is: >> - Can any one supply a solution that manages RAID 1 with UEFI at the >> same time? >>(I would be sadisfied with a solution where the Partition used by >> UEFI-boot is *not* on a RAID.) >> >>or >> >> - Is it realy just not so easy to get RAID and UEFI
Re: RAID + UEFI
Hello Justin, thanks for the quick answer. I tried to use your disk_config. And I get a a raid as expected. But the script for settign up grup [ config/scipts/GRUP_EFI/10-setup ] fails. Hence I end up with a system tha can not boot. What I find in [ scripts.log ]: --- = shell: GRUB_EFI/10-setup = ... + echo Install grub on /dev/sda + unshare --pid --fork --kill-child --mount-proc chroot /target grub-install --no-floppy --force-extra-removable /dev/sda Installing for x86_64-efi platform. grub-install: error: disk `md0' not found. ++ error=1 ... Install grub on /dev/sdb + unshare --pid --fork --kill-child --mount-proc chroot /target grub-install --no-floppy --force-extra-removable /dev/sdb Installing for x86_64-efi platform. grub-install: error: disk `md0' not found. ++ error=1 ... done + exit 1 GRUB_EFI/10-setup FAILED with exit code 1. --- So my question is: Have you twaked [ GRUP_EFI/10-setup ] ? How can I fix this error? Why is the script telling me it uses [sda] for installation bun then trying [md0]? Perhaps some of the envirenment-variables might help, so I list a few: FAI_VERSION=6.0.5 disklist='sda sdb ' Regards Thomas Kloepfer On 20.09.23 09:21, Justin Cattle wrote: Hi, There's probably a few different ways to do this. Here is a fairly generic disk_config example I created last time I was working on FAI. I haven't used the config n a while, but it's should be some inspiration even if it doesn't work for you as it is: $ cat disk_config/FAIBASE_EFI_RAID # default EFI raid disk config # disk_config disk1 disklabel:gpt fstabkey:uuid align-at:1M primary - 256M - - primary - 256M- - - primary - RAM:20% - - disk_config disk2 sameas:disk1 disk_config raid fstabkey:uuid raid1 /boot/efi disk1.1,disk2.1 vfat rw mdcreateopts="--metadata=1.0" raid1 / disk1.2,disk2.2 ext4 defaults,noatime,discard raid1 swap disk1.3,disk2.3 swap sw You can also use LVM as well on top if you like. Here is my example for htat [ again, from last time I looked at this stuff ]: $ cat LVM_EFI_RAID # default LVM EFI raid disk config # disk_config disk1 disklabel:gpt fstabkey:uuid align-at:1M primary - 256M - - primary - 1G - - primary - 4G- - - disk_config disk2 sameas:disk1 disk_config raid fstabkey:uuid raid1 /boot/efi disk1.1,disk2.1 vfat rw mdcreateopts="--metadata=1.0" raid1 /boot disk1.2,disk2.2 ext4 defaults,noatime,discard raid1 - disk1.3,disk2.3 - - disk_config lvm fstabkey:uuid vg vg md2 vg-root / 256M- ext4 defaults,noatime,discard vg-swap swap RAM:20% swap sw Hope that helps. Cheers, Just On Wed, 20 Sept 2023 at 08:14, Thomas Kloepfer wrote: Hello, I am rather new to FAI. But I am impresst by this great tool. Especially by the documentation that commes with it. But I am suprised I do not find any working example on how to set up a simple RAID 1 with UEFI boot. I read all the discussions in this mailinglist (found two threads dealing with the problem). I am aware that RAID and UEFI do not get together well due to the fact that the RAID information is not available at boot-time and [grup] has to deal with a device [sda] rather than with a partition [md0]. Futher more [grup] needs a partition with partition type [vfat]. I can imaging a solution with FAI that needs special one-time treatment done manualy after FAI hast terminated, but this kills the aim of FAI : A=fully, A=automated . so my question is: - Can any one supply a solution that manages RAID 1 with UEFI at the same time? (I would be sadisfied with a solution where the Partition used by UEFI-boot is *not* on a RAID.) or - Is it realy just not so easy to get RAID and UEFI to work together because FAI was established at a time where there was no UEFI boot. Hence the stucture of FAI is not intended to solve this in the first pace. Attemts to solve this will result in rather ugly workarounds? I'd appreciate any helpfull reply. And thanks again for this great tool. Thomas Kloepfer Notice: This email is confidential and may contain copyright material of members of the Ocado Group. Opinions and views expressed in this message may not necessarily reflect the opinions and views of the members of the Ocado Group. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses. References to the "Ocado Group" are to Ocado Group
Re: RAID + UEFI
On Wed, 2023-09-20 at 09:52 +0200, Diego Zuccato wrote: > TL;DR: IMO having /boot/uefi on (sw) RAID1 is not worth the headaches. > Long version follows. > > That's quite normal. You should use older RAID format that places > metadata at the end of the partition instead of the newer that places it > at the beginning. And even so it's risky, since one of the partitions > could get modified by other systems (the BIOS, for example) that aren't > RAID-aware (that's also one of the reasons that lead to the newer > format...). Yeah, I tried the older RAID formats, didn't work. ;) What I have considered is having a hook that copies /boot/efi from the "primary" drive to the "secondary". But I'm not sure how safe that is in reality. > Since you're using FAI, it's probably faster to just completely > reinstall the system (possibly preserving data partition(s)) than > risking RAID desync and related headaches. To keep the disk partitions > aligned, you could use the "mirror" space for an extra swap partition :) Heh, maybe. :) We're just going through and rebuilding a bunch of servers now. Better than doing a dist-upgrade. -- Andrew Ruthven, Wellington, New Zealand and...@etc.gen.nz | Catalyst Cloud: | This space intentionally left blank https://catalystcloud.nz |
Re: RAID + UEFI
TL;DR: IMO having /boot/uefi on (sw) RAID1 is not worth the headaches. Long version follows. That's quite normal. You should use older RAID format that places metadata at the end of the partition instead of the newer that places it at the beginning. And even so it's risky, since one of the partitions could get modified by other systems (the BIOS, for example) that aren't RAID-aware (that's also one of the reasons that lead to the newer format...). Since you're using FAI, it's probably faster to just completely reinstall the system (possibly preserving data partition(s)) than risking RAID desync and related headaches. To keep the disk partitions aligned, you could use the "mirror" space for an extra swap partition :) Diego Il 20/09/2023 09:26, Andrew Ruthven ha scritto: Hey, Just a note that I've found that some hardware doesn't like /boot/efi being on RAID1. Which is rather disappointing. But otherwise, the examples that Justin provided look very similar to what I've succesfully used (although sometimes without the RAID1 for /boot/efi!) Cheers, Andrew -- Andrew Ruthven, Wellington, New Zealand and...@etc.gen.nz | Catalyst Cloud: | This space intentionally left blank https://catalystcloud.nz | -- Diego Zuccato DIFA - Dip. di Fisica e Astronomia Servizi Informatici Alma Mater Studiorum - Università di Bologna V.le Berti-Pichat 6/2 - 40127 Bologna - Italy tel.: +39 051 20 95786
Re: RAID + UEFI
Hey, Just a note that I've found that some hardware doesn't like /boot/efi being on RAID1. Which is rather disappointing. But otherwise, the examples that Justin provided look very similar to what I've succesfully used (although sometimes without the RAID1 for /boot/efi!) Cheers, Andrew -- Andrew Ruthven, Wellington, New Zealand and...@etc.gen.nz | Catalyst Cloud: | This space intentionally left blank https://catalystcloud.nz |
Re: RAID + UEFI
Hi, There's probably a few different ways to do this. Here is a fairly generic disk_config example I created last time I was working on FAI. I haven't used the config n a while, but it's should be some inspiration even if it doesn't work for you as it is: $ cat disk_config/FAIBASE_EFI_RAID # default EFI raid disk config # disk_config disk1 disklabel:gpt fstabkey:uuid align-at:1M primary - 256M- - primary - 256M- - - primary - RAM:20% - - disk_config disk2 sameas:disk1 disk_config raid fstabkey:uuid raid1 /boot/efi disk1.1,disk2.1 vfatrw mdcreateopts="--metadata=1.0" raid1 / disk1.2,disk2.2 ext4defaults,noatime,discard raid1 swap disk1.3,disk2.3 swapsw You can also use LVM as well on top if you like. Here is my example for htat [ again, from last time I looked at this stuff ]: $ cat LVM_EFI_RAID # default LVM EFI raid disk config # disk_config disk1 disklabel:gpt fstabkey:uuid align-at:1M primary - 256M- - primary - 1G - - primary - 4G- - - disk_config disk2 sameas:disk1 disk_config raid fstabkey:uuid raid1 /boot/efi disk1.1,disk2.1 vfatrw mdcreateopts="--metadata=1.0" raid1 /boot disk1.2,disk2.2 ext4defaults,noatime,discard raid1 - disk1.3,disk2.3 - - disk_config lvm fstabkey:uuid vg vg md2 vg-root / 256M- ext4defaults,noatime,discard vg-swap swap RAM:20% swapsw Hope that helps. Cheers, Just On Wed, 20 Sept 2023 at 08:14, Thomas Kloepfer < thomas.kloep...@iwr.uni-heidelberg.de> wrote: > Hello, > > I am rather new to FAI. But I am impresst by this great tool. > Especially by the documentation that commes with it. > > But I am suprised I do not find any working example on how to set up a > simple RAID 1 with UEFI boot. > > I read all the discussions in this mailinglist (found two threads > dealing with the problem). > > I am aware that RAID and UEFI do not get together well due to the fact > that the RAID information is not available at boot-time and [grup] has > to deal with a device [sda] rather than with a partition [md0]. Futher > more [grup] needs a partition with partition type [vfat]. > > I can imaging a solution with FAI that needs special one-time treatment > done manualy after FAI hast terminated, but this kills the aim of FAI : > A=fully, A=automated . > > so my question is: > - Can any one supply a solution that manages RAID 1 with UEFI at the > same time? >(I would be sadisfied with a solution where the Partition used by > UEFI-boot is *not* on a RAID.) > >or > > - Is it realy just not so easy to get RAID and UEFI to work together > because FAI was established at a time where there was no UEFI boot. > Hence the stucture of FAI is not intended to solve this in the first > pace. Attemts to solve this will result in rather ugly workarounds? > > I'd appreciate any helpfull reply. > And thanks again for this great tool. > > Thomas Kloepfer > -- Notice: This email is confidential and may contain copyright material of members of the Ocado Group. Opinions and views expressed in this message may not necessarily reflect the opinions and views of the members of the Ocado Group. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses. References to the "Ocado Group" are to Ocado Group plc (registered in England and Wales with number 7098618) and its subsidiary undertakings (as that expression is defined in the Companies Act 2006) from time to time. The registered office of Ocado Group plc is Buildings One & Two, Trident Place, Mosquito Way, Hatfield, Hertfordshire, AL10 9UL.
RAID + UEFI
Hello, I am rather new to FAI. But I am impresst by this great tool. Especially by the documentation that commes with it. But I am suprised I do not find any working example on how to set up a simple RAID 1 with UEFI boot. I read all the discussions in this mailinglist (found two threads dealing with the problem). I am aware that RAID and UEFI do not get together well due to the fact that the RAID information is not available at boot-time and [grup] has to deal with a device [sda] rather than with a partition [md0]. Futher more [grup] needs a partition with partition type [vfat]. I can imaging a solution with FAI that needs special one-time treatment done manualy after FAI hast terminated, but this kills the aim of FAI : A=fully, A=automated . so my question is: - Can any one supply a solution that manages RAID 1 with UEFI at the same time? (I would be sadisfied with a solution where the Partition used by UEFI-boot is *not* on a RAID.) or - Is it realy just not so easy to get RAID and UEFI to work together because FAI was established at a time where there was no UEFI boot. Hence the stucture of FAI is not intended to solve this in the first pace. Attemts to solve this will result in rather ugly workarounds? I'd appreciate any helpfull reply. And thanks again for this great tool. Thomas Kloepfer