On 2020-01-13 13:41 -0700, Alan Feuerbacher wrote:
> I'm building the LFS systemd development version, and having some 
> difficulty deciding how to configure some UEFI things.
> I'm using GPT partitions and LVM (Logical Volume Management).

Using LVM for root FS would require an initramfs:


/* snip */

> I've had trouble with the "efivarfs" stuff in builds years ago. In 
> particular, is the line in /etc/fstab necessary or not? I think it is 
> necessary in my system, partly because efibootmgr (running in the chroot 
> environment) gives an error complaining about "efivars not defined" 
> without it. But when I mount an efi directory like so (the stuff below 
> is all run from the host system, not in the chroot environment):
> mkdir -pv /sys/firmware/efi/efivars
> mount -t efivars efivars /sys/firmware/efi/efivars
> efibootmgr runs ok and seems to give reasonable output.

Old kernels have /sys/firmware/efi/efivars as a part of sysfs.  In newer kernel
builds firmware/efi/efivars is an empty directory in sysfs and efivarfs should
be mounted here.  The old way is CONFIG_EFI_VARS and the new way is
CONFIG_EFIVAR_FS, in kconfig.  We're using the latter, in the hint:

>      ## CONFIG_EFI_VARS is not set
>        Location:
>          -> Firmware Drivers
>            -> EFI (Extensible Firmware Interface) Support
>              < > EFI Variable Support via sysfs
>              [*] Export efi runtime maps to sysfs
>      ## CONFIG_EFIVAR_FS=y/m
>         Location:
>           -> File systems
>             -> Pseudo filesystems
>               [*] EFI Variable filesystem

/* snip */

>      menuentry "GNU/Linux, Linux vmlinuz-5.4.8-lfs-20200109-systemd"  {
> #      linux   /vmlinuz-5.4.8-lfs-20200109-systemd root=/dev/sdb4 ro
>        linux   /vmlinuz-5.4.8-lfs-20200109-systemd 
> root=35e97922-0128-453a-afbf-3f0dd75d98b2 ro
>      }

/* snip */

> The last Boot entry eventually puts out an error message:
> error: disk '3ae2214c-3cf6-4324-80cf-a01741ccbccc' not found

Using UUID as the value of "root" in kernel command line would require an
initramfs.  So in LFS book we just use root=/dev/sd[a-z][1-9].
Xi Ruoyao <xry...@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University

FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?


Reply via email to