Chroot: Ensure to remount device before run chroot
This commit is contained in:
parent
81700aed1b
commit
fc69b8633f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue