Post by ZF on Aug 11, 2009 22:55:16 GMT -5
This is to help create a functioning FAT32 (vfat) partition to be shared between your linux and windows OS's. For simplicity, i'll assume that you're using hda1 for windows, hda2 as an extended partition for linux with hda5,6 and 7 for /, /usr, and swap contained as logical sub-partitions. That's a normal setup. Now you'll want to create a new partition using fdisk. Some people seem to be afraid of this, but i find it very easy to use. First, go to the command line and as root type:
telinit s
this will take you to single user mode, which means disks aren't usually mounted and stuff like that (it's not a good idea to try and format a disk that's already mounted and in use). type:
fdisk hda
this will take you into the menu-driven fdisk program. type:
p
to list your current partitions, and take a moment to familiarize yourself with the setup. an i.d. of 83 is an ext3 linux native partition, i.d. 82 means a linux swap partition.
Now you want to create a new primary partition, with a file system type FAT32 (this can be easily accessed by both OS's) to do this, type:
n <---- create new partition
p <---- primary
3 <---- label it hda3 (3rd primary)
At this point it'll ask for first and last sector, which will default to first available sector and last available sector (take up any free space left), if you want to control the size yourself, say create a 5 gigabyte partition, accept the first default, then type +5000M
Now change the fs type with
t
c <---- this specifies vfat filesystem
and review what you've done with 'p' to make sure everything is the way you want it. If you're satisfied, use 'w' to write the partition table to disk, and exit fdisk. (WARNING: this will write the partition table to disk, make sure you haven't changed any of your old partitions)
At this point you need to format the new parition, which can be done with mkfs, although i had to download dosfsutils because slackware didn't come with mkfs.vfat (FAT32) included. If you are missing this package, try the following link to download the rpm (i'm still looking for a good source package).
rpmfind.net/linux/RPM/ultrapenguin/1.1.9/sparc/RedHat/RPMS/mkdosfs-ygg-0.3b-8.sparc.html
Either way, in the end the command should look something like this:
mkfs -t vfat /dev/hda3
OR
mkfs.vfat /dev/hda3
Assuming that works, there's just one thing left to do: edit your /etc/fstab to automatically mount the new partition on boot. Use emacs, vi or whatever editor you're familiar with, and add the following line:
/dev/hda3 /mnt/windows defaults,umask=000 0 0
There are actually several different sets of options you could use in place of defaults, but i have this setup and it so far it works extremely well for me. Type:
mount -a or mount /dev/hda3
and presto!, you should be able to read and write to this partion from linux or windows!
Well, there you go. I apologize if that's more detail than you wanted, but it's best to have the info and not need it, than the other way around.
If anything goes wrong, or you have questions, post up.
telinit s
this will take you to single user mode, which means disks aren't usually mounted and stuff like that (it's not a good idea to try and format a disk that's already mounted and in use). type:
fdisk hda
this will take you into the menu-driven fdisk program. type:
p
to list your current partitions, and take a moment to familiarize yourself with the setup. an i.d. of 83 is an ext3 linux native partition, i.d. 82 means a linux swap partition.
Now you want to create a new primary partition, with a file system type FAT32 (this can be easily accessed by both OS's) to do this, type:
n <---- create new partition
p <---- primary
3 <---- label it hda3 (3rd primary)
At this point it'll ask for first and last sector, which will default to first available sector and last available sector (take up any free space left), if you want to control the size yourself, say create a 5 gigabyte partition, accept the first default, then type +5000M
Now change the fs type with
t
c <---- this specifies vfat filesystem
and review what you've done with 'p' to make sure everything is the way you want it. If you're satisfied, use 'w' to write the partition table to disk, and exit fdisk. (WARNING: this will write the partition table to disk, make sure you haven't changed any of your old partitions)
At this point you need to format the new parition, which can be done with mkfs, although i had to download dosfsutils because slackware didn't come with mkfs.vfat (FAT32) included. If you are missing this package, try the following link to download the rpm (i'm still looking for a good source package).
rpmfind.net/linux/RPM/ultrapenguin/1.1.9/sparc/RedHat/RPMS/mkdosfs-ygg-0.3b-8.sparc.html
Either way, in the end the command should look something like this:
mkfs -t vfat /dev/hda3
OR
mkfs.vfat /dev/hda3
Assuming that works, there's just one thing left to do: edit your /etc/fstab to automatically mount the new partition on boot. Use emacs, vi or whatever editor you're familiar with, and add the following line:
/dev/hda3 /mnt/windows defaults,umask=000 0 0
There are actually several different sets of options you could use in place of defaults, but i have this setup and it so far it works extremely well for me. Type:
mount -a or mount /dev/hda3
and presto!, you should be able to read and write to this partion from linux or windows!
Well, there you go. I apologize if that's more detail than you wanted, but it's best to have the info and not need it, than the other way around.
If anything goes wrong, or you have questions, post up.