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 > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 01-03-2008, 08:02 PM
"Daniel B. Thurman"
 
Default Grub feature request?

Is it possible to have the Grub gui (when it comes up)
to "remember" the last boot item chosen instead of
simply choosing the default?

I wonder if this would be a neat feature?


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.17.13/1207 - Release Date: 1/2/2008 11:29 AM


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-03-2008, 08:16 PM
"Mikkel L. Ellertson"
 
Default Grub feature request?

Daniel B. Thurman wrote:
> Is it possible to have the Grub gui (when it comes up)
> to "remember" the last boot item chosen instead of
> simply choosing the default?
>
> I wonder if this would be a neat feature?
>
One way to do it would be to add the "savedefault" at the end of
each menu entry. (Or only the entries you want to be remembered.)

title GNU/Linux
root (hd0,0)
kernel /boot/vmlinuz root=/dev/sda1
initrd /boot/initrd
savedefault

Mikkel
--

Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-03-2008, 08:27 PM
John Summerfield
 
Default Grub feature request?

Daniel B. Thurman wrote:

Is it possible to have the Grub gui (when it comes up)
to "remember" the last boot item chosen instead of
simply choosing the default?

I wonder if this would be a neat feature?


Even better if you read the docs first. It's been a standard feature for
years.



--

Cheers
John

-- spambait
1aaaaaaa@coco.merseine.nu Z1aaaaaaa@coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-03-2008, 08:36 PM
Les Mikesell
 
Default Grub feature request?

Mikkel L. Ellertson wrote:

Daniel B. Thurman wrote:

Is it possible to have the Grub gui (when it comes up)
to "remember" the last boot item chosen instead of
simply choosing the default?

I wonder if this would be a neat feature?


One way to do it would be to add the "savedefault" at the end of
each menu entry. (Or only the entries you want to be remembered.)

title GNU/Linux
root (hd0,0)
kernel /boot/vmlinuz root=/dev/sda1
initrd /boot/initrd
savedefault



It would be even nicer if it could keep track of attempts and successes,
so that after a couple of attempts without success (i.e. an update
installed a new kernel as the default but it fails to boot), it could
drop back to an entry that had been successful previously. That could
help in headless situations or where the machine is remote and the best
you can do is get someone else to punch the reset button.


--
Les Mikesell
lesmikesell@gmail.com

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-03-2008, 08:58 PM
John Summerfield
 
Default Grub feature request?

Les Mikesell wrote:

Mikkel L. Ellertson wrote:

Daniel B. Thurman wrote:

Is it possible to have the Grub gui (when it comes up)
to "remember" the last boot item chosen instead of
simply choosing the default?

I wonder if this would be a neat feature?


One way to do it would be to add the "savedefault" at the end of
each menu entry. (Or only the entries you want to be remembered.)

title GNU/Linux
root (hd0,0)
kernel /boot/vmlinuz root=/dev/sda1
initrd /boot/initrd
savedefault



It would be even nicer if it could keep track of attempts and successes,
so that after a couple of attempts without success (i.e. an update
installed a new kernel as the default but it fails to boot), it could
drop back to an entry that had been successful previously. That could
help in headless situations or where the machine is remote and the best
you can do is get someone else to punch the reset button.


1. read the docs. Be aware though that "boot" means "load the kernel." I
don't see that it can help with crashing kernels.


2. Take a look at grub2.


--

Cheers
John

-- spambait
1aaaaaaa@coco.merseine.nu Z1aaaaaaa@coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-03-2008, 09:00 PM
"Mr.Scrooge"
 
Default Grub feature request?

--- "Daniel B. Thurman" <dant@cdkkt.com> wrote:

>
> Is it possible to have the Grub gui (when it comes up)
> to "remember" the last boot item chosen instead of
> simply choosing the default?
>
> I wonder if this would be a neat feature?
>
I 'm not sure but i know you can set it to default to any of your entries it doesn't have to be
first in the list. Now how did that work again?It is a minor modification. Each entry is assigned
a number starting with zero from the top down. So if you want it to default to the second entry in
the list then find the line that says default=0 and change it to default=1. As always consult your
man pages(that is from memory and sometimes its spotty at best).

-Max




__________________________________________________ __________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-03-2008, 09:36 PM
"Mikkel L. Ellertson"
 
Default Grub feature request?

Les Mikesell wrote:
>
> It would be even nicer if it could keep track of attempts and successes,
> so that after a couple of attempts without success (i.e. an update
> installed a new kernel as the default but it fails to boot), it could
> drop back to an entry that had been successful previously. That could
> help in headless situations or where the machine is remote and the best
> you can do is get someone else to punch the reset button.
>
Try the fallback option.

RTFM.

Mikkel
--

Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-04-2008, 10:29 PM
"Dean S. Messing"
 
Default Grub feature request?

Mikkel L. Ellertson writes:
> Les Mikesell wrote:
> >=20
> > It would be even nicer if it could keep track of attempts and successes,
> > so that after a couple of attempts without success (i.e. an update
> > installed a new kernel as the default but it fails to boot), it could
> > drop back to an entry that had been successful previously. That could
> > help in headless situations or where the machine is remote and the best
> > you can do is get someone else to punch the reset button.
> >
> Try the fallback option.
>
> RTFM.

Unfortunately, TFM is less than clear about this stuff.
For example in the "Booting fallback systems" section
it discusses `grub-set-default' which does not seem to
exist.

That said, using what the manual says in that section, and a couple of
hours of futzing to corretly set the default back to stanza 0
when the system boots properly, here's what
I came up with couple of months back.
I think it does just what Les wants.

I've tested fairly well and it seems to work.

What the following does is boot my primary kernel (2.6.23.12-52.fc7)
(due to the "set default script" I'll discuss in a moment. If that
fails, the 1st fallback ((2.6.23.8-34.fc7) will attempt to boot. Both
of these are using the same filesystem, just a different
kernel/initrd.

Finally, if that fails, fallback 2 will attempt to boot my "alternate
system". That's yet an older kernel and a bare-bones Fedora 7 system
that sits on a phyically separate disk than my main system.

###### relevant contents of my /boot/grub/grub.conf #####
default=saved
timeout=10
fallback 1 2

title Fedora (2.6.23.12-52.fc7)
root (hd0,1)
kernel /vmlinuz-2.6.23.12-52.fc7 ro root=/dev/vg01/lv00 vga=794
initrd /initrd-2.6.23.12-52.fc7.img
savedefault fallback

title Fedora (2.6.23.8-34.fc7)
root (hd0,1)
kernel /vmlinuz-2.6.23.8-34.fc7 ro root=/dev/vg01/lv00 vga=794
initrd /initrd-2.6.23.8-34.fc7.img
savedefault fallback

title alt_sys (2.6.22.9-91.fc7)
root (hd0,1)
kernel /vmlinuz-2.6.22.9-91.fc7 ro root=/dev/vg00/lv00 vga=794
initrd /initrd_alt_sys-2.6.22.9-91.fc7.img
savedefault
################################################## ######


Now, the problem with the above is that if the main system boots
successfully using stanza 0, the fallback will still be set to 1 which
means that the _next time_ I boot, stanza 1 gets used---not what I
want. So I had to write a replacement for `grub-set-default'

I put this little script in my /boot/grub directory:

############# /boot/grub/resetDefaultBoot.sh ###########
#!/bin/sh

/sbin/grub --batch <<EOF 1>/dev/null 2>/dev/null
root (hd0,1)
savedefault --default=0
quit
EOF
################################################## #####

Finally, to /etc/rc.d/rc.local I added the following
lines:

# Reset default boot to stanza 0 in /etc/grub/grub.conf
/boot/grub/resetDefaultBoot.sh

I've forced a failure of my main kernel, as well as the 2nd kernel
(stanza 1) and it correctly goes to my alternate system. Note that
for _that_ system, I do not use the modified /ec/rc.d/rc.local file so
once it boots, it will keep booting the alternate system till I (by
hand) reset the default from the CLI.

Hope that helps.

Dean

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-05-2008, 05:47 PM
Beartooth
 
Default Grub feature request?

On Fri, 04 Jan 2008 06:58:44 +0900, John Summerfield wrote:
[...]
> 1. read the docs. Be aware though that "boot" means "load the kernel." I
> don't see that it can help with crashing kernels.

If there is any documentation of anything, anywhere, yet more
opaque than all I've read of grub, I shudder to think of it. It's
written, like a classic gummint manual, for those who already know
everything in it, cold, and want an occasional reminder. Those of us
lacking such knowledge, it merely daunts.

> 2. Take a look at grub2.

The project site, for instance at http://www.gnu.org/software/
grub/grub-2-support.en.html, was last updated a little over a year and a
half ago; stability was hoped for as of November '06. Did that come to
pass?? Or is it still an invitation to disaster for mere mortals?


--
Beartooth Staffwright, PhD, Neo-Redneck Linux Convert
Remember I know precious little of what I am talking about.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-05-2008, 08:13 PM
John Summerfield
 
Default Grub feature request?

Beartooth wrote:

On Fri, 04 Jan 2008 06:58:44 +0900, John Summerfield wrote:
[...]

1. read the docs. Be aware though that "boot" means "load the kernel." I
don't see that it can help with crashing kernels.


If there is any documentation of anything, anywhere, yet more
opaque than all I've read of grub, I shudder to think of it. It's
written, like a classic gummint manual, for those who already know
everything in it, cold, and want an occasional reminder. Those of us
lacking such knowledge, it merely daunts.


I find that playing with something while referring to the docs helps.
Grub is easy to play with, though one needs two computers or a printed
copy of the grub manual for best results:-)


I find info documentation generally hard to use, but the pinfo command
makes it easier to browse.





2. Take a look at grub2.

The project site, for instance at http://www.gnu.org/software/
grub/grub-2-support.en.html, was last updated a little over a year and a
half ago; stability was hoped for as of November '06. Did that come to
pass?? Or is it still an invitation to disaster for mere mortals?


That's grub2. It's intended to replace grub, when ready. Look for what
it describes as "grub legacy."








--

Cheers
John

-- spambait
1aaaaaaa@coco.merseine.nu Z1aaaaaaa@coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 10:29 PM.

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