LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-18-2003, 09:45 AM   #1
moly82
Member
 
Registered: May 2003
Location: Genoa - ITALY
Distribution: Debian SID
Posts: 84

Rep: Reputation: 15
How to format a partition from shell?


Hi all!

I've a question for you TOP URGENT!

I connected a new Hard Disk into my pc, and I partioned it with fdisk (I'm using Debian).

Now I'd like to format one of these partition with the FAT32 file system, but I don't know how to do it!

By searching around the web, I found the command to format using the dos-fat fikle system (mkdosfs -c /dev/hdb2), but which is the command to format with the FAT32 fs?

Thanx in advandce to all!

bye!
 
Old 09-18-2003, 09:50 AM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
check this
 
Old 09-18-2003, 10:00 AM   #3
moly82
Member
 
Registered: May 2003
Location: Genoa - ITALY
Distribution: Debian SID
Posts: 84

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by DrOzz
check this
thank you very much!

sorry... is my fault I had to use the "search function", I forgot it! (and also I had a really urgent to do this thing!)

sorry again

bye and thank you!

moly82
 
Old 09-19-2003, 04:41 AM   #4
moly82
Member
 
Registered: May 2003
Location: Genoa - ITALY
Distribution: Debian SID
Posts: 84

Original Poster
Rep: Reputation: 15
hello again!

I tried to do like suggested in the other thread, but I still have problems!

one question: to format the hdb2 partition with vfat filesystem, I have to do it before the system boot (with fdisk running from a boot floppy for example), or I can do it also after the boot, form the Linux shell? (I done in this way yesterday)

this because I tried both these command:

mkfs -t vfat /dev/hdb2

and also

mkdosfs -F 32 /dev/hdb2


... but when I run these commands from the shell (I unmounted the relevant partition before to do that), the process stop immediately (with NO errors, it just tells me mkfs version and other information), but I think is impossible that the format process takes just 1 second! I think the format process doesn't start at all...

what do you think about that?

bye and thanks in advance!
 
Old 09-19-2003, 05:56 AM   #5
footfrisbee
Member
 
Registered: Apr 2003
Distribution: Debian Sarge
Posts: 259

Rep: Reputation: 30
It shouldn't take very long at all to format the partition. I believe that all it does is put a FAT at the beginning of the partition. If you don't trust it, try mounting it

# mount -t vfat /dev/hdb2 /mnt/somedir
 
Old 09-19-2003, 06:57 AM   #6
moly82
Member
 
Registered: May 2003
Location: Genoa - ITALY
Distribution: Debian SID
Posts: 84

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by footfrisbee
It shouldn't take very long at all to format the partition. I believe that all it does is put a FAT at the beginning of the partition. If you don't trust it, try mounting it

# mount -t vfat /dev/hdb2 /mnt/somedir
I'll try doing so, thanx!

I had some doubts about the format process because now I can't use the partition!

I mean: for example I can copy files from a ext3 partition to the vfat one, but when I try to execute the file, or I try to read it if it's a text file, I can't because the file manager tells me that it is not a "regular/normal file"! What does it mean so?
Instead, if I read the content of the text file with the shell, it works fine...
Another thing: I can only write onto the partition if I am logged likle root... but in the fstab I wrote umask=000...

byeeee
 
Old 09-19-2003, 07:03 AM   #7
moly82
Member
 
Registered: May 2003
Location: Genoa - ITALY
Distribution: Debian SID
Posts: 84

Original Poster
Rep: Reputation: 15
I forgot one thing: with programs like gkrellm2, I can see the partition correctly configured (it is mounted, and also the dimension is correct..)... so probably the partition is ok and formatted, but I can't understand the above-mentioned problems: I can write on the partition only if I am logged like root, and if I move/copy files to this partion, I can't executed them...


byeee
 
  


Reply



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
How do I format a partition? rafaelandy Slackware - Installation 13 10-17-2005 01:26 PM
should i format X partition after creat Y partition No2002 Linux - General 3 07-16-2005 10:13 AM
Shell script ip address format check. rooch84 Linux - Software 6 08-18-2004 09:14 AM
I need to format a fat32 partition through a redhat 9 shell rendaimedia Linux - General 1 04-27-2004 09:50 AM
Bulk image format conversions with a shell script? infidel Linux - Software 4 11-16-2003 07:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:33 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