Re: [RELEASE] New Boot-Loader Menu -- version 1.5

2011-05-16 Thread Tom Evans
On Mon, May 16, 2011 at 1:50 PM, Andriy Gapon  wrote:
> on 16/05/2011 14:34 Tom Evans said the following:
>> I disagree entirely, the boot loader knows nothing of kernels
>
> Eh?  Maybe I misunderstand what you are saying, but:
>
> set kernel=kernel.old
> boot
>
> IMHO, it shows that you can tell the loader about kernels.
> Having a kernel-choice sub-menu would be convenient.
>

s/boot loader/boot manager/

My bad for the confusion.

The loader should definitely know about kernels; the boot manager,
which knows about BIOS bootable drives/partitions only, should not.

Cheers

Tom
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: [RELEASE] New Boot-Loader Menu -- version 1.5

2011-05-16 Thread Andriy Gapon
on 16/05/2011 14:34 Tom Evans said the following:
> I disagree entirely, the boot loader knows nothing of kernels

Eh?  Maybe I misunderstand what you are saying, but:

set kernel=kernel.old
boot

IMHO, it shows that you can tell the loader about kernels.
Having a kernel-choice sub-menu would be convenient.

-- 
Andriy Gapon
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: [RELEASE] New Boot-Loader Menu -- version 1.5

2011-05-16 Thread Tom Evans
On Sat, May 14, 2011 at 9:36 PM, Mehmet Erol Sanliturk
 wrote:
> My main idea is that the present Boot-Loader Menu -- version 1.5 is a very
> good menu . Instead of destroying its elegant structure , the already
> available FreeBSD Boot Loader ( actually Kernel selection ) menu could be
> improved and may be used IF IT IS SUITABLE for the USER ( otherwise the user
> may not select it during installation ) .
>

I disagree entirely, the boot loader knows nothing of kernels, it only
presents the bootable drives/partitions as the BIOS sees it. Calling
the boot loader a kernel selection menu is disingenuous, since this is
simply a by-product of having different kernels on different
drives/partitions, whilst the most commonly desired kernel selection
(kernel vs kernel.old) is not available via this method.

Cheers

Tom
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: [RELEASE] New Boot-Loader Menu -- version 1.5

2011-05-14 Thread Mehmet Erol Sanliturk
On Sat, May 14, 2011 at 2:53 PM, Devin Teske  wrote:

> On May 14, 2011, at 8:14 AM, Mehmet Erol Sanliturk <
> m.e.sanlit...@gmail.com> wrote:
>
> On Sat, May 14, 2011 at 3:15 AM, Michael Reifenberger <
> m...@reifenberger.com> wrote:
>
>> Hi,
>> this looks very promising!
>>
>> While you are working on the loader front currently,
>> would it be possible to implement a "Boot kernel.old"
>> menue item that unloads all current loaded modules and re-loads
>> everithing from /boot/kernel.old?
>>
>> Its difficult to handle manually in the loader (esp. handling the
>> zpool.cache file ) and I got bitten by this issue recently in a ZFS only
>> environment.
>>
>> Thanks in advance!
>>
>> Bye/2
>> ---
>> Michael Reifenberger
>>  mich...@reifenberger.com
>>  http://www.Reifenberger.com
>>
>>
>
> There have been suggestions from many regarding "kernel selection" and even
> "root selection" options. I've responded in earnest on at least one such
> suggestion (stating that there are plans to incorporate these features at
> some later date), though I have been short on details (compared to my normal
> verbosity).
>
> These suggestions will have to be slated for a different commit and cannot
> make it into the initial one. A subset of the technical reasons are
> enumerated below:
>
> 1. Currently, the "start" FICL word provided by
> /usr/src/sys/boot/forth/loader.4th -- which reads in
> /boot/defaults/loader.conf and later /boot/loader.conf (if it exists), among
> other things -- pre-loads the configured kernel.
>
> This would need to change. We still want to call "start" from the onset of
> /boot/loader.rc to pick up any variables configured in loader.conf(5), but
> we don't want to load the kernel yet (though modules may be OK). I would
> change the overloaded "boot" word to load the kernel prior to calling the
> built-in boot ( N -- ) construct.
>
> 2. A non-trivial amount of Forth will need to be written to probe for a
> list of kernels to be presented.
>
> Again, that is just a subset of the technical affronts we'll face. I'd like
> to see this functionality pushed to a later SVN rev -- perhaps after MFC of
> the current rev planned for the current state.
>
>
> Many of the Unix/Linux operating systems are utilizing a Kernel Selection (
> let's call it Selection instead of Loader ) menu , such as GRUB or LILO , or
> ,
> in FreeBSD , when Kernel Selection menu is selected instead of booting
> directly from boot sector .
>
> Actually , a Kernel Selection menu in front of the Boot Loader menu is a
> more flexible method :
> First select kernel , then select its booting structure with the above
> described Boot Loader menu .
>
>
> My opinion is that , they should NOT be COMBINED into one single menu ,
> because , in the same system , even there may be other kernels to be booted
> .
>
>
> This would be technically simple to achieve but I'm wondering if the
> community would tolerate having a 2x 10-second timeout (one for kernel
> selection menu, and another for the boot/option menu). Then, if later a
> root-selection is provided, would that go into the kernel selection menu or
> a new menu (now requiring 30-seconds to boot without a human present).
>
> I want the menu with the "Boot" option to be front-and-center, continuing
> to allow the user to boot immediately with a single key ('1', 'b', or
> ENTER) if present (and desired), or if not present boot after a single
> 10-second timeout.
>
> ASIDE: There are more boot toggles/variables mentioned in loader(8) than
> are knobs in the boot menu (both old and new -- and more than can fit on a
> single screen even). Such as boot_ddb, boot_gdb, boot_multicons, boot_mute,
> boot_pause, boot_serial, and comconsole_speed. That's 7 additional options
> that would likely be a good candidate for a "side menu" (perhaps a "More
> Options" menuitem off the main menu).
>
> ASIDE: A root-selection menuitem could potentially present the normal root
> in addition to "ask", "cdrom" and "embedded". Each of which would set
> (respectively) "boot_askname", "boot_cdrom" and "boot_dfltroot". See
> loader(8) for additional details.
>
>
> Some operating systems , such as OpenSolaris and Mandriva Linux , after
> updating the kernel , they are keeping previous kernel in the Kernel
> Selection menu , under the new kernel name item .
>
>
> I've often felt that this could be improved upon by the Linux community.
> IMHO neither Grub nor LiLo present a user-friendly way of setting options
> for the selected kernel and concurrently leaves many Linux desktop-users
> befuddled and uninterested. The use-case is taking a box into single-user
> mode: FreeBSD achieves this with either one keystroke (current loader menu)
> or two (code being committed to HEAD; e.g., s, ENTER); compare that with
> the steps required to boot Linux into single-user mode from either LiLo or
> Grub (disclaimer: this might have been updated in some of the later Linux
> distros).
>
> NOTE: If you have a pre-

Re: [RELEASE] New Boot-Loader Menu -- version 1.5

2011-05-14 Thread Devin Teske
On May 14, 2011, at 8:14 AM, Mehmet Erol Sanliturk  
wrote:

> On Sat, May 14, 2011 at 3:15 AM, Michael Reifenberger  
> wrote:
> Hi,
> this looks very promising!
> 
> While you are working on the loader front currently,
> would it be possible to implement a "Boot kernel.old"
> menue item that unloads all current loaded modules and re-loads
> everithing from /boot/kernel.old?
> 
> Its difficult to handle manually in the loader (esp. handling the zpool.cache 
> file ) and I got bitten by this issue recently in a ZFS only environment.
> 
> Thanks in advance!
> 
> Bye/2
> ---
> Michael Reifenberger
> mich...@reifenberger.com
> http://www.Reifenberger.com
> 
> 

There have been suggestions from many regarding "kernel selection" and even 
"root selection" options. I've responded in earnest on at least one such 
suggestion (stating that there are plans to incorporate these features at some 
later date), though I have been short on details (compared to my normal 
verbosity).

These suggestions will have to be slated for a different commit and cannot make 
it into the initial one. A subset of the technical reasons are enumerated below:

1. Currently, the "start" FICL word provided by 
/usr/src/sys/boot/forth/loader.4th -- which reads in /boot/defaults/loader.conf 
and later /boot/loader.conf (if it exists), among other things -- pre-loads the 
configured kernel.

This would need to change. We still want to call "start" from the onset of 
/boot/loader.rc to pick up any variables configured in loader.conf(5), but we 
don't want to load the kernel yet (though modules may be OK). I would change 
the overloaded "boot" word to load the kernel prior to calling the built-in 
boot ( N -- ) construct.

2. A non-trivial amount of Forth will need to be written to probe for a list of 
kernels to be presented.

Again, that is just a subset of the technical affronts we'll face. I'd like to 
see this functionality pushed to a later SVN rev -- perhaps after MFC of the 
current rev planned for the current state.


> Many of the Unix/Linux operating systems are utilizing a Kernel Selection ( 
> let's call it Selection instead of Loader ) menu , such as GRUB or LILO , or ,
> in FreeBSD , when Kernel Selection menu is selected instead of booting 
> directly from boot sector .
> 
> Actually , a Kernel Selection menu in front of the Boot Loader menu is a more 
> flexible method :
> First select kernel , then select its booting structure with the above 
> described Boot Loader menu .
> 
> My opinion is that , they should NOT be COMBINED into one single menu , 
> because , in the same system , even there may be other kernels to be booted .

This would be technically simple to achieve but I'm wondering if the community 
would tolerate having a 2x 10-second timeout (one for kernel selection menu, 
and another for the boot/option menu). Then, if later a root-selection is 
provided, would that go into the kernel selection menu or a new menu (now 
requiring 30-seconds to boot without a human present).

I want the menu with the "Boot" option to be front-and-center, continuing to 
allow the user to boot immediately with a single key ('1', 'b', or ENTER) if 
present (and desired), or if not present boot after a single 10-second timeout.

ASIDE: There are more boot toggles/variables mentioned in loader(8) than are 
knobs in the boot menu (both old and new -- and more than can fit on a single 
screen even). Such as boot_ddb, boot_gdb, boot_multicons, boot_mute, 
boot_pause, boot_serial, and comconsole_speed. That's 7 additional options that 
would likely be a good candidate for a "side menu" (perhaps a "More Options" 
menuitem off the main menu).

ASIDE: A root-selection menuitem could potentially present the normal root in 
addition to "ask", "cdrom" and "embedded". Each of which would set 
(respectively) "boot_askname", "boot_cdrom" and "boot_dfltroot". See loader(8) 
for additional details.


> Some operating systems , such as OpenSolaris and Mandriva Linux , after 
> updating the kernel , they are keeping previous kernel in the Kernel 
> Selection menu , under the new kernel name item .

I've often felt that this could be improved upon by the Linux community. IMHO 
neither Grub nor LiLo present a user-friendly way of setting options for the 
selected kernel and concurrently leaves many Linux desktop-users befuddled and 
uninterested. The use-case is taking a box into single-user mode: FreeBSD 
achieves this with either one keystroke (current loader menu) or two (code 
being committed to HEAD; e.g., s, ENTER); compare that with the steps required 
to boot Linux into single-user mode from either LiLo or Grub (disclaimer: this 
might have been updated in some of the later Linux distros).

NOTE: If you have a pre-configured Grub or LiLo entry for easily entering into 
single-user mode, note that not everybody is so fortunate (either because of 
their distro or due to lack of manual configuration). Even still, a variable 
amount of cursor/arrow keys

Re: [RELEASE] New Boot-Loader Menu -- version 1.5

2011-05-14 Thread Mehmet Erol Sanliturk
On Sat, May 14, 2011 at 3:15 AM, Michael Reifenberger  wrote:

> Hi,
> this looks very promising!
>
> While you are working on the loader front currently,
> would it be possible to implement a "Boot kernel.old"
> menue item that unloads all current loaded modules and re-loads
> everithing from /boot/kernel.old?
>
> Its difficult to handle manually in the loader (esp. handling the
> zpool.cache file ) and I got bitten by this issue recently in a ZFS only
> environment.
>
> Thanks in advance!
>
> Bye/2
> ---
> Michael Reifenberger
> mich...@reifenberger.com
> http://www.Reifenberger.com
>
>
Many of the Unix/Linux operating systems are utilizing a Kernel Selection (
let's call it Selection instead of Loader ) menu , such as GRUB or LILO , or
,
in FreeBSD , when Kernel Selection menu is selected instead of booting
directly from boot sector .

Actually , a Kernel Selection menu in front of the Boot Loader menu is a
more flexible method :
First select kernel , then select its booting structure with the above
described Boot Loader menu .

My opinion is that , they should NOT be COMBINED into one single menu ,
because , in the same system , even there may be other kernels to be booted
.

Some operating systems , such as OpenSolaris and Mandriva Linux , after
updating the kernel , they are keeping previous kernel in the Kernel
Selection menu , under the new kernel name item .

Such a system may be employed for the FreeBSD : If a kernel.old is generated
, it may be inserted into Kernel Selection menu automatically . If , at
present , there is no kernel selection menu but boot sector is used directly
, kernel build system may modify that structure also to utilize a Kernel
Selection menu .


Thank you very much .


Mehmet Erol Sanliturk
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: [RELEASE] New Boot-Loader Menu -- version 1.5

2011-05-14 Thread Michael Reifenberger

Hi,
this looks very promising!

While you are working on the loader front currently,
would it be possible to implement a "Boot kernel.old"
menue item that unloads all current loaded modules and re-loads
everithing from /boot/kernel.old?

Its difficult to handle manually in the loader (esp. handling the zpool.cache 
file ) and I got bitten by this issue recently in a ZFS only environment.


Thanks in advance!

Bye/2
---
Michael Reifenberger
mich...@reifenberger.com
http://www.Reifenberger.com

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


RE: [RELEASE] New Boot-Loader Menu -- version 1.5

2011-05-13 Thread Devin Teske
> -Original Message-
> From: Devin Teske [mailto:dte...@vicor.com]
> Sent: Friday, May 13, 2011 6:22 PM
> To: freebsd-hackers@freebsd.org
> Cc: '兰清'; 'Alexander Leidinger'; 'Dieter BSD'; Teske, Devin
> (devin.te...@fisglobal.com); Julian Elischer (jelisc...@fusionio.com); 'Warner
> Losh'
> Subject: [RELEASE] New Boot-Loader Menu -- version 1.5
> 
> Happy to bring to you version 1.5 of my loader_menu package. This version
> incorporates the suggestions first made by Lan Qing and then re-affirmed by
(in-
> order) Alexander Leidinger, Dieter BSD, and Julian Elischer (whom brings word
> from the devsummit as well as Warner Losh): you guys want to separate the boot
> "actions" from the boot "options", and now it's accomplished.
> 
> Here's how the re-arrangement looks for each of the different loader
> environments...

i386-compatible hardware with ACPI support:
http://twitpic.com/4wvls8
http://twitpic.com/4wvm73 (color)

i386-compatible hardware without ACPI support:
http://twitpic.com/4wvmod
http://twitpic.com/4wvn0f

non-i386 (such as IA64, PPC, etc.):
http://twitpic.com/4wvne3
http://twitpic.com/4wvod5 (color)

NOTE: Previous links were incorrect. Above are the correct links to the correct
images.
-- 
Devin

_

The information contained in this message is proprietary and/or confidential. 
If you are not the intended recipient, please: (i) delete the message and all 
copies; (ii) do not disclose, distribute or use the message in any manner; and 
(iii) notify the sender immediately. In addition, please be aware that any 
message addressed to our domain is subject to archiving and review by persons 
other than the intended recipient. Thank you.
_
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


[RELEASE] New Boot-Loader Menu -- version 1.5

2011-05-13 Thread Devin Teske
Happy to bring to you version 1.5 of my loader_menu package. This version
incorporates the suggestions first made by Lan Qing and then re-affirmed by
(in-order) Alexander Leidinger, Dieter BSD, and Julian Elischer (whom brings
word from the devsummit as well as Warner Losh): you guys want to separate the
boot "actions" from the boot "options", and now it's accomplished.

Here's how the re-arrangement looks for each of the different loader
environments...

i386-compatible hardware with ACPI support:
http://twitpic.com/4wvls8
http://twitpic.com/4wvn0f (color)

i386-compatible hardware without ACPI support:
http://twitpic.com/4wvmod
http://twitpic.com/4wvn0f (color)

non-i386 hardware (such as IA64, PPC, etc.):
http://twitpic.com/4wvne3
http://twitpic.com/4wvod5 (color)

Here's the links:

http://druidbsd.sourceforge.net/download/loader_menu-1.5.tgz
or
http://druidbsd.sourceforge.net/

Here's a diff of the changes:

diff -rNup loader_menu-1.4/+CONTENTS loader_menu-1.5/+CONTENTS
--- loader_menu-1.4/+CONTENTS   2011-05-05 00:47:31.0 -0700
+++ loader_menu-1.5/+CONTENTS   2011-05-12 16:07:11.0 -0700
@@ -1,5 +1,5 @@
 @comment PKG_FORMAT_REVISION:1.1
-@name loader_menu-1.4
+@name loader_menu-1.5
 @comment ORIGIN:sysutils/loader_menu
 @cwd /boot
 beastie.4th
@@ -17,9 +17,9 @@ loader.rc
 menu-commands.4th
 @comment MD5:0999bd50b8395098bd6bcf9165db4d7b
 menu.4th
-@comment MD5:26a61c0ea268334687a63e07b0d708d8
+@comment MD5:3b97638b4a5608fab425e2751d386c14
 menu.rc
-@comment MD5:dcf2993118b991f57b4ab0659d2712ae
+@comment MD5:f682160708bcf5a537421ab09ce51660
 shortcuts.4th
 @comment MD5:9a5ed52548bbbaf67ad613e37d0e4b58
 version.4th
@@ -30,7 +30,7 @@ version.4th
 @comment MD5:69903862d8df34df77522792172b0999
 @ignore
 +DESC
-@comment MD5:d18419e5babe54b7cc195da7f7f5ac86
+@comment MD5:597ef7a6779d9e083140eaa985fc1ee1
 @ignore
 +INSTALL
 @comment MD5:76c98eb5e084871d9fe5d4fa4511d8c5
diff -rNup loader_menu-1.4/+DESC loader_menu-1.5/+DESC
--- loader_menu-1.4/+DESC   2011-05-04 12:11:31.0 -0700
+++ loader_menu-1.5/+DESC   2011-05-12 13:50:40.0 -0700
@@ -91,6 +91,11 @@ loader_delay="N"
until booting the loaded kernel). During the autoboot sequence, any key
pressed except for ENTER will allow escaping to the loader prompt.
 
+loader_menu_title="..."
+
+   Overrides the default title ("Welcome to FreeBSD") displayed above the
+   dynamic menu.
+
 
 
 WWW: http://druidbsd.sourceforge.net/
diff -rNup loader_menu-1.4/menu.4th loader_menu-1.5/menu.4th
--- loader_menu-1.4/menu.4th2011-05-05 00:33:13.0 -0700
+++ loader_menu-1.5/menu.4th2011-05-12 16:07:06.0 -0700
@@ -75,7 +75,9 @@ variable menukey6
 variable menukey7
 variable menukey8
 variable menureboot
+variable menurebootadded
 variable menuacpi
+variable menuoptions
 
 \ Menu timer [count-down] variables
 variable menu_timeout_enabled \ timeout state (internal use only)
@@ -439,7 +441,10 @@ create init_text8 255 allot
 : menu-create ( -- )
 
\ Print the frame caption at (x,y)
-   11 9 at-xy ." FreeBSD Kernel Options"
+   s" loader_menu_title" getenv dup -1 = if
+   drop s" Welcome to FreeBSD"
+   then
+   24 over 2 / - 9 at-xy type 
 
\ Print our menu options with respective key/variable associations.
\ `printmenuitem' ends by adding the decimal ASCII value for the
@@ -478,8 +483,39 @@ create init_text8 255 allot
then
then
 
+   \ 
+   \ Initialize the menu_options visual separator.
+   \ 
+   0 menuoptions !
+   s" menu_options" getenv -1 <> if
+   c@ dup 48 > over 57 < and if ( '1' <= c1 <= '8' )
+   menuoptions !
+   else
+   drop
+   then
+   then
+
+   \ Initialize "Reboot" menu state variable (prevents double-entry)
+   false menurebootadded !
+
49 \ Iterator start (loop range 49 to 56; ASCII '1' to '8')
begin
+   \ If the "Options:" separator, print it.
+   dup menuoptions @ = if
+   \ Optionally add a reboot option to the menu
+   s" menu_reboot" getenv -1 <> if
+   drop
+   s" Reboot" printmenuitem menureboot !
+   true menurebootadded !
+   then
+
+   menuX @
+   menurow @ 2 + menurow !
+   menurow @ menuY @ +
+   at-xy
+   ." Options:"
+   then
+
\ If this is the ACPI menu option, act accordingly.
dup menuacpi @ = if
acpimenuitem ( -- C-Addr | -1 )
@@ -520,14 +556,16 @@ create init_text8 255 allot
drop \ iterator
 
\ Optionally add a reboot option to the menu
-   s" menu_reboot" getenv -1 <> if
-   drop   \ no need for th