[parted-devel] Parted in raw disk image file

Javier Donaire jdonaire at gmail.com
Tue Jul 11 08:01:03 UTC 2006


Hello,


I have a raw disk image file that I use as a Qemu image. I'm trying to
resize the fat16 partition in that file:

$ ls -lh disk.raw
-rw-r--r-- 1 jyuyu jyuyu 117M 2006-07-11 09:15 disk.raw

$ dd if=/dev/zero of=disk.raw bs=1 seek=500M count=1 conv=notrunc
1+0 records in
1+0 records out
1 byte (1 B) copied, 9,1e-05 seconds, 11,0 kB/s

$ ls -lh disk.raw
-rw-r--r-- 1 jyuyu jyuyu 501M 2006-07-11 09:17 disk.raw

$ /sbin/parted disk.raw print
Disk geometry for /tmp/disk.raw: 0kB - 524MB
Disk label type: msdos
Number  Start   End     Size    Type      File system  Flags
1       27kB    122MB   122MB   primary   fat16        boot

$ /sbin/parted disk.raw resize 1 27kB 524MB
No Implementation: GNU Parted cannot resize this partition to this
size.  We're working on it!
(this command fails for every start/end combination I've tried)

Can parted resize partitions in image files instead of physical devices?

Thanks.



More information about the parted-devel mailing list