Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

time-dependent, automatic boot switch?

Posted on 2004-09-15
9
256 Views
Last Modified: 2010-04-20
Is the following possible?

If the time of day is within a certain range, then boot to CD. Otherwise, boot to HD. Do this *without* any user intervention (e.g. user removing the CD or going into BIOS).

Assumptions:
BIOS can be set to adjust boot order.
bootable CD (my customized Knoppix 3.4) is always in the CD-ROM (never ejects).
a floppy drive exists.

Restrictions:
Can't modify the HD in any way.

As far as I can see the options are 1) modifying isolinux on the Knoppix CD -- but how? 2) putting a bootloader on floppy and booting initially from that -- but if I put lilo or grub on a floppy they can't see the CDROM.

I have been puzzling over this for a while and would be very grateful for any ideas!
0
Comment
Question by:dv440
  • 4
  • 3
9 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 12069097
I can think of two ways to do this:

1) Modify Grub to do a time sensitive boot of the desired device and place that on the Knoppix CD.

2) Set the BIOS to boot from CD first and cobble up a time switch for the power to the CD drive.
0
 
LVL 1

Author Comment

by:dv440
ID: 12069669
For 1), Knoppix 3.4 uses isolinux as the bootloader.  How do you get it to be "subordinate" to grub?  

2), I hadn't thought of that one... although this would work, the PCs in question are critical servers, so I should have included "Can't modify the hardware in any way" to the "Restrictions" part of the original question.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 12070917
> Knoppix 3.4 uses isolinux as the bootloader

Uh, right (smacks self on the forehead). I'd forgotten that. Dunnon if you could get that to work from a floppy or not.

Maybe we could solve this a different way. Could you tell me why you want to do this?
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 1

Author Comment

by:dv440
ID: 12071230
I've made a remastered Knoppix CD that does daily maintenance tasks.  User puts my CD in & reboots, causing maintenance tasks to run, this part works just fine.  After Knoppix is finished, though, the user must manually remove the CD before rebooting, otherwise the system boots to CD again.  

If I could figure out how to get a time-sensitive boot decision, then I would keep the CD in the machine permanently, and set up the server to reboot automatically every night, sometime after hours when downtime is acceptable;  at this "magic" time, it reboots to CD, Knoppix boots, runs the maintenance tasks, reboots after finishing, and since the tasks take some time, the next time it reboots, it isn't the "magic" time period anymore;  thus the PC would boot to the HD instead of going on an infinite Knoppix loop.

No matter how I slice the problem, what I end up needing is a bootloader that has if..then conditionals.  Another issue is where the bootloader lives (floppy or CD), although it seems that things would be simpler by starting from CD, then I don't have to worry about the BIOS understanding el torito and all that.  I think I need to look into isolinux, I'm not familiar with what it can do, right now.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 12071257
Why do you need to boot from CD for these tasks? What "maintenance tasks" do you run? My bet would be that these could be done without having to reboot the system, and probably scripted from cron.
0
 
LVL 1

Author Comment

by:dv440
ID: 12071322
The system runs Windows NT 4.0 Server.  No cron.  ;)

I could do the tasks in Windows, sure, but that would require installing software, which I'm forbidden to do.  Knoppix allows me to bypass this restriction of no-software-installation.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 500 total points
ID: 12071500
I see. Running NT from the disk does make the problem more difficult.

From what little I know about I don't see how you could boot NT from isolinux, like you can with Grub. And now that I look at it further I don't think you can boot the CD from Grub. Might it be possible to boot from a tftp server that's only enabled at the desired times? Then all you'd need do is schedule the auto reboot from Windows (how do you plan to do that without a cron or scheduler on NT?) after the tftp server goes active.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question