Re: : : Formatting MS-DOS drive

2007-07-09 Thread Matthew Szudzik
> Notice that the 8060926 sectors the disk has in LBA mode is more than > 3935 * 64 * 32 = 8058880, so there are 2046 more sectors in LBA > mode than in CHS mode. > > Assuming 63 sectors per track instead and ignoring cylinder and head > count gives a spill of 13 sectors. I would have guessed Wind

Re: : Formatting MS-DOS drive

2007-07-09 Thread Matthew Szudzik
> # fsck_msdos -n /dev/sd0i > ** /dev/sd0i > ** Phase 1 - Read and Compare FATs > ** Phase 2 - Check Cluster Chains > ** Phase 3 - Check Directories > ** Phase 4 - Check for Lost Files > Free space in FSInfo block (-1) not correct (125686) > fix? no > Next free cluster in FSInfo block (2)

Re: : : Formatting MS-DOS drive

2007-07-09 Thread Raimo Niskanen
On Sat, Jul 07, 2007 at 04:31:21AM -0400, Matthew Szudzik wrote: > > Disk: sd0 geometry: 3935/64/32 [8060926 Sectors] > > Offset: 0 Signature: 0xAA55 > > Starting Ending LBA Info: > > #: idC H S -C H S [ start: size ] > >

Re: : Formatting MS-DOS drive

2007-07-07 Thread Matthew Szudzik
OK, to format a usb flash drive with an MS-DOS (FAT32) file system, I am using the following procedure. First, I run fdisk # fdisk -i -e sd0 and edit the MBR partition table as described in the previous message. Then I run newfs_msdos # newfs_msdos -F 32 -u 63 /dev/rsd0i (Is the "-u 63" o

Re: : Formatting MS-DOS drive

2007-07-07 Thread Matthew Szudzik
> Disk: sd0 geometry: 3935/64/32 [8060926 Sectors] > Offset: 0 Signature: 0xAA55 > Starting Ending LBA Info: > #: idC H S -C H S [ start: size ] > > 0: 0B0 1 32 -

Re: : Formatting MS-DOS drive

2007-07-06 Thread Matthew Szudzik
> It seems the partition always start on LBA 63. For many modern harddrives > that is the max number of heads. And for a drive with 63 heads it will > be Cylinder 0 Head 1 Sector 1 (since sectors start at 1, not 0). > On your flash drive with 32 fake heads LBA 63 becomes C/H/S 0/1/32. Excellent!

Re: : Formatting MS-DOS drive

2007-07-06 Thread Raimo Niskanen
On Fri, Jul 06, 2007 at 03:26:26PM -0400, Matthew Szudzik wrote: > > reformatted, then they will have MBR partition tables similar to the > > following. > > > > Disk: sd0 geometry: 492/64/32 [1007616 Sectors] > > Offset: 0 Signature: 0xAA55 > > Starting Ending LBA Info:

Re: Formatting MS-DOS drive

2007-07-06 Thread Matthew Szudzik
> reformatted, then they will have MBR partition tables similar to the > following. > > Disk: sd0 geometry: 492/64/32 [1007616 Sectors] > Offset: 0 Signature: 0xAA55 > Starting Ending LBA Info: > #: idC H S -C H S [ start: size ] > ---

Re: Formatting MS-DOS drive

2007-07-05 Thread Matthew Szudzik
> > I have a usb flash drive that I wish to reformat as an MS-DOS (FAT) file > > system. How do I do that on OpenBSD? > > For interactive MBR edits you can use "fdisk -e sd0" > You probably want to use "0C" for FAT32 with long file name support. I recently bought several flash drives and tested

Re: Formatting MS-DOS drive

2007-07-01 Thread Adriaan
On 7/1/07, Matthew Szudzik <[EMAIL PROTECTED]> wrote: I have a usb flash drive that I wish to reformat as an MS-DOS (FAT) file system. How do I do that on OpenBSD? I want the drive to be formatted in the same manner that a Windows machine or Macintosh might format an MS-DOS file system. So cle

Re: Formatting MS-DOS drive

2007-07-01 Thread Peter N. M. Hansteen
Matthew Szudzik <[EMAIL PROTECTED]> writes: > I have a usb flash drive that I wish to reformat as an MS-DOS (FAT) file > system. How do I do that on OpenBSD? You probably want to look into newfs_msdos. -- Peter N. M. Hansteen, member of the first RFC 1149 implementation team http://www.blug.l

Formatting MS-DOS drive

2007-07-01 Thread Matthew Szudzik
I have a usb flash drive that I wish to reformat as an MS-DOS (FAT) file system. How do I do that on OpenBSD? I want the drive to be formatted in the same manner that a Windows machine or Macintosh might format an MS-DOS file system. So clearly, I don't want to use disklabel, since OpenBSD di