Opened 8 years ago

Last modified 4 years ago

#7930 reopened enhancement

Installer doesn't install bootman and DriveSetup doesn't set the created partition as active, leading to unbootable system

Reported by: HaikuReactOSTrac Owned by: korli
Priority: normal Milestone: R1
Component: Applications/Installer Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Haiku is no longer able to boot in Virtualbox and Virtual PC. I tried installing Build 42637 which is the latest build as of the reporting of this ticket. After installing Haiku, I rebooted the virtual Machine to find an error message which says "no bootable active volume" 15-20 seconds later, another message appeared which says "rom basic fatal: init18: boot failure" in capital letters. Does anyone know what this is being caused by? Is this particular build a broken build? the second message does not appear in Virtual PC. The 2 screen shots attached below show this problem.

Attachments (2)

SS-2011-08-17_20.36.19.png (160.0 KB) - added by HaikuReactOSTrac 8 years ago.
Screenshot of problem occurring in Virtualbox.
SS-2011-08-17_20.52.39.png (173.1 KB) - added by HaikuReactOSTrac 8 years ago.
Screenshot of problem occurring in Virtual PC

Download all attachments as: .zip

Change History (29)

Changed 8 years ago by HaikuReactOSTrac

Attachment: SS-2011-08-17_20.36.19.png added

Screenshot of problem occurring in Virtualbox.

Changed 8 years ago by HaikuReactOSTrac

Attachment: SS-2011-08-17_20.52.39.png added

Screenshot of problem occurring in Virtual PC

comment:1 Changed 8 years ago by HaikuReactOSTrac

Version: R1/alpha3R1/Development

comment:2 in reply to:  description Changed 8 years ago by taos

No such problems with haiku-nightly.vmdk from haiku-nightly-hrev42637-x86gcc2hybrid-vmware.zip and VirtualBox 4.0.8 on Windows 7. Did you attach the vmdk file as hard disk to your virtual machine or did you install ("After installing Haiku") from CD or anyboot image?

comment:3 Changed 8 years ago by deejam

I had no problems installing (and upgrading) hrev42637 using the nightly .iso image in VirtualBox 4.1.0 on Mac OS X.

Edit: In both cases, I installed Haiku onto the entire disk without any partitions and initialized it as Be File System.

Last edited 8 years ago by deejam (previous) (diff)

comment:4 Changed 8 years ago by siarzhuk

I have NO PROBLEM booting hrev42637 both on VB 4.1.0 hrev73009 and on VPC Win 7 Ultimate x64.

comment:5 Changed 8 years ago by tqh

That doesn't mean that there isn't a real problem. It would be good if you could setup your vm to write serial port data to file and attach it.

comment:6 Changed 8 years ago by HaikuReactOSTrac

I cannot write serial port data because Haiku refuses to boot in Virtualbox whenever a serial port is present, even from the CD.

comment:7 Changed 8 years ago by deejam

If I understand this correctly, the "No bootable active volume" is an error message from Haiku's boot loader and "ROM BASIC FATAL: INIT18: BOOT FAILURE" is VirtualBox's counterpart. They do say the same thing; no bootable volume is found.

  • Are you installing Haiku on a system that has partitions or are you installing Haiku on the entire disk?
  • Are you installing on a virtual disk, or a physical?
  • Are you performing a clean install, or an upgrade (upgrade = installing on top of a previous Haiku installation)?

comment:8 Changed 8 years ago by HaikuReactOSTrac

I am using an entire Virtual disk to do a clean install of Haiku, just one BeFS partition for the Haiku system files.

comment:9 Changed 8 years ago by taos

I can only reproduce HaikuReactosTrac's error message if I initialize the virtual disk as Intel Partition Map in DriveSetup, create a partition that is formatted as Be File System, and install Haiku onto the BFS partition (but don't install the Bootmenu to MBR). No problems when going the "traditional" way of initializing the whole disk as Be File System (without creating any partitions).

Last edited 8 years ago by taos (previous) (diff)

comment:10 Changed 8 years ago by HaikuReactOSTrac

Initializing the entire disk as BeFS allows a successful installation of Haiku.

comment:11 Changed 8 years ago by HaikuReactOSTrac

Summary: Boot failure in Virtualbox and Virtual PC with Latest nightly buildBoot failure in Virtualbox and Virtual PC with Latest nightly build when a BeFS partition is created within an Intel Partition Map instead of initializing the entire disk as BeFS without the Intel Partition Map

comment:12 in reply to:  7 Changed 8 years ago by bonefish

Replying to deejam:

If I understand this correctly, the "No bootable active volume" is an error message from Haiku's boot loader and "ROM BASIC FATAL: INIT18: BOOT FAILURE" is VirtualBox's counterpart. They do say the same thing; no bootable volume is found.

Not quite. The former message is likely from the MBR boot code -- Haiku's boot loader (both stage 1 and stage 2) doesn't care whether the partition is active. Since there's no indicator in the partition table whether a partition is bootable or not, the message means that none of the defined partitions has been marked active.

Please check in DriveSetup whether the partition exists and is marked active. If so, please provide the MBR (the first 512 bytes of the disk).

comment:13 Changed 8 years ago by taos

I'm not sure if this can really be called a bug: When I install any operating system to a partition I expect to have to install some kind of boot manager to the mbr in order to be able to boot the operating system (Windows and some linux distributions do this without asking the user - nasty behaviour in a multiboot environment), or at least to have to mark the partition as active. Right before the installation, Haiku even warns the user that either Haiku has to be added to a boot manager like Grub manually or Haiku's boot menu should be installed to prevent boot failures such as described here. If the boot menu is installed (or the haiku partition is set as active), I can boot Haiku even if it resides on a BFS partion inside an Intel Partition Map.

So this "bug" could rather be changed to an enhancement request: if there is only one partition (therefore no other operating systems on the disk that could be affected) mark the partition as active or install the boot menu to the mbr by default (wouldn't please me but possibly other users).

EDIT: The Haiku boot menu is not mentioned before the installation but rather in the user guide (humdinger introduced a new BootManager entry) - my fault. So maybe, a reminder that the (only) partition should be set to active (I hope Haiku's DriveSetup supports more than one active partition if there is more than one disk) or that alternatively a boot menu/manager should be installed could be added?

Last edited 8 years ago by taos (previous) (diff)

comment:14 Changed 8 years ago by HaikuReactOSTrac

Summary: Boot failure in Virtualbox and Virtual PC with Latest nightly build when a BeFS partition is created within an Intel Partition Map instead of initializing the entire disk as BeFS without the Intel Partition MapInstall boot menu by default when there is only 1 partition residing within an Intel Partition Map
Type: bugenhancement

comment:15 Changed 8 years ago by HaikuReactOSTrac

Component: - GeneralApplications/Installer
Owner: changed from nobody to korli

comment:16 Changed 8 years ago by pulkomandy

Summary: Install boot menu by default when there is only 1 partition residing within an Intel Partition MapInstaller doesn't install bootman and DriveSetup doesn't set the created partition as active, leading to unbootable system

comment:17 in reply to:  16 Changed 8 years ago by siarzhuk

Replying to pulkomandy:

Dear Adrien, have you really understand what the original problem is??? Your changes look like obfuscating original idea. Modifying MBR is not the Installer's business most of time. This bug was about very specific and rare case of empty single-partition configuration with zero-filled MBR. But you propose to edit MBR every time Installer was run and DriveSetup creates the partition. Most of users would kill you after this. ;-)

comment:18 Changed 8 years ago by pulkomandy

I changed the description because what was stated before (virtualbox and all that) doesn't have anything to do with the actual problem.

There are several solutions to it :

  • Drivesetup could put a default MBR when creating the partition map. I don't think it does
  • It could also activate the created partition if it is the only one on the drive
  • Or, this could be fixed in installer by detecting an empty MBR and asking to install bootman on it

I didn't propose any solution, just made the ticket title related to the involved tools. Before it sounded like a hardware crash early in bootloader or kernel boot, now it's clear that it's just a missing MBR, and thus a problem at install time.

comment:19 Changed 4 years ago by pulkomandy

NetBSD has an MBR code which could be used for this (in the minimal configuration - no bootmenu stuff): http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/arch/i386/stand/mbr/mbr.S?rev=1.23&content-type=text/plain&only_with_tag=MAIN

When creating an intel partition we should put that code in it instead of leaving it with en empty boot code.

comment:20 Changed 4 years ago by axeld

We already have MBR code, why not just use that in that case? I'm pretty sure that our intel partitioning module already writes an MBR, anyway.

comment:21 Changed 4 years ago by pulkomandy

What we need here is (I think) an MBR that just chainloads to the active partition. Our MBR code does not does that, and instead relies on makebootable being run on it to point to the stage2 loader at the right place.

The other one we have is bootman, which works fine too but needs some user configuration to setup the boot menu. Which you can't do when you are creating the partition map, because no partitions are there yet. So I don't think it can be used in that case.

I can confirm that starting with an empty disk (dd if=/dev/zero), creating a partition map on it, and installing haiku (but no bootman) results in a system that won't boot. It may work if you don't clear the disk first because the disk may already have a standard MBR on it which we don't erase. But if there's nothing there, you get an unbootable system.

At a minimum we need a clearer warning message that setting up bootman or some other MBR is required in that case.

comment:22 Changed 4 years ago by axeld

Didn't we have a writembr tool that did that? Anyway, why not just check in the Installer whether or not the MBR is empty, and if so, automatically run makebootable on it?

comment:23 Changed 4 years ago by pulkomandy

Right, writembr sounds like it would work. Not sure makebootable would work in the current state as it's designed to write the partition boot record, not the master boot record.

And after checking it looks like the partitionning system does reference it already. The "no bootable active volume" comes from there. So that part is actually working. (sorry, a bit of lack of sleep this week).

The problem is then that the partition is not active. We should automatically check the checkbox when creating the first partition on a volume in that case.

comment:24 Changed 4 years ago by axeld

That certainly would help. Alternatively, Installer could make sure that the Haiku partition is active, if there isn't any active partition.

comment:25 Changed 4 years ago by pulkomandy

Resolution: fixed
Status: newclosed

Fixed in hrev48184.

comment:26 Changed 4 years ago by axeld

I would prefer to have the test logic in Installer, too -- if you already have created a partition elsewhere, you might still end up with an unbootable Haiku afterwards.

Even worse, if you don't install Haiku to the first partition, the fix doesn't do anything useful at all. So IMO it would be nicer not to randomly choose a partition to make active, but let Installer do an informed decision instead.

comment:27 Changed 4 years ago by pulkomandy

Resolution: fixed
Status: closedreopened

You are correct. But now I tried to add this to Installer (to makebootable, actually, since that's what Installer uses to make the partition bootable), and I can't understand how to change partition parameters from there. It seems the support for editing partition parameters after creation is missing or incomplete. Or maybe it's just undocumented and I can't understnad the code and how these BPartition, BMutablePartition, BPartitionHandle are supposed to fit together.

Note: See TracTickets for help on using tickets.