Printable Version of Topic
Click here to view this topic in its original format
The CD Forum > General > Uppercase: Patched 'mkisofs' Unneccessary!


Posted by: xlerb Jan 21 2004, 07:08 AM
Hi all, dear Bart,

while working on a cygwin plugin, which requires mixed case file names, I discovered:
  • Bart is right: XP etc. seem to need UPPERCASE file names to boot from an ISO 9660:1999 CD, else a message 'NTLDR not found' appears and the CD boot is aborted.
  • It is NOT neccessary to patch 'mkisofs', just trust Mr. Joerg Schilling (the author and maintainer of mkisofs/cdrtools, seemingly good informed about standards). When 'mkisofs' does allow mixed case file names with -iso-level 4 aka ISO 9660:1999 then it IS allowed.
  • The problem is with Windows (as usual) consuming such a CD and the guys over there not understanding or ignoring standards and implementing buggy software.
  • To solve the conflict between knowledge and ignorance PEBuilder could jump in by just UPPERcasing any file name in the I386 branch, while copying to @OutDir@, leaving alone all other branches/directories and finally using an unpatched copy of 'mkisofs' (with slightly modified params, see below).

What I've done:
  1. got the cdrtools Version 2.01a25 from ftp://ftp.berlios.de/pub/cdrecord/alpha/
  2. unpacked and compiled as of the instructions (cygwin developer install required)
  3. replaced the patched 'mkisofs' by the fresh compiled one
  4. invoked PEBuilder, but unchecked 'Create ISO Image'
  5. manually changed the 'I386' directory in @OutDir@ (C:\pebldr) recursively to UPPERCASE. Also all files in the root.
  6. left alone all other dirs!
  7. made the ISO file (see below for the commandline)
  8. burned with Nero V5.5
And ... the CD boots! Case is preserved on all dirs! Cygwin works basically (making it working fully is another issue and my part of the story).

The commandline for 'mkisofs' I used is (must be given on one line, split up here for clarity):

CODE
mkisofs.exe
 -iso-level 4
 -f
 -volid "BartPE"
 -A PEBUILDER/MKISOFS
 -sysid "Win32"
 -b BOOTSECT.BIN
 -no-emul-boot
 -boot-load-size 4
 -hide BOOTSECT.BIN
 -hide boot.catalog
 -o "D:/PEBuilder/pebuilder.iso"
 "C:/pebldr"


The changes to the commandline as of Bart and specified in 'pebuilder.inf' are:
  • added -f (follow symbolic links aka store shortcuts on CD) [neccessary for cygwin]
  • changed case in -b from 'bootsect.bin' to uppercase
  • changed case in one -hide from 'bootsect.bin' to uppercase

@all: would you give this a try and test, if it works on your config too?
I can deliver the precompiled, unpatched W32 'mkisofs' (if you trust me, else compile it
yourself).

@Bart: do you consider enhancing PEBuilder to follow this approach? Would require
some lines of code to uppercase files/dirs in 'I386'.

best regards

Georg

Posted by: cdob Jan 21 2004, 02:45 PM
QUOTE (xlerb @ Jan 21 2004, 05:08 AM)
just UPPERcasing any file name in the I386 branch

That's wonderful news, that's a legal solution.

Do you use a uppercase shellscript and release it?

BTW: You don’t have to use Nero, you compiled a commandline burning programm. You don’t have to create a ISO image, just pipe mkisofs output to cdrecord. I'm compiling cdrtools regulary.

Maybe you can use -graft-points. PEBuilder don't have to copy all files, mkisofs read from different folder.
"mkisofs.exe -iso-level 4 -f ... -graft-points ""@OutDir@"" /cygwin/=c:/cygwin"

Posted by: paraglider Jan 21 2004, 03:25 PM
I would be surprised if its the whole of I386 that needs to be in uppercase. Maybe only the I386 directory name and SETUPLDR.BIN, TEXTSETUP.SIF and SETUPREG.HIV ? I will have to experiment.

Posted by: xlerb Jan 21 2004, 05:28 PM
QUOTE (cdob @ Jan 21 2004, 12:45 PM)
Do you use a uppercase shellscript and release it?

Dear cdob,

I used this perl script

CODE
#!/usr/bin/perl -w
#
# ucase.pl
# recursively UPPER case a path, usage:
# ucase.pl <file|dir> [ <file|dir> ... ]

use File::Find;

@ARGV or die "$0: you must give a path to convert to uppercase!\n";

finddepth(\&to_upper, @ARGV);

exit 0;

sub to_upper {
   my $lowercase = $_;
   $lowercase eq '.' and return;
   my $uppercase = uc $lowercase;
   # print $File::Find::dir . ": mv $lowercase $uppercase\n";
   rename($lowercase, $uppercase) or die "Could not rename '$lowercase' to '$uppercase': $!\n";
}

Copy it into C:\pebldr and use it like:

cd C:\pebldr
perl ucase.pl i386 bootsect.bin bootfont.bin ...

It will recursively upper case all files and dirs EXCEPT the top level one (i386).
Rename the top level one manually.

I think, ALL files in I386 must be uppercase, because in my normal XP installation the whole I386 branch is also uppercase.

QUOTE (cdob @ Jan 21 2004, 12:45 PM)
BTW: You don’t have to use Nero, you compiled a commandline burning programm. You don’t have to create a ISO image, just pipe mkisofs output to cdrecord. I'm compiling cdrtools regulary.

Maybe you can use -graft-points. PEBuilder don't have to copy all files, mkisofs read from different folder.
"mkisofs.exe -iso-level 4 -f ... -graft-points ""@OutDir@"" /cygwin/=c:/cygwin"


I'll give that a try, thanks.

Posted by: cdob Jan 22 2004, 10:36 AM
QUOTE (xlerb @ Jan 21 2004, 03:28 PM)
I used this perl script

Thanks.

In the meanwhile I used -graft-points, it's case sensitive.

I'm building a Corporate Modboot including BartPE CD.

pebuilder.inf:
;exec="..\burn\mkBartPE.cmd"
exec="..\burn\mkBartPEISO.cmd"

CODE

@echo off
REM mkBartPEISO.cmd: create ISO image, don't burn CD
setlocal
cd /d %~dp0\..\..

set Option=-iso-level 4 -output-charset cp850 -volid "Service"  ^
-A PEBUILDER/MKISOFS -sysid "Win32" -b isolinux/isolinux.bin ^
-no-emul-boot -boot-load-size 4 -boot-info-table -hide isolinux.bin ^
-hide boot.catalog -graft-points ^
-path-list pebuilder/burn/bartpe.lst ^
cds/corpmb/files ^
pebuilder/add ^
/source/pebuilder3026/=pebuilder/pebuilder3026 ^
/source/burn/=pebuilder/burn

mkisofs -o bartpe.iso %Option%


bartpe.lst
CODE

/win51=D:/Bcd/cds/pebldr/files/win51
/win51ip=D:/Bcd/cds/pebldr/files/win51ip
/win51ip.SP1=D:/Bcd/cds/pebldr/files/win51ip.SP1
/winbom.ini=D:/Bcd/cds/pebldr/files/winbom.ini
/I386/BIOSINFO.INF=D:/BCD/CDS/PEBLDR/FILES/I386/BIOSINFO.INF
/I386/EXPLORER.EXE=D:/BCD/CDS/PEBLDR/FILES/I386/EXPLORER.EXE
/I386/IEXPLORE.EXE=D:/BCD/CDS/PEBLDR/FILES/I386/IEXPLORE.EXE
/I386/NTDETECT.COM=D:/BCD/CDS/PEBLDR/FILES/I386/NTDETECT.COM
/I386/REGEDIT.EXE=D:/BCD/CDS/PEBLDR/FILES/I386/REGEDIT.EXE
/I386/SETUPLDR.BIN=D:/BCD/CDS/PEBLDR/FILES/I386/SETUPLDR.BIN
...
1500 lines uppercase


ISOBuster shows a good image. I burned and the CD boots.


Next Step:
CODE

/win51=d:/bcd/cds/pebldr/files/win51
/win51ip=d:/bcd/cds/pebldr/files/win51ip
/win51ip.sp1=d:/bcd/cds/pebldr/files/win51ip.sp1
/winbom.ini=d:/bcd/cds/pebldr/files/winbom.ini
/I386/biosinfo.inf=d:/bcd/cds/pebldr/files/i386/biosinfo.inf
/I386/NTDETECT.COM=d:/bcd/cds/pebldr/files/i386/ntdetect.com
/I386/SETUPLDR.BIN=d:/bcd/cds/pebldr/files/i386/setupldr.bin
/I386/SPCMDCON.SYS=d:/bcd/cds/pebldr/files/i386/spcmdcon.sys
/I386/TXTSETUP.SIF=d:/bcd/cds/pebldr/files/i386/txtsetup.sif
/I386/explorer.exe=d:/bcd/cds/pebldr/files/i386/explorer.exe
/I386/iexplore.exe=d:/bcd/cds/pebldr/files/i386/iexplore.exe
/I386/regedit.exe=d:/bcd/cds/pebldr/files/i386/regedit.exe
...
1500 lines in lowercase


WinPE dosn't boot: complains about missing "\i386\system32\biosinfo.inf"

I have to do more tests.

Posted by: xlerb Jan 23 2004, 07:12 AM
Hi all,

a short msg: CygWin essentially runs with the new concept of uppercasing
just I386 and top level files, leaving alone all other dirs and using an unpatched
version of mkisofs.

See this screenshot of BartPE running the CygWin X11 server and 4 programs on a remote Linux system:

- xterm
- oclock
- xeyes
- soffice

(reduced image size)

*screenshot removed*

http://www.osgev.de/other/bartpe/ScreenHunter_001.gif

2 more shots:

http://www.osgev.de/other/bartpe/ScreenHunter_002.gif

http://www.osgev.de/other/bartpe/ScreenHunter_003.gif

regards

Georg

Posted by: cdob Jan 23 2004, 01:51 PM
QUOTE (cdob @ Jan 22 2004, 08:36 AM)
WinPE dosn't boot: complains about missing "\i386\system32\biosinfo.inf"

Next trial:

/I386/SETUPLDR.BIN=d:/bcd/cds/pebldr/files/i386/setupldr.bin
/i386/system32/biosinfo.inf=d:/bcd/cds/pebldr/files/i386/SYSTEM32/biosinfo.inf

That's \I386 and \i386 on the burned CD. WinXP explorer.exe dosn't like this, don't show any files in \i386, but according to ISOBuster the files are there. WinPE dosn't boot.


One more trial:

/I386/NTDETECT.COM=d:/bcd/cds/pebldr/files/i386/ntdetect.com
/I386/SETUPLDR.BIN=d:/bcd/cds/pebldr/files/i386/setupldr.bin
/I386/SPCMDCON.SYS=d:/bcd/cds/pebldr/files/i386/spcmdcon.sys
/I386/TXTSETUP.SIF=d:/bcd/cds/pebldr/files/i386/txtsetup.sif
/I386/SYSTEM32/BIOSINFO.INF=d:/bcd/cds/pebldr/files/i386/SYSTEM32/biosinfo.inf
/I386/SYSTEM32/calc.exe=d:/bcd/cds/pebldr/files/i386/SYSTEM32/calc.exe
/I386/fonts/arial.ttf=d:/bcd/cds/pebldr/files/i386/fonts/arial.ttf

That's five files (NTDETECT.COM, SETUPLDR.BIN, SPCMDCON.SYS, TXTSETUP.SIF, SYSTEM32/BIOSINFO.INF) in uppercase. Folder \I386 and \I386\SYSTEM32 are in uppercase, all other folder and files are in lower case.

WinPE boot from CD.

Please test yourself.

Posted by: paraglider Jan 23 2004, 02:54 PM
@cdob

It worked for me with your 5 file list + 2 directories. I had to add BOOTFIX.BIN in uppercase for that to display the prompt.

Posted by: xlerb Jan 23 2004, 07:08 PM
Hi cdob and paraglider,

thanks for your experiments and reports.

I tested with paragliders 6 files and 2 dirs in uppercase, no luck!

1st try: \i386\system32\halaacpi.dll could not be found, code 14

And there are some other hal*.dll files too, don't know what these are (HAL = Hardware Abstraction Layer, possibly have to do with ACPI (Advanced Configuration and Power Interface) too).

Just uppercased halaacpi.dll, reburned and did the

2nd try: ntkrnlmp.exe could not be found, code 14

uppercasing that, reburned, then

3rd try: \i386\system32\KDCOM.DLL could not be found, code 14

I stopped the testing here and will stick with uppercasing ALL of I386 and all toplevel files. I don't know why it works for you and not for me, but I believe nobody cares about the I386 branch being UC anyway as long as all other dirs are left mixed case.

And that is what I will ask Bart for to implement in one of the next verions of PEBuilder.

regards

Georg

Posted by: paraglider Jan 23 2004, 09:32 PM
@Xlerb,

The first time I tried it I got the same problem as you - I kept having to add more and more dlls, sys files. Then I made everthing in the root, i386, system32 lowercase and then made only the 6 files and 2 directories uppercase. It then worked.

Posted by: xlerb Jan 24 2004, 12:58 AM
Hi paraglider,

thanks for the tip. But a short test shows, that simply making files in the root lowercase, then uppercasing the mentioned 6 files and 2 dirs did not work out for me. Might be, when I follow your hint fully and lowercase everything in the I386 branch first I could get it to work.

But I don't see the advantage of this, one had to use a script to lowercase all, then uppercase the right files. This is more complicated and errorprone than just uppercasing all files in the root and the whole I386 branch.

Am I missing the point? Who cares about case in the I386 branch for what reason?

regards

Georg

Posted by: this-is-me Jan 24 2004, 01:42 AM
For testing, if anyone here needs a batch win32 command line app to uppercase files/dirs recursively, check out "Win32 Console Toolbox" here: http://stevemiller.net/apps/

There is a program inside called FileCase. Usage to uppercase the i386 dir is as follows:

filecase.exe /u /s /h /q /d C:\pebldr\i386
filecase.exe /u /d /q C:\pebldr\i386

Posted by: xlerb Jan 24 2004, 03:22 PM
QUOTE (this-is-me @ Jan 23 2004, 11:42 PM)
... check out "Win32 Console Toolbox" here: http://stevemiller.net/apps/

There is a program inside called FileCase. Usage to uppercase the i386 dir is as follows:

filecase.exe /u /s /h /q /d C:\pebldr\i386
filecase.exe /u /d /q C:\pebldr\i386

Thanks for the link.

Strange, filecase.exe has the same deficiency as my script: all files/dirs inside i386 are changed, but the i386 dir itself remains lowercase.

Thus the correct sequence of commands to uppercase all neccessary files is:
CODE
REM all files/dirs inside i386
filecase.exe /u /s /h /q /d C:\pebldr\i386
REM all top level files
filecase.exe /u /q C:\pebldr
REM the i386 dir itself
ren C:\pebldr\i386 I386


Please note also, that Steve P. Miller (link above) has a free and very nice 'Dependency Walker' app. Very usefull to figure out, which DLLs are neccessary for any application.

regards

Posted by: cdob Jan 26 2004, 01:55 PM
QUOTE (xlerb @ Jan 23 2004, 05:08 PM)
1st try: \i386\system32\halaacpi.dll could not be found, code 14

I stopped the testing here and will stick with uppercasing ALL of I386 and all toplevel files. I don't know why it works for you and not for me, but I believe nobody cares about the I386 branch being UC anyway as long as all other dirs are left mixed case.

With -graft-points and booting isolinux bootsector WinPe CD boots. After renaming files, folder and booting W2k bootsektor I got also missing halacpi.dll.

Next I uppercasing all of I386, that's more stable. Hopefully Bart use this in a future release.

Posted by: Bart Lagerweij Feb 8 2004, 03:46 PM
@all

Hi,

I've read this thread and see how I can change pebuilder to make this work.

But I first need to finish my "penet" network support.
Could take a few releases before I get to change pebuilder for the "uppercase" change.

Thanks,
Bart.

Posted by: Bart Lagerweij Feb 8 2004, 03:47 PM
@all

Hi,

I've read this thread and see how I can change pebuilder to make this work.

But I first need to finish my "penet" network support.
Could take a few releases before I get to change pebuilder for the "uppercase" change.

Thanks,
Bart.

Posted by: rasa Feb 22 2004, 09:44 PM
@xlerb

Is your Cygwin plugin available?

I started to create one, but I don't want to duplicate your effort.

Posted by: cdob Feb 23 2004, 07:34 PM
QUOTE (rasa @ Feb 22 2004, 07:44 PM)

Is your Cygwin plugin available?

I'm using this. Thanks to xlerb and this-is-me.

pebuilder.inf
CODE

[BuildISO]
exec="mkBartPE.cmd ""@IsoFile@"" ""@OutDir@"" ""@SourcePath@"" ""@Build@"""


mkBartPE.cmd
CODE

@echo off
REM mkBartPE.cmd
REM create ISO image, don't burn
setlocal & echo %~n0 %*
path=%~dp0;%path%

set IsoFile=%~1
if "" == "%IsoFile%" set IsoFile=%~dp0.\BartPE.iso

set OutDir=%~2
if "" == "%OutDir%" set OutDir=C:\pebldr\i386

REM all files/dirs inside i386
filecase.exe /u /s /h /q /d "%OutDir%\i386"
REM all top level files
filecase.exe /u /q "%OutDir%"
REM the i386 dir itself
ren "%OutDir%\i386" I386

rem use local CodePage
set CodePage=HKLM\SYSTEM\CurrentControlSet\Control\Nls\CodePage
FOR /F "tokens=1-2*" %%a IN ('reg query "%CodePage%" /v "OEMCP"') DO (
 set OEMCP=%%c)

rem -allow-lowercase only needed for mkisofs 2.01a17-Bart, but dosn’t harm original mkisofs
mkisofs -version

set option=-iso-level 4 -allow-lowercase -output-charset cp%OEMCP% ^
 -volid ""BartPE"" -A PEBUILDER/MKISOFS -sysid "Win32" ^
 -b BOOTSECT.BIN -no-emul-boot -boot-load-size 4 -hide BOOTSECT.BIN ^
 -hide boot.catalog  "%OutDir%"

echo mkisofs -o "%IsoFile%" %option%
mkisofs -o "%IsoFile%" %option%

rem start cdrecord blank=fast -dao -v "%IsoFile%"





Posted by: rasa Feb 23 2004, 08:08 PM
cdob,

That's informative, but I don't see any reference to cygwin in your reply.

I did create a *very* simple cygwin module, but it needs so much work, I'd rather use someone else's:

CODE
; cygwin.inf
; PE Builder v3 plug-in INF file for Cygwin
; cygwin homepage:  http://cygwin.com/

[Version]
Signature= "$Windows NT$"

[PEBuilder]
Name="Cygwin (Bash Shell)"
Enable=0
Help="cygwin.htm"

[WinntDirectories]
a="Programs\cygwin",2

[SourceDisksFolders]
files=a,,1

[SourceDisksFiles]
cygwin.cmd=a,,1
setpath.cmd=a,,1

[Append]
nu2menu.xml, cygwin_nu2menu.xml

[Default.AddReg]
0x1, "Software\Microsoft\Command Processor", "AutoRun", "%SystemDrive%\Programs\cygwin\setpath.cmd"


CODE
<!-- cygwin_nu2menu.xml - Nu2Menu entry for unixutils -->

<!-- Cygwin does not require a menu entry at all
therefore this XML menu entry is intentionally left blank
feel free to populate this howver you want. May I suggest
though that you instead write scripts to do the job for you
and link to the scripts :) -->

<NU2MENU>
<MENU ID="Programs">      
 <MITEM TYPE="ITEM" DISABLED="@Not(@FileExists(@GetProgramDrive()\Programs\cygwin\cygwin.cmd))" CMD="RUN"
  FUNC="@GetProgramDrive()\Programs\cygwin\cygwin.cmd">Bash Shell (Cygwin)</MITEM>
</MENU>
</NU2MENU>


CODE
@echo off
:: cygwin.cmd
set path=%PATH%;%SystemDrive%\Programs\cygwin
%SystemDrive%\Programs\cygwin\bash.exe --login -i


CODE
@echo off
:: setpath.cmd
set path=%PATH%;%SystemDrive%\Programs\cygwin


NOTE: To be able to boot, I had to uppercase the following files:

i386 (directory)
i386\*.*
i386\system32 (directory)
i386\system32\*.* (except *.exe)
i386\system32\ntkrlmp.exe
i386\system32\drivers\*.*

Why not just uppercase the entire i386 tree?

Well, since Cygwin is case sensitive, a script that calls 'cmd' would then fail,
if cmd.exe was renamed CMD.EXE

Posted by: cdob Feb 24 2004, 09:27 PM
QUOTE (rasa @ Feb 23 2004, 06:08 PM)
That's informative, but I don't see any reference to cygwin in your reply.

Ups, sorry. I read your message to fast and misundersood it.

A basic cygwin-Plugin is there included:
http://smithii.com/ross/pebuilder/pebuilder-makefile.zip

There is much to do. Copy /etc to ramdisk, create /home, mount /etc and /home and so on. Actually I use cygwin, but not with BartPE.

Posted by: compie Mar 12 2004, 04:05 PM
QUOTE (xlerb @ Jan 21 2004, 05:08 AM)
@all: would you give this a try and test, if it works on your config too?
I can deliver the precompiled, unpatched W32 'mkisofs' (if you trust me, else compile it yourself).

Could you upload your unpatched version of mkisofs somewhere?
Or could you email it to me? (compie <at> bigfoot <dot> com).


Posted by: compie Mar 13 2004, 02:00 PM
I found win32 binaries of cdrtools here: http://www.sbox.tugraz.at/home/t/tplank/

and here: http://www.geoshock.com/cdrtools/

Posted by: Bernd Blaauw Mar 13 2004, 09:06 PM
I wish a smaller Cygwin would be available. Kind of big for those functions that MKISOFS uses.

Posted by: xlerb Mar 14 2004, 06:38 AM
Hi all,

sorry, I was offline for a long time because of other work to do.

@Bart

Thanks for reviewing this thread and considering to change pebuilder.
Take your time to finish current work.

@compie

I sent the unpatched 'mkisofs.exe' and tried to send my version of
'cygwin1.dll' (the one I compiled against) too, but maybe the latter fails
on hotmail size limits. If so and you need the dll, then send me another
message (propose a variant of splitting the dll you can handle).

@rasa

Yes, I'm nearly finished with my 'cygwin' plugin. I will publish it soon,
as my 'other work' now gives me some more time. My focus is on basic
cygwin functionality (bash, vi, sort, grep etc.) and the cygwin X server.
But I will have to look at the reference provided by 'cdob'.

@cdob

Yes, there is much to do, you mentioned important parts already. There
are some additional prerequisite tasks to carry out, e.g. fixing some
cygwin symbolic links. I'll look at the link you provided and will try to
combine efforts with the author of that plugin.

Best regards

xlerb

Posted by: compie Mar 14 2004, 11:42 PM
I get this warning from mkisofs:
mkisofs 2.01a24 (i686-pc-cygwin)
mkisofs -o "D:\bartpe\build\pebuilder.iso" -iso-level 4 -allow-lowercase -output-charset cp437 -volid ""BartPE"" -A PEBUILDER/MKISOFS -sysid "Win32" -b BOOTSECT.BIN -no-emul-boot -boot-load-size 4 -hide BOOTSECT.BIN -hide boot.catalog "c:\pebldr"
Warning: creating filesystem that does not conform to ISO-9660.
Warning: Creating ISO-9660:1999 (version 2) filesystem.

Is that bad? Everything else works by the way. The cd boots ok.

Posted by: Bernd Blaauw Mar 15 2004, 06:14 AM
about the warnings: not a problem

Posted by: Bart Lagerweij Mar 15 2004, 10:06 AM
I'm not sure if I change PE Builder for this.
I am prepairing for writing my own ISO build routine, embedded in pebuilder.

Bart.

Posted by: cdob Mar 15 2004, 01:47 PM
QUOTE (Bart Lagerweij @ Mar 15 2004, 08:06 AM)
I am prepairing for writing my own ISO build routine, embedded in pebuilder.

Thats fine, for most circumstances a included build routine gets lower difficulties. But please allow to choose mkisofs instead.
I like burning on the fly, without image: 'mkisofs | cdrecord -'. Next, there exist somewhere a japanse mkisofs version, supporting ISO9660:1999.

Posted by: xlerb Mar 16 2004, 07:05 AM
Dear Bart,

QUOTE
I am prepairing for writing my own ISO build routine, embedded in pebuilder.


Wouldn't that put even more stress on your part?
And, as 'cdob' pointed out already, the mkisofs/cdrtools package has several
additional features (e.g. batch burning, fine control over many features).

And many, if not most, users of your nice tool are sysadmins ... able to get hands
on cygwin and compiling cdrtools for their own needs.

I think your initial approach to use cdrtools/mkisofs is the 'correct' decision:
please continue to support it.

Best regards

xlerb

Posted by: Bernd Blaauw Mar 16 2004, 09:24 PM
I hope Bart's version will be as powerful as MKISOFS then!

Bart, people at this forum found out that you could store the ISO in the c:\pebldr without problems. MKISOFS does not try to scan it (unless the iso file is already present).

are you writing an ISO creation program to decrease PeBuilder size?
or more advanced options?

does the EXEC line in pebuilder.inf support multiple commands?
EXEC1=
EXEC2=

or simply EXEC=
?

Above scenario of storing the ISO in the @OutDir@ would mean first check if ISO exists, if it exists, delete it (so MKISOFS will not scan it), then run MKISOFS

Posted by: helig Mar 18 2004, 10:21 AM
@Bart

In case you still have to modifiy directory or file names in future versions, then you can maybe also take care of character set conversion, e.g. for german umlauts.
The windows API function AnsiToOem (or CharToOem) might be quite useful for that purpose.

Thank you!
Helmut

Posted by: cdob Mar 18 2004, 01:54 PM
QUOTE (helig @ Mar 18 2004, 08:21 AM)
character set conversion, e.g. for german umlauts.

Try "mkisofs -iso-level 4 -output-charset cp850 ..."

Posted by: helig Mar 18 2004, 09:36 PM
@cdob
That works, thank you!

There is just a small drawback left, the german umlaut characters ar not uppercased. But I think there is no setting for changing that, right?

Anyway, thank you for this great hint.
Helmut

Posted by: cdob Mar 19 2004, 01:38 PM
QUOTE (helig @ Mar 18 2004, 07:36 PM)
the german umlaut characters ar not uppercased. But I think there is no setting for changing that, right?

Yep, but read the title: here we only uppercase \I386 and some other files. These names are ASCII chars.

Original mkisofs dosn't uppercase ISO9660:1999 file system, because lowercase characters are leagal. There are only some characters legal with older ISO9660 and therefore mkisofs uppercase 7-bit characters.

Do you use a patched mkisofs?

Posted by: helig Mar 21 2004, 06:35 PM
@cdob

I'm using mkisofs from the BartPE "distribution".

I have double-checked my files with the published information from this thread and found some errors on my side, so now my BartPE boots smoothly while having german umlauts and lower case filenames within my data directory.

Thanks for your help!
Helmut

Posted by: allens Mar 24 2004, 04:16 PM
I have just discovered this thread & would like to try these ideas.

Could someone PM to me the unmodified (unpatched) version of mkisofs, I do not mind admitting that I am not sure how to compile it myself.

Thanks in advance.

Posted by: paraglider Mar 24 2004, 04:20 PM
Scroll up and you will find the post by Compie on March 13th.

Posted by: cdob Mar 24 2004, 04:29 PM
QUOTE (allens @ Mar 24 2004, 02:16 PM)
Could someone PM to me the unmodified (unpatched) version of mkisofs

Scroll up, and read "-allow-lowercase only needed for mkisofs 2.01a17-Bart".

Posted by: Bernd Blaauw Mar 24 2004, 09:41 PM
http://www.sbox.tugraz.at/home/t/tplank/

contains recent MKSIFOS (2.01a27), even works with old Cygwin1.dll
(the newer one is larger).

Posted by: allens Mar 25 2004, 01:28 PM
Thanks for all the MKISOFS location info.

Posted by: Ixel Apr 3 2004, 02:10 AM
I'm using mkisofs and cygwin1.dll packaged with pebuilder 3.0.31. When i run this,

mkisofs -o "D:\pe.iso" -iso-level 4 -allow-lowercase -output-charset cp409 -volid ""BartPE"" -A PEBUILDER/MKISOFS -sysid "Win32" -b BOOTSECT.BIN -no-emul-boot -boot-load-size 4 -hide BOOTSECT.BIN -hide boot.catalog "c:\PEFinal"

I get an error message about an incorrect level ISO 9660; use 1...3.

I'm baffled. Can anyone tell me what this means?

Ixel

Posted by: Ixel Apr 5 2004, 01:24 AM
Doh! Once again, I fail to notice my carelessness. Somehow, I had overwritten the mkisofs and cygwin1 files in my pebuilder dir. Reextracting them and running the above command again worked.

Ixel

Posted by: cdob Apr 5 2004, 12:59 PM
QUOTE (Ixel)
I get an error message about an incorrect level ISO 9660; use 1...3.

That's only a waring: maybe some old OS won't read ISO9660:1999, aka level 4. WinPE and cygwin does read this. Don't worry about that message. Bart disabled this message in his mkisofs.

Posted by: joshudson Apr 10 2004, 07:00 PM
Try this C program to correctly uppercase the i386 subdir.
It has the advantage of depending on nothing. Building with
MinGW results in a 5K binary.

#include <windows.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

int lc = 0;

char wx[MAX_PATH];
char opath[MAX_PATH * 2];

void UpperWalk(char *where)
{
WIN32_FIND_DATA *fd = malloc(sizeof(WIN32_FIND_DATA));
HANDLE hWalk = FindFirstFile(where, fd);
char *path = malloc(MAX_PATH + 5);
char *ptr;
if (hWalk != INVALID_HANDLE_VALUE)
do {
strcpy(wx, fd->cFileName);
if (lc)
strlwr(wx);
else
strupr(wx);
strcpy(path, where);
ptr = strrchr(path, '\\');
if (ptr)
strcpy(ptr + 1, wx);
else
strcpy(path, wx);
if (strcmp(fd->cFileName, wx))
{
strcpy(opath, where);
ptr = strrchr(opath, '\\');
if (ptr)
strcpy(ptr + 1, fd->cFileName);
else
strcpy(opath, fd->cFileName);
/*printf("%s -> %s\n", opath, path);*/
MoveFile(opath, path);
}
if (fd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
if (strcmp(fd->cFileName, ".") && strcmp(fd->cFileName, ".."))
{
strcat(path, "\\*.*");
UpperWalk(path);
}
}
} while (FindNextFile(hWalk, fd));
free(fd);
}

int usage(void)
{
fputs("Usage: upprcase [/l] filespec [filespec ...]\n\n", stderr);
return 1;
}

int main(int argc, char **argv)
{
if (argv[1] && (argv[1][0] == '-' || argv[1][0] == '/'))
switch(*++*++argv)
{
case '-': break;
case 'l': case 'L': lc = 1; break;
default: return usage();
}
if (!argv[1])
return usage();
while (*++argv)
UpperWalk(*argv);
return 0;
}



Posted by: joshudson Apr 11 2004, 08:38 PM
QUOTE (Bernd Blaauw @ Mar 16 2004, 07:24 PM)
Above scenario of storing the ISO in the @OutDir@ would mean first check if ISO exists, if it exists, delete it (so MKISOFS will not scan it), then run MKISOFS

This is not necessary. PE Builder will wipe and recreate the out directory
every time it creates an image.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)