#5163 closed enhancement (fixed)
[PATCH] speed-up boot
Reported by: | Grey | Owned by: | stippi |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/Boot Loader | Version: | R1/Development |
Keywords: | boot | Cc: | fredrik.holmqvist@… |
Blocked By: | Blocking: | #5341 | |
Platform: | All |
Description
Attached patch for speed-up Haiku boot on 0.75 sec.
Main idea: don't wait to give the user the opportunity to press a key for boot menu (current - "space" key) or debug output (current - ECS key), instead to use keyboard state flags - CapsLock and Scroll Lock.
At boot time (after BIOS flushed leds on keyboard) press CapsLock for boot menu or Scroll Lock for debug output.
GRUB and other first level loaders can reset keyboard led state, but not BIOS keyboard flags, so we can use this keys too.
Attachments (4)
Change History (26)
by , 15 years ago
Attachment: | boot_keys.patch added |
---|
follow-up: 2 comment:1 by , 15 years ago
follow-up: 3 comment:2 by , 15 years ago
Replying to axeld:
While the wait time is indeed way too long for my taste, I don't really like this solution either (the current keys just are a lot more natural and intuitive).
Can't we compromise on half the wait time for now?
+1 for shortening the wait time. I'd find it nice, if we'd also support holding Shift to enter the boot menu, though (like BeOS' boot loader), since that usually doesn't have side effects when done earlier (e.g. during the BIOS initialization or in the boot menu).
comment:3 by , 15 years ago
Replying to axeld:
While the wait time is indeed way too long for my taste, I don't really like this solution either (the current keys just are a lot more natural and intuitive).
Can't we compromise on half the wait time for now?
Let's temporary forget about wait time... I like the current keys too, but I am programmer too. Let us think about end-users.
Windows - 93% of market, Mac OS - 5%, *nix and *BSD < 1%
Windows, Mac OS and *BSD use F8 for boot menu. So we have also support F8.
Replying to bonefish:
+1 for shortening the wait time. I'd find it nice, if we'd also support holding Shift to enter the boot menu, though (like BeOS' boot loader), since that usually doesn't have side effects when done earlier (e.g. during the BIOS initialization or in the boot menu).
Yes, one more reason for support holding Shift - Mac OS X use it for "Safe Boot".
In all: Space, F8 and holding Shift for "Boot Menu" and ESC for "Debug Output". Is it all, or same additional hot keys?
Replying to axeld:
Can't we compromise on half the wait time for now?
Wait a bit. I have idea how to support all this keys without waiting time. One day required for debuging and testing.
comment:4 by , 15 years ago
How about "Windows key" and "Menu key"?
BTW, look http://www.perlmonks.org/index.pl/jacques?node_id=509130
comment:5 by , 15 years ago
New solution in attached patch. Wait time=0
Use Space, F8, F12, holding RShift or holding LShift for boot menu.
ESC for debug output.
Main idea - search hot keys codes in BIOS keyboard buffer.
P.S. Holding Shift have side effect with GRUB. Do not hold Shift before GRUB menu. Start holding Shift only after GRUB menu will be on screen!
by , 15 years ago
Attachment: | boot_keys2.patch added |
---|
comment:6 by , 15 years ago
On my systems I've removed the wait-time and use CTRL and ALT modifiers. (It worked on BeOS as well). SHIFT seems to be used earlier in the bootloader though.
by , 15 years ago
Attachment: | modifiers_check.patch added |
---|
Here is the patch I use. (Not sure if it's up to style, just an example).
comment:7 by , 15 years ago
Cc: | added |
---|
follow-ups: 9 10 comment:8 by , 15 years ago
Apart from a few coding style issues (kbd -> keyboard, cikl12 -> ?, space after comma), why are you scanning the buffer twice, and don't check for all the values in one go? Why should the menu have precedence over the debug output? (if that is the intention)
Maybe the function should return a flags field instead that indicates if debug output or the menu have been requested (or both)?
Also, I'm not sure if removing the wait time completely is such a good idea, but I guess we'll see once we play around with it a bit.
comment:9 by , 15 years ago
Replying to axeld:
... why are you scanning the buffer twice, and don't check for all the values in one go? Why should the menu have precedence over the debug output? (if that is the intention)
That is correct intention. Because ESC used in GRUB menu for navigation, and we can find it in keyboard buffer. In any case it will be possible to start debug output from boot_loader menu.
May be the function should return a flags field instead that indicates if debug output or the menu have been requested (or both)?
IMHO, no sense to do it.
Also, I'm not sure if removing the wait time completely is such a good idea, but I guess we'll see once we play around with it a bit.
Why? Good OS have to be load fast!
Apart from a few coding style issues (kbd -> keyboard, cikl12 -> ?, space after comma),
Style corrected patch will be ready soon...
by , 15 years ago
Attachment: | boot_keys3.patch added |
---|
comment:10 by , 15 years ago
Replying to axeld:
8 days ago attachment boot_keys3.patch added. Is it ok for trunk?
comment:11 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → in-progress |
In my opinion, yes. It's now much easier to reach the boot menu. Just press Shift before Haiku even starts to boot. But the documentation will need to be updated as well.
comment:12 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | in-progress → closed |
Applied in hrev35050 and also updated the boot loader documentation. Hope this was the only place.
comment:13 by , 15 years ago
Blocking: | 5341 added |
---|
follow-up: 18 comment:14 by , 15 years ago
In my case I've side effects.
I'm using a USB Key as boot disk, so I must press F8 during BIOS start to show boot menu and select the USB key, instead of Haiku starting I've the Boot Menu and I must choose "continue booting".
It seems to me that F8 remains in buffers and so "Boot Menu" is triggered...
It's pretty annoying!
follow-up: 16 comment:15 by , 15 years ago
Sounds to me like it would be a solution not to use as many keys as we can think of. The shift and space key alone to enter the boot menu should be enough. I don't think this can conflict with anything else.
comment:16 by , 15 years ago
Replying to stippi:
Sounds to me like it would be a solution not to use as many keys as we can think of. The shift and space key alone to enter the boot menu should be enough. I don't think this can conflict with anything else.
Agreed.
comment:17 by , 15 years ago
Yes if is impossible to clear the buffer from BIOS (I have pressed F8 to have the BIOS boot menu, not Haiku one), it is more secure to use unused keys SHIFT and SPACE are right, as they're unused, by any BIOS I think.
comment:18 by , 15 years ago
Replying to fano:
In my case I've side effects.
I'm using a USB Key as boot disk, so I must press F8 during BIOS start to show boot menu and select the USB key, instead of Haiku starting I've the Boot Menu and I must choose "continue booting".
Quote from Grey:
Let's temporary forget about wait time... I like the current keys too, but I am programmer too. Let us think about end-users. Windows - 93% of market, Mac OS - 5%, *nix and *BSD < 1% Windows, Mac OS and *BSD use F8 for boot menu. So we have also support F8.
F8 - de facto standart for boot menu.
Replying to stippi:
Sounds to me like it would be a solution not to use as many keys as we can think of. The shift and space key alone to enter the boot menu should be enough. I don't think this can conflict with anything else.
Holding Shift have side effect with GRUB. Do not hold Shift before GRUB menu. Start holding Shift only after GRUB menu will be on screen!
follow-up: 20 comment:19 by , 15 years ago
The scope of this was to speed up the (already fast!) boot process avoiding the way to user pressing "space bar"... well in my case the affect obtained is the contrary!
I have to press F8 to choose the USB Key to boot Haiku never start automatically anymore! It stucks in the boot menu waiting for the slowest thing in the Earth (ME) to press "Continue booting"...
Sincerely I prefer that it waited 0.75 seconds and not have to press "Continue booting".
follow-up: 21 comment:20 by , 15 years ago
Replying to fano:
The scope of this was to speed up the (already fast!) boot process avoiding the way to user pressing "space bar"... well in my case the affect obtained is the contrary!
I have to press F8 to choose the USB Key to boot Haiku never start automatically anymore! It stucks in the boot menu waiting for the slowest thing in the Earth (ME) to press "Continue booting"...
Sincerely I prefer that it waited 0.75 seconds and not have to press "Continue booting".
How about the idea: Bootloader will check type of boot disk, and if it's USB - ignore F8 keykode in keyboard buffer?
comment:21 by , 15 years ago
Version: | R1/alpha1 → R1/Development |
---|
Replying to Grey:
How about the idea: Bootloader will check type of boot disk, and if it's USB - ignore F8 keykode in keyboard buffer?
I think that's pretty much overkill. Personally, I don't see the need why the F8 key should enter the Haiku boot loader; it didn't so until recently, and it wouldn't hurt anyone to remove that option again.
While the wait time is indeed way too long for my taste, I don't really like this solution either (the current keys just are a lot more natural and intuitive).
Can't we compromise on half the wait time for now?