"The Linux Gazette...making Linux just a little more fun!"


(?) The Answer Guy (!)


By James T. Dennis, linux-questions-only@ssc.com
Starshine Technical Services, http://www.starshine.org/


(?) LILO Default

From Steven W.Cline on Mon, 07 Dec 1998

(?) Answerguy,

I've been searching for this but can't find it. I would like to change the default OS that lilo loads. Right now it is Linux. How can I change the default to DOS?

This is because I am the only one using Linux and the rest of the family uses DOS.

Steven W.Cline
San Bruno, Ca.

(!) The default is the first "stanza" (boot image) listed in the /etc/lilo.conf.
So, just edit that file and move the block for your Windows stanza to place it after any global directives and before any other OSes that you have listed.
Alternatively you can just use the default= directive to specify the label of the image that you want to use.
(Hint: searching the lilo.conf(5) man page on the term "default" leads us to the answer within a few shots.
[ I should only comment on layout stuff, but here, I just gotta.
Once upon a time when antares was a multi-boot machine, I had it set up so that CTRL-ALT-DEL would always reboot you into "the other OS". For a while it was so handy, I'd even forgotten how we did it... so I wasn't able to tell Jim! But here's a trick that should work:
Add a line to /etc/inittab that reads:
ms::boot:/sbin/lilo -R dos

(assuming you've named your stanzas linux and dos). The 'ms' is a gratuitous identifier; it could really be anything, as long as the other inittab lines have a different first value. The '-R' stores a LILO command choice for only one session, so on the next reboot (from DOS, which isn't saying anything special to LILO) you'll go back to the other OS... unless sometime during your linux session, you run another lilo -R command that mentions a different command line to default to. However, you leave the lilo default to linux this way. I suppose you could use this to run /sbin/lilo -R linux so that reboots from Linux will tend to stay in Linux, with the default set as Jim described to dos so that power-on, and reboots in DOS, will tend to stay in DOS.
I don't know if there's a LILO control program for DOS these days, but with LOADLIN and a copy of the kernel stored in DOS-accessible space, you could even create a script that would let you add "Linux" to your DOS or Windows menu system. If you prefer to go that way, you could even uninstall LILO and put back a plain DOS master boot record, so it would never ask anymore. Or, you can set LILO to delay forever, so you can always choose which OS ... though this loses the benefit of being able to ignore the system while it boots. -- Heather ]


Copyright © 1999, James T. Dennis
Published in The Linux Gazette Issue 36 January 1999


[ Answer Guy Index ] a b c 1 2 3 4 5 6 7 9 10 11 12
15 16 18 19 20 21 22 23 24 25 26 27 28
29 31 32 33 34 35 36 37 38 39 40 41 42 44
45 46 47 48 49 50 51 52 53 54 55 56 57 60 61 62 63 64 65 66
67 69 72 76 77 78 79 80 81 82 84 85 86 87 91 94 95 96 97 98


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]