Boot
“pacman -Syu”“可能”破壞了我的系統,因為未安裝引導
我在我的 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 文件夾內容的修改日期與引導分區的修改日期相匹配,所以我按照評論中的建議複製了它們——工作正常。
首先,將 /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