| 1 |
2010-10-16 Michael Tautschnig <mt@debian.org>
|
| 2 |
|
| 3 |
* subroutines: bind-mount /proc and /dev into target. Thanks Michael Prokop
|
| 4 |
<mika@debian.org> for providing all the info and looking at other
|
| 5 |
references.
|
| 6 |
* examples/simple/files/boot/grub/menu.lst/postinst: Call grub-install within
|
| 7 |
chroot, which works with the above change (closes: #523617)
|
| 8 |
Index: trunk/lib/subroutines
|
| 9 |
===================================================================
|
| 10 |
--- trunk.orig/lib/subroutines
|
| 11 |
+++ trunk/lib/subroutines
|
| 12 |
@@ -494,6 +494,7 @@
|
| 13 |
die "Internal error when calling /tmp/rebootCD."
|
| 14 |
fi
|
| 15 |
umount $FAI_ROOT/proc
|
| 16 |
+ umount $FAI_ROOT/dev
|
| 17 |
umount -ar
|
| 18 |
exec reboot -dfi
|
| 19 |
}
|
| 20 |
@@ -818,6 +819,13 @@
|
| 21 |
[ -f $LOGDIR/crypttab ] && cp -p $LOGDIR/crypttab $FAI_ROOT/etc/crypttab
|
| 22 |
# make /var/lib/dpkg a ramdisk
|
| 23 |
mkramdisk -a
|
| 24 |
+ # mount /dev and /proc on target otherwise grub-installer will fail
|
| 25 |
+ mount -o bind /dev $FAI_ROOT/dev
|
| 26 |
+ task_error 802 $?
|
| 27 |
+ if [ ! -e $FAI_ROOT/proc/version ]; then
|
| 28 |
+ mount -o bind /proc $FAI_ROOT/proc
|
| 29 |
+ task_error 803 $?
|
| 30 |
+ fi
|
| 31 |
}
|
| 32 |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
| 33 |
### BEGIN SUBROUTINE INFO
|