1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

Added scripts used for remote installation

svn path=/nixos/trunk/; revision=11817
This commit is contained in:
Michael Raskin 2008-05-12 07:23:55 +00:00
parent 1a6e1a43dc
commit ad3dc29f6d
3 changed files with 71 additions and 0 deletions

View file

@ -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

View file

@ -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 <<EOF
{
boot = {
grubDevice = "/dev/sda";
copyKernels = true;
bootMount = "(hd0,0)";
};
fileSystems = [
{ mountPoint = "/";
device = "/dev/sda3";
}
{ mountPoint = "/boot";
device = "/dev/sda1";
neededForBoot = true;
}
];
swapDevices = [
{ device = "/dev/sda2"; }
];
services = {
sshd = {
enable = true;
};
};
fonts = {
enableFontConfig = false;
};
}
EOF
nixos-install

View file

@ -0,0 +1,8 @@
#! /bin/sh
nohup bash -c 'NIX_REMOTE= ./install-script.sh &>/dev/tty11' &
disown
exit