Grub not working
Tom H
tomh0665 at gmail.com
Thu May 5 18:47:15 UTC 2011
On Thu, May 5, 2011 at 2:37 PM, dave boland <dboland9 at fastmail.fm> wrote:
>
>> Replace "insmod ntfs" with "insmod fat" in "/etc/grub.d/40_custom".
>>
>> # cat /etc/grub.d/40_custom
>> #!/bin/sh
>> cat << EOF
>> menuentry "Chainload WinME" {
>> insmod part_msdos
>> insmod fat
>> set root=(hdX,Y) ## where X and Y are correct for your ME partition
>> chainloader +1
>> }
>> EOF
>>
>> and run "update-grub".
>
> Done, but all is not well. First, here is the 40_custom file:
> #!/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
> cat << EOF
> menuentry "Chainload WinME" {
> insmod part_msdos
> insmod fat
> set root=(hd0,1)
> chainloader +1
> }
> EOF
>
> The problem is that update-grub produces errors on line 146. What file
> I don't know.
> Generating grub.cfg ...
> Found linux image: /boot/vmlinuz-2.6.38-8-generic
> Found initrd image: /boot/initrd.img-2.6.38-8-generic
> Found memtest86+ image: /boot/memtest86+.bin
> error: syntax error.
> error: Incorrect command.
> error: syntax error.
> error: line no: 146
> Syntax errors are detected in generated GRUB config file.
> Ensure that there are no errors in /etc/default/grub
> and /etc/grub.d/* files or please file a bug report with
> /boot/grub/grub.cfg.new file attached.
> done
Delete
<begin>
#!/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
</end>
from 40_custom
More information about the ubuntu-users
mailing list