biosboot broken?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

biosboot broken?

Markus Schatzl-2
Hi,

I've got a strange problem here; maybe some of you have a better
understanding of the issue:

Machine:    Thinkpad X40
Disks:      40G, 60G
Partitions: 7.5G NTFS : OpenBSD : Free Space : 4G CompaqRescue

Installing OpenBSD on the original disk (40G) made no problems at all.
Everything worked just fine.
Now that I switched to a 60G disk (cloned the other 2 partitions and the
Windows bootsector, then installed OpenBSD anew from the same
floppy/mirror as before), OpenBSD won't boot any more, except when I run
the boot-floopy and boot explicitely with wd0a:/bsd

I switch between boot-partitions by flagging them with fdisk. To assure
that the OpenBSD bootsector is ok, I also installed it manually. Without
success.

Anybody has an idea why the bios dares to say that it couldn't find an OS?

Any ideas?

Thanks in advance,
/Markus

Reply | Threaded
Open this post in threaded view
|

Re: biosboot broken?

Uwe Dippel
On Mon, 02 Jan 2006 14:06:52 +0100, M. Schatzl wrote:

> Now that I switched to a 60G disk (cloned the other 2 partitions and the
> Windows bootsector, then installed OpenBSD anew from the same
> floppy/mirror as before), OpenBSD won't boot any more, except when I run
> the boot-floopy and boot explicitely with wd0a:/bsd
>
> I switch between boot-partitions by flagging them with fdisk. To assure
> that the OpenBSD bootsector is ok, I also installed it manually. Without
> success.
>
> Anybody has an idea why the bios dares to say that it couldn't find an OS?

I may not understand your terminology correctly.
Did you copy the MBR as extra ? Just copying the partitions won't be
enough. Respectively: did you install the MBR during your second install
? (Why did you do a second install, after all ?)
What is the 'Windows bootsector' ? You talk about the MBR or boot.ini ?
There is no need to fdisk to multi-boot, btw. Read the FAQ on this.
Did you install the OpenBSD bootsector to MBR or to the root-partition ?

(I can only hope that these questions help you in understanding my
problems of understanding)

Uwe

Reply | Threaded
Open this post in threaded view
|

Re: biosboot broken?

Markus Schatzl-2
Uwe Dippel wrote:
> On Mon, 02 Jan 2006 14:06:52 +0100, M. Schatzl wrote:
>
>
>>Now that I switched to a 60G disk (cloned the other 2 partitions and the
>>Windows bootsector, then installed OpenBSD anew from the same
>>floppy/mirror as before), OpenBSD won't boot any more, except when I run
>>the boot-floopy and boot explicitely with wd0a:/bsd


OK, I finally found the error. This is the the partition table:


Disk: wd0       geometry: 5168/240/63 [78140160 Sectors]
Offset: 0       Signature: 0xAA55
         Starting       Ending       LBA Info:
 #: id    C   H  S -    C   H  S [       start:      size   ]
------------------------------------------------------------------------
 0: 07    0   1  1 -  948 239 63 [          63:    14348817 ] HPFS/QNX/AUX
 1: 12 7189   0  1 - 7751 239 63 [   108697680:     8512560 ] Compaq Diag.
*2: A6  949   0  1 - 7000 239 63 [    14348880:    91506240 ] OpenBSD
 3: 00    0   0  0 -    0   0  0 [           0:           0 ] unused


This is the layout:

NTFS -> OpenBSD -> unused -> Compaq



Partitions #0 and #1 as well as the MBR were already transferred before
the installation of OpenBSD (via the installer). At the disk-setup
stage, I let drop myself into fdisk. Now I created the A6 partition on
unused space and proceeded,

the first time leaving the boot flag on #0:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The NTFS and Compaq(FAT16) partitions showed up as i and j in the
disklabel-editor.

I had to calculate the new offsets for my partitions myself because it
always remained on the initial value (which was correct for wd0a).

Installing biosboot via "/usr/mdec/installboot -v /boot
/usr/mdec/biosboot wd0" was of exactly no use. When I set the boot flag
to #2 later on, it still didn't work. The BIOS always responded with "No
OS found"-messages, though I could start OpenBSD then with a bootfloppy.

Appearently there was no damage done to the MBR, because Windows booted
without problems.


the second time with setting the flag to #2:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

There are no partitions visible except wd0a and wd0c.

Offsets cumulated themselves every "a X"

Installing the BIOS was successful and it also booted the kernel after a
reboot.



In the second case it behaved as expected.

Obviously, the fact of setting the active partition affects the
installation. But shouldn't the flag be just meaningful on boot, to tell
the BIOS where to hook in? Maybe my assumptions/expectations are wrong,
but I suspected the installer only to honor the partition ID.

I don't know if this is an installer bug; I'm certainly not really
hellbent to reproduce it, but I could as long as I got that old disk (1
more week).

So let me know.

All the best,
/Markus

Reply | Threaded
Open this post in threaded view
|

Re: biosboot broken?

Uwe Dippel
On Wed, 04 Jan 2006 18:36:33 +0100, M. Schatzl wrote:

> the first time leaving the boot flag on #0:
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> The NTFS and Compaq(FAT16) partitions showed up as i and j in the
> disklabel-editor.
>
> I had to calculate the new offsets for my partitions myself because it
> always remained on the initial value (which was correct for wd0a).

Can confirm this behaviour. It is plain ugly: You need a pocket
calculator, and when you miss it by one, it will tell you. So it *does*
know, it only doesn't tell you that it knows the correct value to start
with and rather tests your own calculating abilities.

What I cannot reproduce, though, is the boot problem. Here it installs and
boots properly (what do you mean with 'Installing the BIOS' ??); also in
the case with active partition #0. Without any additional biosboot or
whatsoever.
Maybe you made a mistake at your offset/size calculations ?

Personally, I consider it an installer bug. When you run a multi-boot and
don't have OpenBSD in the first partition; you probably boot through
boot.ini; grub or lilo on *nix or similar. Then the correct active
partition is and remains #0. No point to make the installer default any
OpenBSD partition to the offset of your 'first' OS.

Uwe

Reply | Threaded
Open this post in threaded view
|

Re: biosboot broken?

Markus Schatzl-2
Uwe Dippel wrote:
>
> What I cannot reproduce, though, is the boot problem. Here it installs and
> boots properly (what do you mean with 'Installing the BIOS' ??); also in
> the case with active partition #0. Without any additional biosboot or
> whatsoever.
> Maybe you made a mistake at your offset/size calculations ?

Dammit, s/BIOS/biosboot/. Plain dumb error. I meant the first stage
bootloader. I doubt that I made a mistake due to a second install where
it behaved exactly the same way (not to say that I couldn't err a second
time =).

> Personally, I consider it an installer bug. When you run a multi-boot and
> don't have OpenBSD in the first partition; you probably boot through
> boot.ini; grub or lilo on *nix or similar. Then the correct active
> partition is and remains #0. No point to make the installer default any
> OpenBSD partition to the offset of your 'first' OS.

No, I boot as if OpenBSD was on the first partition through setting the
boot-flag active on this partition. I hardly use the other ones.

I suspect that biosboot just gets installed at the wrong location if you
don't set the active partition the right way at install time. But I will
 try to confirm that as soon as possible.

/Markus

Reply | Threaded
Open this post in threaded view
|

Re: biosboot broken?

Uwe Dippel
M. Schatzl wrote:

> No, I boot as if OpenBSD was on the first partition through setting the
> boot-flag active on this partition. I hardly use the other ones.
>
> I suspect that biosboot just gets installed at the wrong location if you
> don't set the active partition the right way at install time. But I will
>  try to confirm that as soon as possible.

I can confirm that it is installed in the right place; at least here on
my machine.
I have / had:
Linux /boot - active
OpenBSD
Free
Extended with logical drives (Linux).

I didn't do anything but what is written in the FAQ. No (extra)
biosboot. Nothing.
The only observation was, that all disklabels were 'glued' to the first
partition to start with. Which I rectified through and through using a
PC (Pocket Calculator).

Uwe