[parted-devel] parted with iPod 80GB

Mario Rossi mariofutire at googlemail.com
Tue Mar 20 23:38:46 CET 2007


On 3/20/07, David Cantrell <dcantrell at redhat.com> wrote:
> On Tue, 2007-03-20 at 11:54 +0530, Debarshi 'Rishi' Ray wrote:
> > > We don't yet have write support for non-512 byte sector sizes with the
> > > DOS disk label.  We have read support.  Write support has been written,
> > > but not tested.  Will be soon, but I imagine that's the problem you're
> > > hitting.
> >
> > However from the original post, it seems that he got an error while
> > using the 'print' command in Parted. 'print' should only involve
> > reading, isn't it?
>
> Good point.  And the read support is there in version 1.8.5.

Indeed. I have problems READING the partition.
Using the files I've uploaded and a loop device you can see exactly
the partition table as it is in the iPod.

losetup -f ipod.sda

[root at thinkpad ~]# fdisk -b 2048 /dev/loop0

Command (m for help): p

Disk /dev/loop0: 50 MB, 50331648 bytes
255 heads, 63 sectors/track, 1 cylinders
Units = cylinders of 16065 * 2048 = 32901120 bytes

      Device Boot      Start         End      Blocks   Id  System
/dev/loop0p1               1           4      128394    0  Empty
/dev/loop0p2               5        2432    78011640    b  W95 FAT32
Partition 2 has different physical/logical endings:
     phys=(1023, 254, 63) logical=(2431, 254, 63)

Of course fdisk reports errors because the file contains only the
first 48MB of the disk. It needs to be told the sector size, but for
the rest it shows the partition table in the same way as when I run it
on the real iPod.

And parted shows the same error

[root at thinkpad ~]# parted /dev/loop0
GNU Parted 1.8.6
Using /dev/loop0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Error: Unable to open /dev/loop0 - unrecognised disk label.

I don't know whether the problem is in the sector size, or in the
strange partition table.
I hope you can use it to test parted.

Cheers



More information about the parted-devel mailing list