I have two hard disk, ad0 with freebsd and ad1 with netbsd.
Today I installed a second version of Netbsd on ad1s2 to try things on.
So on ad1 there was ad1s1 old netbsd ad1s2 new netbsd.
The problem is that when I use chainload to read the PBR of the partitions it always loads the same kernel so I guess that it reads the same second stage boot loader /boot. Because:
When I try find /netbsd I get
Code:
(hd1,0,a)
(hd1,1,a)
Then no matter which root (hd1,0,a) or (hd1,1,a) I choose and use:
on, the found kernels are one and the same - the one for the new netbsd. Somehow I cannot get to the kernel of the old netbsd on slice 1
How do I set the PBR to point to the correct second stage boot loaders?
Does anyone know of a guide similar to
http://www.openbsd.org/faq/faq14.html#Boot386 for NetBSD?
Just for some extra info here is the output of fdisk and disklabel:
fdisk
Code:
Disk: /dev/rwd1d
NetBSD disklabel disk geometry:
cylinders: 620181, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 625142448
BIOS disk geometry:
cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 625142448
Partition table:
0: NetBSD (sysid 169)
start 63, size 40960017 (20000 MB, Cyls 0/1/1-2549/164/63), Active
beg: cylinder 0, head 3, sector 16
end: cylinder 1023, head 62, sector 16
PBR appears to be bootable
1: NetBSD (sysid 169)
start 40961088, size 20480544 (10000 MB, Cyls 2549/181/1-3824/143/63)
beg: cylinder 1023, head 0, sector 1
end: cylinder 1023, head 62, sector 16
PBR appears to be bootable
2: NetBSD (sysid 169)
start 61441632, size 20480544 (10000 MB, Cyls 3824/144/1-5099/106/63)
beg: cylinder 1023, head 0, sector 1
end: cylinder 1023, head 62, sector 16
PBR appears to be bootable
3: <UNUSED>
Bootselector disabled.
Drive serial number: -554148968 (0xdef85b98)
and disklabel
Code:
# /dev/rwd1d:
type: unknown
disk: SEG320
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 620181
total sectors: 625142448
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: 1049328 61441632 4.2BSD 1024 8192 0 # (Cyl. 60954 - 61994)
b: 2097648 62490960 swap # (Cyl. 61995 - 64075)
c: 40960017 63 unused 0 0 # (Cyl. 0*- 40634)
d: 625142448 0 unused 0 0 # (Cyl. 0 - 620180)
e: 15235920 64588608 4.2BSD 2048 16384 0 # (Cyl. 64076 - 79190)
f: 2097648 79824528 4.2BSD 2048 16384 0 # (Cyl. 79191 - 81271)
Within netbsd I can only see the other partitions on wd1 with fdisk, but I cannot mount them like I can in freebsd by mounting slices, because I don't know how to specify the slices. I can only specify the wd1a-p (where I understand c is netbsd partition and d is whole disk) and not partitions or slices.
Since I admit that I do not understand either file system, there are probably things that are not true in the above, but it seems like I am able to navigate in the freebsd with my distorted/faulty perception of the matters.