Discussion:
[lfs-support] EFI grub.cfg
spiky
2018-04-08 12:40:11 UTC
Permalink
As efi is now being used more Would it help to put some sort of EFI
grub.cfg example on the grub setup page?
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
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 thin
Xi Ruoyao
2018-04-08 12:56:14 UTC
Permalink
Post by spiky
As efi is now being used more Would it help to put some sort of EFI
grub.cfg example on the grub setup page?
LFS book won't have such example, because EFI needs additional
packages.

Follow <http://linuxfromscratch.org/hints/downloads/files/lfs-uefi-20170207.txt>
to install the packages and create grub.cfg.
--
Xi Ruoyao <***@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
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?

http://en.wikipedia.org/wiki/Posting_sty
niuneilneo
2018-04-08 13:04:42 UTC
Permalink
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
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?

http://en.wikipedia.org/wiki/Posting_style
Xi Ruoyao
2018-04-08 13:33:50 UTC
Permalink
No, this is not provided by LFS book. The hints are written by fans.
1. The efivars version in this guilde is 30, and not working for my VirualBox pc. I use version efivars 34.
I'm using efivars 31. I just gone to efivars homepage and got the
latest version when I was building LFS.
2. The installation guide of popt in the UEFI guide is also not working for my env, so I have to follow the guide in
the BLFS book section for popt installation.
Yes, my efivars-31 links to shared libpopt. Static libpopt is not
necessary and we should use BLFS guide.
3. The grub.cfg setting is a disaster for my env. Because the VB pc recognize my hard disk as hd1 instead of hd0. And
the vmlinuz image should put to the root folder of /boot (/dev/sda2 in my PC), and the /boot/vmlinuz is never working
for my pc.
grub.cfg must be customized. I always build GRUB with devmapper
support, and use PARTUUID to find partitions.
(Or my system won't boot with an USB stick plugged in).

The only thing we can learn from the example is

insmod efi_gop
insmod efi_uga
insmod font
if loadfont ... then
... ...
fi

If you are using a seperated /boot partition (LFS book 2.4.1.4),
you should "set root=(</boot partition>)" and use "/vmlinuz"
in grub.cfg. If not, "set root=(<root partition>) and use
"/boot/vmlinuz".
--
Xi Ruoyao <***@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
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
niuneilneo
2018-04-08 13:43:51 UTC
Permalink
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
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?

http://en.wikipedia.org/wiki/Posting_style
Bruce Dubbs
2018-04-08 15:33:47 UTC
Permalink
Post by Xi Ruoyao
No, this is not provided by LFS book. The hints are written by fans.
This is correct. If someone wants to update the hint and send it to me,
than I will install it.

-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
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
Xi Ruoyao
2018-04-09 10:12:06 UTC
Permalink
Post by Bruce Dubbs
If someone wants to update the hint and send it to me,
than I will install it.
The attachment is an updated version based on my recent
LFS build.
--
Xi Ruoyao <***@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University
Bruce Dubbs
2018-04-09 16:48:30 UTC
Permalink
Post by Xi Ruoyao
Post by Bruce Dubbs
If someone wants to update the hint and send it to me,
than I will install it.
The attachment is an updated version based on my recent
LFS build.
Committed. Thanks.

-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
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?

http://en.wikipedia.org/wiki/Posting_style
niuneilneo
2018-04-10 00:48:46 UTC
Permalink
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
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?

http://en.wikipedia.org/wiki/Posting_style
Xi Ruoyao
2018-04-10 08:52:06 UTC
Permalink
1, For my case, the ";" mark in the linux kernel line of grub.cfg prevent grub to boot successfully, say:"linux
/linuz-<lfs version> ; root=/dev/sda(partition num) ro" never works. I have to use "linux /linuz-<lfs version>
root=/dev/sda(partition num) ro" I do not know whether this problem only exists in my environment.
Yes. There should be no ";" here. I didn't notice this issue
in 2017-02-07 hint.
2, If build the grub 2 after efibootmgr 15 version, it is compulsive to set the "EFIDIR" to the EFI boot directory.
Yes. I forgot to add this. And we should also set "EFI_LOADER"
to `grubx64.efi` though it's not strictly necessary.

A diff file is attached.
--
Xi Ruoyao <***@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University
Bruce Dubbs
2018-04-10 17:50:24 UTC
Permalink
Post by Xi Ruoyao
1, For my case, the ";" mark in the linux kernel line of grub.cfg prevent grub to boot successfully, say:"linux
/linuz-<lfs version> ; root=/dev/sda(partition num) ro" never works. I have to use "linux /linuz-<lfs version>
root=/dev/sda(partition num) ro" I do not know whether this problem only exists in my environment.
Yes. There should be no ";" here. I didn't notice this issue
in 2017-02-07 hint.
2, If build the grub 2 after efibootmgr 15 version, it is compulsive to set the "EFIDIR" to the EFI boot directory.
Yes. I forgot to add this. And we should also set "EFI_LOADER"
to `grubx64.efi` though it's not strictly necessary.
A diff file is attached.
Applied.
-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
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?

htt
Gerard Beekmans
2018-04-10 15:24:33 UTC
Permalink
Post by Xi Ruoyao
The attachment is an updated version based on my recent
LFS build.
Coincidentally, I just went through the EFI setup last night using that hint and had compiled some notes to update the hint as well. Seems you guys all beat me to it. :) Most of the updates I would have made are the same you guys already did so not much difference there. The only minor one is that I ended up using efivar-35 as that was the version available yesterday. It seems to work just fine.

If I recall correctly, neither the original hint nor your subsequent submitted changes included the installation instructions for efivar itself unless I missed it somewhere. A simple "make && make install" did the trick for me.
--
Gerard
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
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?

http://en.wi
r***@stu.xidian.edu.cn
2018-04-10 17:19:02 UTC
Permalink
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
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?

http://en.wikipedia.org/wiki/Posting_style
Gerard Beekmans
2018-04-10 17:26:02 UTC
Permalink
Sent: Tuesday, April 10, 2018 11:19:02 AM
Subject: Re: [lfs-support] Update lfs-uefi hint (was: Re: EFI grub.cfg)
'grep -A30 EFIVAR-34 lfs-uefi-20180409.txt'
to find the instruction.
'make && make install' works but LFS doesn't like the default "lib64".
Found it, thanks. That just speaks to the fact a text document of that sort is hard. Also, I see what caused my initial issues. efivar vs efivars. It's not used consistently so when I searched mistakenly for "efivars" I found a few hits but they were in different sections of the document.

The package name is efivar-xx so I think we should use the term "efivar" everywhere to avoid some confusion.
This is from my mobile phone, sorry for the stupid HTML-only mail client.
All good. I'm having the same problem. :)
Loading...