On Tue, Apr 08, 2008 at 01:00:04AM -0700, Andrei wrote: > Josh Grosse wrote: > > > > On Mon, 7 Apr 2008 11:04:41 -0700 (PDT), Andrei wrote > > > >> I have PC with two OpenBSD 4.2 - bootable harddisks. Clearly I can > >> boot from either of them by setting a boot sequence in BIOS or by > >> typing "boot hdXa:/bsd" in the boot prompt (X = 0 or 1). > >> > >> What I want is to specify a boot hdd without boot-time user > >> intervention. Thus, imagine I run OpenBSD on hd0, I want to specify > >> what hd1 shell be used as bootable on the next reboot. > > > > See boot.conf(5), set image may be what you are looking for.
I'd say "set device ..." is what you are looking for. I have a bootable USB pen drive that only contains /boot /etc/boot.conf that boots OpenBSD from the hard drive when I have not wanted to touch the MBR code. It contains: set device hd1a set howto -c the last line to push the boot into UKC> since I need to disable acpi. And it is hd1a since boot(8) see the USB pen drive as first hard disk. > > > > Thanks Josh, this works fine. The reason I did not consider boot.conf at the > beginning is that it concerns second-stage bootstrap, while I was trying to > find a solution first-stage bootstrap. OpenBSD's MBR does no fancy tricks. It only boots the first partition on the hard drive marked as bootable. You may be able to get the BIOS to boot the second hard drive, but not from a running OS for the next boot. GRUB installed to MBR can do it, but needs a partition to exist in. So then it will be its second stage bootloader that does the selection. And you will have to modify menu.lst in the GRUB installation, so the GRUB installation will have to be writable from OpenBSD. As you found out OpenBSD's boot(8) can do it. You will have to modify /etc/boot.conf on the hard drive the BIOS boots. And there are of course other bootloaders out there... > > Andrei > > -- > View this message in context: > http://www.nabble.com/Dual-boot-problem-tp16538144p16548546.html > Sent from the openbsd user - misc mailing list archive at Nabble.com. -- / Raimo Niskanen, Erlang/OTP, Ericsson AB