[lfs-dev] grub-2.02~beta2

Craig Magee psybertao at gmail.com
Fri Oct 3 13:08:47 PDT 2014

On 3 October 2014 22:10, Mattias Schlenker <ms at mattiasschlenker.de> wrote:

> On UEFI you could do the same: Add LFS to an existing GRUB. On the other
> hand you could add an GRUBX64.EFI as LFSX64.EFI to the list of UEFI
> bootloaders via efibootmgr. On a fresh machine with just LFS and no other
> systems you would probably use the default /EFI/BOOT/BOOTX64.EFI.
> In my opinion this is to much complexity. Thus I would recommend not
> creating partitions for LFS, but in any case use a separate drive. This
> might even be a 32GB USB thumb drive (should cost less than 15€), do a
> clean install (thus not thinking about dual boot configurations).

That is what I did recently.  I built 64-bit LFS in a folder on my
fileserver (a Core Duo running Debian stable), then copied it to a USB
stick.  I created two GPT partitions, one FAT32, one EXT2.  By compiling
the kernel with a built-in command of root=PARTUUUID=(Id of EXT2 partition)
and placing it in /boot/BOOT/BOOTX64.EFI I now have a USB stick that boots
on my Asus laptop and Mac by bringing up the boot options menu.
There's no specific reason to use GPT.  My goal is to create a hybrid table
I can install GRUB2 to with efiemu to see if I can get the stick to boot on
older non-GPT aware BIOS systems.  I don't know if that's a realistic goal,
the fun part is finding out!
I find EFI to be okay for booting my system with as EFI entries can pass
arguments to the kernel and boot it directly without GRUB.  I don't use
Windows so don't have any issues with it.  GPT seems to be the inevitable
future though, and is pretty darn neat.

There's no need to have the filesystem on the USB stick (4GB was enough for
me to have base LFS, kernel archive, kernel source folder, and build the
kernel in).  Just a FAT partition with the kernel, set to boot from any
partition specified in the kernel, would be possible.
But for that matter, could GRUB2 EFI be the only file on a USB stick and
used to boot LFS from a harddrive partition?  It would be less frustrating
than requiring a pre-configured kernel and much more flexible.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20141004/999ab3cd/attachment.html>

More information about the lfs-dev mailing list