LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


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

Rep: Reputation: 11
Unhappy First Boot (attempt) stuck at GRUB


Hi out there, I'm a new newbie.

I really enjoyed my first attempt at an LFS build (11.1) though to be honest I found the slope suddenly hard from section 9.3 onwards. I felt like I'd suddenly, after several weeks of the semester, walked into the wrong class, a year ahead. However, I persevered, looked up all the terms (ahem!), improvised a bit but seemed to have survived, and nervously approached my first boot. I wondered if the old ThinkPad (X200) would suddenly vanish into hyperspace. It didn't. It got stuck after the GRUB screen and wouldn't budge.

error: disk `hd0,2' not found. Press any key to continue..._"

Time for the Infinite Monkey moment? Not enough keyboards, or bananas. I went back to the GRUB screen and settled on pressing a modest 'e' for edit, finding:

setparams 'GNU/Linux, Linux 5.16.9-lfs-11.1'
linux /boot/vmlinuz-5.16.9-lfs-11.1 root=/dev/sda2 ro

Oops! I quickly discovered something: copying the example at 10.4.4 LITERALLY meant I was telling the machine to look for the root partition where my swap partition is. Duh. This took me to grub.cfg

cat > /boot/grub/grub.cfg << "EOF"
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5

insmod ext2
set root=(hd0,2)

menuentry "GNU/Linux, Linux 5.16.9-lfs-11.1" {
linux /boot/vmlinuz-5.16.9-lfs-11.1 root=/dev/sda2 ro
}
EOF

My SSD looks like this: Host (Arch Linux) /dev/sda1=root /dev/sda2=swap; /dev/sda3=LFS. So I changed "hd0,2" to "hd0,3", and "root=/dev/sda2" to "root=/dev/sda3". I even tried changing ext2 to ext4.

Result?

error: disk `hd0,3' not found. Press any key to continue..._"

Swamped by insecurity, I tried every possible combination of edits, and got back to the same roadblock each time. I'll add that I'm used to UEFI installations, and I'm a little extra unsteady with my venerable X200 and its BIOS ways.

Next step? Shall I do the whole thing all over again ... and look out carefully for whatever I must have done wrong? Use a BIOS Boot partition? Did I somehow miss mounting the LFS partition? Monkeys may not be infinite, but ignorance is!

Any advice would be most gratefully received. And apologies if this isn't the approved layout. I don't think I got far enough for logs, dmesg etc, but that may just further illustrate my ignorance.
 
Old 09-13-2022, 12:13 PM   #2
wiigelec
Member
 
Registered: Nov 2021
Distribution: Devuan
Posts: 67

Rep: Reputation: Disabled
you can use the grub command shell to determine where your operating system is located

https://www.linuxfoundation.org/blog...ub-2-on-linux/
 
Old 09-13-2022, 01:02 PM   #3
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,415

Rep: Reputation: 1600Reputation: 1600Reputation: 1600Reputation: 1600Reputation: 1600Reputation: 1600Reputation: 1600Reputation: 1600Reputation: 1600Reputation: 1600Reputation: 1600
Did you try my suggestion I posted in your other thread? https://www.linuxquestions.org/quest...2/#post6379750

What file are you editing for the grub menu and is it in the arch or lfs file system?

Quote:
error: disk `hd0,3' not found. Press any key to continue..._"
add this line after "set root=(hd0,3)"

Code:
search --no-floppy --fs-uuid --set=root <uuid of partition 3 >
"<uuid of partition 3 >" will be the actual uuid number of partition 3

Last edited by colorpurple21859; 09-13-2022 at 07:53 PM.
 
Old 09-13-2022, 08:16 PM   #4
Don Pedro
LQ Newbie
 
Registered: Aug 2022
Location: Sydney NSW
Distribution: Archlinux, LFS, Debian.
Posts: 27

Original Poster
Rep: Reputation: 11
Thanks to everybody, and please forgive my newbie mistakes. I posted, could not find my post, and the system said I had never posted at all. So, assuming I'd done it wrong, I repeated the procedure. Anyway, learning from the responses I finally found (from the third post which succeeded) I discovered the host system I was using had some issues, and GRUB was not functioning properly. When I tried to issue the 'ls' command, it froze. I tried the 'hello world' command and the machine said it couldn't find it. So I've gone back to Square One, reinstalled the Host system, and will test and make sure everything is going smoothly before starting to build LFS again. I'm also studying what the Kernotex guy has to say, and will do a walk through with him.

So thanks to everybody. I have noted everything suggested, and if I have problems at the boot stage again I'll have avenues of approach ready. Thus I'm marking this thread SOLVED.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
legacy boot bug with GRUB 2.06, boot loop/stuck at GRUB loading, -current kaott Slackware 12 07-27-2021 09:32 PM
[SOLVED] STUCK at first boot: LFS v9.0 First Boot Dell Inspiron 1545 Laptop bgii2000 Linux From Scratch 12 10-12-2019 05:43 PM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
My 2nd attempt at a 1st post - the 1st attempt got snafued somehow hawkfeather LinuxQuestions.org Member Intro 1 07-13-2013 04:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 10:19 AM.

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