I am in the process of creating an automated install disc for Ubuntu Server 10.10. Is it possible to setup package selection within the preseed file (what groups of packages to install etc.)? If so how can this be done.
At a high level, the key part of creating is a preseed file that can specify options that the installer asks you. An example preseed file can be found at the debian website. The example provides most of the options that you may want to modify.
When it gets down to implementation, there are a few more steps to be followed:
Obtain the image. You can choose between a full image and a mini iso which downloads a fresh copy of packages off the internet. The process is slightly different, but mostly analogous.
Once you have the image, you need to extract files from the iso. There might be a one-step way to do this, but this is how I've always done it like this:
sudo mount -o loop -t iso9660 mini.iso /mnt cp -rf /mnt /path/to/extractdir sudo umount /mnt
Now you create the preseed file that you want to use. In the mini iso, since you don't really have a hierarchy, just put it in the root folder. In the regular server install, put it in the preseed folder. It is your choice where you want to put it/what you want to call it.
Once you have the preseed, you need to specify it to the kernel. In the mini iso, you need to edit
text.cfg, or in the full install,
isolinux/text.cfgto include your preseed by editing the
APPENDline as follows:
APPEND arg1 arg2=value2 arg3 ... file=/cdrom/path/to/preseed/file locale=en_US console-setup/ask_detect=false console-setup/layout=us --
Don't remove existing values unless you know what you're doing
Once you're done modifying the preseed and text.cfg files, you need to repack things as an ISO. To do this, you need to put isolinux on the CD to make it bootable. Now,
cdto the root directory of the extracted image, and do the following [taken from the syslinux website:
cd /path/to/extractdir mkisofs -o output.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -T .
You need to add the
-iso-level 2)flag to support longer file names.
Your iso is at
output.iso and ready to be burned!
This answer concern debian, but it is probable that will work for ubuntu also, and in any case can be a useful bit of information: create non-interactive installers
Ok, I spent WAY too much time figuring out how to get this to work. Shroff, your example, though close, isn't quite there.
At least the last part of it.
The last step, with the mkdir CD_root, and mkisofs is slightly off.
If you did the
sudo mount -o loop mini.iso /mnt cp -fr /mnt/ ./new_image sudo umount /mnt
The next steps get fuzzy in your example. The editing the text.cfg, and placement of pressed.txt (name I used) is right. So the following:
cd new_image chmod 777 . vim pressed.txt vim text.cfg
cd .. mkisofs -o output.iso -b isolinux.bin -l -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table new_image
I was lost when dealing with the isolinux/isoliunux.bin, and the CD_root. Appartnetly the copy-paste you stole from syslinux website doesn't apply to the ubuntu images.
Hope this helps everyone else!