LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 06-02-2006, 11:33 PM   #1
primo
Member
 
Registered: Jun 2005
Posts: 542

Rep: Reputation: 34
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

Last edited by primo; 06-02-2006 at 11:36 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FreeBSD or NetBSD mimithebrain General 10 08-30-2005 03:44 PM
FreeBSD 5.3 hard disk boot problem kpachopoulos *BSD 0 12-31-2004 09:23 AM
FreeBSD v NetBSD servnov *BSD 5 09-07-2004 09:05 PM
Freebsd 5.2.1 and hard disk geometry incorrect jimdaworm *BSD 8 03-19-2004 02:02 PM
What is FreeBSD and NETBSD ? futurist Linux - Software 2 03-04-2004 09:39 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration