Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

root=/dev/ram #37

Open
Squirre17 opened this issue Jun 19, 2023 · 0 comments
Open

root=/dev/ram #37

Squirre17 opened this issue Jun 19, 2023 · 0 comments

Comments

@Squirre17
Copy link
Owner

$ cat  ./tmp/SCTF-flying_kernel/files/boot.sh -p
#!/bin/sh
qemu-system-x86_64 \
    -m 128M \
    -kernel /home/ctf/bzImage \
    -initrd /home/ctf/rootfs.img \
    -monitor /dev/null \
    -append "root=/dev/ram console=ttyS0 oops=panic panic=1 nosmap" \
    -cpu kvm64,+smep \
    -smp cores=2,threads=2 \
    -netdev user,id=t0, -device e1000,netdev=t0,id=nic0 \
    -nographic

kernel will panic if not append root=/dev/ram

[    2.800730] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    2.801122] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.8.18 #2
[    2.801122] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
[    2.801122] Call Trace:
[    2.801122]  dump_stack+0x57/0x6b
[    2.801122]  panic+0xf3/0x2b5
[    2.801122]  mount_block_root+0x17d/0x21d
[    2.801122]  ? rdinit_setup+0x26/0x26
[    2.801122]  mount_root+0x10a/0x128
[    2.801122]  prepare_namespace+0x130/0x15f
[    2.801122]  kernel_init_freeable+0x1fb/0x20a
[    2.801122]  ? rest_init+0xb0/0xb0
[    2.801122]  kernel_init+0x5/0x110
[    2.801122]  ret_from_fork+0x22/0x30
[    2.801122] Kernel Offset: disabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant