linuxboot / linuxboot/linuxboot

Cannot boot from disk with Heads in QEMU

Open
#41 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
955
Forks
114
PR merge metrics
No merged PRs in 30d

Description

I tried to run qemu with heads as the kernel and ramdisk, using the following commands in the linuxboot build directory:
sudo make BOARD=qemu KERNEL=../heads/build/qemu-linuxboot/bzImage INITRD=../heads/build/qemu-linuxboot/initrd.cpio.xz config
sudo make
sudo make run

The resulting run gave the following error while booting:
0.927991] Trying to unpack rootfs image as initramfs...

[ 3.745463] ------------[ cut here ]------------

[ 3.745973] WARNING: CPU: 0 PID: 1 at free_init_pages+0x2d/0x7a

[ 3.746226] Modules linked in:

[ 3.746551] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.62-heads #0

[ 3.746828] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015

[ 3.747190] task: ffff880006058000 task.stack: ffffc90000014000

[ 3.747443] RIP: 0010:free_init_pages+0x2d/0x7a

[ 3.747658] RSP: 0018:ffffc90000017e70 EFLAGS: 00000287

[ 3.747882] RAX: ffff880004da3000 RBX: ffff880000000000 RCX: ffff8800050f2818

[ 3.748152] RDX: ffff8800050f3000 RSI: ffff880004da2018 RDI: ffffffff81af162d

[ 3.748252] RBP: ffff8800050f3000 R08: 0000000000022080 R09: ffff880005ee81c0

[ 3.748252] R10: 0000000000000090 R11: ffff880005eece00 R12: 0000000080000000

[ 3.748252] R13: ffffffff81af162d R14: 0000000000000000 R15: 0000000000000000

[ 3.748252] FS: 0000000000000000(0000) GS:ffff880006400000(0000) knlGS:0000000000000000

[ 3.748252] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033

[ 3.748252] CR2: 0000000000000000 CR3: 0000000002c0a000 CR4: 00000000000006f0

[ 3.748252] Call Trace:

[ 3.748252] ? do_early_param+0x89/0x89

[ 3.748252] free_initrd+0x73/0x8b

[ 3.748252] populate_rootfs+0xee/0xfc

[ 3.748252] ? clean_rootfs+0x12b/0x12b

[ 3.748252] do_one_initcall+0x92/0x138

[ 3.748252] ? do_early_param+0x89/0x89

[ 3.748252] kernel_init_freeable+0x146/0x1c6

[ 3.748252] ? rest_init+0x95/0x95

[ 3.748252] kernel_init+0x5/0xe6

[ 3.748252] ret_from_fork+0x35/0x40

[ 3.748252] Code: 86 ff 0f 00 00 41 55 49 89 fd 48 25 00 f0 ff ff 41 54 55 48 89 d5 48 81 e2 00 f0 ff ff 53 48 39 c6 75 08 48 89 f3 48 39 d5 74 08 <0f> 0b 48 89 d5 48 89 c3 48 39 eb 73 39 49 89 ec 48 89 df 49 29

[ 3.748252] ---[ end trace 1b64cae965fb82bb ]---

[ 3.767684] Freeing initrd memory: 3392K

It subsequently seemed to try a network boot - I expected an initrd shell.

Any idea what may be the problem?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure from the linuxboot build directory with the documented BOARD=qemu, KERNEL, and INITRD commands, then start by examining the boot log around initramfs unpacking and free_initrd. Confirm why the expected initrd shell is not reached and document or implement the change needed for disk boot to continue correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.