lilo/grub etc.: time-controlled boot selection?

Marcel Pommer mpi at
Wed Sep 11 07:57:08 PDT 2002

Matthias Benkmann wrote:

> On Wed, 11 Sep 2002 13:48:05 +0200 Marcel Pommer <mpi at> wrote:
>> your question: the machine is supposed to be woke-on-lan at night and
>> boot a linux system that automatically modifies the windows system which
>> is used during the day.
> Well, I don't know if (and doubt that) any boot managers support this, but
> I have some (complicated) other solutions:
> a) If the Windows in question is still a DOS-based one, then you can set
> it to boot into DOS mode (BootGUI=1 in msdos.sys) and have autoexec.bat
> check the time. If the linux system should be started, it launches loadlin
> and otherwise This is probably the fastest solution (unless you
> find a boot manager that supports this directly)

i suppose there is no software which does the opposite of loadlin (like 
"loadwin") i.e. loads windows from a running linux system or a linux system 
in runlevel 6?
This would of course be the most simple way.

> b) Install GRUB on the Windows partition. Install a program that starts
> automatically whenever Windows is booted (either in Autostart or one of
> the many Run registry keys). This program (could even be a bash script if
> you install CygWin) checks the time and if necessary modifies (with sed
> for instance) the menu.lst file from Grub so that Grub boots Linux next
> time. Then use rundll to shut down Windows non-interactively.
> Add a similar script to Linux that will reset Grub's menu.lst to boot
> Windows. This solution is not as robust as a) because it assumes that
> Windows can boot successfully. Not a good solution if you want your Linux
> system to automatically repair Windows.

This strict alternation is also not good because Windows will surely be 
booted many times a day *g*

> c) You could try to boot via LAN. Grub supports network booting (see the
> info pages). Instead of serving an OS image, you could serve boot sectors
> for the chainloader like this
> root (nd)
> chainloader /tftproot/bootsector
> I havent't tried this and I don't know if the chainloader can read from
> the network but I see no reason why it shouldn't. Anyway, your TFTP server
> needs to serve the correct boot sector depending on daytime. The booting
> itself will work from the local disk.

This is a great idea and I will give it a try. Serving different content at 
different times is very simple. But this solution depends on the TFTP 
server being available. If it fails, the machines won't boot at all, so one 
has to eliminate this single point of failure by all means.

Marcel Pommer   techn. Leiter
VKF Renzel GmbH -
Im Geer 15  D-46419 Isselburg  Tel: +49 2874 910-240  Fax: +49 2874 910-109
mpi at
Unsubscribe: send email to listar at
and put 'unsubscribe blfs-support' in the subject header of the message

More information about the blfs-support mailing list