dir2iso

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

dir2iso

#1 Post by aragon »

As i'm often working on the 'opened heart' of my puplet (copying the pup_*.sfs-content to a directory, modify, dir2sfs), i also need a solution like dir2sfs for creating an (bootable) iso again.

Isomaster does not work in all cases, so dir2iso is my personal solution. It combines dir2sfs and the mkisofs-command from the remaster-script.

Code: Select all

#!/bin/bash

t=`echo "$1" | sed "s/\/$//"`
z=`echo "$1" | sed "s/\/$//"`

if [ ! -d "$t" ];then

  echo "error: no valid folder specified!"
  exit 0

fi

if [ -f "$z.iso" ];then

  echo "$z.iso already exists, refusing to overwrite it!"
  exit 0

fi

mkisofs -D -R -o "$z.iso" -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table "$t"
md5sum "$z.iso" > "$z.iso-md5.txt"
sync


echo
echo
s=`du -m "$z.iso" | sed "s/\s.*//"`
echo "created: $z.iso ( $s MB )"
echo "created: $z.iso-md5.txt"
echo
echo "...byebye..."
echo
You copy the content of the base cd to a directory. Exchange the old and the new pup_*.sfs. Than you run dir2iso from the parent-dir with

Code: Select all

dir2iso YOURFOLDER
It will create a new iso named YOURFOLDER.iso in the parent-dir.

Possible improvements (here i need help):
- The script does not test if these files exist in YOURFOLDER:
--- boot.cat
--- boot.msg
--- initrd.gz
--- isolinux.bin
--- isolinux.cfg
--- vmlinuz
--- pup_*.sfs

My thanks to Barry K. and MU.

cheers
aragon

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#2 Post by mikeb »

Isomaster does not work in all cases
I have noticed this too and some iso cannot be mounted (related?)

Cheers for the script but I wonder if this Isomaster bug(?) needs investigating

regards

mike

Post Reply