Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download ubuntu18.04 failed, update cdimage downloading url #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ set -euo pipefail

# See http://askubuntu.com/questions/409607/how-to-create-a-customized-ubuntu-server-iso

VERSION=${1:-16.04.3}
VERSION=${1:-18.04}
SOURCE="ubuntu-$VERSION-server-amd64.iso"
TARGET="$(echo "$SOURCE" | sed -e 's/server-/server-auto-/')"

if [ ! -f "$SOURCE" ]; then
URL="http://releases.ubuntu.com/$VERSION/$SOURCE"
URL="http://cdimage.ubuntu.com/releases/$VERSION/release/$SOURCE"
echo "Downloading $URL"
curl --output "${SOURCE}.tmp" "$URL"
mv "${SOURCE}.tmp" "$SOURCE"
Expand Down Expand Up @@ -59,6 +59,7 @@ sudo mkisofs -r -V "Custom Ubuntu Install CD" \
-boot-load-size 4 -boot-info-table \
-o "$TARGET" newIso/
ls -l "$TARGET"

sudo chown "$USER:$USER" "$TARGET"
isohybrid "$TARGET"

Expand Down