Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 26 May 2013, 01:24
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
dir2iso
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [2 Posts]  
Author Message
aragon

Joined: 15 Oct 2007
Posts: 1690
Location: Germany

PostPosted: Thu 11 Dec 2008, 08:40    Post subject:  dir2iso
Subject description: Make an iso from a directory
 

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:
#!/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:

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

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 4378

PostPosted: Thu 11 Dec 2008, 08:45    Post subject:  

Quote:
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
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0446s ][ Queries: 12 (0.0110s) ][ GZIP on ]