How do I Reboot into Linux at night and back to WinXP in the morning?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
How do I Reboot into Linux at night and back to WinXP in the morning?
Hello,
I work in a university department. We have a computer lab whose main purpose is for undergraduate computer labs. Almost all of those labs must be run in Windows, so the computers have to have Windows of some sort on them. The researchers in the department would like to use these computers for some real work in Linux when they are not being used for labs. What we would like is for the computers to reboot from Windows into Linux at a certain time of night (say 19:00) and then reboot in the morning (say 07:00) back into Windows for the labs. We would also like the computer to check to make sure that no one is currently using the computer.
We can't be the first people to want to do something like this, but we can't find anything with google that willl help us.
I didn't try this but I think you might try using cron to set the reboot job at the desired time in Linux and Task Scheduler in Windows at the same time but I don't know how you can choose in GRUB/LILO on which OS you want to go.
I think that it can be done so that at reboot time in LInux you could modify the loader's config but from within windows that is pretty much impossible, so this turns into one big nothing.
If the default OS is windows, then a cron job could handle the linux -> windows reboot event, but I don't know how you could do both. Maybe dedicating one or two machines for linux would be a better idea. Perhaps using VNC or something similar so more than one user would run linux remotely might be another idea.
If you are using grub its very easy.
Create two grub.conf files one with default boot windows and one with default boot linux
Use this tool to get access to the linux file system to copy the linux boot grub file http://e2fsprogs.sourceforge.net/ext2.html
Use your favorite batch program to reboot your system
Thanks for the replies, all. I would have replied earlier but I didn't get the email.
I forgot to post the most challenging part of this, um, challenge. Our distro is Mandrake 8.2 and our bootloader is Lilo 22.2.
I see where you are going with that, arno, but as you see, we are using Lilo. What we had done in the past was to set the default boot as Linux. Whenever there was a reboot, it would boot all the way up into Linux and then run a script that would check what time it was. If it was time to be in Windows, it would do that Lilo trick of rebooting once into another operating system. This is an ugly, but doable solution. What we really want, is something that checks to make sure no one is using the computer at reboot time. It happened before that someone was working on an Excel spreadsheet at 9pm and left to go to the bathroom. When he came back, the computer had rebooted and he lost a lot of changes. I realize that this is more of a Windows question now, but I was hoping someone had a whole solution.
I think it is possible to use the rdev command to change the lilo default entry, which could be windows. Either that, or changing the 'lilo.conf' default entry with sed and rerunning lilo before shutting down. However, being able to change the default from windows may not be possible.
This sounds more like a policy issue to me. I.E. when finishing after this shift, reboot into windows. You know, like putting down the toilet seat when you are done.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.