Forgotten CONFIG_ values
majek opened this issue · 5 comments
I'm quite sure virtme requires at least
CONFIG_BLK_DEV_INITRD
Needed for the initrd to work at all. Otherwise only non-initrd stuff works. (shell)
CONFIG_INOTIFY_USER
Needed for proper udev /dev/virtio-port mounting. Without this you'll see error:
virtme-init: cannot find script I/O port; make sure virtio-serial is available
CONFIG_ACPI
Needed for shutdown to actually close the vm. otherwise it hangs on message reboot: System halted
On top of the already documented ones. This should probably be added to virtme/configkernel.
I did:
rm .config
make tinyconfig
make kvmconfig
./scripts/config \
-e EARLY_PRINTK \
-e 64BIT \
-e BPF -d EMBEDDED -d EXPERT \
-e INOTIFY_USER \
-e ACPI
./scripts/config \
-e VIRTIO -e VIRTIO_PCI -e VIRTIO_MMIO \
-e NET -e NET_CORE -e NETDEVICES -e NETWORK_FILESYSTEMS \
-e INET -e NET_9P -e NET_9P_VIRTIO -e 9P_FS \
-e VIRTIO_NET -e VIRTIO_CONSOLE \
-e DEVTMPFS -e SCSI_VIRTIO -e BINFMT_SCRIPT -e TMPFS \
-e UNIX -e TTY -e VT -e UNIX98_PTYS -e WATCHDOG -e WATCHDOG_CORE \
-e I6300ESB_WDT \
-e BLOCK -e SCSI_LOWLEVEL -e SCSI -e SCSI_VIRTIO \
-e BLK_DEV_SD -e BLK_DEV_INITRD \
-e VIRTIO_BALLOON \
-d CMDLINE_OVERRIDE \
-d UEVENT_HELPER \
-d EMBEDDED -d EXPERT \
-d MODULE_SIG_FORCE
make olddefconfig
make bzImage
Hmm. This really ought to work without ACPI and BLK_DEV_INITRD. I'll add INOTIFY for now.
ACPI is indeed not needed (apart from the described halt problem), BLK_DEV_INITRD is needed though. Without it:
~/src/virtme$ sudo ./virtme-run --rw --pwd --kimg ../linux/arch/x86/boot/bzImage --memory 1G --force-initramfs
List of all partitions:
No filesystem could mount root, tried:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 0 PID: 1 Comm: swapper Not tainted 5.10.3+ #164
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
Call Trace:
panic+0xe5/0x267
? printk+0x47/0x49
mount_block_root+0x2e0/0x2e0
? rest_init+0x7e/0x7e
prepare_namespace+0x12c/0x15b
? rest_init+0x7e/0x7e
kernel_init+0x9/0xef
ret_from_fork+0x1f/0x30
Kernel Offset: disabled
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
@marcosps applied arighi@0bc524e
I added it to the optional configs (optionals are only available in my fork - these are configs that you can override passing a custom config snippet via virtme-configkernel --custom FILE
).
I think it should be optional because we may want to disable it when we are 100% sure to use a initramfs-less boot. By default it'll be enabled so we won't break virtme-run --force-initramfs
.