grub-devel
[Top][All Lists]
Advanced

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

Re: Kernel panics (in QEMU) when booting with GRUB2 + OVMF + QEMU.


From: Andrei Borzenkov
Subject: Re: Kernel panics (in QEMU) when booting with GRUB2 + OVMF + QEMU.
Date: Sat, 15 Aug 2015 09:29:55 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0

On 14.08.2015 09:45, Mark Lee wrote:
To all,

I've encountered a bug when using GRUB2 + OVMF + QEMU on Arch Linux 64 bit.
The issue can be reproduced when running the latest git code from grub as
well.

ISSUE: Kernel panics (in QEMU) when booting with GRUB2 + OVMF + QEMU.

Once kernel is loaded, GRUB task is over. Why do you think it is GRUB issue?

------
     When booting using OVMF (ovmf_x64.bin) + QEMU, GRUB2 manages to load but
kernel panics when loading its menu entry. This issue is not observed in
hardware or via bios boot.

DOWNLOADS: test.img
----------
     To speed up testing, one can skip reproducing test.img and grab a copy at
<https://drive.google.com/file/d/0Bx2cO4TT8XjeSEt2aEVkNEVsZUk/view?usp=sharing>

REPRODUCE test.img:
-------------------
# fallocate -l 3G test.img
# gdisk test.img <<<(
o
y
n
1

+1M
ef02

n
2

+100M
ef00

n
3




w
y
)
# kpartx -l test.img      /* Get the name of loop device <loop> */
# kpartx -a test.img
# mkfs.fat /dev/mapper/<loop>p2
# mkfs.ext4 /dev/mapper/<loop>p3
# mount /dev/mapper/<loop>p3 /mnt
# mkdir /mnt/boot
# mount /dev/mapper/<loop>p2 /mnt/boot

/* This part is Arch Linux specific */
# pacstrap /mnt base grub
/* End Arch Linux specific */

# grub-install --target=i386-pc --boot-directory=/mnt/boot /dev/<loop>
# grub-install --target=x86_64-efi --efi-directory=/mnt/boot --boot-
directory=/mnt/boot --removable
# echo "
insmod all_video
menuentry "Arch Linux" {
   linux /vmlinuz-linux rw root=/dev/sda3
   initrd /initramfs-linux-fallback.img
}
" > /mnt/boot/grub/grub.cfg
# umount -R /mnt
# kpartx -d test.img

REPRODUCE QEMU ERROR:
---------------------
/* Bios works */
# qemu-system-x86_64 -enable-kvm -cpu host test.img

/* UEFI doesn't */
# qemu-system-x86_64 -enable-kvm -cpu host -bios /usr/share/ovmf/ovmf_x64.bin
test.img

/* I get the following error */
Kernel panic - not syncing : VFS: Unable to mount root fs on Unknown-
block(0,0)
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.1.4-1-ARCH #1
Hardware name : QEMU Standard PC (i440FX + PIIX, 1996), BIOS
0000000000000000 000000007fac344c ffff880006527db8 ffffffff815865be
0000000000000000 ffffffff816f61b0 ffff880006527e38 ffffffff81585453
ffff880000000010 ffff880006527e48 ffff880006527de8 000000007fac344c
Call Trace:
[<ffffffff815865be>] dump_stack+0x4c/0x6e
[<ffffffff81585453>] panic+0xd0/0x203
[<ffffffff818fa621>] mount_block_root+0x297/0x2a6
[<ffffffff818fa684>] mount_root+0x54/0x58
[<ffffffff818fa7c0>] prepare_namespace+0x138/0x171
[<ffffffff818fa22e>] kernel_init_freeable+0x1ec/0x215
[<ffffffff8157cbb0>] ? rest_init+0x90/0x90
[<ffffffff8157cbbe>] kernel_init+0xe/0xf0
[<ffffffff8157c2a2>] ret_fromt_fork+0x42/0x70
[<ffffffff8157cbb0>] ? rest_init+0x90/0x90
Kernel Offset: disabled
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-
block(0,0)



_______________________________________________
Grub-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/grub-devel





reply via email to

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