bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

using grub to batch test projects under multiple OSs


From: Jim Cromie
Subject: using grub to batch test projects under multiple OSs
Date: Sun, 24 Aug 2003 13:13:10 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

hi folks,

1st. forgive if I hit send prematurely - im collecting thoughts for a while 1st.

Im interested in setting up a GRUB config to support the testing of Perl on multiple
Linux kernels, with eventual extension to *BSD, and perhaps cygwin, etc...

at 1st approximation, it seems possible to something like
       sed -e 's/default=(\d+)/$1++/e' < /etc/grub.conf

savedefault feels a bit less clunky, but doesnt provide a way to increment to the
next boot config.

SO, heres a notional proposal:   add 'incdefault'.

# grub.conf with - series of test configs at end..

default=saved
title  normal use boot
   root (hd0,1)
   kernel /vmlinuz-2.4.20-20.7 ro root=LABEL=/
   initrd /initrd-2.4.20-20.7.img
   savedefault

title memtest86
       kernel (hd0,2)/root/memtest.bin

# start test sequence
title   test-kernel-1
      root ...
      # I dont yet 'know' if the init option is even there, but....
      kernel   init=/opt/smoke-test-OS
      incdefault
      savedefault

title   test-kernel-2
      # similar....
      kernel  runlevel=4
      incdefault
      savedefault


when incdefault falls off the end, it should reset to 0, then the normal boot happens.
since the normal boot doesnt 'incdefault', the test progression stops.

OK, 'incdefault' is pretty much the pith of it..

other questions (some OT)

in test-kernel-1 ive assumed the existence of an init kernel-parameter which can load a separate inittab. in test-kernel-2 ive hijacked runlevel 4, which is unused on my
linux system.  At 1st glance, runlevel 4 looks practical, are there relative
(/dis)advantages of these 2 approaches which are non-obvious ?

are there systems where 4 is already 'used' ? I can imagine installations where runlevel 4 is configd for a database server, but that seems 'non-interfering' since
a your db-server is gonna be a separate box from your test-machine.

Have there been any moves/rumbles towards using an extended/named runlevel
scheme (ex: '0-reboot', '1-single', '2-multi-process-standalone', '3-networked', '4-db-serv', '5-X-workstation', '6-halt', '7-test-box', 8-etc.... ?) At a glance, it seems reasonable to extend at least 7-9, perhaps A-Z too. 36 runlevels is 'more than enough',
without breaking the single char runlevel designation in:

# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1

when I run the memtest86 'kernel', I have to force a reboot by rather drastic means (cut the power IIRC). is there a better way (via grub.conf, init, inittab) to do this ?

How might one handle OS's with no notions of runlevels ?
How would one script a reboot in windows ? Im assuming no /sbin/shutdown exists ;-)

if discussion ensues, pls cc me, so I can learn something..

tia
Jim Cromie





reply via email to

[Prev in Thread] Current Thread [Next in Thread]