Disk partitioning is the act of dividing a hard disk drive into multiple logical storage units referred to as partitions, to treat one physical disk drive as if it were multiple disks.

learn more… | top users | synonyms (1)

46
votes
1answer
2k views

Why are there so many different ways to measure disk usage?

When I sum up the sizes of my files, I get one figure. If I run du, I get another figure. If I run du on all the files on my partition, it doesn't match what df claims is used. Why are there so many ...
22
votes
2answers
7k views

What mount points exist on a typical Linux system?

I have 2 questions. During Linux installation we specify memory space for 2 mount points - root and swap. Are there any other mount points created without the users notice? Is this statement ...
14
votes
4answers
3k views

The merits of a partitionless filesystem

I ran into something a couple of weeks ago that I'd never seen before: A filesystem (ext3 I believe) installed to a storage device without a partition. In essence /dev/sdb was the entire filesystem. I ...
10
votes
2answers
45k views

Can I resize the root partition without uninstalling and reinstalling Linux (or losing data)?

I have started using a machine that has both Debian and Windows 7 installed. However, after installing some programs I started getting a message that there is not enough space. I knew that the system ...
4
votes
1answer
1k views

Reading a filesystem from a whole disk image

I ran these commands: VBoxManage clonehd d6b9f0a5-98df-48ca-83c8-91a0809ec349 --format RAW Debian.raw sudo dd if=~/.VirtualBox/HardDisks/Debian.raw of=/dev/sda5 When I try to mount the partition, I ...
25
votes
3answers
7k views

Are there any side effects when two distros share a swap partition?

In order to save disk space, I want to have two OS installations share a single swap partition (a dual-boot). Is this a good idea?
38
votes
6answers
16k views

Different linux distros sharing the same /home folder?

What is the best way to share the same /home directories between different linux distribution? I mean, I want to have both, say, Fedora and Arch, and I want to find my files at home no matter which ...
21
votes
1answer
23k views

How can I increase the number of inodes in an ext4 filesystem?

I had a problem (new to me) last week. I have a ext4 (Fedora 15) filesystem. The application that runs on the server suddenly stopped. I couldn't find the problem at first look. df showed 50% ...
23
votes
3answers
26k views

How to copy the partition layout of a whole disk using standard tools

I want to take a backup of the whole partition layout of a hard drive, including logical drives, so that I can restore that layout to another disk. I do not want to copy the contents of the ...
19
votes
4answers
14k views

Clear unused space with zeros (ext3,ext4)

How to clear unused space with zeros ? (ext3,ext4) I'm looking for something smarter than cat /dev/zero > /mnt/X/big_zero ; sync; rm /mnt/X/big_zero Like FSArchiver is looking for "used space" ...
3
votes
1answer
8k views

How can I shrink a LUKS partition, what does `cryptsetup resize` do?

I am in progress of resizing a LUKS encrypted partition that contains a single ext4 filesystem (no LVM or something). The cryptsetup FAQ recommends to remove the old partition and recreate it, but ...
6
votes
3answers
3k views

How to clone a NTFS partition (WinXP) from a damaged disk to a new one?

I'm an Italian Windows programmer. I know almost nothing of Linux, so please be patient if the question is dumb and pardon my bad english. I need to clone a NTFS partition from a damaged, near to die ...
3
votes
2answers
323 views

Change main partition size to install another distribution

I have CentOS 5.5 installed, I have no un-partitioned space and the only ext3 partition I have is huge with lots of free space. Can I change that partition size in order to allocate another one? I ...
22
votes
7answers
5k views

How can I use DD to migrate data from an old drive to a new drive?

I am upgrading the internal SATA hard drive on my laptop from a 40G drive to a 160G drive. I have a Linux/Ubuntu desktop which has a SATA card. I would actually like to do the same thing for a couple ...
2
votes
3answers
117 views

how should I mount my ext4 partition in fstab

so that it appears in Thunar's sidebar under the name 'Schijf-2'? I am running linux mint13 xfce and this has been a headache causer for the last couple of days. the UUID of this partition is: this ...
2
votes
2answers
2k views

How to mount ext3,ext4 sitting on VDI VirtualBox HDD?

How to mount ext3, ext4 partition sitting on "Fixed-Size VDI" VirtualBox HardDisk ? To be more specific, I ma interested in case when VM is not running.
30
votes
9answers
12k views

Why put things other than /home to a separate partition?

So recently a Debian 5.0.5 installer offered me to have separate /usr, /home, /var and /tmp partitions (on one physical disk). What is the practical reason for this? I understand that /home can be ...
9
votes
1answer
13k views

How to (safely) move /tmp to a different volume?

Today the /tmp directory filled up on a machine at work. The problem was, it was on the root partition which wasn't very big. In order to fix this, a co-worker created a /new/tmp directory elsewhere, ...
11
votes
2answers
14k views

How to reduce Volume Group size in LVM?

[root@localhost ~] vgdisplay --- Volume group --- VG Name vg_root System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 7 VG ...
6
votes
3answers
2k views

Primary vs Logical partition

I know that you can only have 4 primary partitions on a hard drive. But if you're using less than 4, is there a benefit/penalty for using logical partitions?
4
votes
4answers
6k views

Backup of LVM2 logical volume

I'd like to make backup on external drive of LVM2 logical volume in dd manner. Approach I consider is to make lv on extranl drive with identical size copy with dd (Please let me know if you see ...
3
votes
1answer
59 views

Command to reread partitions from media

When I insert media (e.g. an SD card) the system (Ubuntu 12.04) reads the partition table and creates all the /dev/*[1234] links to each partition. If I repartition the media I have to physically ...
3
votes
1answer
2k views

LVM2 partition alignment

How to do the following with Linux tools : LVM partition alignment and alignment of partition on LVM ? What in case where I want to setup LVM partition (for "pv") and then partitions ? To be more ...
2
votes
5answers
5k views

How do I resize a partition in Ubuntu linux without losing data?

I ran out of space in my on the drive only to find that there was another unformatted partition in the system that is available. I now want to resize the current partition to take in the empty ...
5
votes
2answers
878 views

How can I diagnose and repair missing drive space?

I have a small ext3 / partition on a 2T drive which appears to have a discrepancy in its free space. How can I determine what is causing it and how it can be fixed. After trying everything I could ...
3
votes
3answers
110 views

Figuring out what OS is on which partition?

So I have both Ubuntu and Crunchbang installed on my laptop, and I'm trying to figure out which one is on which partition. I'm going to install another OS (probably BT) and need to know what ...
1
vote
1answer
200 views

Resize an extended partition to the whole drive

I previously had the following partitions on my sda: - - /home - /var - /tmp - swap Now I deleted /var, /tmp and the swap partition of that drive. This leaves me with around 35G of empty space. ...
0
votes
1answer
4k views

How to recover the partition table (Windows, Ubuntu) of an unallocated disc?

The following screenshot shows the current state of my hard disc. The unallocated part of the disc used to contain two operating systems: Windows and Ubuntu, in this order. Windows has been ...
3
votes
1answer
10k views

How do I determine the new size for resize2fs?

I want to shrink an ext4 filesystem to make room for a new partition and came across the resize2fs program. The command looks like this: resize2fs -p /dev/mapper/ExistingExt4 $size How should I ...
13
votes
6answers
6k views

What's the best way to partition your drive?

I usually install Linux on a single partition since I only use it as a personal desktop. However every now and then I reinstall the box and what I simply do is to move my files around with an ...
9
votes
3answers
22k views

How do I partition a USB drive so that it's bootable and has a Windows-compatible data storage partition?

split from here I have a 16gb flash drive, which I want a live ISO to boot from (via unetbootin or something similar). It'll be some 32bit distro that I can plug-in and boot on whatever computer I ...
6
votes
4answers
6k views

Partition manager that can handle LVM?

I have been looking but neither Gparted nor KDE Partition Manager can handle LVM. Working with the command line is probably fine but it would be clearer to have a GUI tool here. Does such thing exist? ...
22
votes
10answers
30k views

List partition labels from the command line

Is there a command that will list all partitions along with their labels? sudo fdisk -l and sudo parted -l don't show labels by default. EDIT: (as per comment below) I'm talking about ext2 labels - ...
11
votes
1answer
981 views

What is the difference between “extended” partition and “logical” partition

What is the difference between "extended" partitions and "logical" partitions on my hard disk? What's the need for each? I am using Linux
7
votes
2answers
707 views

Creating formatted partition from nothing

I need to create filesystem with just one partition from nothing (/dev/zero). I tried this sequence of commands: dd if=/dev/zero of=mountedImage.img bs=512 count=131072 fdisk mountedImage.img n ...
4
votes
3answers
997 views

When and why do block devices need to be partitioned? [duplicate]

Possible Duplicate: The merits of a partitionless filesystem So I've got a block device, say /dev/sda or /dev/loop0. Clearly if I want to boot from the former, or I want to subdivide it ...
2
votes
1answer
8k views

Installing debian 7 besides windows 8

I ask this question in superuser but no one can answer my question, I hope any one can help me: I bought a VAIO laptop which Windows 8 preinstalled on it in UEFI mode. Now I want to install Debian 7 ...
13
votes
3answers
7k views

How can I move the home directory to a separate partition?

I would like to install another distribution but keep my home directory. Is there a way to move the home directory to a separate partition? I don't have an external hard drive available to back up my ...
10
votes
4answers
5k views

Convert image of a partition into image of a disk with partition table

I have an image of an existing partition generated with dd if=/dev/sdXN of=image.bin. Now I want to use this image as the basis for a virtual machine. I know how to convert the image into a format ...
8
votes
1answer
3k views

How can I quickly copy a GPT partition scheme from one hard drive to another?

On a non GPT partition table I can do sfdisk -d /dev/sda | sfdisk /dev/sdb But sfdisk doesn't support GPT partition tables. What can I use instead? I'm looking for a one or two command solution, ...
8
votes
1answer
500 views

Can I convert an ext3 partition into ext4 without formatting?

my home directory is on a separate partition which still uses ext3. Is there a way to convert this partition into ext4 in a non-destructive way?
7
votes
3answers
3k views

How to read the in-memory (kernel) partition table of /dev/sda?

I accidentally overwrote my /dev/sda partition table with GParted (full story on AskUbuntu). Since I haven't rebooted yet and my filesystem is still perfectly usable, I was told I might be able to ...
7
votes
6answers
30k views

How to extend CentOS 5 partition on VMware?

I have a CentOS 5 virtual machine and I added 20GB more to disk size. How do I initialize and extend the available space? I'm new to Linux, so what should I do? I tried loading GParted as well, ...
7
votes
2answers
7k 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?
6
votes
2answers
7k views

How can I resize my root partition in Debian?

I am trying to add space to my root partition and am really not sure the safest way to go about it. I have read this thread, Can I resize the root partition without uninstalling and reinstalling ...
4
votes
2answers
2k views

Can I split /boot to a different partition on a single partition system?

I have set up my system, configured it and everything, using only one partition for / (ext4). So no separate home, boot, swap etc. So the question is: Is there a way to go from this configuration ...
4
votes
1answer
372 views

Problems moving home partition

I was running low in disk space on my Linux box, Ubuntu 10.10 Desktop, (specifically on my /home partition) so I added another disk to it and I am trying to move the home partition into it. I am ...
3
votes
2answers
186 views

Repartitioning harddisk

Saturday I have to repartition my HDD. On my server I have 72GB HDD space which is not very much. Currently my system is partitioned as follows: Partition size: Filesystem Size Used ...
3
votes
6answers
6k views

How can I solve the issue about mounting my Windows 8 NTFS partition on Linux Mint?

I used Ubuntu for long even along Windows and SOMETIMES I got this problem for mounting the corresponding NTFS partition at the beginning, however with a pair of command lines to the console I got it ...
1
vote
2answers
95 views

Accidentally reformatted /dev/sda1 - any hope for recovery?

All day today, I've been reformatting a USB flash drive repeatedly and I was doing this multiple times in a row, and I began to grow a little too careless... Without paying attention, I accidentally ...