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:
What I've done:
The commandline for 'mkisofs' I used is (must be given on one line, split up here for clarity):
The changes to the commandline as of Bart and specified in 'pebuilder.inf' are:
@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 | ||
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 | ||||||
Dear cdob, I used this perl script
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.
I'll give that a try, thanks. |
Posted by: cdob Jan 22 2004, 10:36 AM | ||||||||
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"
bartpe.lst
ISOBuster shows a good image. I burned and the CD boots. Next Step:
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 | ||
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 | ||||
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:
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 | ||
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 | ||||||
I'm using this. Thanks to xlerb and this-is-me. pebuilder.inf
mkBartPE.cmd
|
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:
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 | ||
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 | ||
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 | ||
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,
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 | ||
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 | ||
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 | ||
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 | ||
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 | ||
This is not necessary. PE Builder will wipe and recreate the out directory every time it creates an image. |