IOCTL_DISK_SET_DRIVE_LAYOUT

Hi everybody,

I’ve been using IOCTL_DISK_SET_DRIVE_LAYOUT from kernel mode for a while.
Partitioning my drives using this IoCtl works very well.

There is an issue I’m just about to understand (hopefully). As soon as I’ve
changed the drive layout, the bios (and further some apps using bios
functions) recognize the 20 GB drive in error as an 8 GB harddisk.

The BIOS setting in this case is “USER DEFINED”. I suggest it’s a bad CHS
information the BIOS gets from the MBR. It isn’t possible to write CHS to
the MBR manually using IOCTL_DISK_SET_DRIVE_LAYOUT, is it?

My question is: Has someone ever encountered this behavior, could explain or
tell how to work around it?

Regards, Tobias