Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #181036

Re: UEFI + Raid

From Sam Smith <debian@net153.net>
Newsgroups linux.debian.user
Subject Re: UEFI + Raid
Date 2017-05-16 19:20 +0200
Message-ID <tHOiB-8rM-7@gated-at.bofh.it> (permalink)
References <tF0Jj-2c4-1@gated-at.bofh.it> <tFm77-863-3@gated-at.bofh.it> <tFIKm-6A2-3@gated-at.bofh.it> <tFOPL-28n-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 05/11/2017 12:21 AM, Pascal Hambourg wrote:
> Le 11/05/2017 à 00:53, Sam Smith a écrit :
>> On 05/09/2017 05:44 PM, Pascal Hambourg wrote:
>>>
>>> Or use grub-install with --removable and --efi-directory for each disk.
>>> Or use grub-install with --efi-directory and --bootloader-id to install
>>> a copy of GRUB wherever you want and add an EFI boot entry for it.
> (...)
>> I tried to use "grub-install -v  --target=x86_64-efi
>> --bootloader-id=grub /dev/sdb"
>>
>> But as far as I could tell everything was installed to the first disk
>> still (sda) and /boot/efi/EFI/ then had two entries, the old 'debian'
>> one and then new 'grub' one.
>
> With EFI targets, grub-install ignores the specified device, because it
> is irrelevant. This i why I told to use --efi-directory to indicate
> which EFI partition (mounted on the specified directory instead of
> /boot/efi) to install the GRUB core image on.
>
>>> dd if=/dev/sda1 of=/dev/sdb1
>>> efibootmgr -c -d /dev/sdb -p 1 -w -L 'debian backup' -l
>> '\EFI\debian\grubx64.efi'
>>
>> And now "efibootmgr -v" shows:
>>
>>> Boot000E* debian backup
>> HD(1,GPT,96aa190b-b6c0-4753-ab6f-171ccc37b745,0x800,0x79800)/File(\EFI\debian\grubx64.efi)
>>
>>
>>> Boot000F* debian
>> HD(1,GPT,3ec825d3-e2f7-4491-b4a5-321032b0ab8c,0x800,0x79800)/File(\EFI\debian\grubx64.efi)
>>
>
> Beware that using dd clones the partition, including the UUID and label.
> So both the original and cloned partition have the same UUID, which will
> confuse libblkid and result in either being mounted on /boot/efi.
>
>> I guess that will work, though I haven't rebooted yet. What I find weird
>> is that grub in legacy mode will install to all hard drives in the
>> system, or at least it would prompt you for what hard drives you wanted
>> it to be installed to. Why can't grub with efi just automatically do
>> that same?
>
> Because grub-install works quite differently on EFI targets. It does not
> install on a device but on an EFI system partition mount point. Also, it
> requires to specify explicit IDs for multiple copies. Also, whhen using
> the default ID ("debian"), it deletes any existing EFI boot entry whose
> name contains "debian" (case insensitive IIRC).
>




Ah, this was the info I was missing. Didn't know the partition had to be 
mounted. I've used this now:
grub-install -v  --target=x86_64-efi  --bootloader-id=debian2 
--efi-directory=/mnt/efi

and I think all is well.


Regards,

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

UEFI + Raid Sam Smith <debian@net153.net> - 2017-05-09 02:00 +0200
  Re: UEFI + Raid Steve McIntyre <steve@einval.com> - 2017-05-09 14:40 +0200
  Re: UEFI + Raid Pascal Hambourg <pascal@plouf.fr.eu.org> - 2017-05-10 00:50 +0200
    Re: UEFI + Raid Sam Smith <debian@net153.net> - 2017-05-11 01:00 +0200
      Re: UEFI + Raid Pascal Hambourg <pascal@plouf.fr.eu.org> - 2017-05-11 07:30 +0200
        Re: UEFI + Raid Sam Smith <debian@net153.net> - 2017-05-16 19:20 +0200
          Re: UEFI + Raid Pascal Hambourg <pascal@plouf.fr.eu.org> - 2017-05-16 19:50 +0200
          Re: UEFI + Raid Pascal Hambourg <pascal@plouf.fr.eu.org> - 2017-05-16 19:50 +0200
            Re: UEFI + Raid Sam Smith <debian@net153.net> - 2017-05-17 20:10 +0200
              Re: UEFI + Raid Pascal Hambourg <pascal@plouf.fr.eu.org> - 2017-05-17 20:30 +0200

csiph-web