[LITMUS^RT] [NOOB] Cannot boot using "default" compiled kernel

John Gamboa vaulttech at gmail.com
Thu Aug 9 14:28:27 CEST 2012


Hello,

I've compiled the Linux kernel using the instructions provided in [1].
Instead of running "make menuconfig", I've copied the "sample 64-bit
configuration" file (provided in [1]) and renamed it to ".config", so it
could work as the configuration file used by make. It also didn't compile
any modules, since, as far as I understood, the "sample 64-bit
configuration" file is configured not to allow any module. I managed to get
the bzImage file as expected.

While I want to use qemu, I'm using "aqemu" to configure it (it seemed a
good graphical user interface). I created a new virtual machine and the
command line produced by the configurations I defined is the following
(aqemu allows me to access it):

/usr/bin/qemu-system-x86_64

    -monitor stdio

    -soundhw es1370

    -vga std

    -m 256

    -localtime

    -hda /home/gamboa/test

    -boot c

    -net nic,vlan=0

    -net user,vlan=0

    -kernel
/home/gamboa/Documents/litmus/litmus-patch/bzImage.default_without_modules

    -initrd
/home/gamboa/Documents/litmus/initrd/initrd.img-3.0.0-litmus-litmus2011.2

    -name "test"

As you can see, it is passing the -kernel option using the bzImage created
(I put it in another place to make sure I wouldn't lose it when compiling
the kernel again) and the -initrd option. To create the
"initrd.img-3.0.0-litmus-litmus2011.2" file, I used the following command:

    $ mkinitramfs -o initrd.img-3.0.0-litmus-litmus2011.2
3.0.0-litmus-litmus2011.2

In the first time, the mkinitramfs complained, saying that the
"/lib/modules/3.0.0-litmus-litmus2011.2" folder didn't exist. I created an
empty folder and it stopped complaining (I hope to have done the right
thing).

When trying to run the virtual machine with these commands, I'm getting a
kernel panic with the following error message:

VFS: Cannot open root device "(null)" or unknown-block(8,2)
> Please append a correct "root=" boot option; here are the available
> partitions:
> 0300            10485760 hda   driver: ide-gd
>     0301        9990144 hda1 00000000-0000-0000-0000-000000000000
>     0302                   1 hda2 00000000-0000-0000-0000-000000000000
>     0305          492544 hda5 00000000-0000-0000-0000-000000000000
> 1600            4194302 hdc     driver: ide-cdrom
> Kernel panic - not syncing: VFS: Unable to mount root fs on
> unknown-block(8,2)
> Pid: 1, comm: swapper Not tainted 3.0.0-litmus-litmus2011.2 #1
> Call Trace:
> [...]



Since it askes me use the "root=" option, I changed the configuration in
aqemu, and now the command line (to call qemu) has an additional option
"-append root=/dev/hda1" just before the "-name" parameter.

The new error now is the following:

EXT4-fs (hda1): mounted filesystem with ordered data mode. Opts: (null)
> VFS: Mounted root (ext4 filesystem) readonly on device 3:1.
> devtmpfs: mounted
> Freeing unused kernel memory: 516k freed
> Kernel panic - not syncing: No init found. Try passing init= option to
> kernel. See Linux Documentation/init.txt for guidance.
> Pid: 1, comm: swapper Not tainted 3.0.0-litmus-litmus2011.2 #1
> Call Trace:
> [...]


I know that the "init=" option tells the kernel what should be the first
command to be run in the "ram file system", but I'm stuck at this point.
Although I've been using linux for a long time already, I'm relatively noob
when compiling kernels and booting them in virtual machines.

Any help on making this newly compiled kernel work in my virtual machine
would be appreciated -- and tell me if you need more information to help (I
tried my best to explain exactly the situation).

Thanks in advance!

[1]: https://wiki.litmus-rt.org/litmus/InstallationInstructions

-- 
John Gamboa
rabanetescebolas.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20120809/9e0d94ca/attachment.html>


More information about the litmus-dev mailing list