Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#17069 closed bug (fixed)

Boot menu showing wrong selection

Reported by: beaglejoe Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: System/Boot Loader Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by beaglejoe)

The Boot menu shows the wrong selection if there is more than one bootable partition.

If you have multiple bootable partitions

  • Haiku1
  • HaikuNew
  • Haiku-cd

The boot loader menu will show
(Current: Haiku-cd) the last one

Selecting 'Continue booting' will actually boot the FIRST partition (Haiku1)

Probable duplicate of #14165

Change History (11)

comment:1 by beaglejoe, 3 years ago

This seems to be more of a display issue than a functional one.

In src/system/boot/loader/menu.cpp

The code in add_boot_volume_menu() loops through the partitions calling add_boot_volume_item() for each bootable one.
add_boot_volume_item() changes the text of its parent menu, so this leaves the main menu showing the last bootable partition instead of the first bootable partition.

comment:3 by diver, 3 years ago

Is this related to #14165?

comment:4 by beaglejoe, 3 years ago

Yes. Looks like a duplicate. Sorry

comment:5 by beaglejoe, 3 years ago

An optional fix is to comment out the call to item->UpdateStateName(stateItem->VolumeState()); in add_boot_volume_item()
See https://git.haiku-os.org/haiku/tree/src/system/boot/loader/menu.cpp

			if (state == selectedState) {
				stateItem->SetMarked(true);
				stateItem->Select(true);
				//item->UpdateStateName(stateItem->VolumeState());
			}

This also fixes it, but seems a bit more risky and hard to test.

comment:6 by beaglejoe, 3 years ago

Description: modified (diff)

comment:7 by jessicah, 3 years ago

The correct fix is to add:

if (volume == sBootVolume->RootDirectory()) {

item->UpdateStateName(stateItem->VolumeState());

}

in reply to:  7 comment:8 by beaglejoe, 3 years ago

Replying to jessicah:

The correct fix is to add:

if (volume == sBootVolume->RootDirectory()) {

item->UpdateStateName(stateItem->VolumeState());

}

Updated: https://review.haiku-os.org/c/haiku/+/4200

comment:9 by jessicah, 3 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev55223.

comment:10 by kallisti5, 3 years ago

@beaglejoe could you confirm this one is indeed resolved for you? Just double checking before I merge on hrev1/beta3.

Version 0, edited 3 years ago by kallisti5 (next)

in reply to:  10 comment:11 by beaglejoe, 3 years ago

Replying to kallisti5:

@beaglejoe could you confirm this one is indeed resolved for you? Just double checking before I merge on R1/beta3.

Re-tested with hrev55228 (x86_64)

Works with QEMU, Works with Intel NUC (booted from USB) Works with Intel NUC (booted from harddrive) BOOTX64.efi copied from USB to harddrive ESP partition.

Note: See TracTickets for help on using tickets.