fdisk is a utility present in many operating systems that perform partitioning on hard drives. There are versions of fdisk for Linux, DOS, Windows, FreeDOS and OS / 2. It handles DOS FAT partitions only.

learn more… | top users | synonyms

15
votes
5answers
29k views

why does the partition start on sector 2048 instead of 63

I had two drives partitioned the same and running 2 raid partitions on each. One died and I replaced it under warranty for the same model. While trying to partition it, the first partition can only ...
9
votes
4answers
2k views

Recover harddrive data

I have a dell laptop that recently "died" (It would get the blue screen of death upon starting) and the hard drive would make a weird cyclic clicking noises. I wanted to see if I could use some tools ...
8
votes
1answer
6k views

What is the equivalent of the Linux command “sudo fdisk -l” in MacOS?

In Linux, the command sudo fdisk -l produces an output the lists all the disks and partitions in the computer. The following is an example of fdisk -l output: If I try to use sudo fdisk -l in MacOS ...
6
votes
2answers
5k views

Is my OCZ SSD aligned correctly?

I have an OCZ Agility 2 SSD with 40 GB of space. I use it as a system drive in Debian Linux ("Squeeze") and in my opinion it's really fast. I've read a lot on aligning partitions and file systems, and ...
6
votes
2answers
8k views

How to create NTFS partition in Linux to install Windows 7 from USB?

I messed up with my computer and need help. Generally: install Windows 7 from USB. Problem: "setup was unable to create a new system partition" When first attempt to install Windows 7 failed I ...
5
votes
5answers
20k views

Creating and formating a partition using a bash script

Is there any way to create and format a partition using a bash script? I think it can be done with fdisk but I don't know how to feed commands from the bash script into the fdisk shell then exit the ...
5
votes
2answers
3k views

Re-reading the partition table failed with error 22: invalid argument

I have Oracle Linux on a VM and I'm trying to create partitions on /dev/sda2 of size 30 gigs using fdisk utility. I made four partitions each of size 512M and they appear in the partition table. ...
5
votes
3answers
6k views

What does sfdisk do, and how does it compare to fdisk or parted?

I was looking over documentation for ZFS for Linux and I came accross a command that the instructions tell me to run to prepare a disk for use. The command was; sfdisk -q /dev/zvol/tank/fish ...
4
votes
3answers
2k views

Update udev after fdisk run

How to update /dev directory after creation of new partition on a disk? I have the udev installed, it works perfectly except this. The new devices appear only on reboot.
4
votes
1answer
664 views

What does the output of fdisk mean?

I've got a flash drive and I want to understand the properties of it as is outputted from fdisk. I inserted it and check the dmesg and I could see that it was mounted as /dev/sdb1 so I ran fdisk to ...
4
votes
2answers
2k views

Adding an ISO to GRUB2 boot options

I am trying to add an ISO (alternate distro of ubuntu ) to my GRUB . This is the output of fdisk -l: FDISK OUTPUT Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 ...
3
votes
2answers
1k views

After doubling virtual disk size in VirtualBox, fdisk -l still shows old disk size in guest CentOS

I'm running CentOS 6.1 as a guest in VirtualBox 4.1.18 on a Mac OS X (Snow Leopard) host. Since 50 GB for my CentOS guest proved to be insufficient, I resolved to double its available disk space. ...
3
votes
2answers
9k views

What is the “the dos compatibility flag” in fdisk?

I fired up fdisk and got this warning: WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to ...
3
votes
3answers
876 views

Partitioning a disk with already existing partitions

On a Linux Virtual Machine that i recently setup, I had a disk /dev/sdb of size 20G in which i created 8 partitions (3 primary, 1 extended containing 5 logical partitions), using upto 10G of space. So ...
3
votes
1answer
3k views

How do you create and partition a raw disk image?

I need to create a raw disk image for use in a virtual machine, but I need to create the partitions before creating the file system or installing the operating system. Can anyone describe a process ...
3
votes
1answer
1k views

Partition table independent of sector size

The plot I have a WD10JPVT 1Tb disk inside an IcyBox IB-290StUS-B USB/esata enclosure. When I connect the disk via USB, I get a 512 logical / 512 physical sector size. When I connect the disk via ...
3
votes
1answer
1k views

fdisk / sfdisk not saving partitions on USB drive

I am having some problems with an USB drive that is not working correctly, I am trying to recreate partitions with fdisk or sfdisk but once I do it I do "-l" and there's no partitions. This is how I ...
2
votes
2answers
6k views

Correctly shrink NTFS and Resize partition using linux

I am trying to resize a 160GB disk to fit on a 80GB disk, I have tried 3 times to shrink my NTFS and resize the partition. Im using backtrack as a live CD to do this, I use ntfsresize to the ...
2
votes
1answer
818 views

hex edit of FAT32 partition tips wanted

I currently have a wrong-sized partition in a "very damaged" status. The first problem for most recovery tools: - disk size is 9*10x units. - logical partition starts at 2*10x units - logical ...
2
votes
3answers
17k views

Why Clonezilla doesn't recognize RAID0 drives - and how to fix it?

I have a not-so-recent HP desktop PC (model# m9510f, Q8200 CPU - I think it was manufactured in early 2009 sometime, because it still had Vista 64-bit). I've set it up with a pair of 500GB drives ...
2
votes
2answers
496 views

quick format vs format

What is the primary difference between quick format and format. Does a format write 0's before writing the inodes/allocation table and a quick format just write the allocation table/inode without ...
2
votes
1answer
685 views

Making fdisk see software RAID 0

I am following http://grub.enbug.org/Grub2LiveCdInstallGuide and I am using software RAID 0. I am using Ubuntu 10.10 LiveCD and is trying to restore grub2 after installing Windows 7 in another ...
2
votes
1answer
692 views

fdisk (Linux) partitioning RAID 0

I'm trying to create partitions for a Slackware installation on my computer (beside Windows 7) just to have a nice distribution running mostly for school but when I run fdisk and print the partition ...
2
votes
1answer
551 views

real number of sectors on HDD

This is part of output of fdisk -l Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector ...
1
vote
6answers
392 views

Hard drive utilities: FDISK, Format, etc

I need to rebuild my dev box later tonight. What utility do you use for FDISK, and Formatting your drives. I usually do this stuff in Windows but will need to start with bare metal. Last time I did ...
1
vote
2answers
363 views

How to recover data from a USB-connected hard disk that shows no partition?

Is there a possible way to recover data on my Western Digital 2TB drive? I have tried different ways like using gparted and fdisk etc.. but nothing helped. The error I get is that it cannot find a ...
1
vote
2answers
211 views

Installing a 3TB drives on Debian

I am using an internal hard drive USB adapter to mount backup drives. The adapter was working well with my previous 1GB backup drives. We just got two new 3TB hard drives. We connected it with the ...
1
vote
1answer
3k views

Warning: Partition X does not end on cylinder boundary. Should I care/how to fix?

My output of fdisk -l is Disk /dev/sda: 750 GB, 750153761280 bytes 255 heads, 63 sectors/track, 91201 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start ...
1
vote
1answer
191 views

Interpretation of number of heads returned by fdisk

Info about HDD: $ sudo fdisk -l Disk /dev/sda: 250.1 GB, 250058268160 bytes 255 heads, 63 sectors/track, 30401 cylinders, total 488395055 sectors Units = sectors of 1 * 512 = 512 bytes Sector size ...
1
vote
2answers
2k views

Can you expand a linux partition while it's in use?

I'm running a linux server and I need to expand the /tmp partion. Everything I come across using fdisk or parted is saying that I need to unmount before expanding. Is this true, or can it be safely ...
1
vote
1answer
3k views

Using LVM after installing Debian

I have Debian Squeeze installed on VirtualBox. While installing I've chosen Ext3 filesystem and it takes whole virtual disk space. fdisk says: Disk /dev/sda: 33.0 GB, 32986103808 bytes 255 heads, 63 ...
1
vote
2answers
997 views

How to shrink an ext2 partition?

I have an ext2 partition that takes up the whole disk (which is /dev/sdc). I have unplugged the disc and plugged into another (linux) computer. How can I shrink this partition using resize2fs and ...
1
vote
2answers
1k views

After ntfsresize (ntfs resize), what is the exact line to type in for fdisk?

I was told that after ntfsresize (ntfs resize), the fdisk command needs to be run... But how can it be run? What is the exact line? In a book Knoppix Hacks, it seems to suggest needing some ...
1
vote
1answer
440 views

Extended partition does not start on physical sector boundary on 512e (emulated 4k) hard-drive

My fdisk -l output tells me that my extended partition (sda4) is misaligned. But partitions inside it are aligned (their start sector is divisible by 8). Will the misaligned extended partition somehow ...
1
vote
1answer
3k views

Can't format or delete any files on SD card

I have a 16 GB SD card i'm trying to format for use. In Windows if I try to format it says Windows was unable to complete the format, and in Linux when I do fdisk -l -u, fdisk just hangs when the SD ...
1
vote
2answers
1k views

How can I merge partitions in Linux without losing data?

So, I'm working on a couple VMs for a high-profile site, and they have /home partitioned separately from / (root). The owner has asked me to merge the two partitions so that /home is not partitioned ...
1
vote
1answer
2k views

How to force a USB disk to format?

I can't seem to get my USB drive to format anymore or be recognized by the file system (including gparted). How do I just wipe the whole thing and start over!? dmesg [ 5036.408102] usb 2-3: new ...
1
vote
1answer
407 views

linux: utility to find good partition alignment on ssd

I am getting a new SSD. is there a linux utility that aids me by recommending/choosing/checking the correct partition (and potentially ext4) parameters to avoid the performance penalty? my "default" ...
1
vote
1answer
335 views

Mismatch between CxHxS and “total number of sectors”

Model: ATA ST320LT007-9ZV14 (scsi) Disk /dev/sda: 38913,80,62 Sector size (logical/physical): 512B/4096B BIOS cylinder,head,sector geometry: 38913,255,63. Each cylinder is 8225kB. Partition Table: ...
1
vote
1answer
479 views

Shrink EXT3 and Expand NTFS

I have a partition table that looks like this: [root@tower ~]# fdisk /dev/sda WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and ...
1
vote
1answer
3k views

NTFS partition broke: Won't mount in Linux & Windows won't boot

When I try to mount my NTFS partition containing windows in Linux, I get this: ~$ sudo mount -a ntfs_mst_post_read_fixup: magic: 0x61227b5b size: 4096 usa_ofs: 24420 usa_count: 25965: Ongeldig ...
1
vote
1answer
349 views

How to create device driver for nested partitions?

I'm running MSWindows virtualized with /dev/sda2 as it's primary drive. Consequently, there is a partition table on that partition, shown as: # fdisk -l /dev/sda2 Disk /dev/sda2: 137.4 GB, ...
1
vote
0answers
16 views

Counting disk capacity using cylinder-head-sector model

Let's look at fdisk -l /dev/sdc output. # fdisk -l /dev/sdc Disk /dev/sdc: 786 MB, 786432000 bytes 255 heads, 63 sectors/track, 95 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector ...
1
vote
0answers
16 views

Safe to blank MBR of a disk after adding it to an RAID1 array with mdadm?

I created a RAID1 array of two disks, /dev/sda and /dev/sdb, using mdadm. After several booting problems related to the BIOS and SATA/RAID controller of the board, I accidently created some new ...
1
vote
1answer
83 views

Windows doesn't boot anymore after partition change

Background: I normally use Linux as OS. I had a dual boot with Windows XP. Since I had some problems with the windows partition (too long to explain), I shifted it of a while. This is what I have ...
1
vote
1answer
943 views

Kali/Ubuntu doesn't detect windows partition

I am trying to dual boot Windows 7 with Ubuntu or Kali Linux but i am unable to do so. I have backed up all my data to an external hard drive. So it is safe to work with partitioning. I have a 500 ...
1
vote
1answer
137 views

partition table looks different between Linux and Windows

I'm having some odd issues after deleting and resizing an NTFS partition with Gparted. Windows doesn't seem to see the same partition table as Linux. At first, the deleted partition showed up as ...
1
vote
0answers
235 views

TestDisk - Recovered partition not mountable

First here's my Partition Table reported by fdisk. Disk /dev/sda: 2000.4 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector ...
1
vote
0answers
81 views

Understand warnings after “fdisk -l” commands [duplicate]

Possible Duplicate: Warning: Partition X does not end on cylinder boundary. Should I care/how to fix? fdisk -l it gives me this scenario: Disk /dev/sda: 500 GB, 500105249280 bytes 255 ...
1
vote
1answer
3k views

How do I reformat an unmountable/unrecognised/unformatted USB drive?

How do I reformat an unmountable/unrecognised/unformatted USB drive? It will not mount or format on Windows Vista or OSX Tiger. Disk Utility sees the hardware, but no partition to mount. Testdisk ...