Fix udev+lvm issue on Debian Buster

This commit is contained in:
Jeremy Gardais 2019-09-02 16:10:16 +02:00
parent 5d10e94a83
commit 656c9c3ba0
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 18 additions and 8 deletions

26
debian/chroot.install vendored
View File

@ -177,14 +177,23 @@ debootstrap --arch amd64 --include="${dbs_pkg_include}" --exclude="${dbs_pkg_exc
cp -- /tmp/target.fstab /target/etc/fstab
## }}}
## Ensure to (re)mount devices for chroot {{{
mkdir -p -- /target/dev
mountpoint -q /target/dev/ || mount -t devtmpfs -- none /target/dev
mkdir -p -- /target/dev/pts
mountpoint -q /target/dev/pts || mount -t devpts -- /dev/pts /target/dev/pts
mkdir -p -- /target/proc
mountpoint -q /target/proc || mount -t proc -- none /target/proc
mkdir -p -- /target/sys
mountpoint -q /target/sys || mount -t sysfs -- none /target/sys
mkdir -p -- /target/dev
mountpoint -q /target/dev || mount -t devtmpfs -- none /target/dev
mkdir -p -- /target/dev/pts
mountpoint -q /target/dev/pts || mount -t devpts -- /dev/pts /target/dev/pts
mkdir -p -- /target/proc
mountpoint -q /target/proc || mount -t proc -- none /target/proc
mkdir -p -- /target/sys
mountpoint -q /target/sys || mount -t sysfs -- none /target/sys
### FIXME: /run/lvm needs to be manually set in debootstrap|chroot for Buster {{{
### See:
### https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=918590
### https://bbs.archlinux.org/viewtopic.php?pid=1820949#p1820949
mkdir -p -- /target/run/lvm
mountpoint -q /target/run/lvm || mount --bind -- /run/lvm /target/run/lvm
mkdir -p -- /target/run/udev
mountpoint -q /target/run/udev || mount --bind -- /run/udev /target/run/udev
### }}}
## }}}
## Network {{{
### Get all informations from current network configuration in rescue mode
@ -230,6 +239,7 @@ chroot /target dpkg-reconfigure --frontend noninteractive tzdata
## }}}
## Kernel and Grub {{{
### Install
chroot /target aptitude install --assume-yes --without-recommends -- linux-image-amd64 grub-pc
chroot /target grub-install "${hdd}"
chroot /target update-grub