LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   FreeBSD + NetBSD @ same hard disk (https://www.linuxquestions.org/questions/%2Absd-17/freebsd-netbsd-%40-same-hard-disk-451089/)

primo 06-02-2006 11:33 PM

FreeBSD + NetBSD @ same hard disk
 
With a bit of disklabel black magic I'm able to access FreeBSD partitions from NetBSD but I couldn't otherwise. All I can do is access the NetBSD root partition with the device file of the entire slice (in my case /dev/ad3s2).

I have a Western Digital 80GB with /dev/ad3s1 containing FreeBSD 6.1, /dev/ad3s2 with NetBSD 3.0 and /dev/ad3s3 being an extended DOS partition that contains /dev/ad3s5 formatted with ext2 to contain some Linux distro to install later. When I tried adding a disklabel for /dev/ad3s2 from FreeBSD I could no longer boot from NetBSD. It's strange because disklabel in NetBSD does not touch (or so it seems) the raw hard drive, only the kernel's idea of it. I hoped that FreeBSD would do the same and with a reboot I would have those /dev/ad3s2[a-z] files to access individual NetBSD partitions. I will install NetBSD again. The goal isn't to recreate those bits in /dev/ad3s2 so my question is:
how can I access NetBSD partitions from NetBSD ?

NetBSD magic:

disklabel wd1
Code:

# /dev/rwd1d:
type: unknown
disk: WDC WD800BB-00J
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 155061
total sectors: 156301488
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0          # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

16 partitions:
#        size    offset    fstype [fsize bsize cpg/sgs]
 a:  1573488  46154745    4.2BSD  1024  8192 46280  # (Cyl.  45788*-  47349*)
 c:  32001480  46154745    unused      0    0        # (Cyl.  45788*-  77535*)
 d: 156301488        0    unused      0    0        # (Cyl.      0 - 155060)
 e:  23634576  47728233    4.2BSD  2048 16384 28256  # (Cyl.  47349*-  70796*)
 f:  2597616  71362809    4.2BSD  2048 16384 27240  # (Cyl.  70796*-  73373*)
 g:  4195800  73960425    4.2BSD  2048 16384 21880  # (Cyl.  73373*-  77535*)
 i:  78140097  78156288 Linux Ext2      0    0        # (Cyl.  77536 - 155055*)
 k:  46154682        63    unused      0    0        # (Cyl.      0*-  45788*)
 l:  2097152        63    4.2BSD  2048 16384 28552  # (Cyl.      0*-  2080*)
 m:  2662400  2097215    4.2BSD  2048 16384 28552  # (Cyl.  2080*-  4721*)
 n:  8388608  4759615    4.2BSD  2048 16384 28512  # (Cyl.  4721*-  13043*)
 o:  33006522  13148223    4.2BSD  2048 16384 28552  # (Cyl.  13043*-  45788*)

My /etc/fstab was:
Code:

/dev/wd1a      /              ffs    rw                              1 1
/dev/wd1e      /usr            ffs    rw,softdep                      1 2
/dev/wd1f      /var            ffs    rw,nodev,nosuid                1 2
/dev/wd1g      /home          ffs    rw,nodev,nosuid,softdep        1 2
kernfs          /kern          kernfs  rw
# The linux option is used to emulate some files like /proc/cpuinfo
procfs          /proc          procfs  rw,linux

# Linux swap
/dev/wd0j      none            swap    sw                              0 0

# Linux ext2
/dev/wd1i      /mnt/wd        ext2fs  ro,nosuid,nodev                0 0

# FreeBSD 6.1
/dev/wd1l      /mnt/bsd6/root  ufs    ro,nosuid,nodev                0 0
/dev/wd1m      /mnt/bsd6/var  ufs    ro,nosuid,nodev                0 0
/dev/wd1n      /mnt/bsd6/home  ffs    ro,nosuid,nodev,softdep        0 0
/dev/wd1o      /mnt/bsd6/usr  ufs    ro,nosuid,nodev,softdep        0 0



All times are GMT -5. The time now is 11:38 AM.