Port-macppc archive

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

Re: partitioning & install help on late PowerBook



On Thu, Oct 05, 2023 at 13:21:08 +0000, Riccardo Mottola wrote:

> Valery Ushakov wrote:
> > MBR with FAT and NetBSD partitions should be doable with just the
> > tools you have on the install CD.
> > 
> > 1. Erase the beginning of the disk.  1MB is probably already an
> >    overkill.
> > 
> > 2. Use fdisk to create the MBR label and two partitions.  The first
> >    one is FAT32.  I used 2GB for mine so that I can throw in a backup
> >    kernel and sets and what not, but a smaller one will do if you only
> >    use it for the tiny ofwboot.
> 
> Up to here it was easy....
> my headache is h (or should it be e) the FAT partition.
> 
> > 3. Create netbsd disklabel.  That's the tricky part b/c I can never
> >    remember the right options to make it create one and make it stick.
> >    I have to re-learn it every time :)
> 
> Here it looks easy, I see in disklabel c, I can create a & b as usual.
> 
> If I understand correctly, the "start" of a is inside the NetBSD #2
> partition, not really the start of the disk.
> 
> Actually, if I use mbr: "c" is the whole NetBSD slice and "d" would be
> the whole disk (not seen within disklabel).
> 
> However I had to create a at cylynter 65, not 0...
> 
> I created a & b but then am told that a and c overlap and b and c
> overlap. But if a+b=c isn't it true?
> and a+b+h (or e?) = d
> 
> My other issue is "h", it should be mapped to the MSDOS partition a, right?
> 
> In the partitioning examples it is shown that disklabel "recognizes" the
> FAT partition.
> 
> So, yes, confusing business here.

The netbsd disklabel describes the whole disk, not just the netbsd MBR
partition.  MBR and disklabel are two different views of the same
disk.  MBR is more coarse, it has just a "netbsd" partition.
Disklabel elaborates the structure of that portion of the disk
further, but is not restricted to describing just the netbsd MBR
partition.

So, yes, "a" starts at the beginning of the netbsd MBR partition.

Not sure what you mean by "MSDOS partition a" - MBR partition 0?  If
so, then, yes, "h" in the disklabel should be defined to have the same
extent as MBR partition 0.  NetBSD kernel doesn't use MBR, so the
information has to be provided in the disklabel.

E.g. to get back to the example from my earlier mail:

  0: Primary DOS with 32 bit FAT (sysid 11)
      start 2048, size 4194304 (2048 MB, Cyls 0-261/53/48)
  1: NetBSD (sysid 169)
      start 4196352, size 484200448 (236426 MB, Cyls 261/53/49-30401/75/10)

 a:  83886080   4196352     4.2BSD   4096 16384     0	# /
 b:  16580608  88082432       swap
 c: 488397168         0     unused      0     0		# whole disk
 d: 484200448   4196352     unused      0     0		# MBR NetBSD
 f: 134217728 104663040     4.2BSD   4096 16384     0	# another NetBSD fs
 g: 249516032 238880768     4.2BSD      0     0     0	# another NetBSD fs
 h:   4194304      2048      MSDOS	      	    	# MBR FAT (/boot)

You can see that "h" corresponds to the MBR partition 0 (start 2048,
size 4194304), and "a" and "d" start at 4196352 (= 2048 + 4194304),
i.e. at the beginning of the MBR partition 1.  "d" covers the whole
MBR partition and "a" is the smaller root fs inside the netbsd portion
of the disk.

-uwe


Home | Main Index | Thread Index | Old Index