Subject: extended DOS/Linux partitions
To: None <port-i386@NetBSD.ORG>
From: Michael C. Richardson <mcr@sandelman.ottawa.on.ca>
List: port-i386
Date: 01/10/1998 19:34:44
-----BEGIN PGP SIGNED MESSAGE-----


  I just read /usr/src/linux/drivers/block/genhd.c to figure out
how extended DOS partitions are layed out. Weird. Took a while to figure
it out... the comments suggest that the code doesn't work the way that it
does... 

  Anyway, if you are like me, with a dual (or tri) boot Xterm, and want
access to your Linux partitions that live in "extended" partitions, then 
you should do the following:
  1. make a NetBSD partition that covers the Linux extended partition. Say
	wd0h
  2. fdisk /dev/rwd0h	
  3. edit the disklabel to use the proper sector numbers by adding the
"offsets" given the file to the values for wd0h.

  That tells you where the real partitions are. Despite the fact that I
couldn't actually make an extended partition bootable with OSBS, it does
reserve space for Lilo. One track's worth, 63 sectors in my case.

  I now have my "native" RedHat ext2fs partition mounted as /emul/linux.
  This is much easier than wasting disk space to copy it. And, I can always
run Linux native to verify that it is a real bug in some product, not a bug
in NetBSD's emulation :-)

  Teamwave now runs, now that I populated /emul/linux/usr/X11R6.

   :!mcr!:            |  Sandelman Software Works Corporation, Ottawa, ON  
   Michael Richardson |Network and security consulting and contract programming
 Personal: mcr@sandelman.ottawa.on.ca. PGP key available.
 Corporate: sales@sandelman.ottawa.on.ca. 



-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: latin1
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQB1AwUBNLgToKZpLyXYhL+BAQEpbgMAgU6nnFlJ4kN7ABq/rBe+zNbxWSN/ccWm
WO/3r4LhIIh0lPO1K1t7kjBEnvV3vXom5V40QhA8tGI6K6M8kN5HKkmfyp1uw1U3
5ce9ZwTw3YeAnaVJOh8W+t5VYR5+fmRO
=BmzW
-----END PGP SIGNATURE-----