OS/2, eCS & ArcaOS - Technical > Storage

How to Format a Hard Drive

(1/3) > >>

Neil Waldhauer:
I have a computer that is running eComStation, and it became unreliable, with a trap screen after a minute of use.

I replaced the computer, and it's fine, but I was curious what was happening with the unreliable one. I booted from a USB stick and ran chkdsk /f on the drive, and one file was unrepairable. That was enough for me. I don't know why it happened, but I decided to format the drive and restore from backup.

I used FORMAT /L C: /FS:JFS to format the drive. That appears to work, but now I wonder what that does.


--- Quote ---According to Jim Wilkerson, years ago, the /L parameter didn't just remove the header records but
formatted the drive removing all data. My understanding it was sector by sector putting ones and zeros
back on the drive as it was originally when it was new. I don't know what happens if there are bad areas on the
drive but I recall it may map around the bad area.
--- End quote ---

I don't think it works the same in every file system. I think the working code is implemented in the mini-FS driver. The behavior is documented for HPFS, but not for other file systems. What does FORMAT /L do in JFS?

Lars:
I seem to remember that it prevents chkdsk c: /F:3 from finding anything. If you want to have the exact technical detail you will need to look at the OpenJFS implemenation at Netlabs and analyze the source code ...

"format" for JFS is implemented in UJFS.DLL. At least the filesystem specific implementation. FORMAT.COM just queries which DLL to load for a given drive letter (UHPFS.DLL, UJFS.DLL, UFAT32.DLL etc.) and then invokes the "format" entry point.

Joop:
A test on the harddisk is performed with the /L parameter, just run help format or load newview and load the file  OS2\BOOK\CMDREF.INF. Then look for format and choose the /L parameter for more info. As far as I can read it, it has nothing to do with what system you are going to use the drive.

Neil Waldhauer:
I think Lars sort of has the answer, but I'd hoped that someone would actually know. Shouldn't we have this documented somewhere besides reading the source code? The OS/2 command reference hints that /L only applies to MO (magneto-optical) drives.


--- Quote ---FORMAT Command: /L Parameter

Specifies the long format procedure used to format hard disks or format and install the file system on an IBM read/write optical disc. Formatting an optical disc the first time requires about 20 minutes. Reformatting a previously formatted optical disc requires only a few minutes when you do not use the /L parameter.

For hard disks, specifying the /L parameter causes media testing to be performed.

To format and install the file system on a read/write optical disc, enter the following:

FORMAT D: /L


where drive D is designated as the optical disc drive.
--- End quote ---

Dave Yeo:
Wouldn't media testing involve writing known values and then reading them?
Could always use something like DFSee to read random sectors after a long format and see what is written there.

Navigation

[0] Message Index

[#] Next page

Go to full version