LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 09-13-2004, 03:49 PM   #1
kayhan
Member
 
Registered: Oct 2002
Location: US
Distribution: Red Hat 7.3->9 -> Fedora Core 1
Posts: 33

Rep: Reputation: 15
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.

What is the best way for us to do what we want?

Thanks,
kg
 
Old 09-13-2004, 04:57 PM   #2
enigma82
Member
 
Registered: Sep 2004
Location: Fagaras, Romania
Distribution: Mandrake 10.0
Posts: 48

Rep: Reputation: 15
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.
 
Old 09-13-2004, 05:09 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
Old 09-13-2004, 05:17 PM   #4
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
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
 
Old 09-14-2004, 09:49 AM   #5
kayhan
Member
 
Registered: Oct 2002
Location: US
Distribution: Red Hat 7.3->9 -> Fedora Core 1
Posts: 33

Original Poster
Rep: Reputation: 15
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.
 
Old 09-16-2004, 04:45 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
monitor goes black, will not respond. have to reboot to get back in pjbii Slackware 1 03-13-2005 11:37 AM
Good morning, Good evening, Good night. Cheeseboy LinuxQuestions.org Member Intro 2 11-04-2004 09:46 PM
Venting : Back From ReBoot-HELL.... Megamieuwsel General 7 10-02-2004 06:19 AM
Man after 3 days of trying Linux I might have to go back to WinXP jarget Linux - Newbie 19 08-26-2003 09:56 AM
can't get back into linux after winxp install pZyteX Linux - Software 7 09-08-2001 07:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:08 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