LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   gParted Help (https://www.linuxquestions.org/questions/linux-software-2/gparted-help-487142/)

carlosinfl 09-26-2006 11:06 AM

gParted Help
 
I am using gParted to format a new USB (external) drive I purchased. It is a 320GB drive which "dmesg" sees no problem.

Code:

usb-storage: waiting for device to settle before scanning
  Vendor: USB 2.0  Model: Storage Device    Rev: 0111
  Type:  Direct-Access                      ANSI SCSI revision: 00
SCSI device sdb: 625142448 512-byte hdwr sectors (320073 MB)
sdb: Write Protect is off
sdb: Mode Sense: 08 00 00 00
sdb: assuming drive cache: write through
SCSI device sdb: 625142447 512-byte hdwr sectors (320073 MB)
sdb: Write Protect is off
sdb: Mode Sense: 08 00 00 00
sdb: assuming drive cache: write through
 sdb: unknown partition table
sd 5:0:0:0: Attached scsi disk sdb
usb-storage: device scan complete

I see the drive is /dev/sdb so I go to gParted and I only have the option to format the drive as the following:

- EXT2
- EXT3
- Swap
- Unformatted

I do see in the format options list for FAT and others but they are greyed out and I can't select them for some strange reason. Am I missing something? I would like to format the drive as FAT so Linux and Windows can read the drive in case an emergency.

Here is a screenshot

theNbomr 09-26-2006 11:26 AM

Try using fdisk + mkfs. I have successfully formatted USB flash drives(which look like external drives) this way.

--- rod.

carlosinfl 09-26-2006 12:42 PM

Quote:

Originally Posted by theNbomr
Try using fdisk + mkfs. I have successfully formatted USB flash drives(which look like external drives) this way.

--- rod.

So what would the command look like to format /dev/sdb?

Crito 09-26-2006 02:59 PM

Sounds like another CHS geometry problem to me. Plus that drive is too big for a single FAT16 partition anyway, so I'd expect that option to be greyed out.

Anyway, FAT32 probably needs something like XXXXX/255/63 and Linux didn't see it that way. That's why I always initialize and create at least the first partition in Windows, just to make sure I get a good (cross-platform compatible) partition table written. Then I do all my formatting and adjusting of partition sizes with gparted.

theNbomr 09-26-2006 03:35 PM

Quote:

Originally Posted by Carlwill
So what would the command look like to format /dev/sdb?

I usually like to try all of the commands before I provide a recipe, but it this case, I don't have a drive available to test without losing data. Having said that, this is the basic procedure, with apologies if I've overlooked something. Since you are starting with new media, there shouldn't be a risk of data loss.
First,
Code:

man fdisk, &
man mkfs.

You need to create the partition(s) using fdisk.
As root,
Code:

fdisk /dev/sdb
use 'n', to create a new partiton, and enter partiton size & type parameters as desired.
use 'w' to write the partition table to the media. Repeat until all sectors used, or enough partitions created.

Again, as root,
Code:

mkfs -t vfat /dev/sdb1
Repeat as necessary, for any adiditional partitions.

I forget the maximum size of fat32 partitions, but as Crito mentions, you may bump into that limit.

After creating the filesystem(s), they can be mounted, using mount.

carlosinfl 09-26-2006 05:22 PM

My only problem is in "fdisk", I don't know how to use all the available disk space. I know I can do +320000M for 320GB drive but drives are always less than advertised. Is there no way in fdisk to use all available space in one partition?

theNbomr 09-26-2006 08:41 PM

Well, my fdisk first queries for a beginning cylinder number (default=1), and then for a ending cylinder number (defualt=last cyl.). If you want, you can use the 'p' command to print the disk geometry for you.

--- rod.


All times are GMT -5. The time now is 12:01 AM.