Commit 97f3da16 authored by Mike Hibler's avatar Mike Hibler
Browse files

Add a "kernel rename" script for Linux which reruns LILO if the

file /var/emulab/boot/runlilo exists.  This is used for post-diskload
configuration.  The rc.frisbee script modifies the lilo.conf file if
necessary (for disk types other than IDE) and touches the runlilo file.
So next time Linux boots, it will re-run lilo and get everything in synch.

So how do we boot Linux the first time before lilo has been rerun?
I'm glad you asked!  rc.frisbee also runs the magic groklilo program which
knows how to set the one-time command line in LILO.  We use this to set
"root=802" or whatever to make it boot that first time.
parent 7bf641c5
......@@ -118,6 +118,7 @@ sysetc-remove:
script-install: dir-install $(SCRIPTS)
$(INSTALL) -m 755 $(SRCDIR)/liblocsetup.pm $(BINDIR)/liblocsetup.pm
$(INSTALL) -m 755 $(SRCDIR)/rc.ipod $(BINDIR)/rc/rc.ipod
$(INSTALL) -m 755 $(SRCDIR)/rc.kname $(BINDIR)/rc/rc.kname
$(INSTALL) -m 755 $(SRCDIR)/prepare $(BINDIR)/prepare
$(INSTALL) -m 755 $(SRCDIR)/ixpboot $(BINDIR)/ixpboot
$(INSTALL) -m 755 $(SRCDIR)/rc.ixp $(BINDIR)/rc/rc.ixp
......
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2004 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
use Getopt::Std;
# Turn off line buffering on output
$| = 1;
# Drag in path stuff so we can find emulab stuff.
BEGIN { require "/etc/emulab/paths.pm"; import emulabpaths; }
#
# See if we need to rerun LILO. This should only happen after a disk
# is initially loaded.
#
if (-e "$BOOTDIR/runlilo") {
if (!unlink("$BOOTDIR/runlilo")) {
print "WARNING: could not unlink $BOOTDIR/runlilo\n";
}
if (system("/sbin/lilo >$LOGDIR/lilo.out 2>&1")) {
print "WARNING: error $? while running LILO, ".
"see $LOGDIR/lilo.out\n";
}
else {
print "Updated /etc/lilo.conf.\n";
}
}
exit(0);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment