LinuxQuestions.org
Review your favorite Linux distribution.
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 05-10-2023, 02:36 PM   #1
klebermo
LQ Newbie
 
Registered: May 2023
Posts: 3

Rep: Reputation: 0
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block(0,0)


I have created a image file with this commands:

Code:
dd if=/dev/zero of=linux.img bs=16M count=1024
cfdisk linux.img
mkfs.ext4 linux.img
and installed a linux system following the instructions from the book Linux From Scratch 11.3. I have access to this system via chroot, but when I try run it with this command:

Code:
qemu-system-x86_64 -hda linux.img -vga std -m 4G
the initialization of the system is interrupted by the error described in the title of this question. my file /boot/grub/grub.cfg looks like this:

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

insmod ext4

menuentry "GNU/Linux, Linux 6.1.11-lfs-11.3" {
        linux   /boot/vmlinuz-6.1.11-lfs-11.3 root=/dev/hda1 ro
what I have tried:
  1. uncommenting the line set root=(hd0,2)' and trying the values hd0,0orhd0,1(the system not even initialize with this, and I got the errorhd0,X not found` after the grub start screen.
  2. changing the root value in the line started with linux in the menuentry option to /dev/loopXX (I got the same error).
  3. changing the root value in the line started with linux in the menuentry option to /dev/sda1 (in this case, same message, but with the block as (8,1)).
Anyone can tell me what I can do to fix this issue?
 
Old 05-10-2023, 05:48 PM   #2
klebermo
LQ Newbie
 
Registered: May 2023
Posts: 3

Original Poster
Rep: Reputation: 0
I got an answer to that question here: https://unix.stackexchange.com/a/745535/93526. I tested the answer and works perfectly for my case.
 
Old 05-17-2023, 10:34 AM   #3
wiigelec
Member
 
Registered: Nov 2021
Distribution: Devuan
Posts: 65

Rep: Reputation: Disabled
the way to troubleshoot this is by getting a grub command line (c at grub boot screen) then using ‘ls’ to find where your kernel is located. then use “set root=<kernel partition>“, “linux <kernel path> root=<root fs>”, then “boot”.

when i build lfs on a virtual disk (i use qcow2 format) i run fdisk on the image and partition it like a physical disk. though i use lvm for all my disks which adds another layer of complexity in the form of an initrd…
 
  


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
kernel panic - not syncing : VFS: unable to mount root FS on unknown-block Dankles Slackware 23 01-28-2011 03:01 AM
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) OR13 Linux - Kernel 18 01-12-2008 09:23 AM
kernel panic - not syncing: VFS: unable to mount root fs on unknown-block(3,2) o2bfishn Slackware 5 04-28-2006 03:51 PM
Kernel Panic!!! -Not Syncing VFS:Unable to mount root FS on unknown - block (0,0) scarabs Linux - Software 4 04-16-2006 04:16 PM
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,2) Volgin Linux - Software 1 12-11-2005 07:46 PM

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

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