Dear Maintainer, the following bug happens when 'parted' tries to analyze to the image file https://www.olimex.com/wiki/images/b/b4/A20_OLinuxino_Micro_debian_34_90_release_10.torrent that contains the operating system (Debian Wheezy) for the (quite remarkable) embedded system https://www.olimex.com/wiki/A20-OLinuXino-MICRO The partition table of this image file cannot be properly read or modified with parted. Older versions of parted crash on this image file. Newer versions report a the partition table is dangerously different from the real one, so an user that uses parted to change partitions may destroy all the data. As a comparison, see attachments fdisk.txt and cfdisk.txt to see what the partizion table really looks like The attachment fdisk.txt was generated by the command # echo p | fdisk imagefile > /tmp/fdisk.txt that was ran inside a Jessie-amd64 machine. The attachment cfdisk.txt was generated by the command # cfdisk -P s /dev/mmcblk0 that was ran inside a the A20-OLinuXino-MICRO itself (since the Jessie version of cfdisk does not print partitions anymore (!!)) This bug is twofold ------------ Using parted 3.2-7 (Debian jessie amd64) to read the above image file seems to work, but the partition table is dangerously different from the real one, so an user that uses parted to change partitions may destroy all the data See attachment parted.txt---------- Using parted 2.3-12 (Debian wheezy, two archs) parted crashes by Assertion (head_size <= 63) (as in bug 685557) See attachment crash....txt --------- Best regards and thanks in advance. a.
It seems that parted has decided that the MBR looks more like a FAT boot sector than an MBR. Please attach the first kb of the image.
here is the MBR.
I also have a proposal. When parted opens a disk, it should both check
if the whole disk is formatted as a VFAT (or other) volume, and check if
there is a partition table of some kind. In case that both checks are
true, it should stop and warn the user that the disk structure is
ambiguous, and ask for instructions.
a.
Il 15/06/2015 15:31, Phil Susi ha scritto:
You are right.
I used the command
# dd conv=notrunc if=/dev/zero of=a20_Lime_debian_3.4.90_release_3.img
bs=446 count=1
to delete the boot code.
Now the wheezy version of parted reports:
This is still unsupported.
while th Jessie version reports
vvvvvvvvvvvvvvvvvvvvvvvvvvv
Model: (file)
Disk
/home/andrea/mnt/frivolo/media/R2D2/olimex/a20_Lime_debian_3.4.90_release_3.img:
3980MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 17,8MB 16,8MB primary fat16
2 17,8MB 3980MB 3963MB primary ext3
^^^^^^^^^^^^^^^^^^^
or in sectors
that is exactly what cfdisk reports
THX
a.
ps: anyway I think that 'parted' should check as expressed above. You
may want to change the bug title
Il 15/06/2015 15:31, Phil Susi ha scritto:
You forgot to attach the file. Not a bad idea.
Il 17/06/2015 19:24, A Mennucc1 ha scritto: for real ;->