Grub not working

dave boland dboland9 at fastmail.fm
Fri May 6 01:40:44 UTC 2011



On Thu, 05 May 2011 21:24 -0400, "Tom H" <tomh0665 at gmail.com> wrote:
> On Thu, May 5, 2011 at 5:31 PM, dave boland <dboland9 at fastmail.fm> wrote:
> >
> > I have tried all manner of combinations to get this to work.  Currently,
> > I get an error in line 147 (of the config file?) when I run update-grub.
> >  Below is the error and the config file entry starting at line 143.
> >
> > 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: 147
> > 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
> >
> > ### BEGIN /etc/grub.d/40_custom ###
> > # 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" {
> > chainloader (hd0,1)+1
> > }
> > EOF
> > ### END /etc/grub.d/40_custom ###
> 
> I don't understand but I don't have the time to check the archive at
> the moment. I hope that this wasn't what I asked you to do. :(
> 
> What you need is just:
> 
> root at nattykdebox:~# 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
> root at nattykdebox:~#
> 
> In the same way, this is a cat of a 40_custom that I've got at the
> moment to test FreeBSD:
> 
> root at nattykdebox:~# cat /etc/grub.d/40_custom
> #!/bin/sh
> 
> cat <<EOF
> 
> menuentry "FreeBSD chainload" {
> insmod part_msdos
> insmod part_bsd
> insmod ufs1
> insmod ufs2
> set root=(hd1,msdos1,bsd1)
> chainloader +1
> }
> 
> menuentry "FreeBSD loader" {
> insmod part_msdos
> insmod part_bsd
> insmod ufs1
> insmod ufs2
> set root=(hd1,msdos1,bsd1)
> kfreebsd /boot/loader
> }
> 
> menuentry "FreeBSD kernel" {
> insmod part_msdos
> insmod part_bsd
> insmod ufs1
> insmod ufs2
> set root=(hd1,msdos1,bsd1)
> kfreebsd /boot/kernel/kernel
> kfreebsd_loadenv /boot/device.hints
> set FreeBSD.vfs.root.mountfrom=ufs:/dev/ad6s1a
> set FreeBSD.vfs.root.mountfrom.options=rw
> }
> 
> EOF
> root at nattykdebox:~#
> 
> -- 
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> 

Tom,

I have to confess -- I don't quite get what I have to do.  Do I need to
put all of this in a file?

Dave,
-- 
  dave boland
  dboland9 at fastmail.fm

-- 
http://www.fastmail.fm - Send your email first class





More information about the ubuntu-users mailing list