[Top][All Lists]

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

Re: Parted 1.5.1-pre1

From: Ben Collins
Subject: Re: Parted 1.5.1-pre1
Date: Fri, 2 Feb 2001 11:51:13 -0500
User-agent: Mutt/1.3.12i

On Fri, Feb 02, 2001 at 02:31:03PM -0200, Andrew Clausen wrote:
> Dan Knapp wrote:
> > 
> > > Is there much desire (other than mine :) for a mechanism to save the
> > > partition table to disk (in some simple plain text format)? Seems it
> > > would be nice to recreate a corrupt partition table using a backup
> > > (other than dd'ing the first few sectors).
> > 
> >   It's interesting, but I don't see why you consider this superior to
> > dd-ing?
> There's lots to dd.  MSDOS partitions, for example, have a linked
> list of logical partitions.  So, if you have, say, 3 logical
> partitions, you must save:
> (1) the main partition table
> (2) the extended partitoin table
> (3) the logical partition tables for partitions 6 and 7 (the
> second 2 logical partitions)
> Also, you might not want to interfere with boot loaders, which generally
> share the same sectors (just, different parts of the sector ;-)
> Of course, dd can handle that, but it's a little more tricky.

There's also the fact that this can further support partition
descriptions for mass installs. This same mechanism can take a flat file
description of a partition table something like this:

Label: sun

Partition: 1
Type: ext2
Start: 0
Size: all

Partition: 2
Type: linux-swap
End: end
Size: 128M

This is pretty simplistic (maybe an XML format would be easier to
parse). Basically this would say "make a swap partition 128M in size at
the end of the disk, and the make the rest of the disk an ext2
partition". I'm sure you can see the possibilities here. The only
alternative right now is to script the parted program.

The output I was proposing would be in similar format, but include the
actual start and length, as opposed to keyword usage ("all", "end").

Also, the use of a flatfile description as opposed to dd'ing means you
don't carry around the boot loader and other things, which may not be
appropriate for some situations (such as using the same partition table
on an IDE disk and a SCSI disk, since the boot loader will not have the
same root fs device).

Obviously this is a large undertaking, but I'm willing to tackle it :)

/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  address@hidden  --  address@hidden  --  address@hidden  '

reply via email to

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