LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 07-17-2023, 04:24 PM   #1
namlessuM
LQ Newbie
 
Registered: Jul 2023
Posts: 3

Rep: Reputation: 0
System not booting after completion


Hello everyone,

I have finished the LFS book and am looking for help as my system is not bootable. When trying to boot into my LFS build, Welcome to GRUB flashes in the corner of the screen then my computer restarts. I have built off of Fedora. I originally had grub.cfg using designators like the book shows in its example file for setting the root location, but after the boot failed I changed to using the UUID and PARTUUID and the boot still failed.
I then tried to add LFS to the GRUB menu that Fedora is booting from but I can't get that to work either. The LFS system shows up when running os-prober. I can provide any other information, any help would be great.
 
Old 07-17-2023, 07:09 PM   #2
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Boot into fedora, post the output of
Code:
sudo parted -l
Post the the boot menu item of lfs in /boot/grub2/grub.cfg
Post /etc/fstab of lfs system
Which partition is lfs On?
 
Old 07-18-2023, 04:56 PM   #3
namlessuM
LQ Newbie
 
Registered: Jul 2023
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colorpurple21859 View Post
Boot into fedora, post the output of
Code:
sudo parted -l
Post the the boot menu item of lfs in /boot/grub2/grub.cfg
Post /etc/fstab of lfs system
Which partition is lfs On?
My LFS is on device sdb, boot is sdb1 and I build the system in sdb3

Here is the out put of parted -l

Code:
Model: ATA TEAM T253512GB (scsi)
Disk /dev/sda: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system  Name                          Flags
 1      1049kB  106MB  105MB   fat32        EFI system partition          boot, esp, no_automount
 2      106MB   123MB  16.8MB               Microsoft reserved partition  msftres, no_automount
 3      123MB   512GB  511GB   ntfs         Basic data partition          msftdata
 4      512GB   512GB  547MB   ntfs                                       hidden, diag, no_automount


Model: ATA TEAM T253512GB (scsi)
Disk /dev/sdb: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  269MB   268MB   ext4                  bios_grub
 2      269MB   1343MB  1074MB  linux-swap(v1)        swap
 3      1343MB  512GB   511GB   ext4


Model: ATA WDC WD40EZRZ-22G (scsi)
Disk /dev/sdc: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      17.4kB  16.8MB  16.8MB               Microsoft reserved partition  msftres
 2      16.8MB  4001GB  4001GB  ntfs         Basic data partition          msftdata


Model: ATA Samsung SSD 860 (scsi)
Disk /dev/sdd: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  1075MB  1074MB  primary  ext4         boot
 2      1075MB  500GB   499GB   primary  btrfs


Model: Unknown (unknown)
Disk /dev/zram0: 8590MB
Sector size (logical/physical): 4096B/4096B
Partition Table: loop
Disk Flags: 

Number  Start  End     Size    File system     Flags
 1      0.00B  8590MB  8590MB  linux-swap(v1)


Fstab file for LFS

Code:
# Begin /etc/fstab

# file system 					   mount-point  type     options                dump   fsck
#

PARTUUID=89896895-22eb-c149-8910-6cfb63c6dee7      /            ext4     defaults               1      1
PARTUUID=9edf0143-21de-d940-acb6-dab32bdea98e      swap         swap     pri=1                  0      0
PARTUUID=016f9bbd-7a0e-9a48-bf55-64631faf6c18      /boot        ext4     defaults               0      0 
proc          					   /proc        proc     nosuid,noexec,nodev    0      0
sysfs         					   /sys         sysfs    nosuid,noexecmnodev    0      0
devpts           				   /dev/pts     devpts   gid=5,mode=620         0      0
tmpfs              			  	   /run         tmpfs    defaults               0      0
devtmpfs      	  	 	 	  	   /dev         devtmpfs mode=0755,nosuid       0      0
tmpfs         					   /dev/shm     tmpfs    nosuid,nodev           0      0

#End /etc/fstab

The grub.cfg file is is script generated I didn't try to add lfs to it manually, because I don't know how to do it. Here's the grub.cfg file for the LFS system that I created, it didn't boot off of this either.

Code:
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5

insmod ext2
search --set=root --fs-uuid d90b5ed0-cb11-42b5-a362-1ed92bd07f62

menuentry "GNU/Linux, Linux 6.1.11-lfs-11.3" {
	linux /vmlinuz-6.1.11-lfs-11.3.x86_64 root=PARTUUID=89896895-22eb-c149-8910-6cfb63c6dee7 ro
	
}
 
Old 07-18-2023, 10:16 PM   #4
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Remove the bios-grub flag on /dev/sdb1, The bios-grub flag is used by grub when installing grub in legacy mode on a gpt drive.
In fedora create a /boot/grub2/custom.cfg with this in it:
Code:
menuentry "GNU/Linux, Linux 6.1.11-lfs-11.3" {
        insmod all_video    
        insmod ext2
        search --set=root --fs-uuid d90b5ed0-cb11-42b5-a362-1ed92bd07f62
	linux /vmlinuz-6.1.11-lfs-11.3.x86_64 root=PARTUUID=89896895-22eb-c149-8910-6cfb63c6dee7 ro
	
}
This should give a working lfs grub menuentry at the end of the fedora grub menu.
assuming the search --set=root uuid is that of /dev/sdb1

Last edited by colorpurple21859; 07-18-2023 at 10:29 PM.
 
Old 07-19-2023, 04:23 PM   #5
namlessuM
LQ Newbie
 
Registered: Jul 2023
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colorpurple21859 View Post
Remove the bios-grub flag on /dev/sdb1, The bios-grub flag is used by grub when installing grub in legacy mode on a gpt drive.
In fedora create a /boot/grub2/custom.cfg with this in it:
Code:
menuentry "GNU/Linux, Linux 6.1.11-lfs-11.3" {
        insmod all_video    
        insmod ext2
        search --set=root --fs-uuid d90b5ed0-cb11-42b5-a362-1ed92bd07f62
	linux /vmlinuz-6.1.11-lfs-11.3.x86_64 root=PARTUUID=89896895-22eb-c149-8910-6cfb63c6dee7 ro
	
}
This should give a working lfs grub menuentry at the end of the fedora grub menu.
assuming the search --set=root uuid is that of /dev/sdb1
This worked! I've some error codes on boot now but it gets to the bash prompt. Thank you
 
Old 07-19-2023, 05:21 PM   #6
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
No problem.
 
  


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
[SOLVED] DNF system upgrade error report after completion? zavmat Linux - Newbie 10 01-26-2019 09:28 PM
Where is LibreOffice Word Completion words list located on my system? linustalman Linux - Software 10 05-19-2018 02:27 PM
Scheduling shutdown after download completion. avee137 Linux - Newbie 6 01-10-2011 01:40 AM
Tab-Completion in bash indexing system folders! dvno00 Linux - General 2 11-15-2010 11:02 PM
After Completion of RHCE manred Linux - Certification 1 11-15-2010 06:18 AM

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

All times are GMT -5. The time now is 04:54 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