Bug 550182 - FC12 installation causes rootfs and swap partitions to overlap (=>fs corruption)
FC12 installation causes rootfs and swap partitions to overlap (=>fs corruption)
Product: Fedora
Classification: Fedora
Component: parted (Show other bugs)
All Linux
low Severity urgent
: ---
: ---
Assigned To: Axel Thimm
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-12-23 17:57 EST by Tigran Aivazian
Modified: 2009-12-29 07:45 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-12-23 18:51:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tigran Aivazian 2009-12-23 17:57:25 EST
Description of problem:

Installing Fedora Core 12 from Live system via USB results in the system with overlapping partitions for rootfs and swap.

Version-Release number of selected component (if applicable):

How reproducible: Always.

Steps to Reproduce:
1. Prepare Fedora Live USB image via liveusb-creator (under Windows)
2. Boot into the USB image
3. Install to Hard disk.
Actual results:

See fdisk -l /dev/sda output:

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

Device Boot Start End Blocks Id System
/dev/sda1 * 1 5099 40957686 7 HPFS/NTFS
/dev/sda2 5100 11474 51200000 83 Linux
/dev/sda3 11474 11601 1024000 82 Linux swap / Solaris

Here sda2 is my root filesystem (/) and sda2 is swap. Note that they overlap on cylinder 11474. 

Expected results:

The cylinder ranges should never overlap.

Additional info:

This will obviously cause filesystem corruption. In fact, just writing a swap header to the first block(s) of sda2 must have already caused a corruption. This means that the only safe way to install FC12 is to NOT create a swap device during the installation and only create it manually AFTER the install.
Comment 1 Walter Francis 2009-12-23 18:31:39 EST
This appears to be common, also happens on Gnome, XFCE, and LXDE Live's

Disk /dev/sda: 8589 MB, 8589934592 bytes
128 heads, 32 sectors/track, 4096 cylinders
Units = cylinders of 4096 * 512 = 2097152 bytes
Disk identifier: 0x000049eb

Device Boot Start End Blocks Id System
/dev/sda1 * 1 101 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 101 4095 8181098+ 8e Linux LVM
Partition 2 does not end on cylinder boundary.
Comment 2 Tigran Aivazian 2009-12-23 18:50:39 EST
UPDATE: I checked fdisk -lu output and see now that on _sector_ level they do not actually overlap but only on cylinder level. So there is NO problem here and the bug can be closed. But it is very strange/unusual to see partitions crossing cylinder boundaries...
Comment 3 Hans de Goede 2009-12-24 04:13:55 EST
cylinders are an historical artefact, and have nothing to do with the actual physical disk layout now a days, so aligning to them has no use.

In F-13, we will use some new kernel functions to query the actual physical disklayout of the disk, and start aligning to actual physical blocks (this is mostly relevant for the new and upcoming 4k physical sector disks).
Comment 4 Tigran Aivazian 2009-12-24 04:23:36 EST
Yes, I realize that. It is just after 15+ years of manually creating partitions with fdisk I "got used to" seeing everything aligned to cylinder boundaries. Hence my confusion when I saw rootfs/swap overlapping on cylinder level.

Note You need to log in before you can comment on or make changes to this bug.