From e51a8f8aef373540005d1b68d6e47fad643c1dd5 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Sat, 6 Feb 2016 21:26:04 -0800 Subject: [PATCH] Make sure we still mount the kernel filesystems in the disk setup We skip the previous unmount/remount behavior because that makes things unwieldly when there are multiple partitions; but we still have setup to do, so that /dev is available for grub, etc. --- live-build/ubuntu-cpc/functions | 15 +++++++++++---- live-build/ubuntu-cpc/hooks/032-disk-image.binary | 2 ++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/live-build/ubuntu-cpc/functions b/live-build/ubuntu-cpc/functions index 3c8c7853..576c1a2e 100644 --- a/live-build/ubuntu-cpc/functions +++ b/live-build/ubuntu-cpc/functions @@ -66,11 +66,9 @@ mount_image() { return 0 } -mount_partition() { - partition="$1" - mountpoint="$2" +setup_mountpoint() { + local mountpoint="$1" - mount "$partition" "$mountpoint" mount --bind /dev "$mountpoint/dev" mount devpts-live -t proc "$mountpoint/dev/pts" mount proc-live -t proc "$mountpoint/proc" @@ -78,6 +76,15 @@ mount_partition() { mount -t tmpfs none "$mountpoint/tmp" mv "$mountpoint/etc/resolv.conf" resolv.conf.tmp cp /etc/resolv.conf "$mountpoint/etc/resolv.conf" + +} + +mount_partition() { + partition="$1" + mountpoint="$2" + + mount "$partition" "$mountpoint" + setup_mountpoint "$mountpoint" } diff --git a/live-build/ubuntu-cpc/hooks/032-disk-image.binary b/live-build/ubuntu-cpc/hooks/032-disk-image.binary index 47275217..6597832d 100755 --- a/live-build/ubuntu-cpc/hooks/032-disk-image.binary +++ b/live-build/ubuntu-cpc/hooks/032-disk-image.binary @@ -70,6 +70,8 @@ fi cp -a chroot/* mountpoint/ +setup_mountpoint mountpoint + case $ARCH in amd64|i386) should_install_grub=1;; *) should_install_grub=0;;