From ad3dc29f6dbd10fe4f36efe2da661a87253987e3 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Mon, 12 May 2008 07:23:55 +0000 Subject: [PATCH] Added scripts used for remote installation svn path=/nixos/trunk/; revision=11817 --- .../remote-install-scripts/install-launch.sh | 10 ++++ .../remote-install-scripts/install-script.sh | 53 +++++++++++++++++++ .../remote-install-scripts/install-start.sh | 8 +++ 3 files changed, 71 insertions(+) create mode 100755 configuration/remote-install-scripts/install-launch.sh create mode 100755 configuration/remote-install-scripts/install-script.sh create mode 100755 configuration/remote-install-scripts/install-start.sh diff --git a/configuration/remote-install-scripts/install-launch.sh b/configuration/remote-install-scripts/install-launch.sh new file mode 100755 index 00000000000..ed2b81b90c5 --- /dev/null +++ b/configuration/remote-install-scripts/install-launch.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +stop dhclient +ifconfig eth0 10.0.253.250 netmask 255.255.0.0 up + +chmod a+x install-script.sh install-start.sh +scp -i id_livedvd -o StrictHostKeyChecking=no install-script.sh 10.0.253.251: +scp -i id_livedvd -o StrictHostKeyChecking=no install-start.sh 10.0.253.251: +ssh -i id_livedvd -o StrictHostKeyChecking=no 10.0.253.251 bash ./install-start.sh + diff --git a/configuration/remote-install-scripts/install-script.sh b/configuration/remote-install-scripts/install-script.sh new file mode 100755 index 00000000000..2c1d116533a --- /dev/null +++ b/configuration/remote-install-scripts/install-script.sh @@ -0,0 +1,53 @@ +dd if=/dev/zero of=/dev/sda bs=1048576 count=1 + +sfdisk /dev/sda -uM << EOF +,512,L +,1024,S +,,L +EOF + +mkfs.ext3 /dev/sda1 ; mkswap /dev/sda2 ; mkfs.ext3 /dev/sda3 + +mount /dev/sda3 /mnt ; mkdir /mnt/boot ; mount /dev/sda1 /mnt/boot + +mkdir -p /mnt/etc/nixos + +cat > /mnt/etc/nixos/configuration.nix </dev/tty11' & + +disown + +exit +