[SLUG] Harddisc's & partitioning.

Gavin Baker za at supercowpowers.org
Tue Feb 4 15:15:01 GMT 2003


Al Girling <al21 at firenet.uk.com> wrote:
> Hi,
> 
> It's about time I sorted out the 2nd harddrive in my machine.  This
> drive is a 1.6Gb disc which according to fdisk currently looks like;
> 
> Disk /dev/hdb: 16 heads, 63 sectors, 3140 cylinders
> Units = cylinders of 1008 * 512 bytes
> 
>    Device Boot    Start       End    Blocks   Id  System
> /dev/hdb1   *         1      3140   1582528+   b  Win95 FAT32
> 
> Now as I understand it, the Linux version of fdisk is unable to do
> anything to Win95 FAT32.  So can anybody tell me how to format this
> disc so that I might use it.

You can mount and use FAT32 filesystems under Linux, but it really is a
poor choice, so I'm guessing you want to use something else.

fdisk knows about partitions. It has no understanding at all about
filesystems.

The "System" that fdisk shows you doesn't really have much to do with
the filesystem that you put on the partition. Some system identifiers
are useful, "Linux LVM" and "Linux raid autodetect" partitions are found
and initialized by the kernel if you have LVM/Kernel RAID support.

"Win95 FAT32" is not used for anything I know of, and in any case, is
just a number wrote on the partition and doesn't mean much to anything
(except perhaps, windows).

Assuming you want to replace the fat32 filesystem on hdb1 with a decent
filesystem, you can just do "mkfs.ext2 /dev/hdb1" (or ext3 or reiserfs
or ...). Then mount and use it. (mount /dev/hdb1 /somewhere).

The "System" id that fdisk shows will still be "Win95 FAT32" of course,
but that doesn't hurt anything.

If you want to change the system id of the partition, you need to "fdisk
/dev/hdb1" then "t" (change type), then "83" for Linux native, then "w"
to write it to disk. You might not even need to reboot for this, and I'm
sure it won't touch the filesystem on that partition.

Another thing to note is that you don't actually need a partition if
your just gonna use the entire disk for it. Theres nothing wrong with
"mkfs.ext2 /dev/hdb". Then "mount /dev/hdb /somewhere". This disk would
have a filesystem, but no fdisk style "System ID". Again, theres nothing
wrong with that.


Regards,
Gav




More information about the Scarborough mailing list