LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-05-2022, 11:48 AM   #1
Don Pedro
LQ Newbie
 
Registered: Aug 2022
Location: Sydney NSW
Distribution: Archlinux, LFS, Debian.
Posts: 27

Rep: Reputation: 11
Thumbs up GrubStuck


Hi out there

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.

Thanks in anticipation ...

Last edited by Don Pedro; 09-05-2022 at 07:13 PM.
 
Old 09-12-2022, 01:12 AM   #2
Don Pedro
LQ Newbie
 
Registered: Aug 2022
Location: Sydney NSW
Distribution: Archlinux, LFS, Debian.
Posts: 27

Original Poster
Rep: Reputation: 11
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.
 
Old 09-12-2022, 07:17 PM   #3
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,365

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
If the system is on /dev/sda3, This should work:

Code:
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.
 
Old 09-13-2022, 02:16 AM   #4
Don Pedro
LQ Newbie
 
Registered: Aug 2022
Location: Sydney NSW
Distribution: Archlinux, LFS, Debian.
Posts: 27

Original Poster
Rep: Reputation: 11
Thanks Colorpurple

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.

The whole provided a useful lesson. Thanks Again
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration