fix error in detection of NixOS install CD
svn path=/nixu/trunk/; revision=3772
This commit is contained in:
parent
066c85b4f0
commit
9f0a098056
16
fill-disk.sh
16
fill-disk.sh
@ -1,6 +1,6 @@
|
|||||||
#! @bash@/bin/sh -e
|
#! @bash@/bin/sh -e
|
||||||
|
|
||||||
export PATH=@bash@/bin:@coreutilsdiet@/bin:@coreutils@/bin:@findutils@/bin:@utillinux@/bin:@utillinux@/sbin:@e2fsprogs@/sbin:@grub@/sbin:@sysvinitPath@/sbin:@gnugrep@/bin:@which@/bin:@gnutar@/bin
|
export PATH=@bash@/bin:@coreutilsdiet@/bin:@coreutils@/bin:@findutils@/bin:@utillinux@/bin:@utillinux@/sbin:@e2fsprogs@/sbin:@grub@/sbin:@sysvinitPath@/sbin:@gnugrep@/bin:@which@/bin:@gnutar@/bin:@eject@/bin
|
||||||
|
|
||||||
##
|
##
|
||||||
## In the beginning we want to have a minimalistic environment, built with
|
## In the beginning we want to have a minimalistic environment, built with
|
||||||
@ -187,7 +187,7 @@ mknod -m 0600 $root/dev/tty1 c 4 1
|
|||||||
mknod -m 0444 $root/dev/urandom c 1 9
|
mknod -m 0444 $root/dev/urandom c 1 9
|
||||||
|
|
||||||
rm -f $root/etc/mtab
|
rm -f $root/etc/mtab
|
||||||
#ln -s /proc/mounts $root/etc/mtab
|
ln -s /proc/mounts $root/etc/mtab
|
||||||
|
|
||||||
## Probe for CD device which contains our CD here and mount /nix and
|
## Probe for CD device which contains our CD here and mount /nix and
|
||||||
## /nixpkgs from it inside the ramdisk. Anaconda uses kudzu for this.
|
## /nixpkgs from it inside the ramdisk. Anaconda uses kudzu for this.
|
||||||
@ -198,15 +198,15 @@ DEVICES="/dev/hd?"
|
|||||||
for i in ${DEVICES}
|
for i in ${DEVICES}
|
||||||
do
|
do
|
||||||
echo "Looking for CDROM in: $i"
|
echo "Looking for CDROM in: $i"
|
||||||
if mount -t iso9660 $i /cdrom >/dev/null 2>&1
|
if mount -t iso9660 $i /cdrom >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
if test -f /cdrom/NIXOS
|
if test -f /cdrom/NIXOS
|
||||||
then
|
then
|
||||||
cddevice=$i
|
cddevice=$i
|
||||||
echo "Accessing NixOS CDROM at $i"
|
echo "Accessing NixOS CDROM at $i"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo switch to /nix and /nixpkgs from CD
|
echo switch to /nix and /nixpkgs from CD
|
||||||
@ -327,6 +327,7 @@ ln -s @hotplug@/sbin/hotplug $root/sbin/hotplug
|
|||||||
ln -s @hotplug@/etc/hotplug $root/etc/hotplug
|
ln -s @hotplug@/etc/hotplug $root/etc/hotplug
|
||||||
ln -s @hotplug@/etc/hotplug.d $root/etc/hotplug.d
|
ln -s @hotplug@/etc/hotplug.d $root/etc/hotplug.d
|
||||||
ln -s $device $root/dev/root
|
ln -s $device $root/dev/root
|
||||||
|
ln -s @sysvinitPath@/sbin/init /sbin/init
|
||||||
|
|
||||||
echo installing bootloader
|
echo installing bootloader
|
||||||
|
|
||||||
@ -348,11 +349,12 @@ cp /tmp/install-log $root/root
|
|||||||
echo umounting filesystem
|
echo umounting filesystem
|
||||||
|
|
||||||
umount $root
|
umount $root
|
||||||
|
#umount /nix
|
||||||
umount /cdrom
|
umount /cdrom
|
||||||
|
#echo ejecting $cddevice
|
||||||
|
#eject $cddevice
|
||||||
|
|
||||||
echo install done
|
echo install done
|
||||||
ln -s @sysvinitPath@/sbin/init /sbin/init
|
|
||||||
|
|
||||||
echo it\'s safe to turn off your machine
|
echo it\'s safe to turn off your machine
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
|
@ -87,6 +87,7 @@ nano=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).nano' | $NIX_CMD_P
|
|||||||
gnugrep=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).gnugrep' | $NIX_CMD_PATH/nix-instantiate -))
|
gnugrep=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).gnugrep' | $NIX_CMD_PATH/nix-instantiate -))
|
||||||
which=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).which' | $NIX_CMD_PATH/nix-instantiate -))
|
which=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).which' | $NIX_CMD_PATH/nix-instantiate -))
|
||||||
gnutar=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).gnutar' | $NIX_CMD_PATH/nix-instantiate -))
|
gnutar=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).gnutar' | $NIX_CMD_PATH/nix-instantiate -))
|
||||||
|
eject=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).eject' | $NIX_CMD_PATH/nix-instantiate -))
|
||||||
|
|
||||||
#(while read storepath; do
|
#(while read storepath; do
|
||||||
#cp -fa --parents ${storepath} ${archivesDir}
|
#cp -fa --parents ${storepath} ${archivesDir}
|
||||||
@ -168,6 +169,7 @@ sed -e "s^@sysvinitPath\@^$sysvinitPath^g" \
|
|||||||
-e "s^@hotplug\@^$hotplug^g" \
|
-e "s^@hotplug\@^$hotplug^g" \
|
||||||
-e "s^@gnugrep\@^$gnugrep^g" \
|
-e "s^@gnugrep\@^$gnugrep^g" \
|
||||||
-e "s^@which\@^$which^g" \
|
-e "s^@which\@^$which^g" \
|
||||||
|
-e "s^@eject\@^$eject^g" \
|
||||||
-e "s^@gnutar\@^$gnutar^g" \
|
-e "s^@gnutar\@^$gnutar^g" \
|
||||||
-e "s^@mingetty\@^$mingettyWrapper^g" \
|
-e "s^@mingetty\@^$mingettyWrapper^g" \
|
||||||
< $fill_disk > $fill_disk.tmp
|
< $fill_disk > $fill_disk.tmp
|
||||||
@ -223,9 +225,9 @@ cp -fau --parents ${coreUtilsDiet} ${initdir}
|
|||||||
cp -fau --parents ${e2fsProgs} ${initdir}
|
cp -fau --parents ${e2fsProgs} ${initdir}
|
||||||
cp -fau --parents ${modUtils} ${initdir}
|
cp -fau --parents ${modUtils} ${initdir}
|
||||||
cp -fau --parents ${hotplug} ${initdir}
|
cp -fau --parents ${hotplug} ${initdir}
|
||||||
#cp -fau --parents ${which} ${initdir}
|
cp -fau --parents ${eject} ${initdir}
|
||||||
|
|
||||||
touch ${initdir}/NIXOS
|
touch ${archivesDir}/NIXOS
|
||||||
|
|
||||||
(cd ${initdir}; find . |cpio -H newc -o) | gzip -9 > ${initrd}
|
(cd ${initdir}; find . |cpio -H newc -o) | gzip -9 > ${initrd}
|
||||||
|
|
||||||
|
6
pkgs.nix
6
pkgs.nix
@ -5,7 +5,7 @@ rec {
|
|||||||
nettools nix subversion gcc wget which vim less screen openssh binutils
|
nettools nix subversion gcc wget which vim less screen openssh binutils
|
||||||
strace shadowutils iputils gnumake curl gnused gnutar gnugrep gzip
|
strace shadowutils iputils gnumake curl gnused gnutar gnugrep gzip
|
||||||
mingettyWrapper grubWrapper syslinux parted module_init_tools hotplug udev
|
mingettyWrapper grubWrapper syslinux parted module_init_tools hotplug udev
|
||||||
dhcpWrapper man nano;
|
dhcpWrapper man nano eject;
|
||||||
|
|
||||||
boot = (import ./boot) {inherit stdenv kernel bash coreutils findutilsWrapper
|
boot = (import ./boot) {inherit stdenv kernel bash coreutils findutilsWrapper
|
||||||
utillinux sysvinit e2fsprogs nettools nix subversion gcc wget which vim
|
utillinux sysvinit e2fsprogs nettools nix subversion gcc wget which vim
|
||||||
@ -15,7 +15,7 @@ rec {
|
|||||||
|
|
||||||
init = (import ./init) {inherit stdenv bash coreutilsDiet utillinux e2fsprogsDiet
|
init = (import ./init) {inherit stdenv bash coreutilsDiet utillinux e2fsprogsDiet
|
||||||
nix shadowutils mingettyWrapper grubWrapper parted module_init_tools hotplug
|
nix shadowutils mingettyWrapper grubWrapper parted module_init_tools hotplug
|
||||||
dhcpWrapper man nano;};
|
dhcpWrapper man nano eject;};
|
||||||
|
|
||||||
everything = [boot sysvinit kernel];
|
everything = [boot sysvinit kernel eject];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user