tell grub to reboot specific entry without being there
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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
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?
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.