aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2017-05-05 05:56:10 +0200
committerJo-Philipp Wich <jo@mein.io>2017-12-13 15:24:47 +0100
commit90575776b7062426afb80d7abdc15c1bc67c4c3a (patch)
tree3571d5bdb0806b9e143dc19698c6bb88d7021fd6
parent6b9eb0c73a7ced5091b7ab8011b9788ba23d5b79 (diff)
downloadupstream-90575776b7062426afb80d7abdc15c1bc67c4c3a.tar.gz
upstream-90575776b7062426afb80d7abdc15c1bc67c4c3a.tar.bz2
upstream-90575776b7062426afb80d7abdc15c1bc67c4c3a.zip
x86: keep /boot mounted for kexec
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 63571cb56c7ff2692b5c9aa78133c3f4996e2ac5)
-rw-r--r--target/linux/x86/base-files/lib/preinit/79_move_config11
1 files changed, 7 insertions, 4 deletions
diff --git a/target/linux/x86/base-files/lib/preinit/79_move_config b/target/linux/x86/base-files/lib/preinit/79_move_config
index 143ca5147b..7b34d9e5da 100644
--- a/target/linux/x86/base-files/lib/preinit/79_move_config
+++ b/target/linux/x86/base-files/lib/preinit/79_move_config
@@ -7,11 +7,14 @@ move_config() {
. /lib/upgrade/common.sh
if export_bootdevice && export_partdevice partdev 1; then
- if mount -t ext4 -o rw,noatime "/dev/$partdev" /mnt; then
- if [ -f /mnt/sysupgrade.tgz ]; then
- mv -f /mnt/sysupgrade.tgz /
+ mkdir -p /boot
+ if mount -t ext4 -o ro,noatime "/dev/$partdev" /boot; then
+ if [ -f /boot/sysupgrade.tgz ]; then
+ mount /boot -o remount,rw,noatime
+ mv -f /boot/sysupgrade.tgz /
+ mount /boot -o remount,ro,noatime
fi
- umount /mnt
+ mount --bind /boot/boot /boot
fi
fi
}