diff options
Diffstat (limited to 'share/hydractl/provision')
-rwxr-xr-x | share/hydractl/provision | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision index fc0e43e..98e526f 100755 --- a/share/hydractl/provision +++ b/share/hydractl/provision @@ -109,9 +109,9 @@ umount /tmp/debootstrap/dev &> /dev/null if [ "$encrypt" == "y" ]; then echo "Creating encrypted root device..." hydra_safe_run cryptsetup -h sha256 -c aes-cbc-essiv:sha256 -s 256 luksFormat /dev/$vg/root - hydra_safe_run cryptsetup luksOpen /dev/$vg/root debootstrap + hydra_safe_run cryptsetup luksOpen /dev/$vg/root root hydra_safe_run mkfs.ext4 /dev/mapper/debootstrap - install_device="/dev/mapper/debootstrap" + install_device="/dev/mapper/root" else echo "Creating root device..." mkfs.ext4 /dev/vg/root @@ -125,7 +125,8 @@ hydra_safe_run debootstrap --arch=$arch $version /tmp/debootstrap/ $mirror # Initial configuration. echo "Applying initial configuration..." -mount none -t proc /tmp/debootstrap/proc/ +mount none -t proc /tmp/debootstrap/proc +mount none -t sysfs /tmp/debootstrap/sys mount -o bind /dev/ /tmp/debootstrap/dev echo LANG=C > /tmp/debootstrap/etc/default/locale @@ -136,8 +137,8 @@ grep nameserver /etc/resolv.conf >> /tmp/debootstrap/etc/resolv.conf # Hostname configuration. echo $hostname.$domain > /tmp/debootstrap/etc/hostname -echo "127.0.0.1 $hostname $hostname.$domain" >> /tmp/debootstrap/etc/hosts echo "127.0.0.1 localhost" >> /tmp/debootstrap/etc/hosts +echo "127.0.0.1 $hostname $hostname.$domain" >> /tmp/debootstrap/etc/hosts # Invert hostname contents to avoid http://projects.puppetlabs.com/issues/2533 tac /tmp/debootstrap/etc/hosts > /tmp/debootstrap/etc/hosts.new @@ -191,18 +192,18 @@ if [ "$grub" == "y" ]; then echo "Setting up GRUB..." hydra_safe_run chroot /tmp/debootstrap/ apt-get install grub-pc -y - hydra_safe_run grub-install --root-directory=/tmp/debootstrap/boot --no-floppy "$device" - mkdir -p /tmp/debootstrap/boot/grub/ - cat >> /tmp/debootstrap/boot/grub/grub.cfg <<-EOF -set menu_color_normal=white/blue -set menu_color_highlight=yellow/red - -menuentry 'Standard: $hostname Debian Server' --class debian --class gnu-linux --class gnu --class os { - echo 'Debian Server $hostname...' - linux /vmlinuz-2.6.32-5-vserver-amd64 root=/dev/mapper/root ro - echo 'Loading initial ramdisk...' - initrd /initrd.img-2.6.32-5-vserver-amd64-server -} +# hydra_safe_run grub-install --root-directory=/tmp/debootstrap/boot --no-floppy "$device" +# mkdir -p /tmp/debootstrap/boot/grub/ +# cat >> /tmp/debootstrap/boot/grub/grub.cfg <<-EOF +#set menu_color_normal=white/blue +#set menu_color_highlight=yellow/red +# +#menuentry 'Standard: $hostname Debian Server' --class debian --class gnu-linux --class gnu --class os { +# echo 'Debian Server $hostname...' +# linux /vmlinuz-2.6.32-5-vserver-amd64 root=/dev/mapper/root ro +# echo 'Loading initial ramdisk...' +# initrd /initrd.img-2.6.32-5-vserver-amd64-server +#} EOF fi |