设置
分区:
# fdisk -l /dev/sda
...
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 51199 49152 24M c W95 FAT32 (LBA)
/dev/sda2 51200 204799 153600 75M 83 Linux
系统Linux配置:
UI menu.c32
LABEL linux
LINUX ../bzImage
INITRD ../initrd.img
APPEND rootfstype=tmpfs init=/init
/init
:
#!/bin/sh
mount -a
/bin/sh
poweroff -f
测试
通过 QEMU 启动可以正常工作:
# qemu-system-x86_64 /dev/sda
...但是,在笔记本电脑(相同的架构)上运行会导致空白屏幕。我可以键入 shell 命令(reboot
、poweroff
等),但屏幕上没有显示任何文本。