-
Finally got around to analyzing what that HP formatter utility does!
I ran it on Windows XP.
Tried it with FAT and FAT32 filesystems. Tried it with bootable DOS system files, and without. So, total of 4 trials. The DOS system files came from the generic DOS boot disk you get when you use Windows XP to format a floppy. The HP formatter also offers the choice of NTFS, but I have no interest in keeping my data locked up inside Microsoft's proprietary silo 
Here's what we get in the MBR.
Boot sector code:
http://mirror.href.com/thestarman/asm/mbr/Win2kmbr.htm
The HP formatter tool's boot sector compared identical to the standard Microsoft 2000/XP boot sector, but with one exception. There was a 3-byte patch at offset 0xCA: Microsoft's bytes of B8 01 02 were changed to some new bytes of EB 1A 90.
What this does is overwrite the start of the old-fashioned CHS INT 13 commands, with a jump to the newer LBA commands (INT 13 BIOS Extensions), which are located at offset 0xE6. This effectively FORCES the use of LBA, no matter what the size of the disk is. (Without this patch, a very small disk that fit into the CHS limits would still have been eligible to use the old CHS commands.)
Since every BIOS that is even remotely capable of seeing bootable USB thumbdrives, would have to already have supported INT 13 BIOS Extensions for years, this isn't a problem. It's probably a good thing, as it means the bogus CHS values, in the table below, will be completely ignored.
Other things between the boot sector code and the partition table:
Windows 2000/XP disk serial number at 0x1B8: The HP formatter writes a random value here, as it should, but strangely, the 4th byte (at 0x1BB) is always 00! So, there's only 3 bytes of randomness here, not 4. Not sure at all why this was done. A bug?
Error message pointers at 0x1B5: My Microsoft boot sector has the standard values of 2C 44 63 for US English. The HP formatter sets these to 00 00 00, though, so if the MBR were ever to print an error message, it would show up blank or garbage! Another bug?
Partition table:
It uses partition 1, which will be marked active if the bootable DOS system files were installed. CHS size is */255/63.
So, it's definitely not USB-ZIP compatible. (USB-ZIP compatibility would have required the use of partition 4 and CHS size of */64/32.)
Partition types are always 0x0E for FAT16 LBA, or 0x0C for FAT32 LBA. As with the patch above, HP forces LBA to always be used, no matter what the size of the partition is. (I don't have any very small USB keys, so can't fully prove this.)
CHS start is standard 0/1/1. This means the "hidden track" is still intact, and so the remaining 62 sectors of cylinder 0 head 0 are empty wasted space. So, feel free to install your favorite boot managers, or viruses, here. 
CHS end is messed up, though. It does not match the LBA end! Instead, the CHS end is truncated to the highest possible full cylinder boundary. On my USB key, I have a total of 2001888 sectors. This should give me a CHS end of 124/155/63, but it doesn't. The HP formatter instead writes a CHS end of 123/254/63. It ends at the boundary of the last full cylinder (123) instead of continuing to include the final partial cylinder (124).
LBA start is 63 (0x3F), which is correct.
LBA size is the entire size of the USB key, minus those 63 sectors. Mine works out to 2001825 sectors, which is correct.
So, there you have it. That's pretty much a complete breakdown of what the HP formatter utility does, at least in the boot sector.
I didn't analyze past the boot sector, because once the MBR is running and LBA has been forced on, the BIOS hopefully won't be able to cause the rest of the boot process to fail. Assuming the BIOS returns valid data when reading the disk with the INT 13 BIOS Extensions, things should just work from there, as it's all generic filesystem and kernel loader stuff from there. It shouldn't be BIOS-dependent, from that point forward.
Still, I'd be curious to know if any other failures happen, when trying to boot from a USB thumbdrive that has been correctly recognized by the BIOS. What BIOS versions are in the computers that worked to boot drives formatted with the HP formatter but didn't work to boot drives formatted with other tools?
That, to me, is by far the hardest problem: getting the BIOS to see the drive, in the first place! If the BIOS can see the USB thumbdrive well enough to set it up as the bootable "hard drive" (the 0x80 device), and run the MBR properly, things just work from there, I have found. This is assuming the BIOS can provide valid INT 13 support when loading data, until the operating system gets fully up and running.
Testing with my SYSLINUX MBR and Knoppix distro on USB, that I made earlier, versus the bootable DOS disks created by this HP formatter utility, unfortunately didn't help me boot up from any more computers. I still had the same successes and the same failures. As before, the hard part is getting the BIOS to just see the USB thumbdrive in the first place. Cleverly patching the MBR won't help, if the BIOS isn't willing to load the MBR at all....
Josh
Similar Threads
-
By jengiscan in forum MS Windows & New to Linux
Replies: 3
Last Post: 08-25-2008, 11:15 AM
-
By Joseph Schiller in forum Customising & Remastering
Replies: 2
Last Post: 11-17-2004, 11:44 PM
-
By hw.stadl0r in forum Customising & Remastering
Replies: 2
Last Post: 05-14-2004, 04:01 PM
-
By matt_w_lambert in forum Customising & Remastering
Replies: 6
Last Post: 01-05-2004, 10:20 PM
-
By ironstorm in forum Hdd Install / Debian / Apt
Replies: 5
Last Post: 11-23-2002, 08:26 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

(2) Vintage DEC DLV11-KB RS-232 to 20mA Current Loop Converters PDP-11 As-Is
$170.00

Vintage DEC Digital M8048 5013995C PDP-11 LSI 11 ROM (B3)
$149.99

Vintage Digital VR241-A color CRT monitor, powers on, DEC Rainbow or terminal
$150.00

Vintage DEC Digital Starion 200 Desktop PC Powers On Boots To BIOS NO HDD - DW
$269.99

DEC 3010A Vintage Ceramic chip - ALL LEGS INTACT (BO)
$100.00

Vintage DEC LSI-11 PDP-11 Paper Tape Software Lot (96 Tapes) Cables Hardware
$649.00

Vintage DEC Digital T1043 DWMBB/B VAXBI XMI Adapter 5018232-01 C1 VAX Board
$79.99

6 Vintage DEC Digital System Building Blocks - Flip Chips
$95.00

Vintage DEC/Mostek memory systems MK 8015 AA-00 6805-08015 1100 REV C(B7)
$279.99

Vintage DEC LR150-11 Power Supply 70-0464-01 Rev S Sun Shoebox Server PSU Used
$160.00