LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   disk `hd0,4' not found (https://www.linuxquestions.org/questions/linux-from-scratch-13/disk-%60hd0-4-not-found-4175704933/)

bayou self 12-14-2021 02:45 PM

disk `hd0,4' not found
 
LFS 11.0

Cannot boot into either LFS or Debian.
My LFS root partition is SDA4.
Earlier I got these other error messages:
Code:

`/boot/vmlinuz-5.13.12-lfs-11.0' not found
and
Code:

`x86_64-efi/linux.mod' not found
Not having much luck with the Rescue Disk.
Thank you for your help!

colorpurple21859 12-14-2021 03:50 PM

Post /boot/grub/grub.cfg
fdisk -l

bayou self 12-14-2021 04:00 PM

Thanks for the help!
This is what I got:

Code:

grub> cat /boot/grub/grub.cfg
error: file `/boot/grub/grub.cfg' not found

Code:

grub> fdisk -l
error: can't find command `fdisk'.


colorpurple21859 12-14-2021 04:42 PM

The commands are from the host system, not from the grub prompt.
From the grub prompt post the output of
set
ls

bayou self 12-14-2021 04:53 PM

I cannot access the host system (Debian bullseye).
I'm having to type what I see on the screen into a different computer.
Here are a few of the results from "set":
Code:

cmdpath=(hd0,msdos1)/EFI/BOOT
grub_platform=efi
prefix=(hd0,msdos1)/grub/grub
root=hd0,msdos1

That root value could be wrong, as my LFS is sda4.

colorpurple21859 12-14-2021 05:51 PM

what is the ouput of
Code:

grub>ls
grub>ls /grub
grub>ls /grub/grub


bayou self 12-14-2021 06:01 PM

Code:

grub> ls
(hd0) (hd0,msdos1) (hd1) (hd2)

Code:

grub> ls /grub
grub/

Code:

grub> ls /grub/grub
x86_64-efi/ locale/ fonts/ grubenv


colorpurple21859 12-14-2021 06:04 PM

insert the following commands and post output of ls.
Code:

insmod part_gpt
ls


bayou self 12-14-2021 06:07 PM

Code:

grub> ls
(hd0) (hd0,msdos1) (hd1) (hd1,gpt4) (hd1,gpt3) (hd1,gpt2) (hd1,gpt1) (hd2)


colorpurple21859 12-14-2021 06:11 PM

Code:

insmod part_gpt
linux (hd1,4)/boot/vmlinuz-5.13.12-lfs-11.0 root=/dev/sdb4
boot

the sdb4 maybe sda4 or sdc4
for debian try /boot/vmlinuz /boot/initrd.img or /vmlinuz /initrd.img with whatever drive it is on.

bayou self 12-14-2021 06:20 PM

I got
Code:

error: file `/boot/vmlinuz-5.13.12-lfs-11.0' not found
grub> boot
error: you need to load the kernel first.


colorpurple21859 12-14-2021 06:31 PM

Your list all your drives/partitions
Code:

ls (hd1,4)/
ls (hd1,3)/
ls (hd0,1)/

and so forth to find the location of kernels.

bayou self 12-14-2021 06:44 PM

Code:

grub> ls (hd1,1)/
efi/
grub> ls (hd1,1)/efi/
debian/ lfs/
grub> ls (hd1,1)/efi/lfs
grubx64.efi


bayou self 12-14-2021 06:50 PM

Code:

grub> ls (hd1,1)/efi/debian/
shimx64.efi grubx64.efi mmx64.efi fbx64.efi bootx64.csv grub.cfg


bayou self 12-14-2021 07:01 PM

Code:

grub> ls (hd1,2)/
lost+found/ boot/ etc/ media/ vmlinuz.old var/ bin usr/ sbin lib lib32 lib64 libx32 dev/ home/ proc/ root/ run/ sys/ tmp/ mnt/ srv/ opt/ initrd.img.old vmlinuz initrd.img



All times are GMT -5. The time now is 09:01 PM.