Switch to full style
Data recovery and disk repair questions and discussions related to old-fashioned SATA, SAS, SCSI, IDE, MFM hard drives - any type of storage device that has moving parts
Post a reply

Flip removable media bit on HDD

September 11th, 2023, 14:11

Hello everyone!

I have a USB-SATA controller (TUSB9261) to which I want to connect a standard 3.5-inch hard drive.
It is recognized as a fixed disk.
Now my question:
Is it possible to initialize a regular hard drive as a removable storage device?


I've heard that this is regulated through the removable media bit (bit 7). Is there a way to change this bit? Where is this bit located? Is it stored in the firmware of the hard drive, or is it controlled by the controller?

I found the following line in the source code of my USB-SATA controller:

Code:
// Check if removeable media device. (bit 7)
ata_dev[port_num].bRemovableMediaDevice = (id_info[0] & 0x0080) ? TRUE : FALSE;


Maybe something can be done with it.

thanks a lot
greetings
Pax1337

PS: As you may have already noticed, English is not my native language - so I'm sorry :)

Re: Flip removable media bit on HDD

September 11th, 2023, 21:08

It's located in word #0 of the ATA Identify Device data block within the drive's firmware.

Re: Flip removable media bit on HDD

September 13th, 2023, 12:31

Thanks for your answer.
here I uploaded a dump of a example hard drives firmware.
Where can I find the bit now?
Is it enough to just change the bit so that everything works as desired?
Or are there already 3.5-inch hard drives available for purchase that are recognized as removable storage device?

Re: Flip removable media bit on HDD

September 13th, 2023, 13:52

I don't know where the bit is located. I have attached the CPs from the ROM (TOSHIBA MK1059GSM). I expect that one of them will contain this bit, or perhaps it is hard coded into the main code in the ROM. It could also live in the System Area on the platters (?)

For example, 55_MN.bin contains the model number and serial number (?).
Attachments
CPs.7z
(25.16 KiB) Downloaded 116 times
Post a reply