From fc69b8633fce3adf2866a491076cba083e5fdac2 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Fri, 5 Apr 2019 17:25:38 +0200 Subject: [PATCH] Chroot: Ensure to remount device before run chroot --- debian/chroot.install | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/debian/chroot.install b/debian/chroot.install index 7b5df08..2d6e292 100755 --- a/debian/chroot.install +++ b/debian/chroot.install @@ -200,6 +200,12 @@ grep "/var/tmp" /target/etc/fstab || echo "/tmp /var/tmp no sed -i 's;target;;g' /target/etc/fstab sed -i 's;//;/;g' /target/etc/fstab ## }}} +## Ensure to remount device {{{ +mountpoint -q /target/dev/ || mount -t devtmpfs -- none /target/dev +mountpoint -q /target/dev/pts || mount -t devpts -- /dev/pts /target/dev/pts +mountpoint -q /target/proc || mount -t proc -- none /target/proc +mountpoint -q /target/sys || mount -t sysfs -- none /target/sys +## }}} ## Network {{{ ### Get all informations from current network configuration in rescue mode net_device=$(ip r | grep "^default" | head -1 | cut -d" " -f5) @@ -227,12 +233,6 @@ DNS=80.67.169.12 ### Ensure to enable systemd-networkd at startup chroot /target systemctl enable systemd-networkd -## }}} -## Ensure to remount device {{{ -mountpoint -q /target/dev/ || mount -t devtmpfs -- none /target/dev -mountpoint -q /target/dev/pts || mount -t devpts -- /dev/pts /target/dev/pts -mountpoint -q /target/proc || mount -t proc -- none /target/proc -mountpoint -q /target/sys || mount -t sysfs -- none /target/sys ## }}} ## Locale {{{ ### Enable locale(s)