image-bootstrap icon indicating copy to clipboard operation
image-bootstrap copied to clipboard

Is it possible to use image-bootstrap for EFI boot?

Open TTimo opened this issue 6 years ago • 9 comments

Can image-bootstrap be used to create EFI bootable devices?

I found https://github.com/hartwork/image-bootstrap/issues/42 which was resolved by falling back to installing non EFI grub. But the machine I'm working with only supports EFI booting.

I am trying this for Arch, working from https://wiki.archlinux.org/index.php/Installing_Arch_Linux_on_a_USB_key

TTimo avatar Feb 17 '19 16:02 TTimo

Hi!

For a quick approach using --bootloader (host-grub2-device|host-grub2-drive) you may be able to post-process the arguments passed to grub-install using a wrapper and putting that into $PATH (or extending $PATH). Would that work?

We could also discuss introduction of a new flag to make passing --target=i386-pc to grub-install conditional.

What do you think?

hartwork avatar Feb 17 '19 16:02 hartwork

I did that initially (manually: chroot'ed into the image and calling grub-install from there with target=i386-pc). But this doesn't setup for EFI booting.

I think for EFI booting we would need the partitioning to create an EFI partition on the device? Is that sufficient? Are there other operations needed before a --target=x86_64-efi would work? (I suppose that's not a image-bootstrap specific question, although it would be great to see the script enhance it's support in that area)

TTimo avatar Feb 17 '19 17:02 TTimo

Good point about the partition. Should not be rocket science but take a moment or two. Is this for one-time personal use? What is your use case context?

hartwork avatar Feb 17 '19 22:02 hartwork

This is one time for me. I think I can resize partitions from where I'm at atm and get an EFI grub installed by hand, but I figure it would be good for the script to better support EFI in general as it's the current evolution for booting.

TTimo avatar Feb 18 '19 14:02 TTimo

I agree. I tried to boot a recent Lenovo ThinkPad from USB the other and there was no way in without EFI on that USB stick. I would need to check if QEMU can be used to test booting EFI and than the code would need to do more or less what https://github.com/aguslr/multibootusb/blob/master/makeUSB.sh does. I'm in with the direction but I have a few more pressing tasks before that.

hartwork avatar Feb 18 '19 16:02 hartwork

Hi. Any progress on this?

pranaypratyush avatar Dec 02 '21 07:12 pranaypratyush

@pranaypratyush I have been able to get QEMU boot EFI and documented that process in the meantime but no progress in image-bootstrap and it's not a priority so far. What is your scenario with EFI?

hartwork avatar Dec 02 '21 13:12 hartwork

grml-debootstrap learned --vmefi:

  • https://github.com/grml/grml-debootstrap/pull/213
  • https://github.com/grml/grml-debootstrap/pull/216

Compatible with both, legacy BIOS and EFI booting including Secure Boot compatibility.

adrelanos avatar Dec 22 '23 21:12 adrelanos

@adrelanos interesting, good to know :+1:

hartwork avatar Dec 22 '23 23:12 hartwork