All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: Kernel panics (in QEMU) when booting with GRUB2 + OVMF + QEMU.
Date: Sat, 15 Aug 2015 09:29:55 +0300	[thread overview]
Message-ID: <55CEDC63.7010604@gmail.com> (raw)
In-Reply-To: <16954915.kKtRLGMXJZ@melech-hp>

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
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>



  reply	other threads:[~2015-08-15  6:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-14  6:45 Kernel panics (in QEMU) when booting with GRUB2 + OVMF + QEMU Mark Lee
2015-08-15  6:29 ` Andrei Borzenkov [this message]
2015-08-15  7:50   ` Mark Lee
2015-08-16  3:31   ` Jordan Uggla
2015-08-16  5:25     ` Mark Lee
2015-08-17 14:22       ` Andrei Borzenkov
2015-08-17 15:26         ` Mark Lee
2015-11-04 12:00           ` Vladimir 'phcoder' Serbinenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55CEDC63.7010604@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.