Non-RAW images and NTFS aren't properly detected in partition2disk

Bug #494803 reported by Kasimir Gabert
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Eucalyptus
In Progress
Wishlist
Dmitrii Zagorodnov
eucalyptus (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Currently partition2disk determines if a given image is a particular partition or an entire disk based on the output of the "file" command.

In particular, it currently tests for "boot sector" or "Qcow" to check for a full image, which will falsely detect an NTFS partition as a partition table.

Something similar to the uploaded patch should fix this.

Revision history for this message
Kasimir Gabert (kasimir-g) wrote :
Changed in eucalyptus:
importance: Undecided → High
assignee: nobody → Dmitrii Zagorodnov (dmitrii)
status: New → In Progress
Revision history for this message
H.M. (cybrocop) wrote :

There is an issue with partition2disk for any Qcow image.

The current version of partition2disk checks for the existing of the text "partition" as output of the file command:

if (!($magic =~ /partition [0-99]/) && !($magic =~ /Qcow/)) { # if not a disk image already

However, at least on Ubuntu 10.04, the file command doesn't output such information for Qcow partitions.

The output of the "file" command on my Ubuntu 10.04 is as follows:

win2k3.img: Qemu Image, Format: Qcow , Version: 1 , Disk Size could be: 117440512 * 256 bytes

The above Qcow image contains 2 partitions: http://img710.imageshack.us/img710/629/qtparted.png

However, when I convert this to a raw partition, the output is as follows:

win2k3.raw: x86 boot sector, Microsoft Windows XP MBR, Serial 0x3dc23dc2; partition 1: ID=0x7, active, starthead 1, startsector 63, 62830152 sectors; partition 2: ID=0x6, starthead 254, startsector 62830215, 192780 sectors, code offset 0xc0

------

The current code will result in the following log entry every time a Qcow instance is run:

httpd-nc_error_log:cannot find the first partition on this disk, giving up

It looks like partition2disk should either ignore Qcow images or figure out a way to edit them appropriately.

Revision history for this message
H.M. (cybrocop) wrote :

Patch to gracefully ignore Qcow-formatted images.

H.M. (cybrocop)
summary: - NTFS partitions aren't properly detected in partition2disk
+ RAW images and NTFS aren't properly detected in partition2disk
summary: - RAW images and NTFS aren't properly detected in partition2disk
+ Non-RAW images and NTFS aren't properly detected in partition2disk
Thierry Carrez (ttx)
Changed in eucalyptus (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
graziano obertelli (graziano.obertelli) wrote :

lowering priority since Euca 3 will have windows support natively. Associating this bug to 2.0 series.

Changed in eucalyptus:
importance: High → Wishlist
Revision history for this message
Andy Grimm (agrimm) wrote :

This issue is now being tracked upstream at http://eucalyptus.atlassian.net/browse/EUCA-2672

Please watch that issue for further updates.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.