Non-RAW images and NTFS aren't properly detected in partition2disk
Bug #494803 reported by
Kasimir Gabert
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.
Changed in eucalyptus: | |
importance: | Undecided → High |
assignee: | nobody → Dmitrii Zagorodnov (dmitrii) |
status: | New → In Progress |
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 |
Changed in eucalyptus (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Triaged |
To post a comment you must log in.
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.