diff --git a/README.md b/README.md index a1725d8..7d7ee10 100755 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ Build dependencies * `curl`(1). * `m4`(1). -* `mkisofs`(1) from the `cdrtools` package available from MacPorts or - Homebrew. +* `genisoimage`(1) from the `genisoimage` package available from Debian repostiory and other package archives for Linux. + * `mkisofs` and `xorrisofs` are alternatives that work with the same arguments as `genisoimage`. Runtime dependencies -------------------- @@ -26,11 +26,11 @@ Features in the ISO * Configurable default user with SSH key and sudoer NOPASSWD access * The system clock is set to UTC -* Auto partition virtual disk (/dev/vda) with LVM +* Auto partition virtual disk (/dev/sda) with LVM * OpenSSH server is installed * Bring up only eth1 for flexible user-net SSH port forwarding * Includes script to auto-resize partitions to the current size of - vitual disk /etc/auto_resize_vda.sh + vitual disk /etc/auto_resize_sda.sh Building diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..c741881 --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-slate \ No newline at end of file diff --git a/auto_resize_sda.sh b/auto_resize_sda.sh new file mode 100755 index 0000000..441fea4 --- /dev/null +++ b/auto_resize_sda.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# Use parted to extend root partition to available /dev/sda space +END=$(parted /dev/sda print free | grep Free | tail -1 | awk "{print \$2}") +parted /dev/sda resizepart 2 $END +parted /dev/sda resizepart 5 $END +pvresize /dev/sda5 +VGROUP=$(mount | grep root | awk "{ print \$1 }") +lvextend -l +100%FREE -r $VGROUP diff --git a/auto_resize_vda.sh b/auto_resize_vda.sh deleted file mode 100755 index ead9f07..0000000 --- a/auto_resize_vda.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# Use parted to extend root partition to available /dev/vda space -END=$(parted /dev/vda print free | grep Free | tail -1 | awk "{print \$2}") -parted /dev/vda resizepart 2 $END -parted /dev/vda resizepart 5 $END -pvresize /dev/vda5 -VGROUP=$(mount | grep root | awk "{ print \$1 }") -lvextend -l +100%FREE -r $VGROUP diff --git a/build-iso b/build-iso index 0631431..c08a6a7 100755 --- a/build-iso +++ b/build-iso @@ -56,7 +56,7 @@ m4 \ m4 \ -D __USERNAME__="$USERNAME" \ sudoers.m4 > "$COPY/sudoers" -cp "$PUBLIC_KEY" "auto_resize_vda.sh" "$COPY/" +cp "$PUBLIC_KEY" "auto_resize_sda.sh" "$COPY/" m4 \ -D __USERNAME__="$USERNAME" \ -D __PUBLIC_KEY__="$PUBLIC_KEY" \ @@ -64,7 +64,7 @@ m4 \ echo Building a custom ISO # Build a custom ISO. -mkisofs -r -V "Ubuntu $VERSION for Terraform" \ +genisoimage -r -V "Ubuntu $VERSION for Terraform" \ -cache-inodes -J -l -no-emul-boot \ -b isolinux/isolinux.bin \ -c isolinux/boot.cat \ diff --git a/config.sh b/config.sh index 6031dcc..3bcfd2b 100755 --- a/config.sh +++ b/config.sh @@ -4,7 +4,7 @@ : ${NICKNAME:="terraform"} # Arguments given to the download router. -: ${VERSION:="14.04.5"} +: ${VERSION:="16.04.6"} : ${DISTRO:="server"} : ${RELEASE:="latest"} diff --git a/late_command.sh.m4 b/late_command.sh.m4 index cf0b31e..d9403ba 100755 --- a/late_command.sh.m4 +++ b/late_command.sh.m4 @@ -7,7 +7,7 @@ chown 1000:1000 \ /target/home/__USERNAME__/.ssh \ /target/home/__USERNAME__/.ssh/authorized_keys -cp /cdrom/sudoers /cdrom/auto_resize_vda.sh /target/etc/ +cp /cdrom/sudoers /cdrom/auto_resize_sda.sh /target/etc/ chmod 440 /target/etc/sudoers chown 0:0 /target/etc/sudoers -chmod 755 /target/etc/auto_resize_vda.sh +chmod 755 /target/etc/auto_resize_sda.sh diff --git a/unattended.seed.m4 b/unattended.seed.m4 index 9b6dc54..3ad9825 100755 --- a/unattended.seed.m4 +++ b/unattended.seed.m4 @@ -11,7 +11,7 @@ d-i clock-setup/utc boolean true d-i time/zone string UTC # Partitions. -d-i partman-auto/disk string /dev/vda +d-i partman-auto/disk string /dev/sda d-i partman-auto/method string lvm d-i partman-lvm/device_remove_lvm boolean true d-i partman-md/device_remove_md boolean true diff --git a/work/.gitkeep b/work/.gitkeep deleted file mode 100644 index e69de29..0000000