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 - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-27-2007, 07:47 PM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
Formatting (FDISK) Help


Ok - I am formatting an extra drive I threw in my box and I must use FDISK so if anyone can please help me, I would greatly appreciate it!

As you can see the disk is now visible on the system.

Code:
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table
I ran "fdisk /dev/sdb" command and created what I can only assume is an Ext3 partition since I saw only code "83". I also selected to make it a primary partition but I am not sure if that was the correct thing to do.

Code:
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       30401   244196001   83  Linux
My question now is so far have I done everything correct? If not, please explain what I did wrong and how to resolve it.

My 2nd question is now must I set a mount point to it? Do I just go to /etc/fstab and create a new entry to map /dev/sdb1 to /data?

Thanks for all your support & info!
 
Old 03-27-2007, 07:52 PM   #2
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Now that you have a partition, you need to make a filesystem on it. "fdisk" doesn't do that for you. You probably want to just run "mkfs.ext3 /dev/sdb1". After that, "mkdir /data". "chmod 777 /data" or whatever permissions you want. "mount /dev/sdb1 /data". And, it's mounted. For your fstab you can have this, at least that's what mine reads.

/dev/sdb1 /data auto defaults 0 0
 
Old 03-27-2007, 10:47 PM   #3
rguym
LQ Newbie
 
Registered: Sep 2006
Posts: 7

Rep: Reputation: 0
When you used fdisk to set primary and file system, did you select write to disk?
Since your linux system recognizes /dev/sdb ,yet "doesn't contain a valid partion table", perhaps you should use qparted or parted or a similar disk partioner to format this drive to your preferred file system (ext2, ext3, reisfers..)
hope this helped
 
Old 03-27-2007, 10:52 PM   #4
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
When you used fdisk to set primary and file system, did you select write to disk?
Since your linux system recognizes /dev/sdb ,yet "doesn't contain a valid partion table"
I missed that. You will have to actually write the partition to the drive (the "w" command in fdisk) before you can put a filesystem on it, etc.
 
Old 03-28-2007, 07:49 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,691

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Quakeboy02, IMO your first post was correct, I believe the OPs first code block just indicated the drive was recognized, the second code block was after the drive was partitioned which now shows a valid partition table.

Carwill, the linux partition ID i.e. 83 does not indicated filesystem type. You can format it with any filesystem i.e. ext2/3, reiserfs, jfs, xfs etc.
 
Old 03-28-2007, 08:34 AM   #6
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 77
Quote:
Originally Posted by michaelk
Quakeboy02, IMO your first post was correct, I believe the OPs first code block just indicated the drive was recognized, the second code block was after the drive was partitioned which now shows a valid partition table.

Carwill, the linux partition ID i.e. 83 does not indicated filesystem type. You can format it with any filesystem i.e. ext2/3, reiserfs, jfs, xfs etc.
Ah - thanks - so now I just need to mk2fs -j to format as ext3, right? This is not done in the FDISK utility, right?
 
Old 03-28-2007, 01:40 PM   #7
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
The fdisk utility does not make filesystems. I don't know anything about mk2fs. I use "mkfs.ext3", like I posted above.
 
Old 03-28-2007, 01:51 PM   #8
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 77
OK - thanks. I have it formated and partitioned now. However I was told that since these two mount points are removable USB drives, I should not have entries in /etc/fstab. Someone said I should remove the fstab entries & let hal/dbus/automounter run the show.

Anyone know what is the correct way to do this? I want to be able to just plug and play these two formated ext3 USB drives into any Linux system w/o massive headaches.
 
Old 03-28-2007, 02:17 PM   #9
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
"Someone said I should remove the fstab entries & let hal/dbus/automounter run the show."

Give it a try. If you haven't mounted it after creating a filesystem, unplug it, wait a couple seconds, then plug it back in. If you have a mount point, then it worked.

NOTE: It's a good idea to give all the information you have about your stuff in the first post, rather than leaking it out in dribs and drabs. In this case, knowing it's USB is not a big deal. For the next one, it might be.
 
  


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
weird fdisk problem (Fdisk unable to see winxp partitions) khidot Slackware - Installation 5 04-07-2007 09:26 PM
cannot use formatting ygloo LQ Suggestions & Feedback 2 09-28-2006 02:39 PM
Formatting Tarekaz Linux - Newbie 7 03-29-2006 02:46 AM
formatting HD johnrobert Linux - Newbie 3 11-02-2003 10:14 AM
Formatting -=DpG26=- Linux - Newbie 10 09-01-2003 07:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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