Jump to content











Photo
- - - - -

How to make a FreeDOS Bootable CD without the long file names limitation.


  • Please log in to reply
22 replies to this topic

#1 Marietto

Marietto

    Frequent Member

  • Advanced user
  • 267 posts
  • Location:Italy
  • Interests:Computers,movies,read/write,talking about philosophy and religion.
  •  
    Italy

Posted 27 September 2010 - 03:23 PM

Hello,

I'm trying to create a bootable CD with FreeDOS and without the long file names limitation. Inside the ISO image I've included the FreeDOS files and a lot of files contain files longer than 31 chars as for example these :

activedirectory-webservices-replacement.man
application-experience-program-compatibility-assistant-replacement.man

and so on.


I make the ISO image using mkisofs with the following parameters :


-o fdoem.iso -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info -table -N -r -iso-level 4 -J -l -D -joliet-long -relaxed-filenames CDROOT


this is what happens when I make the ISO image.

Using "mkisofs.rc"
Warning: creating filesystem that does not conform to ISO-9660.
Warning: Creating ISO-9660:1999 (version 2) filesystem.
Warning: ISO-9660 filenames longer than 31 may cause buffer overflows in the OS.

Size of boot image is 4 sectors -> No emulation
2.83% done, estimate finish Mon Sep 27 14:11:58 2010
5.66% done, estimate finish Mon Sep 27 14:11:58 2010
99.00% done, estimate finish Mon Sep 27 14:12:01 2010
Total translation table size: 2048
Total rockridge attributes bytes: 113522
Total directory bytes: 319488
Path table size(bytes): 3142
Max brk space used 14a68b0
176773 extents written (345 MB)

Created cdrom imagefile fdoem.iso out of directory CDROOT

as you can see,there are no problems.


After having created the ISO image,I've burnt it with the following parameters :


Mod Data : Mode 1

File System : ISO 9660 + Joliet

Name File Lenght (ISO) : Max 31 chars (lev.2 )

Charset : ISO 9660 (standard CD/ROM ISO)


After having burnt the CD,I see that the long file names are read correctly by Windows,but not by FreeDOS. Here they are truncated with the 8+3 format. As I read,FreeDOS does not support long file names,so I'm using the DOSLFN driver.

The DOSLFN.TXT file,says :

c (CDROM support): Enables CDROM support, i.e. DOSLFN uses much more memory
to keep code for CDROM initialization and CDROM access. This switch defaults
to the state whether SHSUCDX v3.01 is loaded or not (this version of DOSLFN
does not work with MSCDEX or earlier versions of SHSUCDX). You must include
a c+ switch if you load DOSLFN before SHSUCDX, and you want long file names
on CDROM!

Since I load DOSLFN after SHSUCDX,I don't need to use the -c+ switch. But I see that the 8+3 chars limitation is not removed when FreeDOS has been loaded,so,I have removed the old version of SHSUCDX that I used before (2.1) and I have changed it with the new version (3.01) suggested and I started the DOSLFN driver from the command line with the -c+ switch,but this has not helped me at all,because every file and folder are still truncated at 8+3 chars. Do you have any suggest ? Thanks in advance.

#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13752 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 29 September 2010 - 01:29 PM

After having created the ISO image,I've burnt it with the following parameters :


Mod Data : Mode 1

File System : ISO 9660 + Joliet

Name File Lenght (ISO) : Max 31 chars (lev.2 )

Charset : ISO 9660 (standard CD/ROM ISO)

NO.:thumbup:

You already have a .iso image.
You just burn it (you don't give ANY additional parameter to the burning program).
Try using IMGBURN instead of Nero:
http://www.imgburn.com/
http://forum.imgburn...hp?showtopic=61

:dubbio:
Wonko

#3 Marietto

Marietto

    Frequent Member

  • Advanced user
  • 267 posts
  • Location:Italy
  • Interests:Computers,movies,read/write,talking about philosophy and religion.
  •  
    Italy

Posted 29 September 2010 - 06:14 PM

Jacopo,it didn't work.

#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13752 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 29 September 2010 - 06:37 PM

I never said it would. :dubbio:

What I pointed out is that the way you reported were creating the bootable CD DOES NOT make sense.
A .iso is a byte-by-byte or dd-like copy of a CD and viceversa, you simply have NO options when burning a .iso image to CD or DVD.

That was all I had to say on the issue.

As always "isn't working" tells me nothing, without knowing what you did (and if you had to input ANY parameter to the burning program, you are doing something else from burning a .iso to a CD/DVD :thumbup:).


You don't post the ACTUAL exact commands you use to load BOTH DOSLFN and SHSUCDX, nor give any meaningful detail of WHAT you are trying to accomplish, so cannot help you about the long file name problem.

Just as an example you could have conflicts with some other driver or you could workaround the issue using a hard disk emulation instead of a no-emulation .iso/CD, but cannot say. :ph34r:

;)
Wonko

#5 Marietto

Marietto

    Frequent Member

  • Advanced user
  • 267 posts
  • Location:Italy
  • Interests:Computers,movies,read/write,talking about philosophy and religion.
  •  
    Italy

Posted 29 September 2010 - 07:44 PM

I'm trying to start the unattended installation of Windows 7.
As you already knew,it can start automatically if you put the file autounattend.xml on the root of the drive where the windows 7 installation's files are. Since :

a) I'm running FreeDOS from the CD/ROM
b) My disk is partitioned like this :

hd(0,0) : 100 MB hidden + system partition

in this drive there are the Boot folder of Windows 7 and the bootmgr file

hd(0,1) : this is the drive where is installed Windows 7

This is what I did :

1) I copied the Windows 7 installation files on (hd0,1)
2) I renamed the Boot folder and the bootmgr file located on (hd0,0)
3) I run grub4dos from the CD/ROM using this menu.lst conf file :

menu.lst

title Start the Windows 7 unattended installation
root (hd0,1)
chainloader bootmgr

I tried to copy the file autounattend.xml on (hd0,0) and on (hd0,1) but if I put it on these places it is not detected. It is detected if I copy it on the root of the CD/ROM,but as I said,cause the problem of the long file names,it is truncated and cannot be detected. I read that FreeDOS doesn't supports long file names,so I found that it can works with the DOSLFN driver. I run it without parameters. I've attached 4 screenshots to explain very well what's the situation of the FREEDOS CD/ROM.

Attached Thumbnails

  • 1.jpg
  • 2.jpg
  • 3.jpg
  • 4.jpg


#6 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13752 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 30 September 2010 - 08:43 AM

Well, now I really don't get it. :thumbup:
If you have the 100Mb partition it means that windows 7 is ALREADY installed.

The autounattend.xml is read by the windows setup and NOT by Freedos (or whatever else you run BEFORE starting the setup).

You still are not saying WHAT you are using Freedos for, nor HOW DOSLFN and SHUCDX are loaded (config.sys, autoexec.bat, etc.)

:thumbup:
Wonko

#7 Marietto

Marietto

    Frequent Member

  • Advanced user
  • 267 posts
  • Location:Italy
  • Interests:Computers,movies,read/write,talking about philosophy and religion.
  •  
    Italy

Posted 30 September 2010 - 11:34 AM

I use FreeDOS because it allows to me to run grub4dos from the CD/ROM. On the root of the CD/ROM I put grub.exe and menu.lst. The last file is configured to start the installation of XP / Vista and 7 from the CD/ROM.

This is config.sys

!DEVICE=\DRIVERS\himem.exe
!DEVICE=\DRIVERS\Eltorito.sys /D:CDROM001
!SHELL=\COMMAND.COM /E:256 /P
!FILES=100
!BUFFERS=40
!BREAK=OFF
!LASTDRIVE=Z

and this is autoexec.bat

@ECHO OFF
\DRIVERS\shcdx.com /D:CDROM001
SET CDDRIVE=
FOR %%x IN ( C D E F G H I J K L M N O P Q R S T U V W X Y Z ) DO IF EXIST %%x:\AUTORUN.BAT SET CDDRIVE=%%x:
IF "%CDDRIVE%"=="" GOTO errormsg
%CDDRIVE%
CD \
REM Note that we do NOT 'call' AUTORUN.BAT, so we should not return
AUTORUN.BAT
:errormsg
ECHO ERROR: Failure loading; unable to find CD-ROM drive!
ECHO ERROR: If you have multiple CD-ROM drives, please remove the other
ECHO ERROR: CD-ROM discs and try again. Otherwise your disc may be corrupt
ECHO ERROR: or the CD-ROM driver does not correctly support your system.
ECHO ERROR:
ECHO ERROR: Please reboot your computer now.
:loopforever
pause > NUL
GOTO loopforever

These files are not related to FreeDOS,but they are inside an image file called BTDSK.IMG. It is loaded by isolinux.cfg,that's located inside \FDOEMCD\CDROOT\isolinux

prompt 1
default BootCD
display BOOTMSG.TXT

label BootCD
kernel memdisk
append initrd=BTDSK.IMG

F1 F1_HELP.TXT
F2 F2_LICEN.TXT
F3 BOOTMSG.TXT
F4 F_ABOUT.TXT
F5 F_ABOUT.TXT
F6 F_ABOUT.TXT
F7 F_ABOUT.TXT
F8 F_ABOUT.TXT
F9 F_ABOUT.TXT
F0 F_ABOUT.TXT

and this is the file autostart.bat,that's inside FDOEMCD\CDROOT

@echo off

echo --------------------------------------------------------------------
echo PER INIZIARE IL PROCESSO DI RIPARAZIONE DELLA VOSTRA INSTALLAZIONE
echo DI WINDOWS,DOVETE ESSERE IN POSSESSO DI UNA LICENZA VALIDA O DI
echo XP O DI VISTA O DI WINDOWS 7,A SECONDA DEL SISTEMA OPERATIVO CHE
echo VOLETE RIPARARE E DEL CD DI INSTALLAZIONE DI UNO DI QUESTI SISTEMI.
echo SE NON AVETE QUESTI DUE ELEMENTI NON POTETE USARE QUESTO PRODOTTO.
echo IO DECLINO OGNI RESPONSABILITA' NEL CASO VOI VOGLIATE PROSEGUIRE
echo UGUALMENTE. PREMETE UN TASTO PER CONTINUARE SOLO SE DICHIARATE DI
echo AVERE QUANTO RICHIESTO.
echo --------------------------------------------------------------------
pause
grub

#8 dog

dog

    Frequent Member

  • Expert
  • 236 posts

Posted 30 September 2010 - 11:56 AM

I use FreeDOS because it allows to me to run grub4dos from the CD/ROM.

If that's the only reason, you could use grub4dos as your cd bootsector and skip freedos altogether?

#9 ksanderash

ksanderash

    Frequent Member

  • Advanced user
  • 162 posts
  • Interests:electronics, PCs, cinema, reading books, psychology, philosophy
  •  
    Moldova

Posted 30 September 2010 - 12:03 PM

Marietto2009
Can you share with us, please, what is your final task? You got so heavy construction! :thumbup:

You want to make just the unattended installation of Windows 7, or something more?

Maybe this link will be of help for you. It's about building a Grub4Dos CD.

#10 Marietto

Marietto

    Frequent Member

  • Advanced user
  • 267 posts
  • Location:Italy
  • Interests:Computers,movies,read/write,talking about philosophy and religion.
  •  
    Italy

Posted 30 September 2010 - 12:21 PM

My final task is to start the unattended RE-installation of XP or Vista or 7,32 or 64 bit using only FreeDOS and Linux,but not any version of Windows. Inside the CD/ROM there is the ISO image of Knoppix and the tools I need to export settings and configurations from any broken installation of Windows and to reimport them to a new one.

#11 ksanderash

ksanderash

    Frequent Member

  • Advanced user
  • 162 posts
  • Interests:electronics, PCs, cinema, reading books, psychology, philosophy
  •  
    Moldova

Posted 30 September 2010 - 01:07 PM

Well, I see for the first time the DOS based method to do this :thumbup: But it's OK.

I build ISOs with command:
cdimage.exe -h -j1 -b"bcdw_b" -x -o -m -yd "d:\mybootcd" "d:\mybootcd.iso"

Oscdimg from any WAIK can be used instead of Cdimage. Then maybe will be usefull to look the structure of other floppy images, that are already tuned for LFN? E.g. I have such FreeDOS floppy, Russian locale, but simply don't touch anything and it will boot to English Volcov Commander. Will it support your long names?

#12 Marietto

Marietto

    Frequent Member

  • Advanced user
  • 267 posts
  • Location:Italy
  • Interests:Computers,movies,read/write,talking about philosophy and religion.
  •  
    Italy

Posted 30 September 2010 - 01:18 PM

I don't think that the BTDSK.IMG is involved into the long file names problem,because DOSLFN does not need to configure any driver into the config.sys file to run,it is enough to launch the executable with (maybe) some additional parameter. Anyway this is interesting :

SOME NOTES ON IMPLEMENTATION:

A big trouble to me is safe support for long names on CD. Because I want to build on top of MSCDEX, I have to make bridges between Joliet and ISO,and I found, there are no safe bridges! (WinOnCD burns such a Link Table,it's nice to me, but that isn't a standard.) Windows 9x and NT "invent" new short file names and don't use the ISO part of Joliet CDs at all, furthermore, these two systems have different rules. So, if you put a CD with long file names into a drive and look on it with an old DOS program, you'll find up to three different short names for a long name under bare DOS, Windows9x and WindowsNT. As ODI's LFN tools doesn't require MSCDEX (except for reading sectors),it has no problem with it, a driver should deliver right short names for the long ones, because MSCDEX should handle the short ones. Previous versions of DOSLFN loaded a file which provided the link between the Joliet name and its ISO counterpart. This version no longer supports MSCDEX, instead using SHSUCDX v3, which uses the Joliet system itself (and yet another method for generating short names). Another trouble are Write accesses and the consistency of sector buffers: I want to cache data, but a ShortName API may change disk content; so I have to discard all caches, at least for this drive, at every DOS directory write access, even the old FCB ones. This degrades DOSLFN's performance. To support as many DOS versions as possible (not only MS), I don't want to use undocumented internal DOS structures.

#13 ksanderash

ksanderash

    Frequent Member

  • Advanced user
  • 162 posts
  • Interests:electronics, PCs, cinema, reading books, psychology, philosophy
  •  
    Moldova

Posted 30 September 2010 - 01:35 PM

Oh, hell, it's so complicated... Maybe the game doesn't worth the candle?
DOS is a bit outdated material to rely upon in such projects, IMHO.

#14 Marietto

Marietto

    Frequent Member

  • Advanced user
  • 267 posts
  • Location:Italy
  • Interests:Computers,movies,read/write,talking about philosophy and religion.
  •  
    Italy

Posted 30 September 2010 - 01:38 PM

yes,actually I'm following another easier way to fix the problem. Since I can't put the file autounattend.xml on the root of the CD/ROM,I copy it directly to hard disk using Linux and instead to using grub4dos to chainload bootmgr,I reboot the computer and I use the regular INT 13 interrupt.

#15 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13752 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 30 September 2010 - 06:43 PM

I have only one word for this:
  • this is a mess (sorry but I have no better definition for this)

You are using a Syslinux based no-emulation CD to load FreeDOS to load grub.exe.

You are Adding at least THREE:
  • no-emulation CD (hence the need for eltorito.sys)
  • Isolinux
  • Freedos
layers of added complexity (and possible cause of troubles), and all this to load a knoppix?

Everyone is perfectly free to make straight things overly complex, but maybe you are overdoing it.

voyajer idea to throw in it BCDW also, is not that bad either (still if the idea is to make things even more complex and prone to problems).

:thumbup:
Wonko

#16 Marietto

Marietto

    Frequent Member

  • Advanced user
  • 267 posts
  • Location:Italy
  • Interests:Computers,movies,read/write,talking about philosophy and religion.
  •  
    Italy

Posted 30 September 2010 - 10:48 PM

I'm trying to remove the first two layers,but I have a problem that I don't know how fix. I've downloaded balder10.img from the FreeDOS web site. It is a floppy image that contains only the FreeDOS system files. But for my project I need to put inside the CD/ROM the Knoppix iso image and other files. Where can I put these files if the floppy image is only 1.4 MB large ?

#17 ksanderash

ksanderash

    Frequent Member

  • Advanced user
  • 162 posts
  • Interests:electronics, PCs, cinema, reading books, psychology, philosophy
  •  
    Moldova

Posted 30 September 2010 - 11:07 PM

WinImage is up to make instantly a FAT12/16/32 HD-image of any size.

ImDisk (leave the mount disk name blank, enter desired size, and it will be created)

Or you can look for some great tools in this forum (see below subforums)

#18 Marietto

Marietto

    Frequent Member

  • Advanced user
  • 267 posts
  • Location:Italy
  • Interests:Computers,movies,read/write,talking about philosophy and religion.
  •  
    Italy

Posted 01 October 2010 - 09:34 AM

Yes,I created an ISO image removing the isolinux layer,with this content :

a) FREEDOS system files
b) ISO image of Knoppix
c) USMT long files names

I tried to inject these boot files inside the ISO image :

a) BOOTSECT.FD
b) bootmgr
c) FreeDOS kernel.sys,

but the resulting image is never bootable. Why ?

#19 ksanderash

ksanderash

    Frequent Member

  • Advanced user
  • 162 posts
  • Interests:electronics, PCs, cinema, reading books, psychology, philosophy
  •  
    Moldova

Posted 01 October 2010 - 12:37 PM

I strongly suggest you to get acquainted with BCDW project :dubbio:

There is also the unpublished 2.0a version, have a look on it too (links below). Unfortunately the BCDW project was abandoned by the author a few years ago, so use it as is, no support will be given.

http://hotfile.com/d...democd.zip.html
http://www.megaupload.com/?d=WLZH5PUQ
http://www.sendspace.com/file/i5ldk6
http://www.filefront...0a1_democd.zip/

Attached Files



#20 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13752 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 01 October 2010 - 03:00 PM

I tried to inject these boot files inside the ISO image :

a ) BOOTSECT.FD
b ) bootmgr
c ) FreeDOS kernel.sys,

but the resulting image is never bootable. Why ?

Because you tried random :thumbup: (and mostly senseless :thumbup:) things.
You can try "injecting":
  • a .pdf file
  • an excel spreadsheet
  • the GNU license
  • the .txt edition of the BIBLE
and you will still have a non bootable CD.

You need to study (and learn) HOW a boot CD works, the three main types of emulation, what each requires, and generally speaking you NEVER "inject" anything in a bootable CD (if you want it to actually boot).
There are three main kinds of bootable CD:
  • floppy emulation (uses a 1.44 or 2.88 Mb floppy image to boot)
  • hard disk emulation (uses a whole hard disk image to boot)
  • no-emulation (uses a no-emulation bootsector or a loader capable of emulating a CD bootsector)

For the record CD bootsector is something that is normally 2048 bytes and is at sector 17.

What you "injected"(I do wonder "HOW" and "WHERE") was:
a ) BOOTSECT.FD <-a floppy bootsector?(512 bytes in size and normally on first sector)
b ) bootmgr <-a Windows Vista :dubbio:/2008/7 bootloader
c ) FreeDOS kernel.sys<- a System file

And you ask WHY it didn't boot? :thumbup:

You used the wrong "material" with the wrong "tools" using a wrong "method" and you are actually surprised? :thumbup:

;)
Wonko

#21 Marietto

Marietto

    Frequent Member

  • Advanced user
  • 267 posts
  • Location:Italy
  • Interests:Computers,movies,read/write,talking about philosophy and religion.
  •  
    Italy

Posted 01 October 2010 - 03:32 PM

You are right,I lost a little bit up the thread.

#22 Marietto

Marietto

    Frequent Member

  • Advanced user
  • 267 posts
  • Location:Italy
  • Interests:Computers,movies,read/write,talking about philosophy and religion.
  •  
    Italy

Posted 03 October 2010 - 12:07 AM

Excus-me,I was a "little" confused. Today I read the GRUB4DOS tutorial and I found that I'm making things more complicated than they are. This is what I'm interested with :

Create a bootable CDROM

In GRUB for DOS, you can use grldr to create bootable CDROM:

mkisofs -R -b grldr -no-emul-boot -boot-load-size 4 -o grldr.iso iso_root

grldr and menu.lst should be placed at the root directory of CDROM image.

Well,this is what I did,as you can see from the screenshot. Problem is because the menu.lst is not detected.

Attached Thumbnails

  • Immagine.jpg


#23 ksanderash

ksanderash

    Frequent Member

  • Advanced user
  • 162 posts
  • Interests:electronics, PCs, cinema, reading books, psychology, philosophy
  •  
    Moldova

Posted 03 October 2010 - 01:11 PM

Maybe this link will be of help for you. It's about building a Grub4Dos CD.

Dear, Marietto2009, have you followed the link? <_< There is all needed info for you.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users