FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 05-23-2010, 10:56 PM
"Todd A. Jacobs"
 
Default grub savedefault?

When one has multiple kernels installed, where is one supposed to
configure the option to always boot the last-selected kernel? I can't
make sense of all the automatic over-writing that the grub scripts are
doing on Debian, and the /etc/default/grub file doesn't have an example
of what the scripts are looking for.

I just want to be able to select a kernel at boot, and have that be the
default until a new kernel is installed or I manually select something
else.

--
"Oh, look: rocks!"
-- Doctor Who, "Destiny of the Daleks"


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100523225613.GA26914@penguin.codegnome.org">http ://lists.debian.org/20100523225613.GA26914@penguin.codegnome.org
 
Old 05-23-2010, 11:52 PM
Celejar
 
Default grub savedefault?

On Sun, 23 May 2010 15:56:13 -0700
"Todd A. Jacobs" <nospam@codegnome.org> wrote:

> When one has multiple kernels installed, where is one supposed to
> configure the option to always boot the last-selected kernel? I can't
> make sense of all the automatic over-writing that the grub scripts are
> doing on Debian, and the /etc/default/grub file doesn't have an example
> of what the scripts are looking for.
>
> I just want to be able to select a kernel at boot, and have that be the
> default until a new kernel is installed or I manually select something
> else.

What seems to work for me (and I agree, it's pretty confusing,
especially when you add 'man grub-set-default' to the mix) is to
include these three lines in menu.lst:

default saved
# updatedefaultentry=true
# savedefault=true

I'm not quite certain which are necessary, but as I've said, this seems
to give me the behavior that I (and, IIUC, you) want.

Celejar
--
foffl.sourceforge.net - Feeds OFFLine, an offline RSS/Atom aggregator
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100523195217.e0c41898.celejar@gmail.com">http://lists.debian.org/20100523195217.e0c41898.celejar@gmail.com
 
Old 05-24-2010, 01:30 AM
Tom H
 
Default grub savedefault?

On Sun, May 23, 2010 at 7:52 PM, Celejar <celejar@gmail.com> wrote:
> On Sun, 23 May 2010 15:56:13 -0700
> "Todd A. Jacobs" <nospam@codegnome.org> wrote:
>
>> When one has multiple kernels installed, where is one supposed to
>> configure the option to always boot the last-selected kernel? I can't
>> make sense of all the automatic over-writing that the grub scripts are
>> doing on Debian, and the /etc/default/grub file doesn't have an example
>> of what the scripts are looking for.
>>
>> I just want to be able to select a kernel at boot, and have that be the
>> default until a new kernel is installed or I manually select something
>> else.
>
> What seems to work for me (and I agree, it's pretty confusing,
> especially when you add 'man grub-set-default' to the mix) is to
> include these three lines in menu.lst:
>
> default saved
> # updatedefaultentry=true
> # savedefault=true
>
> I'm not quite certain which are necessary, but as I've said, this seems
> to give me the behavior that I (and, IIUC, you) want.

I don't think that you need "# updatedefaultentry=true" if you are
using "default saved". IIUC, I only has any meaning in the case of
"default x" where x is a number.

IIUC, "# savedefault=true" will append "savedefault" to the menu
entries and, booting from one of those entries turns it into the
default at the next boot if you choose "default saved".

I have not tried "default saved" with grub1, but with grub2 it will
not work (the first time that you set it) if you don't run
"grub-set-default x" where x is the default entry that you want (the
count starts with 0).


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTikkHcncSbit-yZlJGDyByDiIeV0EFxfQXEJMfKt@mail.gmail.com">http://lists.debian.org/AANLkTikkHcncSbit-yZlJGDyByDiIeV0EFxfQXEJMfKt@mail.gmail.com
 
Old 05-24-2010, 08:24 PM
Andrei Popescu
 
Default grub savedefault?

On Sun,23.May.10, 19:52:17, Celejar wrote:
> On Sun, 23 May 2010 15:56:13 -0700
> "Todd A. Jacobs" <nospam@codegnome.org> wrote:
>
> > When one has multiple kernels installed, where is one supposed to
> > configure the option to always boot the last-selected kernel? I can't
> > make sense of all the automatic over-writing that the grub scripts are
> > doing on Debian, and the /etc/default/grub file doesn't have an example
> > of what the scripts are looking for.
...
> What seems to work for me (and I agree, it's pretty confusing,
> especially when you add 'man grub-set-default' to the mix) is to
> include these three lines in menu.lst:

[snip]

That's grub1, but the OP was asking about grub2 (/etc/default/grub).

Regards,
Andrei
--
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
 
Old 05-25-2010, 12:31 AM
Tom H
 
Default grub savedefault?

On Mon, May 24, 2010 at 4:24 PM, Andrei Popescu
<andreimpopescu@gmail.com> wrote:
> On Sun,23.May.10, 19:52:17, Celejar wrote:
>> On Sun, 23 May 2010 15:56:13 -0700
>> "Todd A. Jacobs" <nospam@codegnome.org> wrote:
>>
>> > When one has multiple kernels installed, where is one supposed to
>> > configure the option to always boot the last-selected kernel? I can't
>> > make sense of all the automatic over-writing that the grub scripts are
>> > doing on Debian, and the /etc/default/grub file doesn't have an example
>> > of what the scripts are looking for.
> ...
>> What seems to work for me (and I agree, it's pretty confusing,
>> especially when you add 'man grub-set-default' to the mix) is to
>> include these three lines in menu.lst:
>
> [snip]
>
> That's grub1, but the OP was asking about grub2 (/etc/default/grub).

Oops. I also gave grub1 advice...

For grub2, set "GRUB_DEFAULT=saved" in "/etc/default/grub", run
"update-grub", and run "grub-set-default x" (where x is the default
entry from which you want to boot and the count starts at 0).


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTin6a0EKaBdgc4U0UP74yaYOhnvIML7dzSHUULVi@mail .gmail.com">http://lists.debian.org/AANLkTin6a0EKaBdgc4U0UP74yaYOhnvIML7dzSHUULVi@mail .gmail.com
 
Old 05-26-2010, 06:32 PM
Stefan Monnier
 
Default grub savedefault?

> For grub2, set "GRUB_DEFAULT=saved" in "/etc/default/grub", run
> "update-grub", and run "grub-set-default x" (where x is the default
> entry from which you want to boot and the count starts at 0).

The approach is use is that /etc/rc.local does:

cp /boot/vmlinuz-$(uname -r) /boot/vmlinuz-latest
cp /boot/initrd.img-$(uname -r) /boot/initrd.img-latest

so Grub2 ends up with an additional option to use "Linux latest".
The main reason for doing that wasn't so much to keep booting with the
same version as last time, but so that I can be "sure" that hibernate
can resume properly, even if the kernel or initrd were modified
(e.g. rebuilt/updated/deleted/younameit) in the mean time.


Stefan


PS: Note that it is not 100% foolproof: if the vmlinux and/or initrd has
indeed been modified since it was copied to foo-latest, and if I boot
using foo-latest, that very foo-latest I need for resume will be
overwritten with the newer vmlinuz/initrd when etc/rc.local is run
(because $(uname -r) is not really telling me which kernel was used to
boot, i.e. it won't say "latest").


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: jwvocg27c4j.fsf-monnier+gmane.linux.debian.user@gnu.org">http://lists.debian.org/jwvocg27c4j.fsf-monnier+gmane.linux.debian.user@gnu.org
 

Thread Tools




All times are GMT. The time now is 01:06 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org