bug-grub
[Top][All Lists]
Advanced

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

expect script to boot a specific GRUB entry


From: Dave Hansen
Subject: expect script to boot a specific GRUB entry
Date: 16 Aug 2003 12:10:48 -0700

I thought someone else might find this slightly useful.  I'm doing a lot
of automated testing of development versions of the Linux kernel.  I
needed to be able to recover when a kernel goes bad on me.  I have some
neat Cisco hardware that allows me to telnet to a port on a server and
get access to a serial port.  This expect script attaches to one of
those ports where GRUB is waiting.

Handed a GRUB title, this will find it in the menu and boot it.  The
only real caveat is that you need to escape regular expression
characters in your kernel titles.  For instance: "Linux (2.4.17) works "
needs to be passed as "Linux \(2\.4\.17\) works ".

I think hacks like this demonstrate how useful a full-featured scripting
laguage in the menu syntax would be, including the ability to save some
state across a power cycle without the OS being involved.

-- 
Dave Hansen
address@hidden

Attachment: grub-select.exp
Description: Text document


reply via email to

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