LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-12-2023, 12:06 PM   #1
peristaltic
LQ Newbie
 
Registered: Mar 2005
Posts: 23

Rep: Reputation: 0
Problem adding completed LFS 11.3 partition to existing GRUB


Hello --

I completed the LFS 11.3 book (systemd version) last night. I did not follow the book's directions for compiling/installing GRUB since I planned to modify the existing GRUB entries on my host computer.

The LFS 11.3 partition is on /dev/sda2. The Linux Mint 21.1 host I used to build LFS is located on /dev/sdb3. Grub is installed on the MBR of sdb, set up in the BIOS as the first drive to boot.

After I completed the book, I ran the "grub-customizer" program on my host to add an entry for LFS. To my pleasant surprise, the program added an entry automatically: "unknown Linux distribution (on /dev/sda2)". I restarted, selected this new entry from the grub menu and LFS booted just fine.

However...

I noticed my networking on the LFS system was broken so I rebooted back into the host system to research how to fix it. When I tried to boot back into LFS a second time, I got a GRUB error:
Code:
error: no such device: 440f8ee8-6803-40dc-beca-4abae454dbfe.
error: file '/boot/vmlinuz-6.1.14-lfs-11.3-systemd' not found.
Press any key to continue...
I made no changes so I'm not sure what happened. I double checked the UUID for /dev/sda2 and it is correct.

I am perplexed why the LFS entry booted once but never again. I'm not sure where to start troubleshooting for fear of making things worse/corrupting my host system. Any help would be appreciated. Thanks.
 
Old 03-12-2023, 01:10 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
post the output of the following
Code:
efibootmgr
sudo parted -l
lsblk -f
and the contents /boot/grub/grub.cfg
 
1 members found this post helpful.
Old 03-12-2023, 01:55 PM   #3
peristaltic
LQ Newbie
 
Registered: Mar 2005
Posts: 23

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colorpurple21859 View Post
post the output of the following
Code:
efibootmgr
sudo parted -l
lsblk -f
and the contents /boot/grub/grub.cfg
efibootmgr
Code:
EFI variables are not supported on this system.
sudo parted -l
Code:
Model: ATA WDC WD30EZRX-00M (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name          Flags
 1      1049kB  2959GB  2959GB  ext4         2.73 Tb Ext4
 2      2959GB  3001GB  42.0GB  ext4         lfs


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

Number  Start   End     Size    File system  Name                  Flags
 1      1049kB  2097kB  1049kB                                     bios_grub
 2      2097kB  540MB   538MB   fat32        EFI System Partition  boot, esp
 3      540MB   120GB   119GB   ext4


Model: ATA ST1000DM010-2EP1 (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  1000GB  1000GB  ext4
lsblk -f
Code:
NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                         
├─sda1
│    ext4   1.0         5317c518-99bf-4f54-b50a-cdbcb62c3414                
└─sda2
     ext4   1.0   lfs   440f8ee8-6803-40dc-beca-4abae454dbfe     31G    14% /mnt/lfs
sdb                                                                         
├─sdb1
│                                                                           
├─sdb2
│    vfat   FAT32       401B-A5A7                             505.9M     1% /boot/efi
└─sdb3
     ext4   1.0         30b965ce-2555-4acf-81fb-71faefa9ba3e   78.8G    23% /
sdc                                                                         
└─sdc1
     ext4   1.0   1 Tb HDD
                        09bc67bd-7b1b-4ce6-b4c3-9a5fcb49f8d0    864G     1% /home
Code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${initrdfail}" = 2 ]; then
   set initrdfail=
elif [ "${initrdfail}" = 1 ]; then
   set next_entry="${prev_entry}"
   set prev_entry=
   save_env prev_entry
   if [ "${next_entry}" ]; then
      set initrdfail=2
   fi
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function initrdfail {
    if [ -n "${have_grubenv}" ]; then if [ -n "${partuuid}" ]; then
      if [ -z "${initrdfail}" ]; then
        set initrdfail=1
        if [ -n "${boot_once}" ]; then
          set prev_entry="${default}"
          save_env prev_entry
        fi
      fi
      save_env initrdfail
    fi; fi
}
function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
set root='hd1,gpt3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  30b965ce-2555-4acf-81fb-71faefa9ba3e
else
  search --no-floppy --fs-uuid --set=root 30b965ce-2555-4acf-81fb-71faefa9ba3e
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=800x600
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=30
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=30
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
	if [ "${1}" = "keep" ]; then
		set vt_handoff=vt.handoff=7
	else
		set vt_handoff=
	fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if [ ${grub_platform} != pc ]; then
      set linux_gfx_mode=keep
    elif hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Linux Mint 21.1 Cinnamon' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-30b965ce-2555-4acf-81fb-71faefa9ba3e' {
	recordfail
	load_video
	gfxmode $linux_gfx_mode
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_gpt
	insmod ext2
	set root='hd1,gpt3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  30b965ce-2555-4acf-81fb-71faefa9ba3e
	else
	  search --no-floppy --fs-uuid --set=root 30b965ce-2555-4acf-81fb-71faefa9ba3e
	fi
	linux	/boot/vmlinuz-5.19.0-32-generic root=UUID=30b965ce-2555-4acf-81fb-71faefa9ba3e ro  quiet splash 
	initrd	/boot/initrd.img-5.19.0-32-generic
}
submenu 'Advanced options for Linux Mint 21.1 Cinnamon' $menuentry_id_option 'gnulinux-advanced-30b965ce-2555-4acf-81fb-71faefa9ba3e' {
	menuentry 'Linux Mint 21.1 Cinnamon, with Linux 5.19.0-32-generic' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.19.0-32-generic-advanced-30b965ce-2555-4acf-81fb-71faefa9ba3e' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd1,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  30b965ce-2555-4acf-81fb-71faefa9ba3e
		else
		  search --no-floppy --fs-uuid --set=root 30b965ce-2555-4acf-81fb-71faefa9ba3e
		fi
		echo	'Loading Linux 5.19.0-32-generic ...'
		linux	/boot/vmlinuz-5.19.0-32-generic root=UUID=30b965ce-2555-4acf-81fb-71faefa9ba3e ro  quiet splash 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.19.0-32-generic
	}
	menuentry 'Linux Mint 21.1 Cinnamon, with Linux 5.19.0-32-generic (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.19.0-32-generic-recovery-30b965ce-2555-4acf-81fb-71faefa9ba3e' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd1,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  30b965ce-2555-4acf-81fb-71faefa9ba3e
		else
		  search --no-floppy --fs-uuid --set=root 30b965ce-2555-4acf-81fb-71faefa9ba3e
		fi
		echo	'Loading Linux 5.19.0-32-generic ...'
		linux	/boot/vmlinuz-5.19.0-32-generic root=UUID=30b965ce-2555-4acf-81fb-71faefa9ba3e ro recovery nomodeset dis_ucode_ldr 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.19.0-32-generic
	}
	menuentry 'Linux Mint 21.1 Cinnamon, with Linux 5.19.0-28-generic' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.19.0-28-generic-advanced-30b965ce-2555-4acf-81fb-71faefa9ba3e' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd1,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  30b965ce-2555-4acf-81fb-71faefa9ba3e
		else
		  search --no-floppy --fs-uuid --set=root 30b965ce-2555-4acf-81fb-71faefa9ba3e
		fi
		echo	'Loading Linux 5.19.0-28-generic ...'
		linux	/boot/vmlinuz-5.19.0-28-generic root=UUID=30b965ce-2555-4acf-81fb-71faefa9ba3e ro  quiet splash 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.19.0-28-generic
	}
	menuentry 'Linux Mint 21.1 Cinnamon, with Linux 5.19.0-28-generic (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.19.0-28-generic-recovery-30b965ce-2555-4acf-81fb-71faefa9ba3e' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd1,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  30b965ce-2555-4acf-81fb-71faefa9ba3e
		else
		  search --no-floppy --fs-uuid --set=root 30b965ce-2555-4acf-81fb-71faefa9ba3e
		fi
		echo	'Loading Linux 5.19.0-28-generic ...'
		linux	/boot/vmlinuz-5.19.0-28-generic root=UUID=30b965ce-2555-4acf-81fb-71faefa9ba3e ro recovery nomodeset dis_ucode_ldr 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.19.0-28-generic
	}
	menuentry 'Linux Mint 21.1 Cinnamon, with Linux 5.15.0-67-generic' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.15.0-67-generic-advanced-30b965ce-2555-4acf-81fb-71faefa9ba3e' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd1,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  30b965ce-2555-4acf-81fb-71faefa9ba3e
		else
		  search --no-floppy --fs-uuid --set=root 30b965ce-2555-4acf-81fb-71faefa9ba3e
		fi
		echo	'Loading Linux 5.15.0-67-generic ...'
		linux	/boot/vmlinuz-5.15.0-67-generic root=UUID=30b965ce-2555-4acf-81fb-71faefa9ba3e ro  quiet splash 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.15.0-67-generic
	}
	menuentry 'Linux Mint 21.1 Cinnamon, with Linux 5.15.0-67-generic (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.15.0-67-generic-recovery-30b965ce-2555-4acf-81fb-71faefa9ba3e' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd1,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  30b965ce-2555-4acf-81fb-71faefa9ba3e
		else
		  search --no-floppy --fs-uuid --set=root 30b965ce-2555-4acf-81fb-71faefa9ba3e
		fi
		echo	'Loading Linux 5.15.0-67-generic ...'
		linux	/boot/vmlinuz-5.15.0-67-generic root=UUID=30b965ce-2555-4acf-81fb-71faefa9ba3e ro recovery nomodeset dis_ucode_ldr 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.15.0-67-generic
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/11_linux_zfs ###
### END /etc/grub.d/11_linux_zfs ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober_proxy ###




set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10
fi
### END /etc/grub.d/30_os-prober_proxy ###

### BEGIN /etc/grub.d/31_uefi-firmware ###
### END /etc/grub.d/31_uefi-firmware ###

### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###

### BEGIN /etc/grub.d/40_custom_proxy ###

# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

### END /etc/grub.d/40_custom_proxy ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/42_custom_proxy ###
menuentry "unknown Linux distribution (on /dev/sda2)" --class linux --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-440f8ee8-6803-40dc-beca-4abae454dbfe' {
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  440f8ee8-6803-40dc-beca-4abae454dbfe
	else
	  search --no-floppy --fs-uuid --set=root 440f8ee8-6803-40dc-beca-4abae454dbfe
	fi
	linux /boot/vmlinuz-6.1.14-lfs-11.3-systemd root=/dev/sda2
}
### END /etc/grub.d/42_custom_proxy ###

### BEGIN /etc/grub.d/43_os-prober_proxy ###
### END /etc/grub.d/43_os-prober_proxy ###
 
Old 03-12-2023, 02:32 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
At the grub menu, highlight the lfs entry, press e for edit, delete all this:
Code:
if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  440f8ee8-6803-40dc-beca-4abae454dbfe
	else
	  search --no-floppy --fs-uuid --set=root 440f8ee8-6803-40dc-beca-4abae454dbfe
	fi
press ctrl-x to boot.
if it boots without no problem, change to this and see what happens:
Code:
if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root 440f8ee8-6803-40dc-beca-4abae454dbfe
	fi
 
1 members found this post helpful.
Old 03-12-2023, 03:02 PM   #5
peristaltic
LQ Newbie
 
Registered: Mar 2005
Posts: 23

Original Poster
Rep: Reputation: 0
I removed the first chunk of code and press control x:

Code:
Booting a command list

error: file '/boot/vmlinuz-6.1.14-1fs-11.3-systemd' not found.

Press any key to continue....
 
Old 03-12-2023, 03:24 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
what is in /mnt/lfs/boot?

Last edited by colorpurple21859; 03-12-2023 at 03:26 PM.
 
1 members found this post helpful.
Old 03-12-2023, 06:11 PM   #7
peristaltic
LQ Newbie
 
Registered: Mar 2005
Posts: 23

Original Poster
Rep: Reputation: 0
ls -lah /mnt/lfs/boot
Code:
-rw-r--r--  1 root root 137K Mar 11 20:48 config-6.1.14
-rw-r--r--  1 root root 4.3M Mar 11 20:47 System.map-6.1.14
-rw-r--r--  1 root root  11M Mar 11 20:47 vmlinuz-6.1.14-lfs-11.3-systemd
 
Old 03-12-2023, 07:19 PM   #8
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
At the grub menu, press e for edit and change all this:
Code:
if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  440f8ee8-6803-40dc-beca-4abae454dbfe
	else
	  search --no-floppy --fs-uuid --set=root 440f8ee8-6803-40dc-beca-4abae454dbfe
	fi
to
Code:
search --no-floppy --fs-uuid --set=root 440f8ee8-6803-40dc-beca-4abae454dbfe
If that doesn't work boot into mint, open a terminal
Code:
sudo tune2fs -O ^metadata_csum_seed /dev/sda2
reboot and try again.

Last edited by colorpurple21859; 03-12-2023 at 07:22 PM.
 
Old 03-12-2023, 08:05 PM   #9
peristaltic
LQ Newbie
 
Registered: Mar 2005
Posts: 23

Original Poster
Rep: Reputation: 0
It didn't work the first time so I ran the tune2fs command.
It didn't work after that either.

Code:
Booting a command list

error: no such device: 440f8ee8-6803-40dc-beca-4abae454dbfe. 
error: file/boot/vmlinuz-6.1.14-lfs-11.3-systemd' not found.

Press any key to continue...
I appreciate your help. I'm starting to get discouraged.
 
Old 03-12-2023, 08:20 PM   #10
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
what happens if you rerun sudo update-grub?
 
Old 03-12-2023, 08:27 PM   #11
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
the only other thing I can think of is umount the lfs partition and run a fsck on it.
 
Old 03-12-2023, 10:04 PM   #12
peristaltic
LQ Newbie
 
Registered: Mar 2005
Posts: 23

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colorpurple21859 View Post
the only other thing I can think of is umount the lfs partition and run a fsck on it.
You may be on to something here. Here is the output from fsck of /dev/sda:

Code:
fsck from util-linux 2.37.2
e2fsck 1.46.5 (30-Dec-2021)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sda

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

Found a gpt partition table in /dev/sda
Nvm I forgot I needed to specify the partition not the device (sda2 not sda):

Code:
fsck from util-linux 2.37.2
e2fsck 1.46.5 (30-Dec-2021)
lfs: clean, 158169/2564096 files, 1615678/10255872 blocks

Last edited by peristaltic; 03-12-2023 at 10:14 PM. Reason: misunderstood command
 
Old 03-12-2023, 11:33 PM   #13
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
What is output of
Code:
sudo grub-probe --target=bios_hints --device /dev/sda2
then run again with —target=efi_hints

Last edited by colorpurple21859; 03-12-2023 at 11:37 PM.
 
Old 03-13-2023, 06:14 AM   #14
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
Is fastboot enabled in the bios/firmware?
 
Old 03-13-2023, 09:22 PM   #15
peristaltic
LQ Newbie
 
Registered: Mar 2005
Posts: 23

Original Poster
Rep: Reputation: 0
sudo grub-probe --target=bios_hints --device /dev/sda2
Code:
hd0,gpt2
sudo grub-probe --target=efi_hints --device /dev/sda2
Code:
hd0,gpt2
 
  


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
HDD Partition Failed Boot / ddrescue Operation Completed / Now What to Try and Restore Failing HDD/Partition? GNewbie Linux - Newbie 15 10-14-2016 03:42 PM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
Completed LFS but ...... chakkaradeepcc Linux From Scratch 2 05-15-2005 12:34 AM
adding an existing XP partition to GRUB phoeniks Linux - General 3 08-27-2004 12:54 PM
lfs 5.0 completed miguetoo Linux From Scratch 1 11-26-2003 11:00 AM

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

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