Note that the kernel now runs /init as opposed to /linuxrc or /sbin/init in that mode. (provided busybox is the statically linked version) and you'll get a shell and other busybox utilities in that kernel). Kvm -kernel kernel.img -initrd initramfs.gz To be able to see the kernel messages more easily, I'd recommend using serial output: kvm -kernel kernel.img -initrd disk.img -nographic -append "root=/dev/ram0 console=ttyS0"Īs an alternative you could use an init ramfs instead of an init ramdisk: mkdir -p RAMFS/ qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb -nographic. Then, the kernel would treat the ram disk as the real root file system (though you could still pivot_root to another one). The main (no pun intended) reason to go with nomain is that using the main. If your disk.img is meant to contain a root file system of say a small Linux distribution with /sbin/init., then you probably want to write it instead: kvm -kernel kernel.img -initrd disk.img -append 'root=/dev/ram0` Presumably since you didn't specify a kernel command line ( -append), that /dev/sda1 comes from a CONFIG_CMDLINE passed at kernel compile time or using rdev. The messages above show that it mounts the ram disk successfully (1,0: 1 is for ram, so /dev/ram0) but not the real root file system /dev/sda1 (8,1: 8 is sd, 1 is a1). When /linuxrc (which is supposed to do whatever's necessary to bring up the block device for the real root filesystem) exits, then the kernel mounts the real root file system. Most likely in your case, there's no such file. In that mode, the kernel mounts the disk.img as a ramdisk as the root file system and then executes /linuxrc in there. That is where the initrd is a ramdisk as opposed to a compressed cpio archive unpacked by the kernel in a ramfs, and with the old way to switch to the end device. I am a little lost on what this error means.What's happening is that you're trying to boot Linux in the "Obsolete" way. However, I run this, and I get the following error: (qemu) Bad ram pointer 0x4
0 Comments
Leave a Reply. |