Grub not working
Tony Pursell
ajp at princeswalk.fsnet.co.uk
Fri May 6 14:59:07 UTC 2011
On Fri, 2011-05-06 at 14:43 +0100, Tony Pursell wrote:
> On Fri, 2011-05-06 at 09:16 -0400, dave boland wrote:
> > > > #!/bin/sh
> > > > (because this is a script)
> > > > cat << EOF
> > > > (for the script to start writing to grub.cfg when it's called)
> > > > menuentry "Chainload WinME" {
> > > > insmod part_msdos
> > > > insmod fat
> > > > set root=(hd0,1)
> > > > chainloader +1
> > > > }
> > > > (the above's the actual menu title and the stuff that picking'll do)
> > > > EOF
> > > > (for the script to stop writing to grub.cfg when it's called)
> > > >
> >
> > I updated my 40_custom as explained above (see below). The menu
> > appears, and I get a blinking under score cursor that is non-functional.
> >
> > #!/bin/sh
> > exec tail -n +3 $0
> > # This file provides an easy way to add custom menu entries. Simply
> > type the
> > # menu entries you want to add after this comment. Be careful not to
> > change
> > # the 'exec tail' line above.
> > # cat /etc/grub.d/40_custom
> > #!/bin/sh
> > echo 'Windows ME'
> > #cat<<EOF
> > menuentry "WinME" {
> > insmod part_msdos
> > insmod fat
> > set root=(hd0,1)
> > chainloader +1
> > }
> > EOF
> >
>
> You need to uncomment (take the # off) the line
>
> #cat<<EOF
>
> because this means 'output the lines that follow until you get to a line
> with just EOF on it'.
>
> Also I'm not sure that you need
>
> echo 'Windows ME'
>
> When you have changed the file, you can run it to see what it outputs.
> If you are in /etc/grub.d you just need to type
>
> ./40_custom
>
> Tony
Forget all that. (Bangs head on wall!). We really should read what it
says 'Simply type the menu entries you want to add after this comment'
So all you need is to add
menuentry "WinME" {
insmod part_msdos
insmod fat
set root=(hd0,1)
chainloader +1
after the line
# the 'exec tail' line above.
then the
exec tail -n +3 $0
does the rest by outputting everything after the 3rd line.
Sorry if I sent you down a blind alley before.
Tony
More information about the ubuntu-users
mailing list