[arch-general] Qemu / KVM 9p rootfs not booting automatically

H8H h8h at dev-nu11.de
Mon Oct 5 22:53:28 UTC 2015


Hi

I'm trying to paravirtualize my archs.

Therefore I've created a directory and fill it with

`pacstrap -d /root/arch base`

After that I've chrooted into

`arch-chroot /root/arch /bin/bash`

Inside I've changed the /etc/mkinitcpio.conf
MODULES="9p 9pnet virtio virtio_blk virtio_pci virtio_net"
HOOKS="base udev block autodetect modconf filesystems keyboard fsck"

(Don't know if all the stuff is necessary)

I've saved that file and run

`mkinitcpio -p linux`

I've exit chroot and start vm on the host system

qemu-system-x86_64 -kernel "/root/arch/boot/vmlinuz-linux" \
   -initrd "/root/arch/boot/initramfs-linux.img" \
   -virtfs
local,id=r,path=/root/arch,mount_tag=r,security_model=passthrough \
  -device virtio-9p-pci,fsdev=r,mount_tag=r \
  -enable-kvm \
  -nographic \
  -append 'root=r rw rootfstype=9p rootflags=trans=virtio console=ttyS0'

As you can see it drops a recovery shell. But I can survive ... i think
the same way the parameter append does. I don't know why this does not
work automatically!?

Any hints?

Thanks

:: running early hook [udev]
starting version 226
:: running hook [udev]
:: Triggering uevents...
ERROR: device 'r' not found. Skipping fsck.
ERROR: Unable to find root device 'r'.
You are being dropped to a recovery shell
    Type 'exit' to try and continue booting
sh: can't access tty; job control turned off
[rootfs /]# mount -t 9p -o trans=virtio r new_root/
[rootfs /]# Trying to continue (this will most likely fail) ...
:: mounting 'r' on real root
mount: you must specify the filesystem type
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs /]# Trying to continue (this will most likely fail) ...
:: running cleanup hook [udev]

Welcome to Arch Linux!

[  OK  ] Reached target Swap.
[  OK  ] Created slice System Slice.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Listening on Device-mapper event daemon FIFOs.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Created slice system-getty.slice.
[  OK  ] Reached target Encrypted Volumes.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Reached target Remote File Systems.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Reached target Paths.
[  OK  ] Listening on Journal Socket.
         Mounting POSIX Message Queue File System...
         Starting Setup Virtual Console...
         Mounting Debug File System...
         Starting Create list of required st... nodes for the current
kernel...
         Starting Apply Kernel Variables...
         Starting Journal Service...
         Mounting Huge Pages File System...
[  OK  ] Listening on udev Control Socket.
         Mounting Temporary Directory...
[  OK  ] Listening on LVM2 metadata daemon socket.
         Starting Remount Root and Kernel File Systems...
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Reached target Slices.
[  OK  ] Set up automount Arbitrary Executab...ats File System Automount
Point.
         Mounting Configuration File System...
[  OK  ] Mounted Huge Pages File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Debug File System.
[  OK  ] Mounted Temporary Directory.
[  OK  ] Started Journal Service.
[  OK  ] Started Setup Virtual Console.
[  OK  ] Started Create list of required sta...ce nodes for the current
kernel.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started Remount Root and Kernel File Systems.
[  OK  ] Mounted Configuration File System.
         Starting udev Coldplug all Devices...
         Starting Load/Save Random Seed...
         Starting Create Static Device Nodes in /dev...
         Starting Flush Journal to Persistent Storage...
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started Flush Journal to Persistent Storage.
[  OK  ] Started Create Static Device Nodes in /dev.
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
         Starting Create Volatile Files and Directories...
         Starting udev Kernel Device Manager...
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Create Volatile Files and Directories.
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily verification of password and group files.
[  OK  ] Started Daily man-db cache update.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting Login Service...
         Starting Permit User Sessions...
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Started Daily rotation of log files.
[  OK  ] Reached target Timers.
[  OK  ] Started Permit User Sessions.
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Started Getty on tty1.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started Login Service.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.

Arch Linux 4.2.2-1-ARCH (ttyS0)

localhost login:

===== Otherwise (Double CTRL+D without typing anything)
:: running early hook [udev]
starting version 226
:: running hook [udev]
:: Triggering uevents...
ERROR: device 'r' not found. Skipping fsck.
ERROR: Unable to find root device 'r'.
You are being dropped to a recovery shell
    Type 'exit' to try and continue booting
sh: can't access tty; job control turned off
[rootfs /]# Trying to continue (this will most likely fail) ...
:: mounting 'r' on real root
mount: you must specify the filesystem type
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs /]# Trying to continue (this will most likely fail) ...
:: running cleanup hook [udev]
ERROR: Failed to mount the real root device.
Bailing out, you are on your own. Good luck.

sh: can't access tty; job control turned off
[rootfs /]# [    2.790188] Kernel panic - not syncing: Attempted to kill
init! exitcode=0x00000000
[    2.790188]
[    2.791557] CPU: 0 PID: 1 Comm: sh Not tainted 4.2.2-1-ARCH #1
[    2.792420] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
BIOS 1.8.2-20150617_082717-anatol 04/01/2014
[    2.793920]  0000000000000000 0000000087ab9fb0 ffff88000655be08
ffffffff8156b9da
[    2.795077]  0000000000000000 ffffffff8170d340 ffff88000655be88
ffffffff8156a86a
[    2.796230]  ffff880000000010 ffff88000655be98 ffff88000655be38
0000000087ab9fb0
[    2.797418] Call Trace:
[    2.797796]  [<ffffffff8156b9da>] dump_stack+0x4c/0x6e
[    2.798548]  [<ffffffff8156a86a>] panic+0xce/0x206
[    2.799252]  [<ffffffff81077749>] do_exit+0xb39/0xb40
[    2.799993]  [<ffffffff810777db>] do_group_exit+0x3b/0xb0
[    2.801094]  [<ffffffff81077864>] SyS_exit_group+0x14/0x20
[    2.801669]  [<ffffffff81570f6e>] entry_SYSCALL_64_fastpath+0x12/0x71
[    2.802442] Kernel Offset: disabled
[    2.802816] ---[ end Kernel panic - not syncing: Attempted to kill
init! exitcode=0x00000000
[    2.802816]

Cheers

Chris


More information about the arch-general mailing list