Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This is my very first post, so apologies if I don't do things in the approved way.
I've painstakingly made my way through the LFS procedure (11.1) and was excited to find myself at a GRUB screen on the first attempted boot. I think I kinda expected the old ThinkPad (X200) to vanish into hyperspace. But it did no such thing; it went nowhere. Just said "error: disk `hd0,2' not found." I was invited to "Press any key" but got no further.
Thinking I might find something to edit, I found this rather sparse two-liner
setparams 'GNU/Linux, Linux 5.16.9-lfs-11.1'
linux /boot/vmlinuz-5.16.9-lfs-11.1 root=/dev/sda2 ro
Now: /dev/sda2 is my swap area (the host being ArchLinux on sda1), and (come to think of it) I should have been trying to boot `hd0,3' (/dev/sda3 being where my new installation ought to be) so I edited grub.cfg realising I'd simplistically copied out precisely what the book illustrated. Duh. But good, after some web-searches I'd learned a few more morsels.
But I'm hungry for more, and (I hope) reasonably close. But where do I go from here? I've edited various editables in grub.cfg (hd0,3 and root=/dev/sda3, even sda1!) but short of a different error message (`hd0,3 not found) I'm STUCK at GRUB.
I'm ready to quote/display anything requested, and hoping someone will be gentle with this humble (no, really!) newbie!
And before I go, a global thank-you to all those kind souls who share their knowledge on the web.
I'm replying to my own post here: it should have gone to the Linux From Scratch group; this was my (newbie) mistake, and hence the content was not well focused. Also I could not find the post anywhere, and in fact the system told me I had never posted anything. I repeated the whole procedure (to the appropriate group this time) and again I could not find the post, nor could the system. Anyway ... the entire original problem seems to have been with the (fresh and otherwise untested) host installation, where GRUB was not working properly. So I'm going back to Square One, and thus these posts can be ignored. Thanks to those who did (finally) respond. Consequently I'm going to mark this thread SOLVED.
menuentry "linux LFS"{
insmod_part_msdos
insmod part_gpt
set root=(hd0,3)
linux /boot/vmlinuz-5.16.9-lfs-11.1 root=/dev/sda3 ro
}
This is short brief of what each line does:
The (insmod part_msdos/gpt) loads grub modules for grub to be able to see the drive partition layout, gpt for gpt drives, msdos for msdos legacy drives.
(set root= ) points grub to the drive/partition where the files/kernel/initrd to be loaded are located. Drives count from 0, partitions from 1.
(linux) line loads kernel and passes parameters to the kernel.
(initrd] loads an initrd/initramfs if one exist.
Last edited by colorpurple21859; 09-12-2022 at 07:24 PM.
As I explained in my followup post, I found GRUB wasn't functioning properly on the Host system, so I'm starting again with a fresh Host installation, and will fully test GRUB before proceeding. But thanks for your advice, which I will implement when I get to that point again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.