Subject: Re: mbrlabel, disklabel, and MSDOS drives with extended partitions
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Laine Stump <lainestump@rcn.com>
List: netbsd-help
Date: 07/24/2001 00:27:58
Manuel Bouyer <bouyer@antioche.lip6.fr> writes:
> On Mon, Jul 23, 2001 at 12:34:00AM -0400, lainestump@rcn.com wrote:
> > So: 1) Why doesn't the fake disklabel that's generated have all the
> > stuff that mbrlabel sees?
>
> Because it would bloat the kernel too much ?
Would a read of another sector, and a bit of arithmetic really bloat a
4MB kernel that much?
> > and 2) Since it doesn't, how do I get all
> > the partitions mounted without writing a disklabel to the disk (since
> > that will apparently screw up the boot record for the existing OS,
> > right?)
>
> mbrlabel should be able to write an in-core disklabel (that is, a disklabel
> maintained in kernel memory but not written to disk). Once you've run
> mbrlabel, what does disklabel say ?
No joy, see below - mbrlabel says that it has updated the in-core
disklabel with the other partitions, but disklabel still just shows
the one partition, and mount can't find the others either:
**SU**:dalgic:~>mbrlabel -w wd0
Found MSDOS partition; size 8193087 (4000 MB), offset 63
skipping existing MSDOS partition at slot e.
Found MSDOS partition; size 8193087 (4000 MB), offset 8193213
adding MSDOS partition to slot a.
Found NTFS partition; size 8193087 (4000 MB), offset 16386363
adding NTFS partition to slot b.
Found MSDOS partition; size 8209152 (4008 MB), offset 24579513
adding MSDOS partition to slot c.
8 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 8193087 8193213 MSDOS # (Cyl. 8128*- 16256*)
b: 8193087 16386363 NTFS # (Cyl. 16256*- 24384*)
c: 8209152 24579513 MSDOS # (Cyl. 24384*- 32528*)
d: 80418240 0 unused 0 0 # (Cyl. 0 - 79779)
e: 8193087 63 MSDOS # (Cyl. 0*- 8128*)
f: 24595515 8193150 unused 0 0 # (Cyl. 8128*- 32528*)
Updating in-core disk label.
**SU**:dalgic:~>disklabel wd0
# /dev/rwd0d:
type: ESDI
disk: IC35L040AVER07-0
label: fictitious
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 80418240
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
8 partitions:
# size offset fstype [fsize bsize cpg/sgs]
d: 80418240 0 unused 0 0 # (Cyl. 0 - 79779)
e: 8193087 63 MSDOS # (Cyl. 0*- 8128*)
f: 24595515 8193150 unused 0 0 # (Cyl. 8128*- 32528*)
disklabel: boot block size 0
disklabel: super block size 0