1

For fun, I'd like to "revive" a vintage computer, but this requires to hardware reformat a PATA disk.

I found on the net the formatting utility from the vendor but it works only under Windows and I have no Windows computer.

I don't think the utility would be effective in Wine because it needs to access the hardware and, to my knowledge, Wine and Linux won't let any program do that for obvious safety/security reason.

I can connect the drive to an USB attachment -- my PC motherboard has no PATA interface. The drive will be detected as a SCSI drive because SCSI-3 is now a framework above the various hardware layers SATA, PATA, SCSI, …

I can write a small program with enough privileges to send SCSI CDBs (I have previous experience with SCSI-1 and SCSI-2) on /dev/sd? but I wonder if SCSI command FORMAT (4) would be correctly translated to the PATA equivalent command.

Has anybody any idea/experience if this is feasible?

ajlittoz
  • 165
  • 10
  • 2
    Why can't you use one of the standard partitioning tools (parted, *fdisk, etc) tp do what you want? No need for Windows, Wine, or writing your own program. – NickD Sep 11 '19 at 17:29
  • if the reason you need to install the PATA disk in your newer system is that the vintage computer doesn't have a CD-ROM or bootable USB port (so you can't install an OS on it), you could boot it over the network if it has a network interface. You'd need to run tftpd somewhere on the network, and syslinux will provide pxelinux and memdisk and other tools needed to boot an ISO image over the net. – cas Sep 12 '19 at 03:56
  • The disk has many bad blocks which must be put out of the way by low-level formatting (rewritng address marks and sector addresses). I'm not aware that parted or fdisk can do that. They can partition a good disk but not remove bad blocks from addressable space. As long as this is not done, the disk is unausable for any purpose. – ajlittoz Sep 12 '19 at 19:07
  • @ajlittoz see `man badblocks`. also `man mkfs.ext4` and search for the `-l` option for reading a bad blocks list. and mkfs.ext4's `-c` option for automatically doing a badblocks check before formatting the partition. – cas Sep 13 '19 at 02:26
  • In my understanding, `mkfs` only creates a filesystem on an accessible volume/partition. Passing a list of badblocks parks those in a special file so that they can't be used for files. This does not solve the case where the bad blocks are are really badly ocated (e.g. absolute block 0 making it impossible to write an MBR). This is why i need to rewrite the sector marks on the magnetic surface. – ajlittoz Sep 13 '19 at 07:25
  • I haven't used this for many years, but the [Ultimate Boot CD](http://www.ultimatebootcd.com/) had lots of low-level format utils from various manufacturers. It can be booted from CD, USB, and over the network via tftp & syslinux. – cas Sep 13 '19 at 07:50
  • @cas: I haven't used it for some time too, but good suggestion. I'll give it a try but I don't think there is a truly low-level formatter. – ajlittoz Sep 14 '19 at 06:52

0 Answers0