format /B

Discuss MS-DOS, Windows 1, 2 and 3.
Post Reply
xelloss
User avatar
Donator
Posts: 400
Joined: Sun Aug 18, 2013 7:26 pm
Location: Edinburgh, Scotland

format /B

Post by xelloss »

The /B command line switch for the FORMAT command in MS-DOS "reserves space for the system files IO.SYS and MSDOS.SYS (as hidden files) on a newly formatted disk. In previous versions of MS-DOS, it was necessary to reserve this space before using the SYS command to copy the system files to the disk. This switch is maintained in MS-DOS version 6.0 for compatibility reasons only."

This is what the MS-DOS 6.22 Help has to say about FORMAT /B, and I recall it being the same in MS-DOS 5.0.
Frankly, it doesn't make much sense. I believe that even the IBM PC-DOS 1.00 allowed the operating system to be transferred to the disk at the time of formatting using the /S switch, and the manual for the Compaq MS-DOS 1.11 doesn't mention this requirement before running SYS. In fact, it doesn't mention the /B switch for FORMAT at all.

Can anybody solve this small mystery?

jimmsta
Donator
Posts: 823
Joined: Sat Sep 09, 2006 6:43 am
Contact:

Re: format /B

Post by jimmsta »

Time to inspect some disk images! I suspect that the later versions had this function in case of the use of DriveSpace (otherwise known internally as MagicDrive). A special area of the disk would be needed that wasn't part of the compressed area. I would like to do some tests to see if my suspicions are correct or not, though, which will take some time to get going, as I accidentally wiped out my entire BA archive on my local machine, and will have to grab all the necessary bits again.
16 years of BA experience; I refurbish old electronics, and archive diskettes with a KryoFlux. My posting history is 16 years of educated speculation and autism.

buricco
User avatar
Posts: 92
Joined: Tue Jul 21, 2015 7:44 am

Re: format /B

Post by buricco »

IIRC, it adds a fake io.sys/msdos.sys file to the disk.

xelloss
User avatar
Donator
Posts: 400
Joined: Sun Aug 18, 2013 7:26 pm
Location: Edinburgh, Scotland

Re: format /B

Post by xelloss »

Yes it does, but the purpose for doing so is unclear.
It looks like the switch wasn't there in dos 1.x/2.x, so maybe manuals for version 3 could give some more meaningful explanation?

Darkstar
User avatar
Donator
Posts: 1212
Joined: Fri May 14, 2010 1:29 pm
Location: Southern Germany

Re: format /B

Post by Darkstar »

IIRC, in early DOS versions, IO.SYS and MSDOS.SYS had to be located at a specific location (the first few blocks? a particular place in the FAT?), and "format /b" was to make sure that no user data was actually on these blocks or relocate them if there was.

But that's just from memory, someone with a disassembler and some spare time could easily find out what "/b" actually does...
I upload stuff to archive.org from time to time. See here for everything that doesn't fit BA

Battler
User avatar
Donator
Posts: 2117
Joined: Sat Aug 19, 2006 8:13 am
Location: Slovenia, Central Europe.
Contact:

Re: format /B

Post by Battler »

In all standalone versions of MS-DOS, IO.SYS and MSDOS.SYS had to be the first to entries in the FAT, with IO.SYS first. I suspect FORMAT /B made sure the volume label, if given, wouldn't use the first FAT slot.
Main developer of the 86Box emulator.
Join the 86Box Discord server, a nice community for true enthusiasts and 86Box supports!

The anime channel is on the Ring of Lightning Discord server.

Check out our SoftHistory Forum for quality discussion about older software.

xelloss
User avatar
Donator
Posts: 400
Joined: Sun Aug 18, 2013 7:26 pm
Location: Edinburgh, Scotland

Re: format /B

Post by xelloss »

Format /B does, in fact create bogus io.sys and msdos.sys.
I can also believe that in older versions of DOS, SYS would fail if the first clusters of a disk were already occupied by other files.
What I cannot understand is who in the world, upon formatting a disk, would reserve space for the system files, rather than just use the /S switch.

Overdoze
User avatar
Posts: 1762
Joined: Mon Feb 24, 2014 10:28 am
Location: Slovenia

Re: format /B

Post by Overdoze »

xelloss wrote:I can also believe that in older versions of DOS, SYS would fail if the first clusters of a disk were already occupied by other files.
I can confirm that. If you do a plain format (without the /S switch), create some directories or files on the partition and then try using SYS on it, you'll get a message saying there's not enough disk space. This was on several DOS 3.x releases I tried.
All roads lead to Neptune™

KRNL386 - my site about retro computing | My site about Windows 1.0 | My blog | 86Box Manager | LeakDB - list of PC OS warez leaks

buricco
User avatar
Posts: 92
Joined: Tue Jul 21, 2015 7:44 am

Re: format /B

Post by buricco »

I think it was so you could provide a disk for distribution and let someone else make it bootable later?

JustZisGuy
Posts: 271
Joined: Wed Dec 11, 2013 3:24 am

Re: format /B

Post by JustZisGuy »

You will find that a lot of early IBM PC titles were formatted in this manner. They will have "dummy" system files sitting at the beginning of the disk. There were several reasons for this.

First, if one were to commercially distribute a disk with DOS, Microsoft or IBM would expect licensing fees.

Second, not all early clones were truly 100% IBM PC compatible. Even if they could boot IBM PC-DOS, they might still need their OEM version to make full use of the system. Keep in mind there was not even a "vanilla" non-OEM version of MS-DOS until 3.2.

It was standard procedure, spelled out in many early application manuals, for the end user to use the SYS command provided by their OEM to make application disks self-booting.

xelloss
User avatar
Donator
Posts: 400
Joined: Sun Aug 18, 2013 7:26 pm
Location: Edinburgh, Scotland

Re: format /B

Post by xelloss »

The licensing/customization reason makes sense.
It was still a pretty lousy solution, though, given that the size of the system files changed from version to version, so it wasn't really possible to know you had reserved enough space for the operating system to be written to disk.

Post Reply