LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-30-2007, 04:02 PM   #1
bobwall
Member
 
Registered: Jul 2004
Location: Milpitas, California
Distribution: 1/2 Debian 1/2 my own
Posts: 189

Rep: Reputation: 30
tell grub to reboot specific entry without being there


Is there any way to make tell grub to boot a specific entry the next time the computer boots. This would be very convenient for me because often when I want to reboot to Windows, it takes minutes for Linux to write back cached files to the disk so I either have to be there when it reboots or go away and comeback finding it has rebooted back to Debian.
 
Old 08-30-2007, 04:26 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
some distros now have an option built into the shutdown menu to select a different OS on reboot. I don't think this helps you if it is re-booting unattended.

The brute force way to do this is to simply edit /boot/grub/menu.lst to set the default to the desired OS. If you do this often, you could write a small shell script with GUI (eg Zenity) to make it easier.
 
Old 08-30-2007, 04:28 PM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
nah, you're on the right track pixellany, it's not unattended as in over night, just unattended while the kettle boils...

http://www.gnu.org/software/grub/man...-once_002donly
 
Old 08-30-2007, 05:42 PM   #4
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
Why not just set windows to be the first bootable system? then after a timeout you suggest it would boot windows.

Somthing like this

Code:
 
# Begin /boot/grub/menu.lst

# By default boot the first menu entry.
default 0

# Allow 30 seconds before booting the default.
timeout 30

# Use prettier colors.
color green/black light-green/black

# The first entry is for windows.
title Windows
rootnoverify (hd0,0)
chainloader +1

#For linux does not auto boot after time out 
title linux 
root (hd0,1)
kernel /boot/kernel-2.6.5 root=/dev/hda2

Last edited by exvor; 08-30-2007 at 05:47 PM.
 
Old 08-30-2007, 06:25 PM   #5
bobwall
Member
 
Registered: Jul 2004
Location: Milpitas, California
Distribution: 1/2 Debian 1/2 my own
Posts: 189

Original Poster
Rep: Reputation: 30
great, it works

It works like a charm acid_kewpie. You guys are awesome. This feature will surely save me time. Now if I can only get Windows to reboot back to Windows without me being there, that would even be better. Maybe someone can port grub-set-default to Windows?
 
Old 08-30-2007, 06:56 PM   #6
nan0meter
Member
 
Registered: Aug 2007
Location: The Netherlands
Distribution: Fedora 7 x86_64
Posts: 119

Rep: Reputation: 15
Oh, i wish i had time to write a GTK2 app to allow you to switch between certain grub options. But well i still go to school so i don't have a lot of time. Maybe someday i will when i really need it my self!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
grub entry? quaylet Linux - Newbie 2 06-14-2005 01:30 PM
GRUB Entry for 2.6.8 Codegen Linux - Distributions 1 08-14-2004 08:54 PM
DNS entry to specific Port? paintcheck200 Linux - Networking 2 05-03-2004 10:22 AM
Giving Specific users access to the reboot command shassouneh Linux - Security 15 03-24-2004 05:10 PM
Mounting USB-Stick - entry in fstab disappears at reboot??? rot Linux - General 5 08-07-2003 03:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration