From 656c9c3ba0c157806df1f5f2e7745298d2390bc1 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Mon, 2 Sep 2019 16:10:16 +0200 Subject: [PATCH] Fix udev+lvm issue on Debian Buster --- debian/chroot.install | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/debian/chroot.install b/debian/chroot.install index fa89c7c..3eccc6e 100755 --- a/debian/chroot.install +++ b/debian/chroot.install @@ -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