[source] x86: keep /boot mounted for kexec

LEDE Commits lede-commits at lists.infradead.org
Thu Dec 14 09:44:04 PST 2017


jow pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/90575776b7062426afb80d7abdc15c1bc67c4c3a

commit 90575776b7062426afb80d7abdc15c1bc67c4c3a
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Fri May 5 05:56:10 2017 +0200

    x86: keep /boot mounted for kexec
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
    (cherry picked from commit 63571cb56c7ff2692b5c9aa78133c3f4996e2ac5)
---
 target/linux/x86/base-files/lib/preinit/79_move_config | 11 +++++++----
 1 file 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 143ca51..7b34d9e 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
 }



More information about the lede-commits mailing list