Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1D0Oqw-0005dy-OY for mharc-grub-devel@gnu.org; Sun, 13 Feb 2005 13:52:19 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D0Oqg-0005at-9O for grub-devel@gnu.org; Sun, 13 Feb 2005 13:52:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D0OqW-0005VX-3M for grub-devel@gnu.org; Sun, 13 Feb 2005 13:51:53 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D0OqT-0005PA-RB for grub-devel@gnu.org; Sun, 13 Feb 2005 13:51:50 -0500 Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1D0ORY-0007yI-Ia for grub-devel@gnu.org; Sun, 13 Feb 2005 13:26:04 -0500 Received: (qmail invoked by alias); 13 Feb 2005 18:26:00 -0000 Received: from p3EE0F442.dip.t-dialin.net (EHLO pc1.trash.bin) (62.224.244.66) by mail.gmx.net (mp025) with SMTP; 13 Feb 2005 19:26:00 +0100 X-Authenticated: #19855039 Received: from pc8.trash.bin (pc8.trash.bin [192.168.4.8]) by pc1.trash.bin (Postfix) with ESMTP id E79034B99 for ; Sun, 13 Feb 2005 19:25:55 +0100 (CET) Received: by pc8.trash.bin (Postfix, from userid 500) id 77CB0448DD2; Sun, 13 Feb 2005 19:25:55 +0100 (CET) Date: Sun, 13 Feb 2005 19:25:55 +0100 From: Marc-Jano Knopp To: The development of GRUB 2 Message-ID: <20050213182555.GA1267@mjk.myfqdn.de> References: <20050207121011.GC1380@mjk.myfqdn.de> <200502102024.08157.okuji@enbug.org> <20050210215112.GE3832@mjk.myfqdn.de> <200502111038.56290.okuji@enbug.org> <20050211120946.GA1290@mjk.myfqdn.de> <420CC284.1040900@list.ru> <20050211163744.GC1290@mjk.myfqdn.de> <420CE7C7.20407@list.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <420CE7C7.20407@list.ru> User-Agent: Mutt/1.5.1i X-Y-GMX-Trusted: 0 Subject: Re: [Suggestion] LILO-like direct menu item access && scripting X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2005 18:52:09 -0000 On Fri, 11 Feb 2005 at 18:13 (+0100), Serbinenko Vladimir wrote: > Marc-Jano Knopp wrote: > >On Fri, 11 Feb 2005 at 15:34 (+0100), Serbinenko Vladimir wrote: > >>Marc-Jano Knopp wrote: > >>>On Fri, 11 Feb 2005 at 10:38 (+0100), Yoshinori K. Okuji wrote: > >>>>On Thursday 10 February 2005 22:51, Marc-Jano Knopp wrote: > >>>> > >>>>>But as your mail left a few things open (Select or execute? Normal > >>>>>keys or keys with modifier? Single-letter-keys or strings?), the > >>>>>discussion about this would have had to be continued anyway. :-) > >>>>> > >>>>I prefer to execute it when a shortcut key is pressed. Why not? > >>>> > >>>Because then it would not be possible to edit menu items blindly. > >>>For example, I could not blindly add boot parameters to the Linux > >>>kernel (runlevel, root=, etc.) to override the default > >>>settings (which I do, indeed, e.g. for my SCSI testing machine > >>>which varying disks with varying partition layout connected, so that > >>>fixed menu items don't help). > >>> > >>I think the best choice to do it is to bind a key like C-p to add > >>parameters to the entry. Then theese parameters will be accessible as > >>$1, $2, ... ($0 is a label of menu entry) > > > >Accessible to whom or what? > > > To the scripts Hm. What would that be good for? > >My scenario would be something like this: > > > >1. Hit 's' to enter select-menu-entry-by-name mode (optional) > >2. Type "linux" and hit [Return] to select (not execute) menu item > > "Linux 2.4" > >3. Hit 'e' to edit. Now the cursor could be at the end of the line > > by default, so that I just need to type for example: > >4. " root=/dev/sdf" [Return] > >5. Hit [Return] again (or 'b') to boot. > > > The problem with this scenario is the determination of line by default > especially for scripts. You can have a script that launches different > kernels depending on condition or it can use function. Which line is the > default one? Honestly: I don't understand what you mean. How would a script be employed in the above scenario? And why is it so difficult to determine the default line? Both the index of the default line (i.e. e.g. menu item number 3) and its initial value (like "kernel /boot/vmlinuz root=/dev/sda3") are known to GRUB, and so should be known to the scripting engine, too. Best regards Marc-Jano