error not handled, file not found, or failed to download iso
Closed this issue · 2 comments
I ran this script to set up an iso, and it failed, showing the following output (password censored). On investigating, it was not able to download the 14.04 image. It didn't show a progress meter, just said DONE, and didn't handle the wget error at all or check for a missing file.
I would like for this script to check for the existence of the downloaded file after the download and exit with an error message if it doesn't exist.
I was running this on a stock ubuntu 14.04 in a vagrant/virtualbox, as user vagrant using sudo. Once I figured out it wasn't downloading, I tried to make an ubuntu 16 iso and that started the download and showed a progress indicator.
Output from program when it failed to download:
+---------------------------------------------------+
| UNATTENDED UBUNTU ISO MAKER |
+---------------------------------------------------+
which ubuntu edition would you like to remaster:
[1] Ubuntu 12.04.4 LTS Server amd64 - Precise Pangolin
[2] Ubuntu 14.04.3 LTS Server amd64 - Trusty Tahr
[3] Ubuntu 16.04 LTS Server amd64 - Xenial Xerus
please enter your preference: [1|2|3]: 2
please enter your preferred timezone: Etc/UTC
please enter your preferred username: ubuntu
please enter your preferred password:
confirm your preferred password:
Make ISO bootable via USB: yes
downloading ubuntu-14.04.3-server-amd64.iso: DONE
-h downloading netson.seed:
DONE
installing required packages
remastering your iso file
./create-unattended-iso.sh: line 161: /tmp/iso_new/isolinux/lang: No such file or directory
cp: cannot create regular file ‘/tmp/iso_new/preseed/netson.seed’: No such file or directory
./create-unattended-iso.sh: line 173: /tmp/iso_new/preseed/netson.seed: No such file or directory
sed: can't read /tmp/iso_new/preseed/netson.seed: No such file or directory
sed: can't read /tmp/iso_new/preseed/netson.seed: No such file or directory
sed: can't read /tmp/iso_new/preseed/netson.seed: No such file or directory
sed: can't read /tmp/iso_new/preseed/netson.seed: No such file or directory
md5sum: /tmp/iso_new/preseed/netson.seed: No such file or directory
sed: can't read /tmp/iso_new/isolinux/txt.cfg: No such file or directory
creating the remastered iso
isohybrid: could not open file `/tmp/ubuntu-14.04.3-server-amd64-unattended.iso': No such file or directory
umount: /tmp/iso_org: not mounted
-----
finished remastering your ubuntu iso file
the new file is located at: /tmp/ubuntu-14.04.3-server-amd64-unattended.iso
your username is: ubuntu
your password is: ????????
your hostname is: ubuntu
your timezone is: Etc/UTC
vagrant@mytestvm:~$ cd /tmp/
vagrant@mytestvm:/tmp$ ls
netson.seed
This still fails and is not solved with #16 using WSL (linux on windows).
Running on my ubuntu server it completed without a hitch. Been troubleshooting for a few hours and thought this might come in handy for someone with the same problem in the future. 👋
I have same error running inside ubuntu 18.04 docker image