add hotplug here, temporarily disable e2fsck, so at least everything is mounted rw
svn path=/nixu/trunk/; revision=3630
This commit is contained in:
parent
38cb12017a
commit
0b4feb3a6c
@ -9,8 +9,8 @@ echo "--- Nix ---"
|
|||||||
echo "mounting /proc..."
|
echo "mounting /proc..."
|
||||||
mount -n -t proc none /proc
|
mount -n -t proc none /proc
|
||||||
|
|
||||||
echo "checking /dev/root..."
|
#echo "checking /dev/root..."
|
||||||
e2fsck -y /dev/root || test "$?" -le 1
|
#e2fsck -y /dev/root || test "$?" -le 1
|
||||||
|
|
||||||
echo "remounting / writable..."
|
echo "remounting / writable..."
|
||||||
mount -n -o remount,rw /dev/root /
|
mount -n -o remount,rw /dev/root /
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ stdenv, kernel, bash, coreutils, findutils, utillinux, sysvinit, e2fsprogs
|
{ stdenv, kernel, bash, coreutils, findutils, utillinux, sysvinit, e2fsprogs
|
||||||
, nettools, nix, subversion, gcc, wget, which, vim, less, screen, openssh
|
, nettools, nix, subversion, gcc, wget, which, vim, less, screen, openssh
|
||||||
, binutils, strace, shadowutils, iputils, gnumake, curl, gnused, gnugrep
|
, binutils, strace, shadowutils, iputils, gnumake, curl, gnused, gnugrep
|
||||||
, gnutar, gzip, mingetty, grubWrapper, parted, modutils}:
|
, gnutar, gzip, mingetty, grubWrapper, parted, modutils, hotplug}:
|
||||||
|
|
||||||
derivation {
|
derivation {
|
||||||
name = "boot";
|
name = "boot";
|
||||||
|
@ -7,6 +7,7 @@ kernel=@kernel@
|
|||||||
sysvinitPath=@sysvinitPath@
|
sysvinitPath=@sysvinitPath@
|
||||||
bootPath=@bootPath@
|
bootPath=@bootPath@
|
||||||
modutils=@modutils@
|
modutils=@modutils@
|
||||||
|
hotplug=@hotplug@
|
||||||
|
|
||||||
echo mounting special filesystems
|
echo mounting special filesystems
|
||||||
|
|
||||||
@ -290,6 +291,10 @@ echo "192.168.150.1 uml" >> $root/etc/hosts
|
|||||||
|
|
||||||
ln -s @kernel@/vmlinuz $root/boot/vmlinuz
|
ln -s @kernel@/vmlinuz $root/boot/vmlinuz
|
||||||
ln -s @sysvinitPath@/sbin/init $root/sbin/init
|
ln -s @sysvinitPath@/sbin/init $root/sbin/init
|
||||||
|
ln -s @hotplug@/sbin/hotplug $root/sbin/hotplug
|
||||||
|
ln -s @hotplug@/etc/hotplug $root/etc/hotplug
|
||||||
|
ln -s @hotplug@/etc/hotplug.d $root/etc/hotplug.d
|
||||||
|
ln -s $device $root/dev/root
|
||||||
|
|
||||||
echo installing bootloader
|
echo installing bootloader
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, bash, coreutils, utillinux, e2fsprogs, nix, shadowutils, mingetty, grubWrapper, parted, modutils}:
|
{ stdenv, bash, coreutils, utillinux, e2fsprogs, nix, shadowutils, mingetty, grubWrapper, parted, modutils, hotplug}:
|
||||||
|
|
||||||
derivation {
|
derivation {
|
||||||
name = "init";
|
name = "init";
|
||||||
|
@ -62,6 +62,7 @@ utillinux=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).utillinux' |
|
|||||||
e2fsprogs=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).e2fsprogs' | $NIX_CMD_PATH/nix-instantiate -))
|
e2fsprogs=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).e2fsprogs' | $NIX_CMD_PATH/nix-instantiate -))
|
||||||
modutils=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).modutils' | $NIX_CMD_PATH/nix-instantiate -))
|
modutils=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).modutils' | $NIX_CMD_PATH/nix-instantiate -))
|
||||||
grub=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).grubWrapper' | $NIX_CMD_PATH/nix-instantiate -))
|
grub=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).grubWrapper' | $NIX_CMD_PATH/nix-instantiate -))
|
||||||
|
hotplug=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).hotplug' | $NIX_CMD_PATH/nix-instantiate -))
|
||||||
#gnused=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).gnused' | $NIX_CMD_PATH/nix-instantiate -))
|
#gnused=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).gnused' | $NIX_CMD_PATH/nix-instantiate -))
|
||||||
#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 -))
|
||||||
|
|
||||||
@ -113,6 +114,7 @@ cp -fau --parents ${Grub} ${archivesDir}
|
|||||||
cp -fau --parents ${Kernel} ${archivesDir}
|
cp -fau --parents ${Kernel} ${archivesDir}
|
||||||
cp -fau --parents ${SysVinit} ${archivesDir}
|
cp -fau --parents ${SysVinit} ${archivesDir}
|
||||||
cp -fau --parents ${BootPath} ${archivesDir}
|
cp -fau --parents ${BootPath} ${archivesDir}
|
||||||
|
cp -fau --parents ${hotplug} ${archivesDir}
|
||||||
|
|
||||||
bashdeps=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).bash' | $NIX_CMD_PATH/nix-instantiate -)))
|
bashdeps=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).bash' | $NIX_CMD_PATH/nix-instantiate -)))
|
||||||
|
|
||||||
@ -131,6 +133,7 @@ sed -e "s^@sysvinitPath\@^$sysvinitPath^g" \
|
|||||||
-e "s^@modutils\@^$modutils^g" \
|
-e "s^@modutils\@^$modutils^g" \
|
||||||
-e "s^@grub\@^$grub^g" \
|
-e "s^@grub\@^$grub^g" \
|
||||||
-e "s^@kernel\@^$kernel^g" \
|
-e "s^@kernel\@^$kernel^g" \
|
||||||
|
-e "s^@hotplug\@^$hotplug^g" \
|
||||||
< $fill_disk > $fill_disk.tmp
|
< $fill_disk > $fill_disk.tmp
|
||||||
mv $fill_disk.tmp $fill_disk
|
mv $fill_disk.tmp $fill_disk
|
||||||
|
|
||||||
@ -164,6 +167,7 @@ cp -fau --parents ${utilLinux} ${initdir}
|
|||||||
cp -fau --parents ${coreUtils} ${initdir}
|
cp -fau --parents ${coreUtils} ${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}
|
||||||
|
|
||||||
touch ${initdir}/NIXOS
|
touch ${initdir}/NIXOS
|
||||||
|
|
||||||
|
6
pkgs.nix
6
pkgs.nix
@ -3,15 +3,15 @@ rec {
|
|||||||
stdenv kernel bash coreutils findutils utillinux sysvinit e2fsprogs
|
stdenv kernel bash coreutils findutils utillinux sysvinit e2fsprogs
|
||||||
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
|
||||||
mingetty grubWrapper syslinux parted modutils;
|
mingetty grubWrapper syslinux parted modutils hotplug;
|
||||||
|
|
||||||
boot = (import ./boot) {inherit stdenv kernel bash coreutils findutils
|
boot = (import ./boot) {inherit stdenv kernel bash coreutils findutils
|
||||||
utillinux sysvinit e2fsprogs nettools nix subversion gcc wget which vim
|
utillinux sysvinit e2fsprogs nettools nix subversion gcc wget which vim
|
||||||
less screen openssh binutils strace shadowutils iputils gnumake curl
|
less screen openssh binutils strace shadowutils iputils gnumake curl
|
||||||
gnused gnutar gnugrep gzip mingetty grubWrapper parted modutils;};
|
gnused gnutar gnugrep gzip mingetty grubWrapper parted modutils hotplug;};
|
||||||
|
|
||||||
init = (import ./init) {inherit stdenv bash coreutils
|
init = (import ./init) {inherit stdenv bash coreutils
|
||||||
utillinux e2fsprogs nix shadowutils mingetty grubWrapper parted modutils;};
|
utillinux e2fsprogs nix shadowutils mingetty grubWrapper parted modutils hotplug;};
|
||||||
|
|
||||||
everything = [boot init sysvinit kernel];
|
everything = [boot init sysvinit kernel];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user