[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with DISK IMAGING

Subject: Problems with DISK IMAGING
Date: Tue, 14 Nov 2000 14:44:27 +0100

Dear developers of parted,

today I started playing around with parted-1.2.13 to create disk images. I
found the following problems:

1. The documentation says a Windows partition in the disk image can be
created with:

        # parted /root/cdimage/diskimage mklabel msdos mkpart primary fat 0

   This leads to an error message. The statement works if you say:

        # parted /root/cdimage/diskimage mklabel msdos mkpart primary fat 0

2. If you try to copy a disk image from a CD to the disk parted fails,
because it tries to open the disk image on CD in readwrite mode. Instead it
should have a second attempt and try to open the image readonly. I made the
following change to work with disk images on CD. Maybe there should be an
additional warning that the device has been opened read only.

static int
_do_open (PedDevice* dev)
     dev->fd = open (dev->path, O_RDWR);
     if (dev->fd == -1) {
       dev->fd = open (dev->path, O_RDONLY);
       if (dev->fd == -1) {

         ped_exception_throw (
                     "Error opening %s: %s",
                     dev->path, strerror (errno));
         return 0;

#ifdef linux
     _flush_cache (dev);

     return 1;

best regards


Michael Loehr
EMEA ATS, Storage Systems Group
Dpt. 0005, Mainz, Germany, 55131-82
Phone +49-6131-84-3396, Fax -6592

< A bug in the right place is a feature. >

reply via email to

[Prev in Thread] Current Thread [Next in Thread]