[openbeos] mkdos and DriveSetup

  • From: "Marcus Overhagen" <dos4gw@xxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Sun, 27 Jan 2002 05:03:13 +0100

Hi,

I noticed that DriveSetup fails to initialize partitions with the dosfs 
(dos/windows file system, FAT32) when the partition is larger than
32GB (It's 38 GB here, and I want to use BeOS to initialize it :-)

Further investigation showed that DriveSetup uses add-ons
contained in /boot/beos/system/add-ons/drive_setup/fs
to do the job, but the "dos" add-on executes the mkdos
program, which failes.

| $ /boot/home/config/be/Preferences/deviceSetup
| will not prompt for confirmation
| using a 32-bit fat
| geometry: cylinders = 1, sectors = 80019765, heads = 1
| BIOS geometry: cylinders = 1024, sectors = 63, heads = 255
| mkdos error: Calculated sectors/cluster too large (128).
| Try using a larger sized FAT

Since FAT32 supports drive sizes up to 2 Terabyte,
I decided to write a replacement of mkdos. The core 
functionality should be finished by tomorrow. Calculation of
sectors/cluster is already working fine :)

usage: mkdos [-n] [-t] [-f 12|16|32] device [volume_label]
        -n, --noprompt  do not prompt before writing
       -t, --test      enable test mode (will not write to disk)
       -f, --fat       use FAT entries of the specified size 

The remaining problem is evaluation of arguments,
which I never did before. I hope somebody can help me,

By the way, this is the way it is used by DriveSetup,
but I would like to have it working from the shell also.

argv[1] = -n
argv[2] = -f
argv[3] = 32
argv[4] = /dev/disk/ide/ata/1/master/0/0_0
argv[5] = daten_1 

A few remaining questions, to be answered by the Preference team:
Anyone already doing this?  Should I stop? Are you working on a 
DriveSetup replacement?

regards
Marcus (media kit team :)

PS:
I need some volunteers to test it, once it's finished. 
 

Other related posts: