Coder Social home page Coder Social logo

Comments (8)

luketainton avatar luketainton commented on August 19, 2024 1

That might be the easiest option. The script is also calling lsb_release which is not available on MacOS, which is making me think that the script isn't fully portable to MacOS.

Thanks for your help @atwright147 !

from ubuntu-unattended.

netson avatar netson commented on August 19, 2024

Hi, thanks for the report; however, since I do not own/use any MacOS device, it's difficult for me to test this. I assume it is because the versions of SED on Ubuntu and MacOS are different and/or support different parameters? Maybe you can confirm this by checking the manpage on MacOS for your SED version?

According to the regular manpage, this is what the -u flag does:
-u, --unbuffered load minimal amounts of data from the input files and flush the output buffers more often

from ubuntu-unattended.

atwright147 avatar atwright147 commented on August 19, 2024

@luketainton

Try using brew to install the GNU version of sed:

# find out about gnu sed
brew info gnu-sed

# install gnu sed
brew install gnu-sed

Looks like you will need to add PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH" to your bashrc or zshrc file to get it to work.

from ubuntu-unattended.

luketainton avatar luketainton commented on August 19, 2024

I'll look into this when I have some time and get back to you. Thanks for the suggestion!

from ubuntu-unattended.

luketainton avatar luketainton commented on August 19, 2024

@atwright147 I did as you said, and while it did advance the script, there are still issues.

+---------------------------------------------------+
| UNATTENDED UBUNTU ISO MAKER |
+---------------------------------------------------+

create-unattended-iso.sh: line 63: lsb_release: command not found
which ubuntu edition would you like to remaster:

[1] Ubuntu 12.04.5 LTS Server amd64 - Precise Pangolin
[2] Ubuntu 14.04.6 LTS Server amd64 - Trusty Tahr
[3] Ubuntu 16.04.6 LTS Server amd64 - Xenial Xerus
[4] Ubuntu 18.04.2 LTS Server amd64 - Bionic Beaver

please enter your preference: [1|2|3|4]: 4
please enter your preferred timezone: /var/db/timezone/zoneinfo/Europe/London
please enter your preferred username: netson
please enter your preferred password:
confirm your preferred password:
Make ISO bootable via USB: yes
downloading netson.seed: sed: illegal option -- u
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
DONE
installing required packages
create-unattended-iso.sh: line 168: lsb_release: command not found
remastering your iso file
create-unattended-iso.sh: line 194: /Users/luke/iso_new/isolinux/lang: No such file or directory
sed: /Users/luke/iso_new/isolinux/isolinux.cfg: No such file or directory
cp: illegal option -- T
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
create-unattended-iso.sh: line 214: /Users/luke/iso_new/preseed/netson.seed: No such file or directory
create-unattended-iso.sh: line 217: mkpasswd: command not found
sed: 1: "/Users/luke/iso_new/pre ...": extra characters at the end of l command
sed: 1: "/Users/luke/iso_new/pre ...": extra characters at the end of l command
sed: 1: "/Users/luke/iso_new/pre ...": extra characters at the end of l command
sed: 1: "/Users/luke/iso_new/pre ...": extra characters at the end of l command
create-unattended-iso.sh: line 228: md5sum: command not found
sed: 1: "/Users/luke/iso_new/iso ...": extra characters at the end of l command
creating the remastered iso
create-unattended-iso.sh: line 243: isohybrid: command not found
umount: /Users/luke/iso_org: not currently mounted

finished remastering your ubuntu iso file
the new file is located at: /Users/luke/ubuntu-18.04.2-server-amd64-unattended.iso
your username is: netson
your password is: netson
your hostname is: ubuntu
your timezone is: /var/db/timezone/zoneinfo/Europe/London

from ubuntu-unattended.

atwright147 avatar atwright147 commented on August 19, 2024

Did you do this bit:

Looks like you will need to add PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH" to your bashrc or zshrc file to get it to work.

It looks like you are getting exactly the same error as before.

from ubuntu-unattended.

luketainton avatar luketainton commented on August 19, 2024

I did do that but for some reason it was still using the built-in version of sed. I've created a symbolic link to where the MacOS version of sed is - I'll try again and see what happens.

from ubuntu-unattended.

atwright147 avatar atwright147 commented on August 19, 2024

Also, try adding an echo $PATH to the script to see what path the script is running with.

I did this on a Mac and I don't remember having these issues but I can't remember if maybe I did it in a VM. That might be an option for you, create a VM in VirtualBox and then run this script from within that

from ubuntu-unattended.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.