On 3/18/19 3:20 PM, Pei Jia wrote:
Hi, Bruce:
Thank you for your detailed explanation.
1. 2 grubs
* *grub on my host's laptop*, please refer to
https://longervision.cc/bugs/grub.jpg . And the contents in
*/boot/grub/grub.cfg* is too much, I'm *NOT* copy/paste it here.
* grub on my USB stick, the contents in /boot/grub/grub.cfg:
➜ grub cat grub.cfg
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5
set root=(*hd0*,*msdos1*)
insmod ext4
menuentry "GNU/Linux, Linux 5.0.2-lfs-8.5" {
linux /boot/vmlinuz-5.0.2-lfs-8.5 rootdelay=10
root=*/dev/**sde* ro
}
Obviously, the *grub.cfg* on my *USB stick* is *incorrect*, right? From
*grub* *bash*, if I want to load *USB stick's LFS Linux*, I'm quite sure
the hard drive is *hd0*, which should *corresponds to sda* instead of
*sde*. No matter what, while booting, my laptop pops up
https://longervision.cc/bugs/grub.jpg *by default*. So, it seems I'm
using *my laptop's grub* right now.
I am only guessing, but if the firmware is booting the usb drive, then I
would try changing the grub.cfg file on the usb drive to say
linux /boot/vmlinuz-5.0.2-lfs-8.5 rootdelay=10 root=/dev/sda1 ro
From the point of view if the system at this time the only drive is
/dev/sda.
fstab should reflect the same.
grub identifies hard disks differently from the kernel. hd0 is the
first drive, but which drive is first? Depends on the firmware, but my
guess is the usb drive since it is finding the kernel for booting. The
problme is telling the kernel about the system.
-- 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