On Sun, Apr 03, 2011 at 08:29:33AM -0400, Ed Nisley wrote:
> On Sun, 2011-04-03 at 17:47 +1000, Erik Christiansen wrote:
> > a kosher way to make grub take boot parameters
>
> That's easy: GRUB_CMDLINE_LINUX isolcpus=1
>
> What's hard (at least for me) is putting that parameter *only* on the
> RTAI kernel line and leaving the stock kernel lines untouched.
>
> If you can do that, color me grateful!
Since I only have ubuntu 8.04 here (with menu.lst) at the moment, we
might (in the worst case) have to take a second cut, but the easiest way
to automate it for you would be to add a few lines to the
/usr/sbin/update-grub script. (Which I also have here on 8.04, for
testing)
First, let's confirm where update-grub is:
$ which update-grub
/usr/sbin/update-grub
Then save a copy, in case of gremlins! (e.g. one ">" is omitted below. ;-)
$ cp -p /usr/sbin/update-grub /usr/sbin/update-grub.backup
Now append the attached (tested) bash script snippet to
/usr/sbin/update-grub (a bash script), either using your favourite text
editor, or alternatively save it from your mail agent into /tmp/fred,
then append it with ">>":
$ cat /tmp/fred >> /usr/sbin/update-grub
Either way will do, so long as we have made the backup.
Caveat: I have made one unverified assumption, and that is that
/boot/grub/grub.cfg identifies kernel command lines with "kernel" at the
start of the line, as in menu.lst. If that "ain't so", then either you
could substitute for "kernel" in the script, or email me a sample of
/boot/grub/grub.cfg, and I'll tweak to fit.
Step by step instructions for implementing a wrapper script provide more
steps to go wrong. The above is safe enough, so long as
/usr/sbin/update-grub is copied before starting. ;-)
Now "uninstall" would just be:
$ mv /usr/sbin/update-grub.backup /usr/sbin/update-grub
If I've guessed wrong anywhere, please yodel, and we'll fix it.
Erik
--
Quentin Crisp: There is no need to do any housework at all.
After the first four years, the dirt doesn't get any worse.
# Addition to update-grub, to auto post-edit bootargs.
gawk '
/^kernel/ && $2 ~ /-rtai$/ {
printf("%s %s\n",$0,"isolcpus=1")
next
}
{ print $0 }
' /boot/grub/grub.cfg > /tmp/grub.cfg # Modify update-grub output.
mv /tmp/grub.cfg > /boot/grub/grub.cfg # Overwrite update-grub output.
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself;
WebMatrix provides all the features you need to develop and
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users