Bug 550182 - FC12 installation causes rootfs and swap partitions to overlap (=>fs corruption)
Summary: FC12 installation causes rootfs and swap partitions to overlap (=>fs corruption)
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: parted
Version: 12
Hardware: All
OS: Linux
low
urgent
Target Milestone: ---
Assignee: Axel Thimm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-23 22:57 UTC by Tigran Aivazian
Modified: 2009-12-29 12:45 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-12-23 23:51:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tigran Aivazian 2009-12-23 22:57:25 UTC
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 23:31:39 UTC
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 23:50:39 UTC
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 09:13:55 UTC
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 09:23:36 UTC
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.