Re: Dual boot problem
On Sun, Jun 28, 2020 at 1:13 PM Greg Thomas wrote: > On Sun, Jun 28, 2020 at 9:25 AM Nick Holland > wrote: > >> >> from your dmesg: >> sd0 at scsibus1 targ 0 lun 0: >> naa.5000c500b98a130c >> sd0: 953869MB, 512 bytes/sector, 1953525168 sectors, thin >> sd1 at scsibus1 targ 1 lun 0: >> naa.500a07510369b769 >> sd1: 488386MB, 512 bytes/sector, 1000215216 sectors, thin >> sd2 at scsibus1 targ 2 lun 0: >> naa.5002538844584d30 >> sd2: 244198MB, 512 bytes/sector, 500118192 sectors, thin >> >> ERR M basically means that biosboot(8), which is "tagged" with the >> physical location of /boot(8) on the disk, doesn't see the marker >> that indicates that what it is pointing at is actually /boot. The >> windows 10 boot loader is pulling from a disk other than sd0, the pbr >> is pointing at something "correct" if it were sd0, but the Windows >> boot loader is trying to pull it from whatever the new default disk >> is. Maybe. >> >> There may be some bcdedit magic that can say "boot from this other disk" >> which might solve your problem, but I have no idea. A lame way of >> doing this might be to shrink your Windows partition by 1G, and install >> your OpenBSD root partition there, and the rest on sd0. >> > > Rad, thanks Nick! I'm going to poke around with BCDEasy or whatever that > 3rd party software is since it'll be easier to figure out rather than > reading through all the bcdedit documentation. I swear back in the Windows > ntldr days that I was running Windows and OpenBSD on separate disks so I > think this should be doable with their current boot loader. > > Worse comes to worse I'll go with your last suggestion! > I couldn't find any magic with bcdedit/BCDEasy so I shrunk my Windows partition, did a minimal install of OpenBSD way out there at the end of sd2, copied over some of /etc, and it's all good. nihilanon$ fdisk sd2 Disk: sd2 geometry: 31130/255/63 [500118192 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start:size ] --- *0: 07 0 32 33 -191 24 25 [2048: 3067904 ] NTFS 1: 07191 56 58 - 30875 167 12 [ 3072000: 492945408 ] NTFS 2: A6 30875 167 13 - 31130 158 4 [ 496017408: 4096000 ] OpenBSD 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused Next up is OpenVPN, and deciding if I should stick with -stable (most probably) or start trying snapshots again.
Re: Dual boot problem
On Sun, Jun 28, 2020 at 12:34 PM Clay Daniels wrote: > > I too need a Windows install, but I have moved it to my older 2014 machine > and kept my self-built toy for BSD. I think I need to buy me another SSD to > run NetBSD too. ;-) > Yeah, I'm super fortunate to have found this pretty much unused X220 so I could just keep the beat up old X220 for Windows.
Re: Dual boot problem
On Sun, Jun 28, 2020 at 9:25 AM Nick Holland wrote: > > from your dmesg: > sd0 at scsibus1 targ 0 lun 0: > naa.5000c500b98a130c > sd0: 953869MB, 512 bytes/sector, 1953525168 sectors, thin > sd1 at scsibus1 targ 1 lun 0: > naa.500a07510369b769 > sd1: 488386MB, 512 bytes/sector, 1000215216 sectors, thin > sd2 at scsibus1 targ 2 lun 0: > naa.5002538844584d30 > sd2: 244198MB, 512 bytes/sector, 500118192 sectors, thin > > ERR M basically means that biosboot(8), which is "tagged" with the > physical location of /boot(8) on the disk, doesn't see the marker > that indicates that what it is pointing at is actually /boot. The > windows 10 boot loader is pulling from a disk other than sd0, the pbr > is pointing at something "correct" if it were sd0, but the Windows > boot loader is trying to pull it from whatever the new default disk > is. Maybe. > > There may be some bcdedit magic that can say "boot from this other disk" > which might solve your problem, but I have no idea. A lame way of > doing this might be to shrink your Windows partition by 1G, and install > your OpenBSD root partition there, and the rest on sd0. > Rad, thanks Nick! I'm going to poke around with BCDEasy or whatever that 3rd party software is since it'll be easier to figure out rather than reading through all the bcdedit documentation. I swear back in the Windows ntldr days that I was running Windows and OpenBSD on separate disks so I think this should be doable with their current boot loader. Worse comes to worse I'll go with your last suggestion! Greg
Re: Dual boot problem
On Sun, Jun 28, 2020 at 11:25 AM Nick Holland wrote: > On 2020-06-27 21:50, Greg Thomas wrote: > > Hey folks, I'm trying to avoid buggin y'all, but I'm down to my last two > > tasks, setting up dual boot with Windows 10 and setting up OpenVPN. I'm > > currently trying to troubleshoot "Loading ERR M" while using Windows > > BCD. I can boot no problem when selecting my boot drive while starting > up > > my Thinkpad X220. > > > > I installed a couple of weeks ago using pretty much all defaults. > ... > > nihilanon# fdisk sd0 > > Disk: sd0 geometry: 121601/255/63 [1953525168 Sectors] > > Offset: 0 Signature: 0xAA55 > > Starting Ending LBA Info: > > #: id C H S - C H S [ start:size ] > > > --- > > 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] > unused > > 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] > unused > > 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] > unused > > *3: A6 0 1 2 - 121600 254 63 [ 64: 1953520001 ] > OpenBSD > > I'm not seeing a windows partition here. And it appears your OpenBSD > partition is using the entire disk. Oh. Your computer has three disks > in it...your Windows install is on a second/third disk? I don't think > that is going to work. > > from your dmesg: > sd0 at scsibus1 targ 0 lun 0: > naa.5000c500b98a130c > sd0: 953869MB, 512 bytes/sector, 1953525168 sectors, thin > sd1 at scsibus1 targ 1 lun 0: > naa.500a07510369b769 > sd1: 488386MB, 512 bytes/sector, 1000215216 sectors, thin > sd2 at scsibus1 targ 2 lun 0: > naa.5002538844584d30 > sd2: 244198MB, 512 bytes/sector, 500118192 sectors, thin > > ERR M basically means that biosboot(8), which is "tagged" with the > physical location of /boot(8) on the disk, doesn't see the marker > that indicates that what it is pointing at is actually /boot. The > windows 10 boot loader is pulling from a disk other than sd0, the pbr > is pointing at something "correct" if it were sd0, but the Windows > boot loader is trying to pull it from whatever the new default disk > is. Maybe. > > There may be some bcdedit magic that can say "boot from this other disk" > which might solve your problem, but I have no idea. A lame way of > doing this might be to shrink your Windows partition by 1G, and install > your OpenBSD root partition there, and the rest on sd0. > > Nick. > > I have used Rod Smith's rEFInd boot manager for some time, and started out installing it in a Windows partition's efi boot section, but it also works as a stand alone boot usb to pick up all UEFI installations on the entire computer, either same disk multi-boot or a separate disks on the same machine. Right now I have FreeBSD 13.0 Current on the spinning disk & OpenBSD 6.7 -current on the M2 SSD drive. Bear in mind Refind works only for UEFI, not MBR. If I load NetBSD to the SSD drive as a MBR install, I have to drop down to the BIOS and pick the boot order there. I too need a Windows install, but I have moved it to my older 2014 machine and kept my self-built toy for BSD. I think I need to buy me another SSD to run NetBSD too. ;-) Clay
Re: Dual boot problem
On 2020-06-27 21:50, Greg Thomas wrote: > Hey folks, I'm trying to avoid buggin y'all, but I'm down to my last two > tasks, setting up dual boot with Windows 10 and setting up OpenVPN. I'm > currently trying to troubleshoot "Loading ERR M" while using Windows > BCD. I can boot no problem when selecting my boot drive while starting up > my Thinkpad X220. > > I installed a couple of weeks ago using pretty much all defaults. ... > nihilanon# fdisk sd0 > Disk: sd0 geometry: 121601/255/63 [1953525168 Sectors] > Offset: 0 Signature: 0xAA55 > Starting Ending LBA Info: > #: id C H S - C H S [ start:size ] > --- > 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused > 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused > 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused > *3: A6 0 1 2 - 121600 254 63 [ 64: 1953520001 ] OpenBSD I'm not seeing a windows partition here. And it appears your OpenBSD partition is using the entire disk. Oh. Your computer has three disks in it...your Windows install is on a second/third disk? I don't think that is going to work. from your dmesg: sd0 at scsibus1 targ 0 lun 0: naa.5000c500b98a130c sd0: 953869MB, 512 bytes/sector, 1953525168 sectors, thin sd1 at scsibus1 targ 1 lun 0: naa.500a07510369b769 sd1: 488386MB, 512 bytes/sector, 1000215216 sectors, thin sd2 at scsibus1 targ 2 lun 0: naa.5002538844584d30 sd2: 244198MB, 512 bytes/sector, 500118192 sectors, thin ERR M basically means that biosboot(8), which is "tagged" with the physical location of /boot(8) on the disk, doesn't see the marker that indicates that what it is pointing at is actually /boot. The windows 10 boot loader is pulling from a disk other than sd0, the pbr is pointing at something "correct" if it were sd0, but the Windows boot loader is trying to pull it from whatever the new default disk is. Maybe. There may be some bcdedit magic that can say "boot from this other disk" which might solve your problem, but I have no idea. A lame way of doing this might be to shrink your Windows partition by 1G, and install your OpenBSD root partition there, and the rest on sd0. Nick.
Dual boot problem
Hey folks, I'm trying to avoid buggin y'all, but I'm down to my last two tasks, setting up dual boot with Windows 10 and setting up OpenVPN. I'm currently trying to troubleshoot "Loading ERR M" while using Windows BCD. I can boot no problem when selecting my boot drive while starting up my Thinkpad X220. I installed a couple of weeks ago using pretty much all defaults. nihilanon$ disklabel sd0 # /dev/rsd0c: type: SCSI disk: SCSI disk label: ST1000LM049-2GH1 duid: f251a360129c9562 flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 255 sectors/cylinder: 16065 cylinders: 121601 total sectors: 1953525168 boundstart: 64 boundend: 1953520065 drivedata: 0 16 partitions: #size offset fstype [fsize bsize cpg] a: 2097152 64 4.2BSD 2048 16384 12960 # / b: 33807608 2097216swap# none c: 19535251680 unused d: 8388576 35904832 4.2BSD 2048 16384 12960 # /tmp e: 74955232 44293408 4.2BSD 2048 16384 12960 # /var f: 12582912119248640 4.2BSD 2048 16384 12960 # /usr g: 2097152131831552 4.2BSD 2048 16384 12960 # /usr/X11R6 h: 41943040133928704 4.2BSD 2048 16384 12960 # /usr/local i: 4194304175871744 4.2BSD 2048 16384 12960 # /usr/src j: 12582912180066048 4.2BSD 2048 16384 12960 # /usr/obj k:629145600192648960 4.2BSD 4096 32768 26062 # /home nihilanon# fdisk sd0 Disk: sd0 geometry: 121601/255/63 [1953525168 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start:size ] --- 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused *3: A6 0 1 2 - 121600 254 63 [ 64: 1953520001 ] OpenBSD Since my install is on sd0 I ran the dd command from the FAQ: dd if=/dev/rsd0a of=openbsd.pbr bs=512 count=1 I moved the PBR to Windows, and ran the bcdedit commands listed in the FAQ plus bcdedit /set {bootmgr} displaybootmenu yes bcdedit /set {bootmgr} timeout 12 Thanks for any pointers. I'm going to re-run the dd command in case I chose the wrong disk somehow earlier. Greg OpenBSD 6.7 (GENERIC.MP) #182: Thu May 7 11:11:58 MDT 2020 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 17041059840 (16251MB) avail mem = 16511991808 (15747MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xdae9c000 (64 entries) bios0: vendor LENOVO version "8DET76WW (1.46 )" date 06/21/2018 bios0: LENOVO 4286CTO acpi0 at bios0: ACPI 4.0 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP SLIC SSDT SSDT SSDT HPET APIC MCFG ECDT ASF! TCPA SSDT SSDT UEFI UEFI UEFI acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP4(S4) EXP7(S4) EHC1(S3) EHC2(S3) HDEF(S4) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpihpet0 at acpi0: 14318179 Hz acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz, 2791.35 MHz, 06-2a-07 cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN cpu0: 256KB 64b/line 8-way L2 cache cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges cpu0: apic clock running at 99MHz cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz, 2790.95 MHz, 06-2a-07 cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN cpu1: 256KB 64b/line 8-way L2 cache cpu1: smt 1, core 0, package 0 cpu2 at mainbus0: apid 2 (application processor) cpu2: Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz, 2790.96 MHz, 06-2a-07 cpu2:
Re: Dual boot problem
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. 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. 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.
Re: Dual boot problem
On 01:00:04 Apr 08, Andrei wrote: 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. Then you have to do it manually. OpenBSD is not very convenient for multiboot or for having more than one OpenBSD on the same disk. -Girish
Re: : Dual boot problem
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
Re: : Dual boot problem
Not quite, you don't need a specific partition for grub.Grub only needs to be installed on the BIOS first boot device. Which can be a hard drive, a floppy, a cdrom, an usb key... On a hard drive with only OpenBSD slices, grub will usually be installed on the first slice, the one with the largest volume label. The BIOS boot one. At boot, the mbr jumps to the /grub directory, loads some stages and reads the menu.lst. Grub has the ability to mark partition types (keyword parttype) and mark a partition active (define root(x,y) and keyword makeactive) just as any fdisk would do (you eventually can partition a disk from within grub). There is some info, even without the need to install it first: /usr/ports/sysutils/grub/files/README.OpenBSD and a menu example /usr/ports/sysutils/grub/files/menu.lst As you will see, the trick is to mark unused OpenBSD slices with another identifier. Would you want to by-pass the grub's choices menu, (no intervention) you only would have to write different menu.lst.xxx files and mv the one you need at next reboot. Fwiw, my default menu is on the hard drive, simple entry. When messing around I boot from an usb key. Raimo Niskanen wrote: 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.
Re: : : Dual boot problem
On Tue, Apr 08, 2008 at 02:54:48PM +0200, Louis V. Lambrecht wrote: Not quite, you don't need a specific partition for grub.Grub only needs to be installed on the BIOS first boot device. Which can be a hard drive, a floppy, a cdrom, an usb key... Thank you for your correction. I looked at an OpenBSD 4.1 machine and did not find grub in neither the packages nor the ports tree. So I erroneously assumed a non-OpenBSD aware grub was needed. On a hard drive with only OpenBSD slices, grub will usually be installed on the first slice, the one with the largest volume label. The BIOS boot one. At boot, the mbr jumps to the /grub directory, loads some stages and reads the menu.lst. Grub has the ability to mark partition types (keyword parttype) and mark a partition active (define root(x,y) and keyword makeactive) just as any fdisk would do (you eventually can partition a disk from within grub). There is some info, even without the need to install it first: /usr/ports/sysutils/grub/files/README.OpenBSD and a menu example /usr/ports/sysutils/grub/files/menu.lst ; : Raimo Niskanen wrote: : : 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. : : -- / Raimo Niskanen, Erlang/OTP, Ericsson AB
Re: Dual boot problem
Girish Venkatachalam-2 wrote: On 01:00:04 Apr 08, Andrei wrote: 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. Then you have to do it manually. OpenBSD is not very convenient for multiboot or for having more than one OpenBSD on the same disk. -Girish Yes, I noticed it. BTW, I managed to use more than one OpenBSD on different partitions of the same disk. The trick was to use 'A6' partition ID only for the active OpenBSD partition, and use another ID for all the rest ones. At least this worked for OpenBSD 4.2, I am not sure if this issue is planned to be fixed in future releases. -- View this message in context: http://www.nabble.com/Dual-boot-problem-tp16538144p16561041.html Sent from the openbsd user - misc mailing list archive at Nabble.com.
Re: : : Dual boot problem
Cm'on Raimo. Tssk! Tssk! http://www.openbsd.org/cgi-bin/cvsweb/ports/sysutils/grub/files/ I mostly use openports.se, rather than searching my own filesystem which is not quite conforming to the standard file hierarchy. :-) Raimo Niskanen wrote: On Tue, Apr 08, 2008 at 02:54:48PM +0200, Louis V. Lambrecht wrote: Not quite, you don't need a specific partition for grub.Grub only needs to be installed on the BIOS first boot device. Which can be a hard drive, a floppy, a cdrom, an usb key... Thank you for your correction. I looked at an OpenBSD 4.1 machine and did not find grub in neither the packages nor the ports tree. So I erroneously assumed a non-OpenBSD aware grub was needed. On a hard drive with only OpenBSD slices, grub will usually be installed on the first slice, the one with the largest volume label. The BIOS boot one. At boot, the mbr jumps to the /grub directory, loads some stages and reads the menu.lst. Grub has the ability to mark partition types (keyword parttype) and mark a partition active (define root(x,y) and keyword makeactive) just as any fdisk would do (you eventually can partition a disk from within grub). There is some info, even without the need to install it first: /usr/ports/sysutils/grub/files/README.OpenBSD and a menu example /usr/ports/sysutils/grub/files/menu.lst ; : Raimo Niskanen wrote: : : 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. : :
Dual boot problem
Hi all, 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. installboot(8) offers what I need, but it can't be used for cross- device installboots. If possible, I'd like to solve this without any dedicated bootloaders like grub. If you convince me that using bootloader is better alternative, I would not mind much. Note that run everything in VMware, so I am not afraid to screw-up things. All suggestions are welcome. Andrei -- View this message in context: http://www.nabble.com/Dual-boot-problem-tp16538144p16538144.html Sent from the openbsd user - misc mailing list archive at Nabble.com.
Re: Dual boot problem
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.
dual boot problem
hello, i have openbsd on the first partition on my hard drive, and windows xp on the second partition. i made the windows partition active. this is the command that i used to get the openbsd's mbr: dd if=/dev/rwd0c of=mbr count=1 i copied the file mbr to my windows partition and added the following line in to c:\boot.ini c:\mbr=openbsd when i select this line from the ntldr menu, nothing happens, it just shows the menu again. apparently my mbr file is wrong because when i created one using Gilles Vollant's bootpart (http://www.winimage.com) and used it, it loaded openbsd successfully. i can use the mbr file created by bootpart but i would like to understand what i was doing wrong... please help. thanks konstantin
Re: dual boot problem
On Wed, May 24, 2006 at 11:56:20PM -0700, akonsu wrote: this is the command that i used to get the openbsd's mbr: dd if=/dev/rwd0c of=mbr count=1 actually you need the pbr (partition boot record) not the mbr, look at FAQ 4.8, your command should look like: dd if=/dev/rwd0a of=name bs=512 count=1 -- Przemyslaw Nowaczyk [EMAIL PROTECTED] CS student @ Poznan University of Technology
Re: dual boot problem
On Wed, May 24, 2006 at 11:56:20PM -0700, akonsu wrote: | hello, | | i have openbsd on the first partition on my hard drive, and windows xp on | the second partition. | i made the windows partition active. | | this is the command that i used to get the openbsd's mbr: | | dd if=/dev/rwd0c of=mbr count=1 Try /dev/rwd0a, see FAQ4.8. Cheers, Paul 'WEiRD' de Weerd -- [++-]+++.+++[---].+++[+ +++-].++[-]+.--.[-] http://www.weirdnet.nl/ [demime 1.01d removed an attachment of type application/pgp-signature]
Re: dual boot problem
akonsu [EMAIL PROTECTED] wrote: dd if=/dev/rwd0c of=mbr count=1 Here is your error dd if=/dev/rwd0a of=pbr count=1 For the NTLDR you want the PBR (Partition Boot Record) not the MBR (Master Boot Record). I changed the of= for correct the terminology the important part is the if= device. I usually use dd if=/dev/rwd0a of=/mnt/OpenBSD.pbr bs=512 count=1 where /mnt is the mountpoint of a small FAT partiton that is active.
Re: dual boot problem
On Thursday 25 May 2006 09:22, Jan Johansson wrote: akonsu [EMAIL PROTECTED] wrote: dd if=/dev/rwd0c of=mbr count=1 Here is your error dd if=/dev/rwd0a of=pbr count=1 For the NTLDR you want the PBR (Partition Boot Record) not the MBR (Master Boot Record). I changed the of= for correct the terminology the important part is the if= device. I usually use dd if=/dev/rwd0a of=/mnt/OpenBSD.pbr bs=512 count=1 where /mnt is the mountpoint of a small FAT partiton that is active. While at the subject, you need to run this every time you upgrade bootblocks. What would be the result of not updating bootblocks when upgrading from snapshot? Or not rerunning that command when updating them? -- viq
Re: dual boot problem
viq [EMAIL PROTECTED] wrote: While at the subject, you need to run this every time you upgrade bootblocks. What would be the result of not updating bootblocks when upgrading from snapshot? Sounds dangerous to me. Will old bootblocks be able to boot the kernel? Or not rerunning that command when updating them? It will say Err M after you choose OpenBSD from NTLDR. Use the bootblock from the CD but load the kernel from hd0 by typing boot hd0a:/bsd at the boot prompt. Then rerun the command to update your your PBR-file.
Re: dual boot problem
viq wrote: On Thursday 25 May 2006 09:22, Jan Johansson wrote: akonsu [EMAIL PROTECTED] wrote: dd if=/dev/rwd0c of=mbr count=1 Here is your error dd if=/dev/rwd0a of=pbr count=1 For the NTLDR you want the PBR (Partition Boot Record) not the MBR (Master Boot Record). I changed the of= for correct the terminology the important part is the if= device. I usually use dd if=/dev/rwd0a of=/mnt/OpenBSD.pbr bs=512 count=1 where /mnt is the mountpoint of a small FAT partiton that is active. While at the subject, you need to run this every time you upgrade bootblocks. What would be the result of not updating bootblocks when upgrading from snapshot? depends. The boot code doesn't change dramatically often. Last time it happened, it was the changes that permitted OpenBSD to boot beyond the 8G point on BIOSs which permitted it. I personally tested around 50 different machines to make sure it worked, and several hundred other reports were provided by other users and developers. And when a last minute improvement was discovered, I had to re-run those tests. :) So...avoiding updating the boot blocks is usually harmless...you would be replacing code with the exact same code. Now that I've said that, it will probably change, and in an important way. Or not rerunning that command when updating them? As indicated by others, the system won't boot. The inode for the second-stage boot loader (/boot) is hard-coded in the PBR. Change that inode, you have a problem, because what the NTLDR does is invoke the PBR that was saved...IN THE PAST. So, that PBR will end up trying to pull in and run who-knows-what...and will likely fail. Ugly? Well, before that bootloader change, the actual physical blocks were coded in the PBR, which meant recopying the file /boot would break the boot process. The current process is actually very robust, recopying the /boot file doesn't change the inode number normally. The normal upgrade processes are done in such a way that the inode isn't changed, so this will rarely be a problem. The good news, almost by definition, a multi-booting machine isn't at some remote location...it's in front of you, thus easy to repair. (yeah, I am sure someone has a weird setup. whatever). Nick.
Re: dual boot problem
On 5/25/06, Nick Holland [EMAIL PROTECTED] wrote: viq wrote: On Thursday 25 May 2006 09:22, Jan Johansson wrote: akonsu [EMAIL PROTECTED] wrote: For the NTLDR you want the PBR (Partition Boot Record) not the MBR (Master Boot Record). I changed the of= for correct the terminology the important part is the if= device. I usually use dd if=/dev/rwd0a of=/mnt/OpenBSD.pbr bs=512 count=1 where /mnt is the mountpoint of a small FAT partiton that is active. While at the subject, you need to run this every time you upgrade bootblocks. What would be the result of not updating bootblocks when upgrading from snapshot? depends. The boot code doesn't change dramatically often. [...] Or not rerunning that command when updating them? As indicated by others, the system won't boot. [...] Excellent! I had the exact same problem (and also solved it with winimage, which is a disugsting app). Thanks to Nick for his clear explanation, and others for the solution in simple terms. This list is always so informative. -Nick (#2)