Solved

time-dependent, automatic boot switch?

Posted on 2004-09-15
9
257 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
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.  

 
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux script delete files 3 60
how to print sub line with  sed /awk /perl in bash file 11 69
php56-php-mcrypt for rhel7 php56 1 112
DB2 9.7 Grant Execute SP 4 18
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
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 navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

730 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