need help install installing a new fat32 hard drive in a linux box.

mcveigh

Diamond Member
Dec 20, 2000
6,457
6
81
A friend wants a removable hard drive in his linux server.
his idea is that he can copy over important files and take it home at night. this way if "something bad" happens he doesn't lose his data.
I already have dual raid1 arrays on this file server, but he wants this.
he wants fat partiton so he could hook it up to his windows box at home to read the data if need be.

here's what I did.
install new HD in mobile rack, reboot (there goes my uptime:|).
fdisk /dev/hdc
create one partition(primary) label id fat32 (LBA)
wasn't sure if I need to format, I don't think fdisk does it for me?
is there a fat32 format command in linux? I can't find a reference to one. (like mke2fs).
mkdir /backup
added entry to /etc/fstab
/dev/hdc1 /backup vfat defaults 0 0
(I think this is correct)

when I try "mount /backup"
I get this
[root@redserver root]# mount /backup/
mount: wrong fs type, bad option, bad superblock on /dev/hdc1,
or too many mounted file systems


my thought is
1) I need to format (duh) but how can I create a fat partition in linux
2)/etc/fstab is wrong.
any ideas?
 

awal

Senior member
Oct 13, 1999
953
0
0
You need to run mkdosfs on the partition that you just created. it will format it to be compatible with fat32, make sure you read the man page first for any options you may need.
 

Electrode

Diamond Member
May 4, 2001
6,063
2
81
The program to create FAT filesystems is called mkdosfs, which is part of the dosfstools package, which also includes a fsck for FATn filesystems, and some other stuff. I'm not sure what the home page of this package is, but you can find the source tarball easily with google linux. Binaries are included with most distros as well.

Assuming you have dosfstools properly installed, and you are root or have sudo access, this command will create a FAT32 filesystem on /dev/hdc1:

mkdosfs -F 32 /dev/hdc1

Hope this helps. :)
 

matheusber

Senior member
Jun 12, 2001
380
5
81
as they said ... but for me is ( at least i used allways tis way and worked fine ) mkfs.msdos and that param -F 32 ( -n or -l you can say the label, that name windows will show you ) ...

why not have ext2 in this hd, this way you wont lose the ownership info if you need to restore data ...

matheus
 

mcveigh

Diamond Member
Dec 20, 2000
6,457
6
81
he wants to be able to conect it to a windows 2000 box and get the data if need be.