OpenBSD failing to boot - BSD

This is a discussion on OpenBSD failing to boot - BSD ; I installed OpenBSD 3.9 on my x86 system tonight. After rebooting the machine a couple of times, I am no longer able to get into OpenBSD. (BTW - this exact same thing happened a few nights ago on a different ...

+ Reply to Thread
Results 1 to 16 of 16

Thread: OpenBSD failing to boot

  1. OpenBSD failing to boot

    I installed OpenBSD 3.9 on my x86 system tonight. After rebooting the
    machine a couple of times, I am no longer able to get into OpenBSD.
    (BTW - this exact same thing happened a few nights ago on a different
    hard-drive, same computer though.)

    When the computer boots, it goes through the normal process ...
    displays the BIOS information and then attempts to load the boot loader
    from the MBR. This is where it stops. I don't get any error messages.
    I just get a blank screen with a blinking cursor.

    I can boot from the OpenBSD 3.9 CD and get to a command prompt. From
    there I can mount the partitions ... so I know the system is still in
    tact. I'm not sure how to restore the MBR.

    Does anyone know how I can restore the MBR? (Other than a re-install)


  2. Re: OpenBSD failing to boot

    blixel@gmail.com wrote:
    > I installed OpenBSD 3.9 on my x86 system tonight. After rebooting the
    > machine a couple of times, I am no longer able to get into OpenBSD.
    > (BTW - this exact same thing happened a few nights ago on a different
    > hard-drive, same computer though.)
    >
    > When the computer boots, it goes through the normal process ...
    > displays the BIOS information and then attempts to load the boot loader
    > from the MBR. This is where it stops. I don't get any error messages.
    > I just get a blank screen with a blinking cursor.
    >
    > I can boot from the OpenBSD 3.9 CD and get to a command prompt. From
    > there I can mount the partitions ... so I know the system is still in
    > tact. I'm not sure how to restore the MBR.
    >
    > Does anyone know how I can restore the MBR? (Other than a re-install)


    If you did, indeed, destroy the MBR, some hackery might get you around
    it; most installs simply use the whole disk, and re-writing the MBR just
    might work.

    Since the system was able to figure out where the partitions were
    located, apparently, it appears that only the boot loader may be hosed.
    The various installation media (and, of course, the base system) include
    installboot(8), which can re-write the bootloader for you.

    Joachim

  3. Re: OpenBSD failing to boot

    Am Sat, 20 May 2006 04:34:13 +0200 schrieb blixel@gmail.com
    :


    >
    > Does anyone know how I can restore the MBR? (Other than a re-install)
    >



    The Installation Guide says at Point 4.12.2:

    http://www.openbsd.org/faq/faq4.html#noboot


    One solution is to boot the install media again,
    drop to the shell and invoke fdisk(8) to update
    the MBR code from the command line:

    # fdisk -u wd0

    Note: the "update" option within the interactive
    ("-e") mode of fdisk will not write the signature
    bytes required to make the disk bootable.

    Hope this helps!

  4. Re: OpenBSD failing to boot

    > > Does anyone know how I can restore the MBR? (Other than a re-install)
    > >

    >
    >
    > The Installation Guide says at Point 4.12.2:
    >
    > http://www.openbsd.org/faq/faq4.html#noboot
    >
    >
    > One solution is to boot the install media again,
    > drop to the shell and invoke fdisk(8) to update
    > the MBR code from the command line:
    >
    > # fdisk -u wd0
    >


    Thanks for the reply. Apparently the problem was deeper than I
    thought. After running "fdisk -u wd0" to correct the problem, I was no
    longer able to get the machine to boot past the BIOS. At the point the
    computer would recognize the hard-drive, it would hang. I couldn't
    even boot from a CD or floppy because it would hang too early in the
    boot process.

    I took the hard-drrive out of the machine, put it in an external
    enclosure, and hooked it up to my other computer. From there I was
    able to run fdisk on the drive. I decided to just clear out all the
    partitions and start over. (Since it was a new OpenBSD 3.9 install, I
    wasn't losing any data.)

    Once I deleted all the partitions, I then ran a "badblocks -v /dev/sdb"
    check just to make sure everything was OK with the drive itself. It
    checked out OK. No bad blocks anyway.

    So then I powered everything down, removed the drive from the external
    enclosure, and put it back in the other computer. Whatever was causing
    the computer to hang was solved by deleting all the partitions.

    That's where I'm at now. Later today I'll re-install OpenBSD on the
    drive. I have a pretty good idea what caused the MBR to become
    corrupted in the first place... There is a simple little boot loader
    called GAG that I like. I've used it with many Linux distros, FreeBSD,
    and YellowTAB's Zeta. I guess GAG doesn't like OpenBSD though.
    Because it messed up the MBR on two different hard-drives when I tried
    to install it.


  5. Re: OpenBSD failing to boot

    Am Sat, 20 May 2006 18:46:38 +0200 schrieb blixel@gmail.com
    :


    > That's where I'm at now. Later today I'll re-install OpenBSD on the
    > drive. I have a pretty good idea what caused the MBR to become
    > corrupted in the first place... There is a simple little boot loader
    > called GAG that I like. I've used it with many Linux distros, FreeBSD,
    > and YellowTAB's Zeta. I guess GAG doesn't like OpenBSD though.
    > Because it messed up the MBR on two different hard-drives when I tried
    > to install it.
    >


    Are you planning a multi-boot harddrive or a OpenBSD-Standalone?
    There are some restrictions you should reconsider like the root partition
    should be contained in the first 8GB of disk, and there can only be one
    OpenBSD MBR partition per Harddisk. Coexistence with windows is only
    possible a.f.a.i.k. if MS is the first operation system on harddrive.





  6. Re: OpenBSD failing to boot

    > > That's where I'm at now. Later today I'll re-install OpenBSD on the
    > > drive. I have a pretty good idea what caused the MBR to become
    > > corrupted in the first place... There is a simple little boot loader
    > > called GAG that I like. I've used it with many Linux distros, FreeBSD,
    > > and YellowTAB's Zeta. I guess GAG doesn't like OpenBSD though.
    > > Because it messed up the MBR on two different hard-drives when I tried
    > > to install it.
    > >

    >
    > Are you planning a multi-boot harddrive or a OpenBSD-Standalone?
    >

    multi-boot for this particular machine

    > There are some restrictions you should reconsider like the root partition
    > should be contained in the first 8GB of disk, and there can only be one
    > OpenBSD MBR partition per Harddisk. Coexistence with windows is only
    > possible a.f.a.i.k. if MS is the first operation system on harddrive.
    >

    I realized I made a partitioning mistake. I *think* I got it right
    this time. I re-installed OpenBSD 3.9 on the machine and used CHS mode
    to setup the partition. I set the starting cylinder to 0, the starting
    head to 1, and the starting sector to 1. I set the ending cylinder to
    5000 (which gives me close to 40 gigabyte), I set the ending head to
    254 and the ending sector to 63.

    When I then created the disklabels inside the partition, the a
    disklabel defaulted to an offset of 63 this time ... as opposed to an
    offset of 0. I think that was where the mistake was the first two
    times. I think the a disklabel was overlapping the MBR.

    I'm still not entirely comfortable with what I did ... in that I don't
    entirely understand the CHS mode and the offset. I sort of get it...
    sectors 0-62 is the MBR. So you have to start at 63 so you don't
    overlap with the MBR.

    As far as what other Operating Systems I'll install on this machine, it
    will probably be FreeBSD 6.1 and Debian.


  7. Re: OpenBSD failing to boot

    Am Sat, 20 May 2006 21:40:13 +0200 schrieb blixel@gmail.com
    :

    > I'm still not entirely comfortable with what I did ... in that I don't
    > entirely understand the CHS mode and the offset. I sort of get it...
    > sectors 0-62 is the MBR. So you have to start at 63 so you don't
    > overlap with the MBR.
    >
    > As far as what other Operating Systems I'll install on this machine, it
    > will probably be FreeBSD 6.1 and Debian.
    >


    You ran into the Problem that i guessed, i had that in my first run with
    a brandnew hd without mbr too.
    The Offset 63 is the number of sectors from the beginning of the disk where
    the partition begins, you're right.
    Be aware that at the "size: []" question of disklabel you can enter
    amounts in
    Mb like 500M or GB like 3G.
    FreeBSD and Linux don't have any restrictions for multiboot afaik.

    Have Fun!

    Mr. Sun






  8. Re: OpenBSD failing to boot

    mr. sun wrote:
    --- snip ---
    > There are some restrictions you should reconsider like the root partition
    > should be contained in the first 8GB of disk, and there can only be one

    --- snip ---

    It seems that this resctriccion has been removed. I have my OBSD box installed
    in the second half of a 30GB disk. The first half is occupied by FBSD.

    -- Julio



  9. Re: OpenBSD failing to boot

    Julio Uehara wrote:
    > mr. sun wrote:
    > --- snip ---
    >> There are some restrictions you should reconsider like the root partition
    >> should be contained in the first 8GB of disk, and there can only be one

    > --- snip ---
    >
    > It seems that this resctriccion has been removed. I have my OBSD box installed
    > in the second half of a 30GB disk. The first half is occupied by FBSD.
    >

    I don't know about that. The FAQ still warns against it.

    "Note that it is possible to install a 40G drive on an old 486 and load
    OpenBSD on it as one huge partition, and think you have successfully
    violated the above rule. However, it might come back to haunt you in a
    most unpleasant way"



  10. Re: OpenBSD failing to boot

    On 05/24/06 7:07 PM, Clever Monkey wrote:

    > Julio Uehara wrote:
    >
    >> It seems that this resctriccion has been removed. I have my OBSD box
    >> installed
    >> in the second half of a 30GB disk. The first half is occupied by FBSD.
    >>

    > I don't know about that. The FAQ still warns against it.


    The restriction is no longer due to OpenBSD's boot loader (not since
    3.5, I think), but some BIOSes will still have problems booting over
    504MB, 32GB, 128GB, etc., and will probably also affect other operating
    systems' boot loaders...


    --
    Chris Odorjan - codorjan@gmail.com - http://www.execulink.com/~bobnet/

  11. Re: OpenBSD failing to boot

    On Wed, 24 May 2006 19:49:00 -0400
    Chris Odorjan wrote:

    > On 05/24/06 7:07 PM, Clever Monkey wrote:
    >
    > > Julio Uehara wrote:
    > >
    > >> It seems that this resctriccion has been removed. I have my OBSD box
    > >> installed
    > >> in the second half of a 30GB disk. The first half is occupied by FBSD.
    > >>

    > > I don't know about that. The FAQ still warns against it.

    >
    > The restriction is no longer due to OpenBSD's boot loader (not since
    > 3.5, I think), but some BIOSes will still have problems booting over
    > 504MB, 32GB, 128GB, etc., and will probably also affect other operating
    > systems' boot loaders...


    I found a usenet post [1] explaining BIOS geometry translation, and
    after reading it together with boot_i386(8) and biosboot(8) I think I
    understand the 1024 cylinder startup problem except for a few details.

    My hard disk controller and BIOS support LBA and so does biosboot, so
    from that point forward in the start process there should be nothing to
    worry about. But what about the MBR code, does it use LBA, or CHS only?
    If CHS only: In BIOS next to the selected mode (LBA) I can select my own
    translation in CHS numbers. I should choose heads and sectors values
    close to the BIOS API max (256, 63) to have as many sectors as possible
    below 1024 cylinders, right? (I have a Windows partition at the
    beginning on the disk and want it to be as big as possible.) Biosboot
    will reside on the first sector of my OpenBSD partition, I don't have to
    have the entire OpenBSD partition below 1024 cylinders, only that
    sector?

    [1]


    --
    Magnus

  12. Re: OpenBSD failing to boot

    On 20 May 2006 12:40:13 -0700
    "blixel@gmail.com" wrote:

    > I'm still not entirely comfortable with what I did ... in that I don't
    > entirely understand the CHS mode and the offset. I sort of get it...
    > sectors 0-62 is the MBR. So you have to start at 63 so you don't
    > overlap with the MBR.


    I believe the MBR is just one sector (512 byte), but what is stored in
    the rest of that track?

    --
    Magnus

  13. Re: OpenBSD failing to boot

    On 05/29/06 10:36 AM, M. Ahman wrote:

    > My hard disk controller and BIOS support LBA and so does biosboot, so
    > from that point forward in the start process there should be nothing to
    > worry about. But what about the MBR code, does it use LBA, or CHS only?


    I'm pretty sure OpenBSD's MBR code does LBA (since version 3.5), the
    commit message says this:

    Major overhaul of our master boot record.

    We now use EDD calls if the disk supports it, so we can boot partitions
    that start above the 8 GB CHS limit. Of itself, this change does not
    remove the current 8 GB limit for OpenBSD/i386.

    (That last part refers to biosboot also needing to use EDD calls to load
    the second-stage bootstrap program, which it has also done since 3.5.)

    So if your BIOS and controller speak LBA, then it _should_ work with
    OpenBSD's MBR. But if Windows is installed then it probably put its own
    MBR there. This probably isn't a problem assuming you're using a recent
    version (anything newer than Win95, I'd guess).

    --
    Chris Odorjan - codorjan@gmail.com - http://www.execulink.com/~bobnet/

  14. Re: OpenBSD failing to boot

    On 29 May 2006 16:48:00 +0200
    "M. Ahman" wrote:

    > On 20 May 2006 12:40:13 -0700
    > "blixel@gmail.com" wrote:
    >
    > > I'm still not entirely comfortable with what I did ... in that I don't
    > > entirely understand the CHS mode and the offset. I sort of get it...
    > > sectors 0-62 is the MBR. So you have to start at 63 so you don't
    > > overlap with the MBR.

    >
    > I believe the MBR is just one sector (512 byte), but what is stored in
    > the rest of that track?


    I found this at after lot of
    searching, so I'm going to answer my own question.


    For example, most new versions of FDISK start the first partition
    (primary or extended) at cylinder 0, head 1, sector 1. This leaves the
    sectors at cylinder 0, head 0, sectors 2...n as unused sectors. This
    same layout may be seen on the first track of an extended partition. See
    example 2 below. Also note that software drivers like Ontrack's Disk
    Manager depend on these unused sectors because these drivers will hide
    their code there (in cylinder 0, head 0, sectors 2...n). This is also a
    good place for boot sector virus programs to hang out.


    --
    Magnus

  15. Re: OpenBSD failing to boot

    On Mon, 29 May 2006 19:26:43 -0400
    Chris Odorjan wrote:

    > On 05/29/06 10:36 AM, M. Ahman wrote:
    >
    > > My hard disk controller and BIOS support LBA and so does biosboot, so
    > > from that point forward in the start process there should be nothing to
    > > worry about. But what about the MBR code, does it use LBA, or CHS only?

    >
    > I'm pretty sure OpenBSD's MBR code does LBA (since version 3.5), the
    > commit message says this:
    >
    > Major overhaul of our master boot record.
    >
    > We now use EDD calls if the disk supports it, so we can boot partitions
    > that start above the 8 GB CHS limit. Of itself, this change does not
    > remove the current 8 GB limit for OpenBSD/i386.
    >
    > (That last part refers to biosboot also needing to use EDD calls to load
    > the second-stage bootstrap program, which it has also done since 3.5.)
    >
    > So if your BIOS and controller speak LBA, then it _should_ work with
    > OpenBSD's MBR. But if Windows is installed then it probably put its own
    > MBR there. This probably isn't a problem assuming you're using a recent
    > version (anything newer than Win95, I'd guess).


    Doing `fdisk -u' after a Windows installation could be a good idea then.

    Thanks for the help.

    --
    Magnus

  16. Re: OpenBSD failing to boot

    M. Ahman wrote:
    > I found a usenet post [1] explaining BIOS geometry translation, and
    > after reading it together with boot_i386(8) and biosboot(8) I think I
    > understand the 1024 cylinder startup problem except for a few details.
    >
    > My hard disk controller and BIOS support LBA and so does biosboot, so
    > from that point forward in the start process there should be nothing to
    > worry about. But what about the MBR code, does it use LBA, or CHS only?
    > If CHS only: In BIOS next to the selected mode (LBA) I can select my own
    > translation in CHS numbers. I should choose heads and sectors values
    > close to the BIOS API max (256, 63) to have as many sectors as possible
    > below 1024 cylinders, right? (I have a Windows partition at the
    > beginning on the disk and want it to be as big as possible.) Biosboot
    > will reside on the first sector of my OpenBSD partition, I don't have to
    > have the entire OpenBSD partition below 1024 cylinders, only that
    > sector?


    The following shows the partitions allocated to WinXP and *BSD. It also shows
    that OpenBSD is well below the previous limit of 1024 cyl. I am using GRUB
    coming in pkgsrc/ports of Net/FreeBSD, as a bootloader.


    bash-3.1$ fdisk wd0
    Disk: wd0 geometry: 4865/255/63 [78156225 Sectors]
    Offset: 0 Signature: 0xAA55
    Starting Ending LBA Info:
    #: id C H S - C H S [ start: size ]
    ------------------------------------------------------------------------
    *0: 07 0 1 1 - 1911 254 63 [ 63: 30716217 ] HPFS/QNX/AUX
    1: A9 1912 0 1 - 4865 144 63 [ 30716280: 47449080 ] NetBSD
    2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
    3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
    bash-3.1$ fdisk wd1
    Disk: wd1 geometry: 59554/16/63 [60030432 Sectors]
    Offset: 0 Signature: 0xAA55
    Starting Ending LBA Info:
    #: id C H S - C H S [ start: size ]
    ------------------------------------------------------------------------
    *0: A5 0 1 1 - 29791 15 63 [ 63: 30030273 ] FreeBSD
    1: A6 29792 0 1 - 59549 15 63 [ 30030336: 29996064 ] OpenBSD
    2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
    3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused

    Hope it helps,

    -- Julio



+ Reply to Thread