为什么不使用官方发布的here?拥有 SD 卡的一般程序是为 SD 卡设置两个分区。第一个分区将是 FAT32,您的引导加载程序、设备树 blob 和内核映像以及任何其他文件都可以驻留在其中。如果我没记错的话,RPi 在第一个分区中需要相当多的其他二进制 blob。第二个将是一个 ext 分区,您需要在其中放置 rootfs。获取任何可用的分发映像,将其写入 SD 卡并用您喜欢的任何发行版 rootfs 替换第二个 rootfs 分区。内核和设备树 blob 也可能驻留在第二个分区的 /boot 上,而不是第一个。
我也只是快速检查了一下。我有一张 RPi3 的 SD 卡,上面有 Raspbian。我用基于 Ubuntu 的 rootfs 替换了具有来自 Raspbian 的 rootfs 的第二个分区。它启动得很好,但停在
* Starting Mount filesystems on boot[ OK ]
* Starting Populate /dev filesystem[ OK ]
* Stopping Populate /dev filesystem[ OK ]
* Starting Populate and link to /run filesystem[ OK ]
* Stopping Populate and link to /run filesystem[ OK ]
* Stopping Track if upstart is running in a container[ OK ]
* Starting Initialize or finalize resolvconf[ OK ]
* Starting set console keymap[ OK ]
* Starting Signal sysvinit that virtual filesystems are mounted[ OK ]
* Starting Signal sysvinit that virtual filesystems are mounted[ OK ]
* Starting Bridge udev events into upstart[ OK ]
* Starting device node and kernel event manager[ OK ]
* Starting Signal sysvinit that remote filesystems are mounted[ OK ]
* Stopping set console keymap[ OK ]
* Starting load modules from /etc/modules[ OK ]
* Starting cold plug devices[ OK ]
* Starting log initial device creation[ OK ]
* Stopping load modules from /etc/modules[ OK ]
* Starting set console font[ OK ]
* Stopping set console font[ OK ]
* Starting userspace bootsplash[ OK ]
* Starting Send an event to indicate plymouth is up[ OK ]
* Stopping userspace bootsplash[ OK ]
* Stopping Send an event to indicate plymouth is up[ OK ]
* Stopping cold plug devices[ OK ]
* Stopping log initial device creation[ OK ]
* Starting configure network device security[ OK ]
* Starting Mount network filesystems[ OK ]
* Starting configure network device security[ OK ]
* Stopping Mount network filesystems[ OK ]
* Starting configure network device[ OK ]
* Starting configure network device[ OK ]
* Starting Bridge socket events into upstart[ OK ]
The disk drive for / is not ready yet or not present.
keys:Continue to wait, or Press S to skip mounting or M for manual recovery
我没有调查原因,但我相信这是由于 /etc/fstab。
[root@alarmpi ~]# cat /etc/fstab
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
/dev/mmcblk0p1 /boot vfat defaults 0 0
这是来自 Arch。我没有记下 Ubuntu,但它是不正确的。
用基于 ArchLinux ARM 的 rootfs 替换 rootfs,它似乎可以正常启动。请注意,我使用了基于 Raspbian 的 SD 卡并将 rootfs 与 Arch 的交换。
[ 3.743064] systemd-journald[85]: Received request to flush runtime journal from PID 1
[ 4.791472] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
Arch Linux 4.1.18-v7+ (ttyS0)
alarmpi login:
Arch Linux 4.1.18-v7+ (ttyS0)
alarmpi login: root
Password:
Welcome to Arch Linux ARM
Website: http://archlinuxarm.org
Forum: http://archlinuxarm.org/forum
IRC: #archlinux-arm on irc.Freenode.net
[ 15.258407] random: nonblocking pool is initialized
我希望这能让您大致了解如何处理这个问题。