Find the answer to your Linux question:
Results 1 to 5 of 5
I have purchased a 1Tb USB disk drive, which I want to set up as a two-partition disk drive on my F10 box. Using fdisk, I have deleted the existing ...
  1. #1
    Just Joined!
    Join Date
    Dec 2006
    Posts
    19

    [SOLVED] Problem Formatting Disk Partitions

    I have purchased a 1Tb USB disk drive, which I want to set up as a two-partition disk drive on my F10 box. Using fdisk, I have deleted the existing partitions, and created two new primary partitions of 500Gb each. The fdisk print command shows two partitions: /dev/sdb1p1 and /dev/sdb1p2. I've then written the new partition table to disk, and rebooted. Then, df -h shows I have /dev/sda1 (original device) and /dev/sdb1 (the device I've just partitioned).

    Now to format the partitions as ext3. Following other posts I've found on this process, I've:
    # mkfs.ext3 /dev/sdb1p1
    This responds with "Could not stat /dev/sdb1p1 --- no such file or directory. The device apparently does not exist" I can mkfs.ext3 /dev/sdb1, and end up with only one partition of 1Tb - not what I want.

    What am I missing, here? Eventually, I want to have two ext3 partitions which I can mount.

    TIA,
    Jon

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Is it really /dev/sdb1p1 or /dev/sdb1 only? Post the output of fdisk -l command here.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Dec 2006
    Posts
    19
    Thanks DC - here's the output:

    [oracle@newton ~]$ df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/mapper/VolGroup00-LogVol00
    146G 23G 116G 17% /
    /dev/sda1 190M 28M 153M 16% /boot
    tmpfs 251M 116K 251M 1% /dev/shm
    /dev/sdb1 917G 200M 871G 1% /media/disk
    [oracle@newton ~]$ su -
    Password:
    [root@newton ~]# fdisk /dev/sdb1

    The number of cylinders for this disk is set to 121600.
    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): p

    Disk /dev/sdb1: 1000.2 GB, 1000202241024 bytes
    255 heads, 63 sectors/track, 121600 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xd43f90fe

    Device Boot Start End Blocks Id System
    /dev/sdb1p1 1 60800 488375968+ 83 Linux
    /dev/sdb1p2 60801 121600 488376000 83 Linux

    Command (m for help): q

    [root@newton ~]# fdisk -l

    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x0000a27d

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 25 200781 83 Linux
    /dev/sda2 26 19457 156087540 8e Linux LVM

    Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xf782a612

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 121601 976760001 7 HPFS/NTFS
    [root@newton ~]#
    TIA,
    Jon

  4. #4
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    You have incorrectly created a partition table *on a partition* instead of on the device. You need to run fdisk against /dev/sdb NOT /dev/sdb1.

    fdisk /dev/sdb

    Use option o to create a new partition table. Then use n to create new partitions. When you're done, fdisk -l will show 2 partitions on sdb, not the 1 partition you have now.

  5. #5
    Just Joined!
    Join Date
    Dec 2006
    Posts
    19

    Smile

    Thanks, HRO - your solution has resolved my issue. I now have two formatted and mountable partitions /dev/sdb1 and /dev/sdb2.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...