LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-22-2004, 03:40 AM   #1
id10t
Member
 
Registered: Dec 2003
Location: Minnesota
Distribution: Slackware 9.1
Posts: 63

Rep: Reputation: 15
Formatting a hard drive (vfat)


OK SO I have 3 hard drives that i am dealing with.
/dev/hda Reiserfs (Slackware)
/dev/hdb (I want formatted fat32 so Windows and Linux may access it)
/dev/hdc NTFS (XP)

OK... SO I use cfdisk and make one big fat32 partition

output from # fdisk -l /dev/hdb

Code:
Disk /dev/hdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1       14593   117218241   1b  Hidden W95 FAT32
The problem I run into is when I try # mkfs /dev/hdb1 -t vfat
I get
Code:
mkfs.vfat: No such file or directory
# mkfs -V output:
Code:
mkfs from util-linux-2.12
I can't seem to figure out why mkfs doesn't work. Is there something I am doing wrong, or do you know of something else I should try?


EDIT: Solution Found read last post.

Last edited by id10t; 01-22-2004 at 06:32 PM.
 
Old 01-22-2004, 08:11 AM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Try 'mkdosfs -F 32 /dev/hdb1'. Symlink/invocation/binary weirdness.
 
Old 01-22-2004, 09:31 AM   #3
Misel
Member
 
Registered: Mar 2003
Location: Berlin
Distribution: Slackware current
Posts: 310

Rep: Reputation: 31
Are you sure that mkdosfs and mkfs.vfat are the same?

If mkdosfs doesn't work try `parted`. It's a nice program for managing partitions and in the extra directories.
 
Old 01-22-2004, 09:49 AM   #4
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Well, it's the same as mkfs.msdos and I have no mkfs.vfat but mkdosfs can make FAT32 filesystems, so I figured that'd suit. Not the same utility but the same result. Though maybe just making a symlink to it would work - I don't know how it reads $0. I've used the command I gave before, IIRC. Just have to specify that you want FAT32.

Code:
-rwxr-xr-x    1 root     bin         22996 Mar  5  2003 /sbin/mkdosfs*
-rwxr-xr-x    1 root     bin         31020 Aug 12 14:46 /sbin/mke2fs*
-rwxr-xr-x    1 root     bin          4936 Aug 25 20:06 /sbin/mkfs*
-rwxr-xr-x    1 root     bin          8004 Aug 25 20:06 /sbin/mkfs.bfs*
-rwxr-xr-x    1 root     bin         15604 Aug 25 20:06 /sbin/mkfs.cramfs*
lrwxrwxrwx    1 root     root            6 Nov 26 06:51 /sbin/mkfs.ext2 -> mke2fs*
lrwxrwxrwx    1 root     root            6 Nov 26 06:51 /sbin/mkfs.ext3 -> mke2fs*
-rwxr-xr-x    1 root     bin         15460 Aug 25 20:06 /sbin/mkfs.minix*
lrwxrwxrwx    1 root     root            7 Nov 26 06:50 /sbin/mkfs.msdos -> mkdosfs*
-rwxr-xr-x    1 root     bin          4148 Aug 12 14:46 /sbin/mklost+found*
-rwxr-xr-x    1 root     bin        142312 Sep  7 19:53 /sbin/mkreiserfs*
-rwxr-xr-x    1 root     bin         11030 Aug 25 22:15 /sbin/mkrescue*
-rwxr-xr-x    1 root     bin         11316 Aug 25 20:06 /sbin/mkswap*
 
Old 01-22-2004, 11:04 AM   #5
nesware
Member
 
Registered: Jan 2004
Location: belgium
Distribution: Slackware
Posts: 117

Rep: Reputation: 15
Usage: mkfs [-V] [-t fstype] [fs-options] device [size]

are you sure it's
# mkfs /dev/hdb1 -t vfat
and not
# mkfs -t vfat /dev/hdb1
 
Old 01-22-2004, 02:21 PM   #6
id10t
Member
 
Registered: Dec 2003
Location: Minnesota
Distribution: Slackware 9.1
Posts: 63

Original Poster
Rep: Reputation: 15
root@id10t:~# mkfs -t vfat /dev/hdb1
Code:
mkfs.vfat: No such file or directory
I tried parted... here is what I get
Code:
Warning: The kernel was unable to re-read the partition table on /dev/hdb
(Device or resource busy).  This means Linux knows nothing about any
modifications you made.  You should reboot your computer before doing anything
with /dev/hdb.
So here I go to reboot
 
Old 01-22-2004, 02:33 PM   #7
id10t
Member
 
Registered: Dec 2003
Location: Minnesota
Distribution: Slackware 9.1
Posts: 63

Original Poster
Rep: Reputation: 15
Well still now go

Code:
root@id10t:/120# mount /dev/hdb2 /home/half/Fat32 -t vfat
mount: wrong fs type, bad option, bad superblock on /dev/hdb2,
       or too many mounted file systems
root@id10t:/120# mount /dev/hdb2 /home/half/Fat32 -t fat
mount: fs type fat not supported by kernel
root@id10t:/120# mount /dev/hdb2 /home/half/Fat32 -t fat32
mount: fs type fat32 not supported by kernel

BTW: I did two partitions instead because of an idea I had, but I make them both Fat32 with parted. It only supposed to take a moment to check to fat32 with parted... I was preparing for a half an hour.
 
Old 01-22-2004, 02:40 PM   #8
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
If you're set on having the command, try 'ln -s mkdosfs mkfs.vfat'.

Then 'mkfs.vfat /dev/foo'

I just did it with a floppy and it worked. Should with a hard drive. Like I say, you can also just provide the option to mkdosfs.

-- Or never mind, I suppose.

Last edited by slakmagik; 01-22-2004 at 02:42 PM.
 
Old 01-22-2004, 04:52 PM   #9
dirstyGuy
Member
 
Registered: Jan 2004
Posts: 67

Rep: Reputation: 15
I remembered, they had usually adviced ppl to format dos/vfat/ntfs partitions from within windows. And typically window98/me partition must be the first partition of a first harddisk (/dev/hda1 ..). W2k/XP have better partition manager, it is flexibler, u can have their partitions in any where. But for windows98/Me just don't try to install them other than in C: that is /dev/hda1.

Just for storing data, it is ok to have it in any partition. But use windows to create the partition still recomended ..

Last edited by dirstyGuy; 01-22-2004 at 04:56 PM.
 
Old 01-22-2004, 06:31 PM   #10
id10t
Member
 
Registered: Dec 2003
Location: Minnesota
Distribution: Slackware 9.1
Posts: 63

Original Poster
Rep: Reputation: 15
Solution

Well... It looks like I got it work...

OK here is what I did.


Tried parted the first time and make both partitions Fat32 (I must have made a mistake)

The first partition /dev/hdb1 mounted fine. The second did not.

I ran Parted again thinking that i probably made a mistake somewhere.

Both partitions mounted perfectly.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting a Hard Drive dudeman41465 Linux - Software 3 10-13-2005 04:09 PM
Hard-drive formatting kc0bus Linux - Newbie 5 07-02-2005 12:14 PM
Formatting Hard Drive baber_abbasi Linux - Software 2 01-04-2005 08:41 AM
formatting a secondary hard drive Bronzzy Linux - Newbie 2 03-27-2004 11:02 AM
Formatting hard drive... Linux~Powered Linux - Hardware 1 02-09-2004 04:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration