LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   need some help partitioning a large (250GB) usb external hard drive (https://www.linuxquestions.org/questions/linux-hardware-18/need-some-help-partitioning-a-large-250gb-usb-external-hard-drive-460307/)

vees 07-02-2006 12:32 PM

need some help partitioning a large (250GB) usb external hard drive
 
Hi,

I just purchased a 250GB usb external hard drive which I plan to use as a repository or sorts for my various computers. Predictably, it came with from the store with one huge vfat partition. Which is fine for GNU/Linux, but which FreeBSD cannot handle properly yet as FreeBSD has only experimental support of FAT filesystems bigger than 128GB. Since I am trying to learn FreeBSD I will need to have this drive read-writable by FreeBSD. I would also like to have it read-writable by any Windoze box. I therefore need to repartition it into several vfat partitions each smaller than 128GB.


When I do fdisk /dev/sda1 here is the first message I get:

The number of cylinders for this disk is set to 30400.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help):


while a prinout of this device gives me:

Command (m for help): p

Disk /dev/sda1: 250.0 GB, 250056705024 bytes
255 heads, 63 sectors/track, 30400 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

Command (m for help):


I first tried to simply create 3 new primary partitions with 'n' then using the first availale cylinder than doing +100GB for the size. All seemed ok until I did 'w' which gave me a message about 'error 22'.

I figured that the mistake was using primary partitions (on a usb device and a computer with two internal hard drives and all these partitions already:

# fdisk -l

Disk /dev/hda: 81.9 GB, 81964302336 bytes
16 heads, 63 sectors/track, 158816 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 60945 30716248+ 83 Linux
/dev/hda2 * 60946 80325 9767520 83 Linux
Partition 2 does not end on cylinder boundary.
/dev/hda3 80326 128760 24410767+ 83 Linux
Partition 3 does not end on cylinder boundary.
/dev/hda4 128760 128775 8032+ 82 Linux swap / Solaris
Partition 4 does not end on cylinder boundary.

Disk /dev/hdb: 40.0 GB, 40027029504 bytes
255 heads, 63 sectors/track, 4866 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 3039 24410736 7 HPFS/NTFS
/dev/hdb2 3040 4865 14667345 f W95 Ext'd (LBA)
/dev/hdb5 3040 4865 14667313+ 7 HPFS/NTFS

Disk /dev/sda: 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/sda1 1 30401 244196001 c W95 FAT32 (LBA)
#


I then tried creating one extended partition on /dev/sda1 and three logical partitions inside. All went well until I tried writing this with 'w' which gave me this error 22 again.

What is going on, what am I doing wrong, what is error 22 and how should I proceed to get my 3 partitions on my usb device?

Many thanks,

VS

JunctaJuvant 07-04-2006 03:33 AM

Just to make sure: did you *delete* the partition /dev/sda1 on /dev/sda prior creating the new /dev/sda{1,2,3} partitions?

zeitounator 07-04-2006 04:14 AM

Quote:

Originally Posted by vees
When I do fdisk /dev/sda1

The '1' is your problem. Try fdisk /dev/sda

/dev/sda1 is the first partition on disk /dev/sda. You want to run fdisk/create/delete partitions on the entire disk not on the partition.


All times are GMT -5. The time now is 12:04 PM.