Added scripts used for remote installation
svn path=/nixos/trunk/; revision=11817
This commit is contained in:
parent
1a6e1a43dc
commit
ad3dc29f6d
10
configuration/remote-install-scripts/install-launch.sh
Executable file
10
configuration/remote-install-scripts/install-launch.sh
Executable 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
|
||||
|
53
configuration/remote-install-scripts/install-script.sh
Executable file
53
configuration/remote-install-scripts/install-script.sh
Executable 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
|
||||
|
8
configuration/remote-install-scripts/install-start.sh
Executable file
8
configuration/remote-install-scripts/install-start.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#! /bin/sh
|
||||
|
||||
nohup bash -c 'NIX_REMOTE= ./install-script.sh &>/dev/tty11' &
|
||||
|
||||
disown
|
||||
|
||||
exit
|
||||
|
Loading…
Reference in New Issue
Block a user