tech-kern archive

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

Re: wedges and gpt.

On Oct 7, 2009, at 6:46 AM, Joerg Sonnenberger wrote:
sysinst support is not that helpful as long as the boot support is not
present. Which will hopefully hit the tree very soon now.

What would be nice is having 'gpt' and 'dkctl' in the sysinst root to eliminate this step:

cd /dev && sh MAKEDEV drvctl dk7
mount_mfs -s512m swap /mnt
mount -r -t cd9660 /dev/cd0a /mnt2
cd /mnt && tar xzpf /mnt2/amd64/binary/sets/base.tgz
cd /dev ; tar cf - . | (cd /mnt/dev ; tar xvpf - )
chroot /mnt

...but that's off-topic for tech-kern...

(1) the 'gpt' command tells you what to type to dynamically create a
wedge but the command it spews is not syntactically correct.

The preferable fix would be to trigger a reenumeration by the kernel,
but that doesn't exist yet.

yup. That'd be cool.  It would have removed some confusion for sure.

(3) Do we really need a GPT partition table, then wedges, then an
MBR partition table, and then subsequently a BSD disk label?  This
onion has a lot of layers.

The idea is that you have only the GPT table. The wedges are just the
representation of the inidividual entries. There is no need for a disk

I couldn't newfs anything until I edited the BSD disk label; though that could have been a result of confusion on my part...

(4) Even once I did get it all working properly, gpt still reports
"gpt: rwd0d: Suspicious MBR at Sector 0" and I never did figure out
how to make that go away while leaving a functional system.

Are you using bootcamp? IIRC that is doing some strange things.

nope. I used bootcamp the first time and it screwed things up. The second time I used Apple's "Disk Utility" to shrink my OSX partition and then 'gpt' to create the subsequent partitions but that also didn't seem to work... On the third attempt, I used "Disk Utility" to shrink the OSX partition, and create a second but unformatted partition which after the NetBSD boot, I 'gpt remove'd and was able to create my Root and Swap partitions...

Between each attempt, I reinstalled OSX from scratch using the whole disk for OSX in order to get a completely fresh start.

Finally, it would be cool to be able to 'mount' a wedge by name, instead of device... I've always hated our dissociation between 'mount' and dynamic probing of devices... ie: add a scsi device or remove a USB device and after a reboot, your fstab is incorrect... We're inviting the same issues with dynamically probing of wedges, I think...

This would be cool:

bash-4.0# dkctl wd0 listwedges
/dev/rwd0d: 4 wedges:
dk3: NetBSD-swap, 10000000 blocks at 146301455, type: swap
dk2: NetBSD-root, 129183719 blocks at 17117736, type: ffs
dk1: OSX, 16708096 blocks at 409640, type: hfs
dk0: EFI System Partition, 409600 blocks at 40, type: msdos

...and an /etc/fstab that looks like this:

"NetBSD-root" / ffs rw 1 1
"NetBSD-swap" none swap sw 0 0
"OSX" /osx hfs rw 1 0
kernfs /kern kernfs rw
procfs /proc procfs rw


mount_wedge "OSX" /osx

Home | Main Index | Thread Index | Old Index