* Symlink $mountPoint/etc/mtab to /proc/mounts.

svn path=/nixos/trunk/; revision=11793
This commit is contained in:
Eelco Dolstra 2008-05-09 10:08:02 +00:00
parent 728a278641
commit 5feff6f5d4

View file

@ -58,15 +58,6 @@ mkdir -m 0755 -p $mountPoint/dev $mountPoint/proc $mountPoint/sys $mountPoint/mn
mount --bind /dev $mountPoint/dev
mount --bind /proc $mountPoint/proc
mount --bind /sys $mountPoint/sys
# Grub needs a mtab. Make a proper one..
chroot $mountPoint \
/nix/var/nix/profiles/system/sw/bin/cat /proc/mounts > /etc/mtab
echo "/etc/mtab: "
cat /mnt/etc/mtab
# That could spoil mtab with litter.
mount --rbind / $mountPoint/mnt
umountUnder() {
@ -191,10 +182,15 @@ if test -e /etc/nixos/services; then
fi
# Grub needs an mtab.
ln -sfn /proc/mounts $mountPoint/etc/mtab
# Mark the target as a NixOS installation, otherwise
# switch-to-configuration will chicken out.
touch $mountPoint/etc/NIXOS
# Switch to the new system configuration. This will install Grub with
# a menu default pointing at the kernel/initrd/etc of the new
# configuration.