?
Solved

time-dependent, automatic boot switch?

Posted on 2004-09-15
9
Medium Priority
?
259 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
[X]
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
  • 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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 2000 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month10 days, 23 hours left to enroll

770 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