* Symlink $mountPoint/etc/mtab to /proc/mounts.
svn path=/nixos/trunk/; revision=11793
This commit is contained in:
parent
728a278641
commit
5feff6f5d4
@ -58,15 +58,6 @@ mkdir -m 0755 -p $mountPoint/dev $mountPoint/proc $mountPoint/sys $mountPoint/mn
|
|||||||
mount --bind /dev $mountPoint/dev
|
mount --bind /dev $mountPoint/dev
|
||||||
mount --bind /proc $mountPoint/proc
|
mount --bind /proc $mountPoint/proc
|
||||||
mount --bind /sys $mountPoint/sys
|
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
|
mount --rbind / $mountPoint/mnt
|
||||||
|
|
||||||
umountUnder() {
|
umountUnder() {
|
||||||
@ -191,10 +182,15 @@ if test -e /etc/nixos/services; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Grub needs an mtab.
|
||||||
|
ln -sfn /proc/mounts $mountPoint/etc/mtab
|
||||||
|
|
||||||
|
|
||||||
# Mark the target as a NixOS installation, otherwise
|
# Mark the target as a NixOS installation, otherwise
|
||||||
# switch-to-configuration will chicken out.
|
# switch-to-configuration will chicken out.
|
||||||
touch $mountPoint/etc/NIXOS
|
touch $mountPoint/etc/NIXOS
|
||||||
|
|
||||||
|
|
||||||
# Switch to the new system configuration. This will install Grub with
|
# Switch to the new system configuration. This will install Grub with
|
||||||
# a menu default pointing at the kernel/initrd/etc of the new
|
# a menu default pointing at the kernel/initrd/etc of the new
|
||||||
# configuration.
|
# configuration.
|
||||||
|
Loading…
Reference in New Issue
Block a user