Subject: Re: booting from an alternate partition?
To: David Laight <david@l8s.co.uk>
From: Greywolf <greywolf@starwolf.com>
List: current-users
Date: 07/14/2002 14:03:24
This has provided me with next to no hope or information. Anyone else?
Here's what I have:
wd0 has windows on it; the mbr_bootselect code defaults to Hard Disk 2,
where it picks up the MBR code from that when you fail to manually
select windows.
wd1 (Hard Disk 2 -- it would be wd2 if it were hardwired) is fdisk'd as such:
Disk: /dev/rwd1d
NetBSD disklabel disk geometry:
cylinders: 39535 heads: 16 sectors/track: 63 (1008 sectors/cylinder)
BIOS disk geometry:
cylinders: 1024 heads: 255 sectors/track: 63 (16065 sectors/cylinder)
Partition table:
0: sysid 169 (NetBSD)
start 63, size 39851697 (19458 MB), flag 0x80
beg: cylinder 0, head 1, sector 1
end: cylinder 1023, head 254, sector 63
1: sysid 169 (NetBSD)
start 14076720, size 137088 (66 MB), flag 0x0
beg: cylinder 876, head 60, sector 1
end: cylinder 884, head 195, sector 63
2: <UNUSED>
3: <UNUSED>
This is, I'm sure, after having looked at it closer, quite wrong.
But I thought I'd give it a try. Partition 1 is equivalent in size to
wd1i:
[dislabel for wd1]
# /dev/rwd1d:
type: ESDI
disk: ST320420A
label: Seagate 20GB
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 39535
total sectors: 39851760
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: 132993 63 4.2BSD 1024 8192 16 # (Cyl. 0*- 131)
b: 1573488 133056 swap # (Cyl. 132 - 1692)
c: 39851697 63 unused 0 0 # (Cyl. 0*- 39535*)
d: 39851760 0 unused 0 0 # (Cyl. 0 - 39535*)
e: 451584 1706544 4.2BSD 1024 8192 32 # (Cyl. 1693 - 2140)
f: 274176 2158128 4.2BSD 1024 8192 32 # (Cyl. 2141 - 2412)
g: 3225600 2432304 4.2BSD 2048 16384 128 # (Cyl. 2413 - 5612)
h: 8418816 5657904 4.2BSD 2048 16384 128 # (Cyl. 5613 - 13964)
i: 137088 14076720 4.2BSD 1024 8192 32 # (Cyl. 13965 - 14100)
j: 451584 14213808 4.2BSD 1024 8192 32 # (Cyl. 14101 - 14548)
k: 274176 14665392 4.2BSD 1024 8192 32 # (Cyl. 14549 - 14820)
l: 6481440 14938560 4.2BSD 2048 16384 128 # (Cyl. 14820 - 21249)
m: 18431760 21420000 4.2BSD 2048 16384 128 # (Cyl. 21250 - 39535*)
[I have it heavily parted for a reason.]
Anyway: wd1a is my 1.5 root partition; wd1i is currently my 1.6-current
root partition.
I'd like to be able to menu-select from the mbr_bootselect thing that I
want to boot from wd1i, rather than wd1a.
It turns out when I go into manual mode, the bootloader assumes that the
place from whence it loaded the boot code is hd0. Thankfully, this does
not get propagated from the second-stage booter to the kernel, or I'd be
in REAL trouble.
So anyway, do we make provisions for this, or do I have to do a partition
juggle (again)?
So I can boot it manually, but i'd like to be able to make it the default
or put it into a boot menu. Does GRUB handle anything like this?
On Sun, 14 Jul 2002, David Laight wrote:
# Well the netbsd bootloader (the one that counts down from 5)
# could read a command from a file when the timeout expires.
# After all it knows how to access the root directory.
#
# But if you need the mbr_bootsel to do anything you would
# have to modify the boot sector - and trust there is space
# in mbr_bootsel to fit in the code to unset it (by writing
# a copy of itself back).
--*greywolf;
--
NetBSD. Not Guano.