Solved

time-dependent, automatic boot switch?

Posted on 2004-09-15
9
254 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to get maximum transfer speed over LAN 4 77
Best way to virtualise a remote Linux server 2 66
php ssh2_scp_send 1 60
High Bandwidth Usage 6 53
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
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 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.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

813 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

15 Experts available now in Live!

Get 1:1 Help Now