[Top][All Lists]

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

Re: Hacking parted to work with BSD disklabels ...

From: Timshel Knoll
Subject: Re: Hacking parted to work with BSD disklabels ...
Date: Mon, 23 Oct 2000 16:30:57 +1100
User-agent: Mutt/1.2.5i

On Wed, Oct 18, 2000 at 05:14:44AM +1100, Andrew Clausen wrote:
> Hi Timshel!
> I haven't seen you for AGES... should meet in the city some time.
> Lunch on Mondays and Tuesdays are good :-)  Dinner on Thursday is
> also good.

OK, I'm kind of busy this week ... but I'll let you know for next week.
Exams coming up ... FUN ;-P

> Timshel Knoll wrote:
> > 
> > Hi Andrew et al,
> > 
> > I'm mucking around trying to get *BSD diskables read in parted. This should
> > be easy enough with a full disk disklabel (ie. not a disklabel in a MSDOS
> > partition), but as soon as you have a disklabel in a DOS partition it
> > creates problems ...
> hmmm, yes.
> > I'm looking for a workaround solution to this. The only ideas I have come
> > up with is to either add calls in disk_dos.c to some bsd_* stuff, or to
> > add a new FS type which is actually a wrapper around the bsd disklabel
> > stuff. I think that the former is the preferable option.
> New FS type?  Do you mean disk label type?

Both :). The problem is that a BSD disklabel can be used in two ways.
The first (and most common on ix86 boxen) is to have the BSD partition
housed within a dos primary partition, ie. a type of `extended' partition.
The second is to have the disklabel used as the main partition table
for the disk, much like a `traditional' partition table (this is usually
called 'dedicated' style. The problem is that I'll have to do one of a
number of things:
 - only use support for 1 use of the disklabel at this stage (not good)
   (I've coded quite a bit of this - for only the 'dedicated' disklabel)
 - lots of code duplication to get it working for both (also not good)
 - somehow create a nasty hack that works around both solutions
   (can't think of a way to do this)
 - Other ideas that I haven't come up with yet :-)

> BTW: I don't know much about BSD slices... are there any good docs,
> or readable code I can look at?  It's hard for me to comment, until I
> know what I'm talking about ;-)

OK, check include/linux/genhd.h for some basic info on the internals ...
struct bsd_disklabel is the actual disklabel, and is found at sector
1 in the partition that the disklabel is found in.



   Timshel Knoll <address@hidden>  for Debian email: <address@hidden>
    Second year Computer Science, RMIT   |   CS108 Tutor (Semester 2, 2000)
        Debian GNU/Linux developer, see http://www.debian.org/~timshel/
   For GnuPG public key: finger address@hidden or address@hidden

Attachment: pgptZtvUAAM9G.pgp
Description: PGP signature

reply via email to

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