2004-02-14 22:56:51 +00:00
|
|
|
#! /bin/sh -e
|
|
|
|
|
2005-07-31 16:25:39 +01:00
|
|
|
# deps is an array
|
2005-07-29 17:54:36 +01:00
|
|
|
declare -a deps
|
|
|
|
|
2006-07-09 23:33:01 +01:00
|
|
|
NIXSTORE=`which nix-store`
|
|
|
|
NIXINSTANTIATE=`which nix-instantiate`
|
|
|
|
|
|
|
|
coreutils=$($NIXSTORE -r $(echo '(import ./pkgs.nix).coreutils' | $NIXINSTANTIATE -))
|
|
|
|
|
2006-07-02 23:37:40 +01:00
|
|
|
# determine where we can find the Nix binaries
|
2006-07-09 23:33:01 +01:00
|
|
|
NIX=$($coreutils/bin/dirname $(which nix-store))
|
2006-07-02 23:37:40 +01:00
|
|
|
|
2006-07-03 09:39:52 +01:00
|
|
|
# make sure we use many of our own tools, because it is more pure
|
2006-07-02 23:37:40 +01:00
|
|
|
mktemp=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).mktemp' | $NIX/nix-instantiate -))
|
|
|
|
|
2006-07-03 09:39:52 +01:00
|
|
|
gnused=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).gnused' | $NIX/nix-instantiate -))
|
|
|
|
gnutar=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).gnutar' | $NIX/nix-instantiate -))
|
2006-07-03 10:32:15 +01:00
|
|
|
cdrtools=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).cdrtools' | $NIX/nix-instantiate -))
|
2006-07-04 00:16:44 +01:00
|
|
|
gzip=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).gzip' | $NIX/nix-instantiate -))
|
|
|
|
cpio=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).cpio' | $NIX/nix-instantiate -))
|
2006-07-03 09:39:52 +01:00
|
|
|
|
|
|
|
archivesDir=$($mktemp/bin/mktemp -d)
|
2005-07-05 14:52:49 +01:00
|
|
|
manifest=${archivesDir}/MANIFEST
|
2005-07-19 17:55:44 +01:00
|
|
|
nixpkgs=/nixpkgs/trunk/pkgs
|
2005-07-06 17:00:20 +01:00
|
|
|
fill_disk=$archivesDir/scripts/fill-disk.sh
|
2005-08-31 13:58:46 +01:00
|
|
|
ramdisk_login=$archivesDir/scripts/ramdisk-login.sh
|
2005-07-29 17:54:36 +01:00
|
|
|
storePaths=$archivesDir/mystorepaths
|
|
|
|
validatePaths=$archivesDir/validatepaths
|
2005-07-31 16:25:39 +01:00
|
|
|
bootiso=/tmp/nixos.iso
|
2005-08-01 18:30:45 +01:00
|
|
|
initrd=/tmp/initram.img
|
2005-08-03 13:00:42 +01:00
|
|
|
initdir=${archivesDir}/initdir
|
2005-08-31 13:02:28 +01:00
|
|
|
initscript=$archivesDir/scripts/init.sh
|
2005-07-06 15:42:41 +01:00
|
|
|
|
2006-08-02 23:42:56 +01:00
|
|
|
nix=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).nixUnstable' | $NIX/nix-instantiate -))
|
|
|
|
|
|
|
|
nixDeps=$($NIX/nix-store -qR $nix)
|
2004-08-06 14:52:39 +01:00
|
|
|
|
2006-06-24 23:14:43 +01:00
|
|
|
storeExpr=$($NIX/nix-store -qR $($NIX/nix-store -r $(echo '(import ./pkgs.nix).everything' | $NIX/nix-instantiate -)))
|
2006-08-02 23:42:56 +01:00
|
|
|
#storeExpr=$($NIX/nix-store -r $($NIX/nix-store -qR $(echo '(import ./pkgs.nix).everything' | $NIX/nix-instantiate -)))
|
|
|
|
|
|
|
|
### make NAR files for everything we want to install and some more. Make sure
|
|
|
|
### the right URL is in there, so specify /cdrom and not cdrom
|
|
|
|
$NIX/nix-push --copy $archivesDir $manifest --target /cdrom $storeExpr $($NIX/nix-store -r $(echo '(import ./pkgs.nix).kernel' | $NIX/nix-instantiate -))
|
2004-02-18 10:56:07 +00:00
|
|
|
|
|
|
|
# Location of sysvinit?
|
2006-06-24 23:14:43 +01:00
|
|
|
sysvinitPath=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).sysvinit' | $NIX/nix-instantiate -))
|
2004-02-18 10:56:07 +00:00
|
|
|
|
2004-02-18 14:56:32 +00:00
|
|
|
# Location of Nix boot scripts?
|
2006-06-24 23:14:43 +01:00
|
|
|
bootPath=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).boot' | $NIX/nix-instantiate -))
|
2005-07-06 17:00:20 +01:00
|
|
|
|
2006-06-24 23:14:43 +01:00
|
|
|
syslinux=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).syslinux' | $NIX/nix-instantiate -))
|
2005-07-31 14:11:44 +01:00
|
|
|
|
2006-06-24 23:14:43 +01:00
|
|
|
kernel=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).kernel' | $NIX/nix-instantiate -))
|
2005-07-31 16:25:39 +01:00
|
|
|
|
2006-06-24 23:14:43 +01:00
|
|
|
#nixDeps=$($NIX/nix-store -qR $(echo '(import ./pkgs.nix).nix' | $NIX/nix-instantiate -))
|
2005-07-11 18:59:19 +01:00
|
|
|
|
2006-06-24 23:14:43 +01:00
|
|
|
#nixDeps=$($NIX/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).nix' | $NIX/nix-instantiate -)))
|
|
|
|
#echo $($NIX/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).nix' | $NIX/nix-instantiate -))) >> $storePaths
|
|
|
|
#$NIX/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).nix' | $NIX/nix-instantiate -)) >> $storePaths
|
2005-07-29 17:54:36 +01:00
|
|
|
|
2006-08-02 23:42:56 +01:00
|
|
|
utillinux=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).utillinux' | $NIX/nix-instantiate -))
|
|
|
|
|
|
|
|
gnugrep=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).gnugrep' | $NIX/nix-instantiate -))
|
|
|
|
|
|
|
|
grub=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).grubWrapper' | $NIX/nix-instantiate -))
|
|
|
|
|
2006-08-03 14:43:44 +01:00
|
|
|
combideps=$($NIX/nix-store -qR $nix $utillinux $gnugrep $grub $gzip)
|
2006-08-02 23:42:56 +01:00
|
|
|
|
|
|
|
#for i in $storeExpr
|
|
|
|
#for i in $nixDeps
|
|
|
|
for i in $combideps
|
2005-08-26 17:06:52 +01:00
|
|
|
do
|
2005-08-27 01:36:07 +01:00
|
|
|
echo $i >> $storePaths
|
|
|
|
echo '' >> $storePaths
|
2006-06-24 23:14:43 +01:00
|
|
|
deps=$($NIX/nix-store -q --references $i)
|
2006-07-03 23:20:22 +01:00
|
|
|
pkgs=$(echo $deps | $coreutils/bin/wc -w)
|
2005-08-27 01:36:07 +01:00
|
|
|
echo $pkgs >> $storePaths
|
|
|
|
for j in $deps
|
|
|
|
do
|
|
|
|
echo $j >> $storePaths
|
|
|
|
done
|
|
|
|
echo copying from store: $i
|
2006-07-03 09:39:52 +01:00
|
|
|
$gnutar/bin/tar -cf - $i | $gnutar/bin/tar --directory=$archivesDir -xf -
|
2005-08-26 17:06:52 +01:00
|
|
|
done
|
|
|
|
|
2006-06-24 23:14:43 +01:00
|
|
|
utilLinux=$(nix-store -r $(echo '(import ./pkgs.nix).utillinuxStatic' | $NIX/nix-instantiate -))
|
|
|
|
coreUtilsDiet=$($NIX/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).coreutilsDiet' | $NIX/nix-instantiate -)))
|
|
|
|
|
|
|
|
## temporarily normal e2fsprogs until I can get it to build with dietlibc
|
2006-06-25 11:42:17 +01:00
|
|
|
e2fsProgs=$($NIX/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).e2fsprogsDiet' | $NIX/nix-instantiate -)))
|
|
|
|
#e2fsProgs=$($NIX/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).e2fsprogs' | $NIX/nix-instantiate -)))
|
2006-06-24 23:14:43 +01:00
|
|
|
modUtils=$($NIX/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).module_init_toolsStatic' | $NIX/nix-instantiate -)))
|
|
|
|
Grub=$($NIX/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).grubWrapper' | $NIX/nix-instantiate -)))
|
|
|
|
Kernel=$($NIX/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).kernel' | $NIX/nix-instantiate -)))
|
|
|
|
SysVinit=$($NIX/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).sysvinit' | $NIX/nix-instantiate -)))
|
|
|
|
BootPath=$($NIX/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).boot' | $NIX/nix-instantiate -)))
|
|
|
|
|
|
|
|
bashGlibc=$($NIX/nix-store -q $(echo '(import ./pkgs.nix).bash' | $NIX/nix-instantiate -))
|
2006-08-02 23:42:56 +01:00
|
|
|
bash=$($NIX/nix-store -q $(echo '(import ./pkgs.nix).bashStatic' | $NIX/nix-instantiate -))
|
2006-06-24 23:14:43 +01:00
|
|
|
coreutilsdiet=$($NIX/nix-store -q $(echo '(import ./pkgs.nix).coreutilsDiet' | $NIX/nix-instantiate -))
|
|
|
|
findutils=$($NIX/nix-store -q $(echo '(import ./pkgs.nix).findutilsWrapper' | $NIX/nix-instantiate -))
|
|
|
|
utillinux=$($NIX/nix-store -q $(echo '(import ./pkgs.nix).utillinux' | $NIX/nix-instantiate -))
|
|
|
|
e2fsprogs=$($NIX/nix-store -q $(echo '(import ./pkgs.nix).e2fsprogsDiet' | $NIX/nix-instantiate -))
|
2006-06-25 11:42:17 +01:00
|
|
|
#e2fsprogs=$($NIX/nix-store -q $(echo '(import ./pkgs.nix).e2fsprogs' | $NIX/nix-instantiate -))
|
2006-08-02 23:42:56 +01:00
|
|
|
#e2fsprogs=$($NIX/nix-store -q $(echo '(import ./pkgs.nix).e2fsprogs' | $NIX/nix-instantiate -))
|
2006-06-24 23:14:43 +01:00
|
|
|
modutils=$($NIX/nix-store -q $(echo '(import ./pkgs.nix).module_init_toolsStatic' | $NIX/nix-instantiate -))
|
|
|
|
grub=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).grubWrapper' | $NIX/nix-instantiate -))
|
|
|
|
mingettyWrapper=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).mingettyWrapper' | $NIX/nix-instantiate -))
|
|
|
|
udev=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).udev' | $NIX/nix-instantiate -))
|
|
|
|
dhcp=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).dhcpWrapper' | $NIX/nix-instantiate -))
|
|
|
|
nano=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).nano' | $NIX/nix-instantiate -))
|
|
|
|
gnugrep=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).gnugrep' | $NIX/nix-instantiate -))
|
|
|
|
which=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).which' | $NIX/nix-instantiate -))
|
|
|
|
eject=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).eject' | $NIX/nix-instantiate -))
|
|
|
|
sysklogd=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).sysklogd' | $NIX/nix-instantiate -))
|
|
|
|
#kudzu=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).kudzu' | $NIX/nix-instantiate -))
|
2005-08-01 18:30:45 +01:00
|
|
|
|
2005-08-27 01:36:07 +01:00
|
|
|
#(while read storepath; do
|
|
|
|
#cp -fa --parents ${storepath} ${archivesDir}
|
|
|
|
#done) < $storePaths
|
2005-07-29 17:54:36 +01:00
|
|
|
|
2005-12-24 11:50:42 +00:00
|
|
|
#echo utillinux $utilLinux
|
2005-07-11 18:59:19 +01:00
|
|
|
|
2005-12-24 11:50:42 +00:00
|
|
|
#for i in $utilLinux; do
|
|
|
|
# echo i $i
|
2006-06-24 23:14:43 +01:00
|
|
|
# deps=( $($NIX/nix-store -q --references $i) )
|
2005-12-24 11:50:42 +00:00
|
|
|
# echo length ${#deps[@]}
|
|
|
|
# if test "${#deps[@]}" = 0
|
|
|
|
# then
|
|
|
|
# echo zarro
|
|
|
|
# fi
|
|
|
|
#done
|
2005-07-11 18:59:19 +01:00
|
|
|
|
2005-08-01 18:30:45 +01:00
|
|
|
echo creating directories for bootimage
|
|
|
|
|
2006-07-03 23:20:22 +01:00
|
|
|
$coreutils/bin/mkdir ${initdir}
|
|
|
|
$coreutils/bin/mkdir ${initdir}/bin
|
|
|
|
$coreutils/bin/mkdir ${initdir}/cdrom
|
|
|
|
$coreutils/bin/mkdir ${initdir}/dev
|
|
|
|
$coreutils/bin/mkdir ${initdir}/etc
|
|
|
|
$coreutils/bin/mkdir ${initdir}/etc/sysconfig
|
|
|
|
$coreutils/bin/mkdir ${initdir}/installimage
|
|
|
|
$coreutils/bin/mkdir ${initdir}/modules
|
|
|
|
$coreutils/bin/mkdir ${initdir}/proc
|
|
|
|
$coreutils/bin/mkdir ${initdir}/sbin
|
|
|
|
$coreutils/bin/mkdir ${initdir}/sys
|
|
|
|
$coreutils/bin/mkdir ${initdir}/tmp
|
|
|
|
$coreutils/bin/mkdir -p ${initdir}/usr/bin
|
|
|
|
$coreutils/bin/mkdir -p ${initdir}/usr/sbin
|
|
|
|
$coreutils/bin/mkdir ${initdir}/var
|
|
|
|
$coreutils/bin/mkdir ${initdir}/var/run
|
2005-08-01 18:30:45 +01:00
|
|
|
|
2005-07-31 14:11:44 +01:00
|
|
|
echo copying nixpkgs
|
|
|
|
|
2005-09-30 16:22:08 +01:00
|
|
|
#svn export ${nixpkgs} ${archivesDir}/pkgs
|
2006-08-03 14:43:44 +01:00
|
|
|
#$coreutils/bin/cp -fa ${nixpkgs} ${archivesDir}
|
|
|
|
tar -zcf ${archivesDir}/nixpkgs.tgz ${nixpkgs}
|
2005-07-31 14:11:44 +01:00
|
|
|
|
2005-08-27 01:36:07 +01:00
|
|
|
#echo copying packages from store
|
2005-07-31 14:11:44 +01:00
|
|
|
|
2005-07-29 17:54:36 +01:00
|
|
|
#cp -fa --parents ${nixDeps} ${archivesDir}
|
2005-08-27 01:36:07 +01:00
|
|
|
#cp -fvau --parents ${utilLinux} ${archivesDir}
|
|
|
|
#cp -fvau --parents ${Grub} ${archivesDir}
|
|
|
|
##cp -fau --parents ${gnuSed} ${archivesDir}
|
|
|
|
##cp -fau --parents ${gnuGrep} ${archivesDir}
|
|
|
|
#cp -fvau --parents ${Kernel} ${archivesDir}
|
|
|
|
#cp -fvau --parents ${SysVinit} ${archivesDir}
|
|
|
|
#cp -fvau --parents ${BootPath} ${archivesDir}
|
|
|
|
#cp -fvau --parents ${udev} ${archivesDir}
|
|
|
|
#cp -fvau --parents ${dhcp} ${archivesDir}
|
|
|
|
#cp -fvau --parents ${nano} ${archivesDir}
|
|
|
|
#cp -fvau --parents ${gnutar} ${archivesDir}
|
2005-07-31 14:11:44 +01:00
|
|
|
|
|
|
|
echo copying scripts
|
|
|
|
|
2006-07-03 23:20:22 +01:00
|
|
|
$coreutils/bin/mkdir ${archivesDir}/scripts
|
|
|
|
$coreutils/bin/cp -fa * ${archivesDir}/scripts
|
2006-07-03 09:39:52 +01:00
|
|
|
$gnused/bin/sed -e "s^@bash\@^$bash^g" \
|
2005-08-31 13:02:28 +01:00
|
|
|
-e "s^@coreutils\@^$coreutilsdiet^g" \
|
|
|
|
< $initscript > $initscript.tmp
|
2006-07-03 23:20:22 +01:00
|
|
|
$coreutils/bin/mv $initscript.tmp $initscript
|
2006-07-03 09:39:52 +01:00
|
|
|
$gnused/bin/sed -e "s^@sysvinitPath\@^$sysvinitPath^g" \
|
2005-07-06 17:00:20 +01:00
|
|
|
-e "s^@bootPath\@^$bootPath^g" \
|
2005-10-11 20:39:41 +01:00
|
|
|
-e "s^@nix\@^$nix^g" \
|
2005-08-01 18:30:45 +01:00
|
|
|
-e "s^@bash\@^$bash^g" \
|
2005-12-24 21:15:24 +00:00
|
|
|
-e "s^@bashGlibc\@^$bashGlibc^g" \
|
2005-08-03 13:00:42 +01:00
|
|
|
-e "s^@findutils\@^$findutils^g" \
|
2005-08-28 17:56:48 +01:00
|
|
|
-e "s^@coreutilsdiet\@^$coreutilsdiet^g" \
|
2005-08-03 13:00:42 +01:00
|
|
|
-e "s^@coreutils\@^$coreutils^g" \
|
2005-12-24 11:50:42 +00:00
|
|
|
-e "s^@utilLinux\@^$utilLinux^g" \
|
2005-08-03 13:00:42 +01:00
|
|
|
-e "s^@utillinux\@^$utillinux^g" \
|
2005-08-05 14:48:22 +01:00
|
|
|
-e "s^@e2fsprogs\@^$e2fsprogs^g" \
|
2005-08-09 17:51:26 +01:00
|
|
|
-e "s^@modutils\@^$modutils^g" \
|
2005-08-13 00:40:12 +01:00
|
|
|
-e "s^@grub\@^$grub^g" \
|
2005-08-14 02:40:36 +01:00
|
|
|
-e "s^@kernel\@^$kernel^g" \
|
2005-08-23 17:53:39 +01:00
|
|
|
-e "s^@gnugrep\@^$gnugrep^g" \
|
2005-08-26 00:10:36 +01:00
|
|
|
-e "s^@which\@^$which^g" \
|
2005-12-24 11:50:42 +00:00
|
|
|
-e "s^@kudzu\@^$kudzu^g" \
|
2005-09-30 16:22:08 +01:00
|
|
|
-e "s^@sysklogd\@^$sysklogd^g" \
|
2005-08-26 17:06:52 +01:00
|
|
|
-e "s^@gnutar\@^$gnutar^g" \
|
2006-08-03 14:43:44 +01:00
|
|
|
-e "s^@gzip\@^$gzip^g" \
|
2005-08-28 01:51:34 +01:00
|
|
|
-e "s^@mingetty\@^$mingettyWrapper^g" \
|
2005-07-06 17:00:20 +01:00
|
|
|
< $fill_disk > $fill_disk.tmp
|
2006-07-03 23:20:22 +01:00
|
|
|
$coreutils/bin/mv $fill_disk.tmp $fill_disk
|
2005-07-31 14:11:44 +01:00
|
|
|
|
2006-07-03 09:39:52 +01:00
|
|
|
$gnused/bin/sed -e "s^@sysvinitPath\@^$sysvinitPath^g" \
|
2005-08-31 13:58:46 +01:00
|
|
|
-e "s^@bootPath\@^$bootPath^g" \
|
2006-06-24 23:14:43 +01:00
|
|
|
-e "s^@NIX\@^$nix^g" \
|
2005-08-31 13:58:46 +01:00
|
|
|
-e "s^@bash\@^$bash^g" \
|
|
|
|
-e "s^@findutils\@^$findutils^g" \
|
|
|
|
-e "s^@coreutilsdiet\@^$coreutilsdiet^g" \
|
|
|
|
-e "s^@coreutils\@^$coreutils^g" \
|
2005-12-24 11:50:42 +00:00
|
|
|
-e "s^@utillinux\@^$utilLinux^g" \
|
2005-08-31 13:58:46 +01:00
|
|
|
-e "s^@e2fsprogs\@^$e2fsprogs^g" \
|
|
|
|
-e "s^@modutils\@^$modutils^g" \
|
|
|
|
-e "s^@grub\@^$grub^g" \
|
|
|
|
-e "s^@kernel\@^$kernel^g" \
|
|
|
|
-e "s^@gnugrep\@^$gnugrep^g" \
|
|
|
|
-e "s^@which\@^$which^g" \
|
|
|
|
-e "s^@gnutar\@^$gnutar^g" \
|
|
|
|
-e "s^@mingetty\@^$mingettyWrapper^g" \
|
|
|
|
< $ramdisk_login > $ramdisk_login.tmp
|
2006-07-03 23:20:22 +01:00
|
|
|
$coreutils/bin/mv $ramdisk_login.tmp $ramdisk_login
|
2005-08-31 13:58:46 +01:00
|
|
|
|
2005-07-31 14:11:44 +01:00
|
|
|
echo copying bootimage
|
|
|
|
|
2006-07-03 23:20:22 +01:00
|
|
|
$coreutils/bin/mkdir ${archivesDir}/isolinux
|
|
|
|
$coreutils/bin/cp ${syslinux}/lib/syslinux/isolinux.bin ${archivesDir}/isolinux
|
|
|
|
$coreutils/bin/cp isolinux.cfg ${archivesDir}/isolinux
|
|
|
|
$coreutils/bin/chmod u+w ${archivesDir}/isolinux/*
|
2005-07-31 16:25:39 +01:00
|
|
|
|
|
|
|
echo copying kernel
|
|
|
|
|
|
|
|
# By following the symlink we don't have to know the version number
|
|
|
|
# of the kernel here.
|
2006-07-03 23:20:22 +01:00
|
|
|
$coreutils/bin/cp -L $kernel/vmlinuz ${archivesDir}/isolinux
|
2005-07-31 16:25:39 +01:00
|
|
|
|
2005-12-24 11:50:42 +00:00
|
|
|
echo linking kernel modules
|
|
|
|
|
2006-07-03 23:20:22 +01:00
|
|
|
$coreutils/bin/ln -s $kernel/lib $archivesDir/lib
|
2005-12-24 11:50:42 +00:00
|
|
|
|
2005-08-01 18:30:45 +01:00
|
|
|
echo creating ramdisk
|
|
|
|
|
2006-07-03 23:20:22 +01:00
|
|
|
$coreutils/bin/rm -f ${initrd}
|
2005-08-31 13:02:28 +01:00
|
|
|
#cp ${archivesDir}/scripts/fill-disk.sh ${initdir}/init
|
2006-07-03 23:20:22 +01:00
|
|
|
$coreutils/bin/cp ${archivesDir}/scripts/fill-disk.sh ${initdir}/
|
|
|
|
$coreutils/bin/cp ${archivesDir}/scripts/ramdisk-login.sh ${initdir}/
|
|
|
|
$coreutils/bin/cp ${archivesDir}/scripts/init.sh ${initdir}/init
|
2005-12-24 11:50:42 +00:00
|
|
|
#ln -s ${bash}/bin/bash ${initdir}/bin/sh
|
2006-07-03 23:20:22 +01:00
|
|
|
$coreutils/bin/cp ${bash}/bin/bash ${initdir}/bin/sh
|
|
|
|
$coreutils/bin/chmod u+x ${initdir}/init
|
|
|
|
$coreutils/bin/chmod u+x ${initdir}/fill-disk.sh
|
|
|
|
$coreutils/bin/chmod u+x ${initdir}/ramdisk-login.sh
|
2005-12-24 11:50:42 +00:00
|
|
|
#cp -fau --parents ${utilLinux} ${initdir}
|
|
|
|
#cp -fau --parents ${coreUtilsDiet} ${initdir}
|
|
|
|
#cp -fau --parents ${modUtils} ${initdir}
|
2006-07-03 23:20:22 +01:00
|
|
|
$coreutils/bin/cp -fau --parents ${bash}/bin ${initdir}
|
|
|
|
$coreutils/bin/cp -fau --parents ${utilLinux}/bin ${initdir}
|
|
|
|
$coreutils/bin/chmod -R u+w ${initdir}
|
|
|
|
$coreutils/bin/cp -fau --parents ${utilLinux}/sbin ${initdir}
|
|
|
|
$coreutils/bin/cp -fau --parents ${e2fsProgs} ${initdir}
|
|
|
|
$coreutils/bin/cp -fau --parents ${coreutilsdiet}/bin ${initdir}
|
|
|
|
$coreutils/bin/cp -fau --parents ${modutils}/bin ${initdir}
|
|
|
|
$coreutils/bin/chmod -R u+w ${initdir}
|
|
|
|
$coreutils/bin/cp -fau --parents ${modutils}/sbin ${initdir}
|
2005-08-03 13:00:42 +01:00
|
|
|
|
2006-07-03 23:20:22 +01:00
|
|
|
$coreutils/bin/touch ${archivesDir}/NIXOS
|
2005-08-11 15:06:04 +01:00
|
|
|
|
2006-07-04 00:16:44 +01:00
|
|
|
(cd ${initdir}; find . |$cpio/bin/cpio -H newc -o) | $gzip/bin/gzip -9 > ${initrd}
|
2005-08-01 18:30:45 +01:00
|
|
|
|
2006-07-03 23:20:22 +01:00
|
|
|
$coreutils/bin/chmod -f -R +w ${initdir}/*
|
|
|
|
$coreutils/bin/rm -rf ${initdir}
|
2005-08-19 16:26:01 +01:00
|
|
|
|
2006-07-03 23:20:22 +01:00
|
|
|
$coreutils/bin/cp ${initrd} ${archivesDir}/isolinux
|
|
|
|
$coreutils/bin/rm -f ${initrd}
|
2005-07-31 16:25:39 +01:00
|
|
|
|
|
|
|
echo creating ISO image
|
|
|
|
|
2006-07-03 10:32:15 +01:00
|
|
|
$cdrtools/bin/mkisofs -rJ -o ${bootiso} -b isolinux/isolinux.bin \
|
|
|
|
-c isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
|
|
|
|
-boot-info-table ${archivesDir}
|
2005-08-09 17:51:26 +01:00
|
|
|
|
2005-08-14 02:40:36 +01:00
|
|
|
# cleanup, be diskspace friendly
|
2005-08-16 22:46:08 +01:00
|
|
|
|
|
|
|
echo cleaning up
|
|
|
|
|
2006-07-03 23:20:22 +01:00
|
|
|
$coreutils/bin/chmod -f -R +w ${archivesDir}/*
|
2005-12-24 11:50:42 +00:00
|
|
|
#rm -rf ${archivesDir}/*
|