From 4afc0030f1a5c89acff6310a208c81e266a15543 Mon Sep 17 00:00:00 2001 From: devopsmyth Date: Thu, 14 May 2020 11:56:02 -0400 Subject: [PATCH 1/5] Modify ./build-iso Change mkisofs to genisoimage to accommodate for lack of mkisofs on Debian 10 Buster. Both ISO generation tools have the same command line parameters so no other arguments were changed. --- build-iso | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-iso b/build-iso index 0631431..9b0de1f 100755 --- a/build-iso +++ b/build-iso @@ -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 \ From b183e525a2a8d427585a129fea78dd92ee145764 Mon Sep 17 00:00:00 2001 From: William Smyth Date: Thu, 14 May 2020 12:08:59 -0400 Subject: [PATCH 2/5] Update Readme.md Changed Readme.md to reflect use of `genisoimage` in lieu of `mkisofs` or `xorrisofs`. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a1725d8..77c18a0 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 -------------------- From 083c7614bf6d5895ce02b9050fddf7d232e52857 Mon Sep 17 00:00:00 2001 From: William Smyth Date: Thu, 14 May 2020 12:13:33 -0400 Subject: [PATCH 3/5] Set theme jekyll-theme-slate --- _config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 _config.yml 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 From a12bac0a07421017ff7499a8e9e61b71ee254bbc Mon Sep 17 00:00:00 2001 From: devopsmyth Date: Wed, 20 May 2020 00:40:00 -0400 Subject: [PATCH 4/5] Change "vda" to "sda" Alter scripts and filenames to change any mention of 'vda' to 'sda'. To fix failing automated install with Ubuntu ISO. Signed-off-by: devopsmyth --- README.md | 4 ++-- auto_resize_sda.sh | 9 +++++++++ auto_resize_vda.sh | 9 --------- build-iso | 2 +- config.sh | 2 +- late_command.sh.m4 | 4 ++-- unattended.seed.m4 | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) create mode 100755 auto_resize_sda.sh delete mode 100755 auto_resize_vda.sh diff --git a/README.md b/README.md index 77c18a0..7d7ee10 100755 --- a/README.md +++ b/README.md @@ -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/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 9b0de1f..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" \ diff --git a/config.sh b/config.sh index 6031dcc..0d2e604 100755 --- a/config.sh +++ b/config.sh @@ -4,7 +4,7 @@ : ${NICKNAME:="terraform"} # Arguments given to the download router. -: ${VERSION:="14.04.5"} +: ${VERSION:="18.04.4"} : ${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 From 1e78d5c4f26109f4b7f23674fb87c21200f1fac2 Mon Sep 17 00:00:00 2001 From: devopsmyth Date: Wed, 20 May 2020 01:15:42 -0400 Subject: [PATCH 5/5] Remove .gitkeep Signed-off-by: devopsmyth --- config.sh | 2 +- work/.gitkeep | 0 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 work/.gitkeep diff --git a/config.sh b/config.sh index 0d2e604..3bcfd2b 100755 --- a/config.sh +++ b/config.sh @@ -4,7 +4,7 @@ : ${NICKNAME:="terraform"} # Arguments given to the download router. -: ${VERSION:="18.04.4"} +: ${VERSION:="16.04.6"} : ${DISTRO:="server"} : ${RELEASE:="latest"} diff --git a/work/.gitkeep b/work/.gitkeep deleted file mode 100644 index e69de29..0000000