qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VFS: Unable to mount root fs on unknown-block(0,0)


From: Frank Carmickle
Subject: Re: VFS: Unable to mount root fs on unknown-block(0,0)
Date: Thu, 30 Nov 2023 08:14:08 -0500


> On Nov 30, 2023, at 05:08, 泰宇周 <taiyuzhou66@gmail.com> wrote:
> 
> Hi Peter
> Thanks you so much.
> I tried to specify corresponding initramfs to QEMU as following
> qemu-system-x86_64 \
>    -kernel /boot/vmlinuz-`uname -r` \
> -m 4G \
> -initrd /boot/initramfs-`uname -r`.img \
>    -sda centos79.img \
>    -append "root=/dev/sda console=ttyS0" \
>    -enable-kvm -nographic
> 
> It worked for me to boot the kernel.
> However, I still can’t enter the system.
> Qemu reported following information
> 
> 
> [  OK  ] Reached target System Initialization.
>         Starting dracut initqueue hook...
>         Starting Show Plymouth Boot Screen...
> [  OK  ] Started Show Plymouth Boot Screen.
> [  OK  ] Reached target Paths.
> [  OK  ] Reached target Basic System.
> [  181.930451] dracut-initqueue[284]: Warning: dracut-initqueue timeout - 
> starting timeout scripts
> [  182.449479] dracut-initqueue[284]: Warning: dracut-initqueue timeout - 
> starting timeout scripts
> [  182.968450] dracut-initqueue[284]: Warning: dracut-initqueue timeout - 
> starting timeout scripts
> [  183.487482] dracut-initqueue[284]: Warning: dracut-initqueue timeout - 
> starting timeout scripts
> [  184.006435] dracut-initqueue[284]: Warning: dracut-initqueue timeout - 
> starting timeout scripts
> [  184.525464] dracut-initqueue[284]: Warning: dracut-initqueue timeout - 
> starting timeout scripts
> [  185.044444] dracut-initqueue[284]: Warning: dracut-initqueue timeout - 
> starting timeout scripts
> [  185.563430] dracut-initqueue[284]: Warning: dracut-initqueue timeout - 
> starting timeout scripts
> [  186.082448] dracut-initqueue[284]: Warning: dracut-initqueue timeout - 
> starting timeout scripts
> [  186.601681] dracut-initqueue[284]: Warning: dracut-initqueue timeout - 
> starting timeout scripts
> [  187.120630] dracut-initqueue[284]: Warning: dracut-initqueue timeout - 
> starting timeout scripts
> [  187.639579] dracut-initqueue[284]: Warning: dracut-initqueue timeout - 
> starting timeout scripts
> [  188.158458] dracut-initqueue[284]: Warning: dracut-initqueue timeout - 
> starting timeout scripts
> [  188.677459] dracut-initqueue[284]: Warning: dracut-initqueue timeout - 
> starting timeout scripts
> [  189.196840] dracut-initqueue[284]: Warning: dracut-initqueue timeout - 
> starting timeout scripts
> [  189.197064] dracut-initqueue[284]: Warning: Could not boot.
> [  189.279572] dracut-initqueue[284]: Warning: /dev/sda does not exist
>         Starting Dracut Emergency Shell...
> Warning: /dev/sda does not exist
> 
> Generating "/run/initramfs/rdsosreport.txt"
> 
> 
> Entering emergency mode. Exit the shell to continue.
> Type "journalctl" to view system logs.
> You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or 
> /boot
> after mounting them and attach it to a bug report.
> 
> 
> dracut:/# ls
> bin  dracut-state.sh  init  lib64  root  sbin   sys    tmp  var
> dev  etc      lib   proc   run shutdown  sysroot  usr
> dracut:/# ls dev/
> autofs mcelog    stdout  tty2   tty32  tty45 tty58  udmabuf
> char mem   tty   tty20  tty33  tty46 tty59  urandom
> console null   tty0    tty21  tty34  tty47 tty6   usbmon0
> core nvram   tty1    tty22  tty35  tty48 tty60  vcs
> cpu port   tty10   tty23  tty36  tty49 tty61  vcs1
> cpu_dma_latency  ptmx   tty11   tty24  tty37  tty5 tty62  vcsa
> dma_heap pts   tty12   tty25  tty38  tty50 tty63  vcsa1
> fd random    tty13   tty26  tty39  tty51 tty7   vcsu
> full rtc   tty14   tty27  tty4 tty52 tty8   vcsu1
> hpet rtc0   tty15   tty28  tty40  tty53 tty9   vga_arbiter
> hwrng shm   tty16   tty29  tty41  tty54 ttyS0  zero
> input snapshot  tty17   tty3   tty42  tty55 ttyS1
> kmsg stderr    tty18   tty30  tty43  tty56 ttyS2
> log stdin   tty19   tty31  tty44  tty57 ttyS3
> 
> I can't find the sda or hda in the /dev directory inside qemu.
> 
> What should I do to fix this problem?

You'll need to edit the initramfs and mknod the device you need. From a quick 
look at one of my systems with a sda it's major 8 minor 0. I don't believe I've 
used dracut, which is what you appear to be using to build your initramfs, so I 
can't tell you what you need to do to modify the creation of the initramfs. 
You'll want to look for where you can add the mknod, likely you'll find a 
directory where you can add scripts to run at certain times during the creation 
of the image.

HTH
--FC

> 
> Sincerely!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]