我有一个带有 SD 卡的嵌入式系统,上面有 ext4 文件系统。我有一个 rootfs.squasfs 放置在 ext4 文件系统中,我正在尝试启动它。我构建了一个 initramfs,可以在其中挂载 SD 卡,然后挂载 squashfs。但我无法 switch_root 到它。当我尝试时,exec switch_root /newroot /linuxrc
我遇到了崩溃:
/ # mount
rootfs on / type rootfs (rw)
/dev/root.old on / type ext3 (rw,relatime,errors=continue,barrier=1,data=ordered)
/proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/mmcblk0p1 on /tmp type ext4 (rw,relatime,data=ordered)
/dev/loop0 on /newroot type squashfs (ro,relatime)
/ # exec switch_root /newroot /linuxrc
BusyBox v1.22.1 VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
0700 119920 loop0 (driver?)
b300 7634944 mmcblk0 driver: mmcblk
b301 262144 mmcblk0p1 00000000-0000-0000-0000-000000000000
b302 262144 mmcblk0p2 00000000-0000-0000-0000-000000000000
b303 2202010 mmcblk0p3 00000000-0000-0000-0000-000000000000
b310 4096 mmcblk0boot1 (driver?)
b308 4096 mmcblk0boot0 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[<c000eab4>] (unwind_backtrace+0x0/0xfc) from [<c041b0d4>] (panic+0x94/0x1c0)
[<c041b0d4>] (panic+0x94/0x1c0) from [<c0592c9c>] (mount_block_root+0x194/0x224)
[<c0592c9c>] (mount_block_root+0x194/0x224) from [<c0592f20>] (mount_root+0x108/0x110)
[<c0592f20>] (mount_root+0x108/0x110) from [<c0593b6c>] (initrd_load+0x270/0x360)
[<c0593b6c>] (initrd_load+0x270/0x360) from [<c0593010>] (prepare_namespace+0xe8/0x1d8)
[<c0593010>] (prepare_namespace+0xe8/0x1d8) from [<c0592970>] (kernel_init+0x1b4/0x1bc)
[<c0592970>] (kernel_init+0x1b4/0x1bc) from [<c0009ccc>] (kernel_thread_exit+0x0/0x8)
(2015-04-07 17:27:21 CDT) multi-call binary.
Usage: switch_root [-c /dev/console] NEW_ROOT NEW_INIT [ARGS]
有人可以帮助我理解我做错了什么吗?