Bug 668967 - livecd-iso-to-disk --format aligns partitions wrong
Summary: livecd-iso-to-disk --format aligns partitions wrong
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: livecd-tools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-12 09:25 UTC by Peter Hjalmarsson
Modified: 2011-03-12 04:39 UTC (History)
6 users (show)

Fixed In Version: livecd-tools-15.5-1.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-12 04:39:43 UTC


Attachments (Terms of Use)

Description Peter Hjalmarsson 2011-01-12 09:25:36 UTC
Description of problem:
$ sudo livecd-iso-to-disk --format --overlay-size-mb 1000 Hämtningar/boot.iso /dev/sdb
Verifying image...
/home/xake/Hämtningar/boot.iso:   55bd65bbf368b70045abd24db9b96c53
Fragment sums: ec2f722c4f9964abc159dc8d6e731b295aa9d5fbfd4eace93cacef992435
Fragment count: 20
Press [Esc] to abort check.
Checking: 100.0%

The media check is complete, the result is: PASS.

It is OK to use this media.
WARNING: THIS WILL DESTROY ANY DATA ON /dev/sdb!!!
Press Enter to continue or ctrl-c to abort

Varning: The resulting partition is not properly aligned for best performance.



$ sudo env LC_ALL="C" sfdisk -l /dev/sdb

Disk /dev/sdb: 1020 cylinders, 125 heads, 62 sectors/track
Warning: The partition table looks like it was made
  for C/H/S=*/21/6 (instead of 1020/125/62).
For this listing I'll assume that geometry.
Units = cylinders of 64512 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1   *      0+  62740-  62740-   3952606   83  Linux
		start: (c,h,s) expected (0,5,5) found (0,0,35)
		end: (c,h,s) expected (1023,20,6) found (492,20,6)
/dev/sdb2          0       -       0          0    0  Empty
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty


Version-Release number of selected component (if applicable):
livecd-tools.x86_64                 1:15.2-2.fc15

How reproducible:
Always

Steps to Reproduce:
1. get a 4GB usb-stick and boot.iso for Fedora14
2. run livecd-iso-to-disk with --format
  
Actual results:
   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1   *      0+  62740-  62740-   3952606   83  Linux
		start: (c,h,s) expected (0,5,5) found (0,0,35)
		end: (c,h,s) expected (1023,20,6) found (492,20,6)
/dev/sdb2          0       -       0          0    0  Empty
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty


Expected results:
Disk /dev/sdb: 1020 cylinders, 125 heads, 62 sectors/track
Units = cylinders of 3968000 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1          0+   1019    1020-   3952469   83  Linux
/dev/sdb2          0       -       0          0    0  Empty
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty


Additional info:
The current partition table is not even possible to look at with cfdisk.

Comment 1 Brian Lane 2011-01-27 19:30:59 UTC
I don't really trust the output of sfdisk, CHS really isn't an issue with modern drives (especially flash). Aligning on sector size is the important part. The warning from parted is just a warning, it prefers to align things at 1MiB.

livecd-iso-to-disk aligns the start at 34 512b sectors (17408 bytes). It might be worthwhile to change this to align based on sectors instead of bytes so that 4k sector devices won't have problems in the future.

Comment 2 Brian Lane 2011-02-05 02:01:47 UTC
parted now prefers 1MiB alignment so we may as well use that, not sectors.

commit 09f64c7066746023d69e78c2673ded67ec30919f

Comment 3 Fedora Update System 2011-02-16 00:24:03 UTC
livecd-tools-15.4-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/livecd-tools-15.4-1.fc15

Comment 4 Fedora Update System 2011-02-16 01:30:24 UTC
livecd-tools-15.4-1.fc15 has been pushed to the Fedora 15 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update livecd-tools'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/livecd-tools-15.4-1.fc15

Comment 5 Peter Hjalmarsson 2011-02-16 09:33:17 UTC
Now the message from livecd-iso-to-disk is gone.

Now I will just need to figure out why the stick will not start, but that is another bug.

Comment 6 Fedora Update System 2011-02-19 00:52:51 UTC
livecd-tools-15.5-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/livecd-tools-15.5-1.fc15

Comment 7 Fedora Update System 2011-02-19 02:18:20 UTC
livecd-tools-14.2-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/livecd-tools-14.2-1.fc14

Comment 8 Fedora Update System 2011-02-24 20:55:05 UTC
livecd-tools-14.2-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2011-03-12 04:39:08 UTC
livecd-tools-15.5-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


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