Essentials:

Make bootable ISO from multiple ISO files!

iso-filesI finally got sick and tired of swapping discs during an install of FreeBSD so after visiting a few websites I put this little shell script together which automates the process of merging the two ISO files together into a new bootable ISO file.

I have had good success getting the ISO files from this FTP site:
ftp://ftp4.us.freebsd.org/pub/FreeBSD/

Your average download time for both ISO files will be around 2 hours or less hopefully. Save your CD*.iso files into the /temp folder that you have made or will make.

For this to work you will need to execute this on an existing FreeBSD system. I am using FreeBSD 6.1-RELEASE.

In a slightly different version of this script you could use growisofs which would just burn the ISO directly to a burner but instead I make use of the mkisofs which just outputs a ISO file to the file system.

Create a file called makeiso.sh in / and paste the following into it.

code    
#!/bin/sh
 
# Give a warning
echo "
Make sure you are running this from the /temp directory
Assumes files are in the / folder
Assumes source files are named CD*.iso
Adding pkg_add -r dvd+rw-tools
 
Press Enter to continue or Control-C to abort..."
 
# Check input
/usr/bin/read x
 
# Adding dvd tools
echo "Adding dvd+rw-tools..."
pkg_add -r dvd+rw-tools
 
cd /temp
mdconfig -a -f CD2.iso
mount -t cd9660 /dev/md0 /mnt
echo "Copying files..."
tar -C /mnt -cf - . |tar -xf -
umount /mnt
mdconfig -d -u 0
mdconfig -a -f CD1.iso
mount -t cd9660 /dev/md0 /mnt
echo "Copying files..."
tar -C /mnt -cf - . |tar -xf -
umount /mnt
mdconfig -d -u 0
cd packages
cat INDEX |sed "s/|2/|1/g" > ix
mv ix INDEX
cd ..
rm -r rr_moved
cd /
echo "Building ISO file..."
mkisofs -R -no-emul-boot -b boot/cdboot -o bootable.iso /temp
 
echo "ISO creation completed..."
echo "Make sure to clean up your /temp folder."

Then run the script from / by typing:
sh ./makeiso.sh

If you leave the CD*.iso images in the /temp folder they will be included in your new bootable ISO file. The final ISO file size will be around 2597 MB (2.59GB).

If you remove the two CD*.iso files from /temp then your new bootable ISO file will be around 1518 MB (1.58GB) in size.

Large Credit:
http://www.pa.msu.edu/~tigner/bsddvd.html

Download FreeBSD:
http://www.freebsd.org/where.html

Tom McGuire is a web designer, developer and educator specializing in learning everything there is to learn about everything. He also firmly believes in ‘Touch, not Tech.” He co-runs a boutique style digital media company called Visual Moxie and he spends a lot of his time thinking about and sharing his knowledge of the internet, information philosophy and web design and development.

Tom McGuire

View all posts by Tom McGuire

Toms website

Search with these terms to find more content:

Terms: create bootable iso frommultiple files, make bootable iso, make multiple iso, multiple iso files  

No comments yet.

Add a comment