#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 )
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 , 3 years ago
comment:5 by , 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 , 3 years ago
Description: | modified (diff) |
---|
follow-up: 8 comment:7 by , 3 years ago
The correct fix is to add:
if (volume == sBootVolume->RootDirectory()) {
item->UpdateStateName(stateItem->VolumeState());
}
comment:8 by , 3 years ago
Replying to jessicah:
The correct fix is to add:
if (volume == sBootVolume->RootDirectory()) {
item->UpdateStateName(stateItem->VolumeState());
}
follow-up: 11 comment:10 by , 3 years ago
@beaglejoe could you confirm this one is indeed resolved for you? Just double checking before I merge on R1/beta3.
comment:11 by , 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.
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.