Please note that LinuxExchange will be shutting down on December 31st, 2016. Visit this thread for additional information and to provide feedback.

I'm looking at making a way where I can do installs of Ubuntu systems with as little work as possible.

I'm just starting to use Kickstart so I want to do the unattended install; but I also want to have it pull the install-script.sh from the Internet (Dropbox right now, but maybe a PPA??) and then install some repos, applications, deb files for which there is no repo, and some wallpaper images, etc. I also want to be able to change, remove, update the install-scetup.sh on my Internet site and whatever deb files, images, etc, all at-will; -- so putting these things on the ISO image of the alternate install CD isn't really a viable option.

By pulling from the Internet, I don't need to constantly update the CD itself until a new point release comes out, ala 10.04.1LTS, 10.04.2LTS, etc, so anything that I change (like adding/removing applications from the install-script.sh and/or *.deb files, wallpapers, etc) would instantly be updated. So of John installs and now a few months later I add some new backgrounds, remove a few applications from the install-setup.sh, so when Suzy installs, she will get those changes.

It'd be a nice bonus if Johnny would get those changes too. I know that would require a PPA repo vs Dropbox. One thing about that though... I'm not a packager, so I don't know how to package *.deb files, etc.

Some sites (and code....) I've ran across are below..... as for the code, will it work "as is"? How do I incorporate it into the ks.cg (Kickstart) file as a %post ? Can I even do that?

http://www.redhat.com/docs/manuals/linux/RHL-7.3-Manual/custom-guide/ch-kickstart2.html http://nerdnotes.org/2006/02/kickstart-for-ubuntu-live-cd/

http://www.ubuntugeek.com/unattended-ubuntu-installations-made-easy.html


#!/bin/sh

# determine the mac address of the first network adapter
mac=`/sbin/ifconfig  | awk  '/HWaddr/ { print $5 }' | head -1`

# download and execute livecd init script
wget -q -O - http://dl.dropbox.com/u/914191/install-script.sh?mac=$mac | /bin/sh

( Anyone who researches my posts on here will see the install-script.sh I'm talking about.) ( You can also get it at: http://dl.dropbox.com/u/914191/install-script.sh )

asked 19 Aug '10, 20:41

Ron's gravatar image

Ron ♦
9361718
accept rate: 13%




It's too long to post the actual code here... but here it is laid out in how to do it...

1) Download ks.cfg and install it to the alternate Ubuntu ISO wget http://dl.dropbox.com/u/914191/install-setup/ks.cfg

2) Recompile the ISO, burn it to CD and then run it from there on reboot.

What this does it it loads the Ubuntu on the PC and as part of the kickstart configuration file, on %post (after the Ubuntu install), it does a wget command like so:

wget -q http://dl.dropbox.com/u/914191/install-setup/ks-install-script.sh -O- | sh

This downloads and runs the bash shell script and it installs various programs, removes others, downloads other files, etc. This ks-install-script.sh differs from my normal one because the sudo command is coded into each line.

The old way I was doing this was to just use a normal Ubuntu CD and install it that way, then just wget http://dl.dropbox.com/u/914191/install-setup/install-script.sh to the desktop. After that, cd Desktop and then chmod +x install-script.sh and then finally sudo ./install-script.sh

This method DOES still work by the way, so use whichever one you want.

The install-script is still under development as I want to tweak the iptables section and also maybe do an actual PPA repo instead, but for now, this solution using Dropbox works for me. I'd also like to develop a LAN version that pulls from an apt-cache server perhaps,as that would save WAN bandwidth on multiple installs.

I'd really like to just have a DEB file if that would work, but I'm not a programmer/developer/packager really, so I'm not sure on if that's the best way to do this or not. If it is, how would I do it? No idea. Feel free to use the code, but do share your changes with me and others; and do please give me credit as the originator.

wget -c -t0 http://dl.dropbox.com/u/914191/rons-ubuntu-v13-autoinstall.iso

UPDATE - I posted the following on the Ubuntu Forums and figured I'd post it here as well.

New Install / Customized Packaging Does anyone here know about packaging deb files?

I'm in the process of reading https://wiki.ubuntu.com/PackagingGuide/Complete but this is more of a question of, "is this the best way to do it?" than anything else.

I want to find the best way to distribute images for wallpapers, fonts, document files, and also a customized install-setup.sh as well. Right now I have an alternative Ubuntu ISO with a kickstart file that does a wget to.dropbox.com -O- | sh after Ubuntu is installed -- and while it works, it's crude. I don't really need to change the ISO image, only the script which resides on the Dropbox location.

The install-script.sh installs 3rd party applications, PPAs, sets up iptables, downloads some images files, a customized aliases file and imports it into the .bashrc and /etc/skel .bashrc, and a few other tasks as well.

Basically the idea I want to do is to do a new Ubuntu install, add the PPA, sudo apt-get update and then the deb file downloads and does all of the work.

Is this the best way to do that? One issue that may arise is the shell script does require some user input to it. Forgive me. I am not a programmer, new to packaging, etc. Just want some feedback on my method really.

If you want to see the ks.cfg and the ks-install-script.sh they are at:

http://dl.dropbox.com/u/914191/ks-install-script.sh http://dl.dropbox.com/u/914191/install-script/ks.cfg

http://ubuntuforums.org/showthread.php?p=9758363#post9758363

link

answered 23 Aug '10, 14:45

Ron's gravatar image

Ron ♦
9361718
accept rate: 13%

edited 24 Aug '10, 20:10

Can you please provide the details of your fix, as this is meant to be a faq of sorts.

(23 Aug '10, 18:02) rfelsburg ♦

I'll edit my answer above.

(23 Aug '10, 21:49) Ron ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×14
×9
×8
×1

Asked: 19 Aug '10, 20:41

Seen: 11,441 times

Last updated: 07 Sep '10, 20:24

powered by OSQA