fdisk (for "fixed disk") is a command-line utility that provides disk partitioning functions.

learn more… | top users | synonyms

2
votes
1answer
442 views

fdisk, dd, and the Rapsberry pi

I was trying to wipe my 4GB SD card which acts as the hard drive for the Raspberry Pi, so I went into Mac OS X Disk Utility* and Erased the entire disk, and specified that the whole disk be one big ...
0
votes
2answers
4k views

CentOS doesn't see USB device

I'm running CentOS 6.3 inside of VirtualBox and am having trouble seeing my USB 2.0 thumb drive. In VirtualBox I go to Devices, USB drives and can capture my connected thumb drive. I've created a ...
3
votes
1answer
803 views

Remount lvm partitions after OS reinstallation

I recently upgraded to Linux Mint from Ubuntu. I have overwritten /dev/sda2 which had Ubuntu. I had earlier created two logical volumes opt and virtualization from /dev/sda1. I forgot to take the lvm ...
2
votes
0answers
362 views

Disable RAID auto detect at runtime

In Linux, I'm partitioning two disks for RAID1 with fdisk. The first disk partitioning succedes, but the second fail because the raid starts automatically and occupy also the second disk (why? it ...
4
votes
2answers
625 views

How do I make use of unused space on my boot drive on FreeBSD

I have an old FreeBSD Server (running 7.3-RELEASE) that desperately needs additional storage. In fact, it has some-- the original 20G SCSI drives have been replaced by 300G SCSI drives, so in theory ...
2
votes
2answers
120 views

Can I safely resize my partition from its beginning?

Currently dual booting Windows 8 and Linux Mint 14, sooner or later I will give more space to my Linux system. Is resizing my Linux partition from the beginning a safe operation ? If yes, could you ...
1
vote
1answer
927 views

Growing my extended partition to the left

I have the following one hdd Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors Disk identifier: 0xfa6bd800 Device Boot Start ...
2
votes
1answer
819 views

Create Logical Volume with non-LVM partition

I'm not sure if the title actually depicts my question, but I will try to explain. I have seen everywhere it is mentioned to create a partition of type LVM (8e) and then create logical volume with ...
2
votes
1answer
3k views

fdisk isn't showing my hard drive as properly formatted (but it is)

I've got 3 1TB drives which I've set up to use LVM. Here's the output of pvdisplay: --- Physical volume --- PV Name /dev/sda1 VG Name vgpool PV Size ...
5
votes
3answers
283 views

What's the best way to list size of / in Terminal?

I want to see how much total space / is taking, but I don't know how to do that. I can use ls -hal and add up the subtotals, or I can use fdisk to tell me the size of that partition, but is there a ...
1
vote
2answers
1k views

How to resize logical volume to fit filesystem

How can I resize logical volume to fit filesystem automagically?
1
vote
1answer
124 views

What happens to data copied after undoing fdisk?

Suppose I have some drive with a single partition. For some reason I decide to repartition it, using fdisk. I create multiple partitions, then write the partition table, then exit fdisk. At this ...
1
vote
1answer
6k views

Partition table not recognized by Linux kernel

I experience relatively often that the partition table of a USB stick or SD card is suddenly no longer recognized by the kernel while (g)parted and fdisk still see it, as do other systems. I can even ...
6
votes
1answer
2k views

How to properly align partitions?

I'm trying to understand what are the rules for creating correctly aligned partitions. For the moment I'm playing with parted on a virtual machine, but I'm planning to move to a real hard disk when I ...
2
votes
2answers
1k views

I ran fdisk on a wrong drive. How can I recover

I ran fdisk on the wrong HD. I basically cleared partition table, pressed w and quited fdisk and only then realized that that was my main harddrive... I got this message: WARNING: Re-reading ...
4
votes
2answers
6k views

What are the ramifications of not having a valid partition table?

I recently upgraded my Ubuntu from 11.10 (Oneiric) to 12.04 (Precise Pangolin) on a Dell Inspiron B130 Laptop. When I run fdisk -l it says that my HD doesn't contain a valid partition table. I have ...
2
votes
1answer
525 views

Do I need to format a CF before installing Linux?

I recently purchased an 8GB Patriot CF card, like this one . I also have a Syba CF/Sata adapter. I put these together into my mini-itx computer (connected via Sata cables, not USB) and booted an ...
1
vote
2answers
799 views

Fdisk partition alignment, NAND, not showing specified heads

I ran fdisk with these options, fdisk -H 32 -S 32 /dev/sdc Then I made a new label, and created an aligned first partition. Disk /dev/sdc: 7743 MB, 7743995904 bytes 32 heads, 32 sectors/track, ...
0
votes
2answers
960 views

Unknown hard disk partition?

I want to mount my second hard disk from my Linux VMware guest but when I try mount -t ext3 /dev/sdb2 it is not available. fdisk -l /dev/sdb gives me unknown format: /dev/sdb1 2048 ...
3
votes
1answer
98 views

HDD Testing En Masse

Does anyone have any ideas about how to set up automatic detection and conditional formatting of a LOT of HDDs? I tried posting this on TomsHardwareForums, but I don't think the responder read my ...
1
vote
1answer
686 views

fdisk hangs on “Syncing disk” when resizing a raw QEMU image

I'm using fdisk to resize the partitions on a raw QEMU image. When I write the new partition table, it hangs at "Syncing disks." Note that I'm running fdisk as non-root since I don't need root to ...
1
vote
1answer
740 views

Adding a populated existing disk device to a QEMU raw image

I have a raw QEMU image (vda.raw), and I would like to resize it and add an existing partition, using data I have in a file that contains a raw ext3 file system populated with data (vdb.raw). The two ...
5
votes
3answers
614 views

how to use “Unusable” sectors outside defined partition boundaries

What might be a convenient way to stash some hidden data in the "Unusable" area following the last partition, or anywhere outside defined partition boundaries? For example, making it appear as a ...
1
vote
0answers
1k views

WD MyBook 3TB - Gparted failed & HDD partitions recovery?

I have this new WD MyBook external HDD (USB 3.0/2.0); I created 3 partitions all of them ext3 type (~1 TB | ~1 TB | ~750 GB) I loaded lots of files all the partitions were like ~30% full on each, and ...
5
votes
6answers
9k views

Change the number of the partition from sda1 to sda2

I have a disk with two partitions: sda1 and sda2. I would like change the number of sda1 to sda2 and sda2 to sda1. It's possible but I don't remember the procedure. i.e. My first partition will be ...
7
votes
3answers
1k views

Why do we need to specify partition type in fdisk and later again in mkfs?

I'm a little confused about fdisk and mkfs. So - here is typical USB flash drive partitioning and formatting: umount /dev/sdb fdisk fdisk /dev/sdb Command (m for help): d Selected partition 1 ...
2
votes
2answers
3k views

Use testdisk and gpart information to mount ext4 partition

I am trying to recover the ext4 partition table of a 2TB disk, where I have 900.000 files. I have cloned the original HD and now I am working on the cloned HD. And I am running Parted Magic Live CD. ...
4
votes
1answer
6k views

How do I check how much free space left on a device to create a partition

Let's say I have this virtual machine running: [root@centos ~]# fdisk -ul Disk /dev/sda: 8589 MB, 8589934592 bytes 255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors Units = sectors ...
5
votes
3answers
899 views

Can't access USB HDD

I just bought a WD 1TB Caviar Blue drive, and a Bytecc HD-35SU enclosure for it. Snapped the drive in, went to plug it in on my laptop, nothing happened. I figured that probably meant I needed to ...
2
votes
2answers
966 views

Errors from cfdisk with new external USB backup drive

I've picked up an HP SimpleSave sd500a backup drive. This is a 2.5", 500GB drive. It has a mysterious CD-like partition, but otherwise seems to contain a WD Scorpio Blue disk. It seems that the ...
3
votes
2answers
1k views

How to create a new partition on a hard disk?

How do I create a new partition on a hard disk, from the terminal? I've been reading the man pages for fdisk and mkfs, but they're confusing. I need to know how to create a new partition on a blank ...
9
votes
1answer
4k views

How does partprobe work?

I was looking for a way to refresh the scsi bus (or any other bus, for that matter) that would allow my kernel ( 2.6.18-194-el5 on CentOS 5.5) to know about the partitions on a drive, and I couldn't ...
2
votes
1answer
923 views

fdisk unable to open

I am having problems using fdisk to clear the partition table of my sd card. The sd card is identified in the /dev folder when inserted into the sd card reader, but when the following command in run: ...
6
votes
2answers
6k views

Finding the sector size of a partition

I answered this question, assuming that the *.img file had a sector size of 512. How do I query a device, or the image of a device, to find the correct sector size?