Skip to content

Commit

Permalink
Change "vda" to "sda"
Browse files Browse the repository at this point in the history
Alter scripts and filenames to change any mention of 'vda' to 'sda'. To fix failing automated install with Ubuntu ISO.

Signed-off-by: devopsmyth <[email protected]>
  • Loading branch information
codedChaos committed May 20, 2020
1 parent 083c761 commit a12bac0
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions auto_resize_sda.sh
Original file line number Diff line number Diff line change
@@ -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
9 changes: 0 additions & 9 deletions auto_resize_vda.sh

This file was deleted.

2 changes: 1 addition & 1 deletion build-iso
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
2 changes: 1 addition & 1 deletion config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
: ${NICKNAME:="terraform"}

# Arguments given to the download router.
: ${VERSION:="14.04.5"}
: ${VERSION:="18.04.4"}
: ${DISTRO:="server"}
: ${RELEASE:="latest"}

Expand Down
4 changes: 2 additions & 2 deletions late_command.sh.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion unattended.seed.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a12bac0

Please sign in to comment.