Solved

time-dependent, automatic boot switch?

Posted on 2004-09-15
9
252 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now