bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FAT16 support


From: Andrew Clausen
Subject: Re: FAT16 support
Date: Tue, 11 Jan 2005 11:29:20 +1100
User-agent: Mutt/1.3.28i

On Mon, Jan 10, 2005 at 08:57:18AM +0000, Jason J wrote:
> I have an application I would really love FAT16 resizing support. From 
> the bug lists I read, parted cant grow FAT16 very well because it cant 
> modify the cluster size.

It can't grow the cluster size, right.  It can shrink.  Growing his much
harder, because you have to move lots of data around, so that bigger
chunks of logically contiguous data are next to each other.  Shrinking
is easy: just chop everything up :)

However, Parted can convert the file system to FAT32, which in most
situations allows Parted to grow the file system.

> 1) Is anyone working on finishing up the FAT16 support? Anything in 
> beta/alpha I could try?

No.

> 2) In scripted mode (parted -s), it is very bad to have it automatically 
> convert FAT16 to FAT32 without user intervention or some sort of 
> authorization/force commandline flag.  It would also be nice to have the 
> option to convert to FAT32 as an option without resizing.

Why?  Fat16 and Fat32 aren't very different.  I don't think this
conversion is any more drastic than changing cluster size.

Are there any applications that require Fat16?  (Perhaps digital
cameras?)

> 3) Is there any other way I can create bootable FAT16 partitions PURELY 
> from linux?

I wonder if FreeDOS has an easy way to install the bootloader on the
partition.

In any case, you can copy the Microsoft boot loader onto an
already-created FAT file system with some clever use of dd.  The rules
are slightly different for FAT16 and FAT32.

Here's the FAT16 rules:
* suppose you have an already-bootable FAT16 file system on partition
/dev/hdb1.  (It could also be in a file, say /root/fat-bootable-image).
* suppose you want to make /dev/hda1 bootable.
* then, do:

   dd if=/dev/hdb1 of=/dev/hda1 bs=1 seek=63 skip=63 count=448 conv=notrunc

For FAT32, do:

   dd if=/dev/hdb1 of=/dev/hda1 bs=1 seek=90 skip=90 count=420 conv=notrunc
   dd if=/dev/hdb1 of=/dev/hda1 bs=512 seek=1 skip=1 count=3 conv=notrunc

I haven't tested this.  I got the numbers from doc/FAT (inside the
Parted package), sections 3.1 and 3.4, which I wrote a few years ago.

Cheers,
Andrew





reply via email to

[Prev in Thread] Current Thread [Next in Thread]