It is currently Wed Apr 23, 2014 7:42 am

All times are UTC - 8 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: mkisofs, ISO from pathspec ONLY? Customize?
PostPosted: Wed Sep 28, 2005 4:44 am 
Offline

Joined: Sun Sep 11, 2005 3:41 pm
Posts: 11
mkisofs, ISO from pathspec ONLY. Customize.

Several days of trial & research -- no joy.
PLEASE
Can anyone tell me how to produce an ISO with ONLY the pathspec tree?
And to NOT include everything in the current working directory tree?
Do NOT want to copy mkisofs & its batch file into the ISO.
Yes I have read (& memorized) the UBCD Customize page and several other cdrecord & mkisofs pages.
Using windows.
Thanks.


Top
 Profile  
 
 Post subject: mkisofs, ISO from pathspec ONLY? Customize?
PostPosted: Wed Sep 28, 2005 9:08 am 
Offline

Joined: Thu Feb 24, 2005 10:04 am
Posts: 101
JJ:

I'm not sure what you mean by produce an ISO with the pathspec tree.

If you want to exclude files and/or directories from your ISO make sure
you're running a mkisofs with the -exclude-list option. This option allows
you to specify a file containing a list of files/dirs you want to exclude from
the ISO when creating.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2005 3:50 pm 
Offline

Joined: Sun Sep 11, 2005 3:41 pm
Posts: 11
>> I'm not sure what you mean by produce an ISO with the pathspec tree.
This mkisofs manual page:
http://linuxcommand.org/man_pages/mkisofs8.html
defines pathspec as the path of the directory tree to be copied into the iso9660 filesystem.

>> make sure you're running a mkisofs with the -exclude-list option
Yes I've tried the -x, -m, & -exclude-list options in several variations.
And all I get are various invalid node errors.

Can anyone offer a specific example of what works in a windows PC for excluding
files from the working directory (where you place mkisofs.exe & its batch file).
Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2005 6:24 pm 
Offline

Joined: Thu Feb 24, 2005 10:04 am
Posts: 101
OK, long email in an attempt to resolve all questions from both threads:

I'll address your mkisofs questions later in this post, but let's first start with the objective:

Objective A:
Since you purchased a CDROM as opposed to downloading the ISO, you want to verify the integrity of your UBCD 3.3 Full CD. I provided a list of files and their checksums, but you want to make sure that the checksums I gave you are indeed legit (I take no offense)
Solution A:
The only way you'll be able to accomplish this is to have someone else send you the individual file checksums like I did. If you are trying to duplicate Victor's mastering and get the same ISO checksum it's NEVER going to happen. Once you are able to master your own ISO (as shown below) you'll see this is true. As far as why it's true one would have to look into the mkisofs source code; but the fact that it doesn't generate an ISO with the exact checksum is neither a bug nor necessarily bad programming practice.

Objective B:
You want to generate your own ISO because you've customized it, or simply to know that you can.
Solution B:
OK. Some of the issues you've run into probably are due to the fact mkisofs is a port from unix systems so it's syntax isn't always "Windows" consistent. This isn't a problem, just something to be aware of. Let's start with some definitions:

working directory = This is the directory you are working from. We'll assume it's c:\ubcd. Your working directory will contain the extracted contents of UBCD 3.3 Full (and perhaps other files that you may or may not want in your ISO, like mkisofs). To make sure you are in the correct directory, get to a command prompt and type the following:
Quote:
C:
cd \ubcd


pathspec = This is the mkisofs parameter which specifies the path of the directory tree to be copied into the iso9660 filesystem. Since your working directory is the same as your pathspec, the pathspec parameter to mkisofs will be "." (dot, a period, no quotes).

For the sake of simplicity, you'll want to copy mkisofs.exe to c:\ubcd (it isn't necessary to have mkisofs.exe in your working directory, but if it's not, you would need to understand environment variables, specifically the PATH environment variable).

Now, to make your iso, type the following:
Quote:
mkisofs -N -J -r -o \ubcd.iso -b boot/loader.bin -no-emul-boot -boot-load-size 4 .

This will create the ubcd.iso file in C:\.

Assuming you don't want mkisofs.exe in your iso, you'll have to type:
Quote:
mkisofs -N -J -r -m mkisofs.exe -o \ubcd.iso -b boot/loader.bin -no-emul-boot -boot-load-size 4 .


If you want to exclude multiple files you use multiple "-m" options like so:
Quote:
mkisofs -N -J -r -m mkisofs.exe -m makeubcd.bat -o \ubcd.iso -b boot/loader.bin -no-emul-boot -boot-load-size 4 .

This would also exclude the file makeubcd.bat.

If you want to exclude a bunch of files using the "-exclude-list" option, create a file in c:\ubcd using notepad and name it excluded.txt Here are some examples of exclusions you might add to this file:
Code:
./excluded.txt
./mkisofs.exe
./makeubcd.bat
./tools/convert/*.exe
./INSERT

File names are case sensitive, so ./INSERT would exclude the INSERT directory, but ./insert would not.

At this point you've created the ubcd.iso file several times and noticed a few "messages" from mkisofs.exe, such as "Warning: creating filesystem that does not conform to ISO-9660" and "Using XXX for YYY". This is normal and you can ignore the messages or google around for what these messages are all about. Needless to say they are the same messages Victor gets when he creates the master.

Now, for the checksum issue, create an iso then check it's MD5 checksum with your favorite utility. Then create the iso again and check the checksum. They will differ.

And finally, here is a script you can place anywhere on your computer and it will create your iso. You can play with the batch file to experiment with options.

If you are using Notepad to create this batch file make sure you change "Save as type" to "All Files" and save the file as "makeubcd.bat"

Code:
@echo off

REM Changing the drive and directory via the
REM cd command below might fail if you're not
REM running WinXP or 2000.

rem * Change UBCD_DIR to any location you like.
rem * This should contain the extracted contents of the UBCD

rem * We'll assume mkisofs.exe in in C:\ubcd, but you
rem * could put it anywhere on your system provided
rem * you change MKISOFS_UTIL below

rem * The name of the iso will be myubcd.iso and can
rem * be found in C:\  Change UBCD_ISO if you want.

SET UBCD_DIR="C:\ubcd"
SET UBCD_ISO="C:\myubcd.iso"
SET MKISOFS_UTIL="C:\ubcd\mkisofs.exe"

if exist %UBCD_DIR%\ubcd.ico GOTO CHECK2
echo.
echo %UBCD_DIR% does not contain the extracted UBCD files
echo Exiting.
goto END

:CHECK2
if exist %MKISOFS_UTIL% GOTO DOIT
echo.
echo Can't find %MKISOFS_UTIL%
echo Exiting.
goto END

:DOIT
rem Change working directory
cd %UBCD_DIR%


rem * Now, make the iso excluding mkisofs and this batch file
rem * in case they are in C:\UBCD.  If they are not, no big
rem * deal.

%MKISOFS_UTIL% -o %UBCD_ISO% -N -J -r -m mkisofs.exe -m makeubcd.bat -b boot/loader.bin -no-emul-boot -boot-load-size 4 .

:END
rem * And finally, pause in case you running this
rem * from Explorer, etc
echo.
echo.
pause


I've run out of time so didn't get a chance to proofread but all should be correct.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 6:47 am 
Offline

Joined: Sun Sep 11, 2005 3:41 pm
Posts: 11
bldrdash
With respect to this thread about mkisofs & pathspec:
Thanks for clarifying the "." issue.
I had interpreted what it said on the Customizing UBCD page as the "." being mandatory and thus was careful to always included it at the end.
Since I was already defining my own pathspec, this "." was not needed. And this was why mkisofs.exe & its batch file kept getting included.
Thanks again.

bldrdash
With respect to the other thread about Checksums:
>> (from above)... it's NEVER going to happen. Once you are able to master your own ISO (as shown below) you'll see this is true.
Yes. If you had read my reply on that other thread you would see that I was NOT trying to argue that point; Rather I was confirming & agreeing with what you had said:
viewtopic.php?t=256
>>>OK, I've actually just used the same mkisofs batch file & mkisofs.exe with the exact same source files (pathspec) and the exact same ISO target file.
>>>And yes several attempts (with no changes) give a 186MB ISO with different MD5s every time.
>>>Posted: Wed Sep 28, 2005 3:45 pm
That post was made about 5 minutes prior to my post preceding yours above (Posted: Wed Sep 28, 2005 3:50 pm).
I wasn't trying to bring that Checksums issue to this thread and I wasn't trying to argue that "different ISOs" point with you.
Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group