我在 RaspberryPi2 上运行 4.9.61-1-ARCH armv7l。我通过升级破坏了我的系统。为了修复这个问题,我从另一个 Arch ARM 安装中使用 chroot 进入 sdc2,但由于能力不足,我没有挂载引导分区 sdc1。我运行了pacman -Syu
,现在我的系统再次启动,并且只要我能告诉就运行良好,但是我收到以下警告:
[2017-11-28 22:34] [ALPM] upgraded linux-raspberrypi (4.9.61-1 -> 4.9.65-1)
[2017-11-28 22:34] [ALPM-SCRIPTLET] WARNING: /boot appears to be a seperate partition but is not mounted.
[2017-11-28 22:34] [ALPM-SCRIPTLET] You probably just broke your system. Congratulations.
[2017-11-28 22:34] [ALPM-SCRIPTLET] >>> Updating module dependencies. Please wait ...
[2017-11-28 22:34] [ALPM] running '99-linux-raspberrypi.hook'...
[2017-11-28 22:34] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux-raspberrypi.preset: 'default'
[2017-11-28 22:34] [ALPM-SCRIPTLET] -> -k 4.9.65-1-ARCH -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
[2017-11-28 22:34] [ALPM-SCRIPTLET] ==> Starting build: 4.9.65-1-ARCH
[2017-11-28 22:34] [ALPM-SCRIPTLET] -> Running build hook: [base]
[2017-11-28 22:34] [ALPM-SCRIPTLET] -> Running build hook: [udev]
[2017-11-28 22:34] [ALPM-SCRIPTLET] -> Running build hook: [autodetect]
[2017-11-28 22:34] [ALPM-SCRIPTLET] -> Running build hook: [modconf]
[2017-11-28 22:34] [ALPM-SCRIPTLET] -> Running build hook: [block]
[2017-11-28 22:34] [ALPM-SCRIPTLET] -> Running build hook: [filesystems]
[2017-11-28 22:34] [ALPM-SCRIPTLET] -> Running build hook: [keyboard]
[2017-11-28 22:34] [ALPM-SCRIPTLET] -> Running build hook: [fsck]
[2017-11-28 22:34] [ALPM-SCRIPTLET] ==> WARNING: No modules were added to the image. This is probably not what you want.
[2017-11-28 22:34] [ALPM-SCRIPTLET] ==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
[2017-11-28 22:34] [ALPM-SCRIPTLET] ==> Image generation successful
另一个人pacman -Syu
告诉我“没什么可做的”
现在我想知道这是否会导致问题,也许会导致未来的升级。是否建议降级 linux-raspberrypi 并再次运行升级,或者我在这里安全吗,因为它似乎有效?
文件夹 /boot 内容的修改日期与启动分区的修改日期匹配,因此我按照注释中的建议复制了它们 - 工作正常。
答案1
首先,将 /boot 中的所有内容复制到临时目录,
$ sudo cp -R /boot /tmp/boot
$ ls /tmp/boot # verify that everything copied over
然后删除/boot中的所有内容,
$ sudo rm -ir /boot/*
然后挂载你的启动目录,
$ sudo mount -a # mounts all filesystems mentioned in fstab
$ sudo mount | grep boot # verify boot is mounted
然后将所有内容复制回/boot,
$ sudo cp -R /tmp/boot/* /boot/
$ ls /boot # verify files copied over successfully
$ sudo rm -rf /tmp/boot # delete temporary directory