Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [partition]

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.

Filter by
Sorted by
Tagged with
114
votes
4answers
9k 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 ...
532
votes
37answers
563k views

Tracking down where disk space has gone on Linux?

When administering Linux systems I often find myself struggling to track down the culprit after a partition goes full. I normally use du / | sort -nr but on a large filesystem this takes a long time ...
39
votes
5answers
19k 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 ...
61
votes
6answers
142k 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% ...
32
votes
2answers
33k 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 correct:...
73
votes
6answers
89k 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" ...
46
votes
3answers
27k 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?
5
votes
2answers
1k 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 ...
40
votes
9answers
21k views

What is the /boot partition really for?

I'm reading a relatively old text on Linux partitions and file systems (the LPIC 1 Certification Bible). It says: Some versions of the Linux boot loaders cannot access a kernel that is outside ...
6
votes
2answers
6k views

How to read one filesystem from a whole disk image file?

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 ...
4
votes
2answers
443 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 ...
81
votes
3answers
148k 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 partitions,...
58
votes
6answers
33k 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 ...
17
votes
3answers
96k 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 ...
5
votes
2answers
651 views

Partition still encrypted with luks after wipefs

I wiped the disk using wipefs -a /dev/sda. I happily formatted the disk, and it seems that when I'm about to mount /dev/sda3 it says "unknown file system type crypto_LUKS". I did no encryption on ...
91
votes
12answers
174k 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 - ...
33
votes
6answers
149k 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 ...
48
votes
5answers
69k views

How to safely turn off swap permanently and reclaim the space? (on Debian Jessie)

I installed Debian Jessie with default partitioning on my SSD drive. My current disk partitioning looks like this: As I have 16GB of RAM, I assume I don't need swap. But since I have other disk ...
18
votes
1answer
27k views

How to mount multiple directories on the same partition?

I am installing an SSD and would like to put / on the SSD and /home, /var, and /tmp on the HDD. My current distro is Kubuntu but I would not mind trying another distro if this procedure can be ...
13
votes
2answers
25k 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 ...
15
votes
1answer
44k views

How do I resize partitions and filesystems on them?

How can I resize partitions from the command line? I've heard of GParted, but I don't want to use a GUI program.
16
votes
3answers
10k views

How to create a formatted partition image file from scratch?

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 ...
10
votes
5answers
12k views

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

I need to clone a NTFS partition from a damaged, near to die hard disk (SCSI, if this matters) to a new one (SATA). I've installed the last version of Hiren's Boot CD utilities on a USB stick, and ...
9
votes
6answers
16k views

How do I find the offset of an ext4 filesystem?

I have a failing hard drive that is unable to write or read the first sectors of the disk. It just gives I/O errors and that is all there is. There are other areas on the disk that seem (mostly) fine. ...
9
votes
3answers
6k 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?
5
votes
1answer
570 views

Use a partitioned live usb

I have a USB device and i'm trying to create it in a way that it has 2 partitions: one for a live linux disc and the other for document storage. I created the partitions using gparted and and set a ...
0
votes
0answers
72 views

How shall I split a partition containing `/` and `/home` into two logical volumes? [duplicate]

I have a laptop running Lubuntu 18.04, with a single hard drive as a bootable disk, and two partitions on it: EFI System Partition and a bigger partition contains everything else (e.g. / an /home). $...
-2
votes
1answer
144 views

How can I split a monolithic partition into two, one for `/` and one for `/home`? [duplicate]

Right now, I have everything in a partition (except EFI system partition). How can I split the partition into two, one for / and one for /home? How would you use parted to do that step by step? How ...
30
votes
5answers
87k 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 ...
52
votes
9answers
51k 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 ...
35
votes
5answers
90k views

How to find the type of an img file and mount it?

I have to mount a .img file but I don't know what type of .img it is. How can I figure out what type of .img file it is? # mount -t auto -o ro,loop gmapsupp.img /mnt/iso/ mount: you must specify the ...
29
votes
7answers
20k 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 ...
18
votes
1answer
8k 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
8
votes
2answers
9k views

recovering ext4 partition after dd'ing over start of HD

I accidentally used dd and wrote over the first 208MB of my external disk. What I wrote over is a partition on its own (Debian nestinstaller) so what I see now is not my old (now damaged) ext4 ...
5
votes
1answer
2k views

Partially overwrote /dev/sda, can I recover anything?

I was messing around with my new hard drive, which only contains some personal files, and to check its write speed, I typed: sudo dd if=/dev/zero of=/dev/sda, /dev/sda/ being the new 2 TB connected to ...
6
votes
2answers
5k 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.
1
vote
2answers
4k views

How to install Nitrux OS using znx?

I want to check out Nitrux which you can deploy using znx (how to here). znx does not seem to open correctly in Fedora, which is why I would like to deploy it using the terminal. The how-to says that ...
4
votes
2answers
3k views

Linux Mint: drives' map changing at reboot brings fstab error

I've set up fstab to auto mount media drives on a Linux Mint machine. The OS is installed on a IDE/ATA Disk while 3 SATA disks hold data to share. The BIOS has the ATA disk as first boot device. All ...
4
votes
5answers
5k views

Moving /etc to separate partition

How to put /etc on separate partition? Obviously i can't do that by editing /etc/fstab like i did with /home, because... it's in /etc. I want /etc and /home on one partition (sda7), and the rest on ...
1
vote
2answers
708 views

4-drive RAID-6 implementation and GPT

My current idea is to create 1x software RAID-6 with 4 member drives using mdadm. Specifically, they would be 1TB HDDs on SATA in a small server. System: Linux Debian Jessie 8.6. That makes 2TB of ...
0
votes
3answers
120 views

How shall I improve the current partitioning of my hard drive for Linux filsystems? [closed]

I have had these questions for a long while, so I hope this post won't be closed. gparted shows the current partitions on my hard drive: When I partitioned my hard drive two years ago, I didn't ...
0
votes
2answers
6k views

Resize root LVM and FS in Debian 7

I have a Debian server and I would like to increase the "root" partition from 5GB to 17GB and to diminish the "home" partition from 14GB to 2GB. Here's the filesystem config: root@APP05:~# df -T Sys....
19
votes
6answers
51k 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 ...
25
votes
4answers
9k views

What's the difference between creating mdadm array using partitions or the whole disks directly

Can someone please explain to me, what the difference is between creating mdadm array using partitions or the whole disks directly? Supposing I intend to use the whole drives. Note, that they are with ...
16
votes
1answer
38k 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, ...
15
votes
4answers
38k views

Why are partition size and df output different?

I have a partition /dev/sda1. Disk utility shows it has the capacity of 154 GB. df -h shows Filesystem Size Used Avail Use% Mounted on /dev/sda1 123G 104G 14G 89% / ...
37
votes
1answer
19k views

What is the difference between a name and a label in gparted?

When I create a new partition on my disk using GParted, I have the option to set both a name and a label. Some partitions I have already have both, some only a label. If I right-click on an existing ...
29
votes
6answers
13k views

File systems vs partitions vs directories

I am new to Linux so pardon me for the possible confusion you may encounter in this question. From what I understand, filesystem specifies how a partition stores/manages file, with standards such as ...
18
votes
5answers
31k views

Arch GRUB asking for /run/lvm/lvmetad.socket on a non lvm disk

I am running this script based on the ArchWiki setup procedure. It fails on the GRUB configuration step I am using the archlinux-2013.12.01-dual.iso inside VMware Player with 1 GB ram, sda is 810 MB....
11
votes
5answers
19k views

How to format a partition inside of an img file?

I created an img file via the following command: dd if=/dev/zero bs=2M count=200 > binary.img It's just a file with zeroes, but I can use it in fdisk and create a partition table: # fdisk binary....