LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices



Reply
 
Search this Thread
Old 12-04-2013, 02:43 PM   #1
enorbet
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 14 is Main OpSys on Main PC, 2ndary are OpenSuSe 13 and SolydK
Posts: 783

Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
OpenSuSe12.3 - Help Fix Grub2 Syntax Errors (was - Replace Grub2 w/ Lilo)


Greetings
Before I list Problems and Needs let me just say I am both familiar and comfortable with Lilo. It does what I tell it, no more, no less.

Problem - I had a working Grub2 config that I painstakingly built that would handle 2 situations
1) Boot OpenSuse or Win7 when I selected 1st HDD in Bios Boot Order
2) Stay happy when I chose 2nd HDD in Boot Order for other systems using Lilo

Then an OpenSuse kernel upgrade updated Grub2 and while SuSe works, Win7 no longer does

I'd be marginally happy to employ some simple means to insure that Grub update didn't assume my system is broken and it knows better - in effect guaranteeing it did not overwrite my config.

I'd be much happier just replacing Grub2 w/ Lilo but I'd like to know if anyone else does this and can help me avoid issues I might miss in a system that basically expects Grub2.

Thank you

Last edited by enorbet; 12-05-2013 at 05:12 PM. Reason: no response to main question - trying 2nd
 
Old 12-05-2013, 05:07 PM   #2
enorbet
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 14 is Main OpSys on Main PC, 2ndary are OpenSuSe 13 and SolydK
Posts: 783

Original Poster
Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
Okay, I guess I'm going to get no love on a heads-up for installing Lilo in place of Grub2. So before I bite the bullet and plunge in “Crash, Burn & Recover” territory, I will try just fixing Grub2.

Here's my problem. When I run this...... I get that >

Code:
 # grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found linux image: /boot/vmlinuz-3.7.2new
Found initrd image: /boot/initrd-3.7.2new
Found linux image: /boot/vmlinuz-3.4.63-2.44-desktop
Found initrd image: /boot/initrd-3.4.63-2.44-desktop
  No volume groups found
Found Windows 7 (loader) on /dev/sda1
Found Microsoft Windows XP Professional on /dev/sda3
Found Ubuntu 13.04 (13.04) on /dev/sda8
Found Slackware Linux (Slackware 14.0) on /dev/sda9
Found Windows 7 (loader) on /dev/sdb2
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 337
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/grub2/grub.cfg.new file attached.done
The first thing I'd like to understand is why (or even how) a file generated by Grub2 can contain syntax errors? I'm assuming I can't just repair those errors in “/boot/grub2/grub.cfg.new” and rename it to “/boot/grub2/grub.cfg” and go on my merry way.

So....

1) what is the proper procedure to fix this situation, removing syntax errors to get a completely working bootloader?
2) And, hopefully, how can I make this persistent through kernel updates in the future so that Grub2 doesn't mess it all up, yet again?

PS Incidentally I really don't want SuSe Grub2 to attempt to boot Slackware or Ubuntu or try to directly boot "Old XP" (it can't) so I really need to be able to make and KEEP it very simple. Any help on fix and/or persistence customization would be greatly appreciated.
 
Old 12-05-2013, 11:16 PM   #3
yancek
Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 5,322

Rep: Reputation: 854Reputation: 854Reputation: 854Reputation: 854Reputation: 854Reputation: 854Reputation: 854
Quote:
I'm assuming I can't just repair those errors in “/boot/grub2/grub.cfg.new” and rename it to “/boot/grub2/grub.cfg” and go on my merry way.
Why would you assume that? You can manually edit grub.cfg to make changes. The reason the message at the top says not to is because no changes you make will remain if you update grub unless you put the changes in the /etc/grub.d/40_custom file. If you don't run grub-mkconfig, the changes will remain in the grub.cfg.

Since you haven't posted your grub.cfg file or, at least the line (337) in question, there is way for anyone to do more than guess.
You might also review the files mentioned in the grub error output or post them here.

Quote:
Incidentally I really don't want SuSe Grub2 to attempt to boot Slackware or Ubuntu
If the drive with Slackware on it is attached when you run grub-mkconfig, it should detect Slackware. You don't need to use it and if you don't want it in the menu, delete that menuentry. Also, where did Ubuntu and xp come from? You didn't mention those in your original post and where are they, which drive?

If you haven't resolved this, you might try do an online search for bootinfoscript, go to the site and read the instructions then download it to any Linux system and run it after making it executable. It is a bash script and outputs detailed information on boot files, dirves, partitions, uuids, etc.
 
1 members found this post helpful.
Old 12-06-2013, 02:41 AM   #4
John VV
Guru
 
Registered: Aug 2005
Posts: 13,820

Rep: Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848Reputation: 1848
SUSE uses a ton ( and i do mean a ton) of auto config scripts
manually configuring anything is not the best idea . Tweaking a config file yes , but not manually making one .


the default setting for suse it to NOT look for other bootloaders and "alien" os's

using the yast GUI is normally the best thing , the /boot/grub.conf is a mix of a "template " config file and scripts

open yast2 ( i use KDE4 so "kickoff" / computer / yast2 )
open the "bootloader" gui tool
in the top section is a dropdown menu
grub2 is default but lilo is listed
for suse to auto config the system there is a button to the right of the dropdown menu
" Boot loader options"
click it
then put a check in the " probe for foreign OS"
and click "ok" and in the next window also click "ok"

then reboot

NOTE:
if you make changes to other os bootloaders then you have to rerun the gui bootloader tool to REMAKE the suse grub config


i also have SL6 installed using it own grub 0.9 version on it's own drive
when i update SL6's kernel i need to remake the grub2 config in suse
4 mouse clicks and it is done .

Last edited by John VV; 12-06-2013 at 02:47 AM.
 
Old 12-06-2013, 04:47 PM   #5
enorbet
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 14 is Main OpSys on Main PC, 2ndary are OpenSuSe 13 and SolydK
Posts: 783

Original Poster
Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
Quote:
Originally Posted by yancek View Post
Why would you assume that? You can manually edit grub.cfg to make changes. The reason the message at the top says not to is because no changes you make will remain if you update grub unless you put the changes in the /etc/grub.d/40_custom file. If you don't run grub-mkconfig, the changes will remain in the grub.cfg.
Yes, that's what I had thought, and to be honest assumed I was wrong since the changes I made over a year ago (and now very vague to me) did not succeed in remaining persistent. I will attempt this again, thank you.

Quote:
Originally Posted by yancek View Post
Since you haven't posted your grub.cfg file or, at least the line (337) in question, there is way for anyone to do more than guess.
You might also review the files mentioned in the grub error output or post them here.
Well as you might imagine with 337 plus lines it is not tiny, so I will delete as much as I think I can and still keep context, as well as line 337, and hope it isn't any kind of spamming. For ease I have put notes in BOLD, so anyone who wishes can just scroll to line 337.

Code:
 #
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
#-#-# 
#-NOTE - I deleted this section for brevity as it should be the most basic and correct, superfluous here
#-#-#
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'openSUSE 12.2' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-71809429-d5b3-4036-916f-297cb5b278a2' {
	load_video
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos8'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos8 --hint-efi=hd1,msdos8 --hint-baremetal=ahci1,msdos8 --hint='hd0,msdos8'  71809429-d5b3-4036-916f-297cb5b278a2
	else
	  search --no-floppy --fs-uuid --set=root 71809429-d5b3-4036-916f-297cb5b278a2
	fi
	echo	'Loading Linux 3.7.2new ...'
	linux	/boot/vmlinuz-3.7.2new root=UUID=71809429-d5b3-4036-916f-297cb5b278a2   video=1280x1024 resume=/dev/disk/by-id/ata-ST31000528AS_9VP1EHSQ-part3 splash=silent quiet showopts
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd-3.7.2new
}
submenu 'Advanced options for openSUSE 12.2' $menuentry_id_option 'gnulinux-advanced-71809429-d5b3-4036-916f-297cb5b278a2' {
	menuentry 'openSUSE 12.2, with Linux 3.7.2new' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.7.2new-advanced-71809429-d5b3-4036-916f-297cb5b278a2' {
		load_video
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos8'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos8 --hint-efi=hd1,msdos8 --hint-baremetal=ahci1,msdos8 --hint='hd0,msdos8'  71809429-d5b3-4036-916f-297cb5b278a2
		else
		  search --no-floppy --fs-uuid --set=root 71809429-d5b3-4036-916f-297cb5b278a2
		fi
		echo	'Loading Linux 3.7.2new ...'
		linux	/boot/vmlinuz-3.7.2new root=UUID=71809429-d5b3-4036-916f-297cb5b278a2   video=1280x1024 resume=/dev/disk/by-id/ata-ST31000528AS_9VP1EHSQ-part3 splash=silent quiet showopts
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd-3.7.2new
	}
	menuentry 'openSUSE 12.2, with Linux 3.7.2new (recovery mode)' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.7.2new-recovery-71809429-d5b3-4036-916f-297cb5b278a2' {
		load_video
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos8'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos8 --hint-efi=hd1,msdos8 --hint-baremetal=ahci1,msdos8 --hint='hd0,msdos8'  71809429-d5b3-4036-916f-297cb5b278a2
		else
		  search --no-floppy --fs-uuid --set=root 71809429-d5b3-4036-916f-297cb5b278a2
		fi
		echo	'Loading Linux 3.7.2new ...'
		linux	/boot/vmlinuz-3.7.2new root=UUID=71809429-d5b3-4036-916f-297cb5b278a2  showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset  x11failsafe
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd-3.7.2new
	}
	menuentry 'openSUSE 12.2, with Linux 3.4.63-2.44-desktop' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.4.63-2.44-desktop-advanced-71809429-d5b3-4036-916f-297cb5b278a2' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos8'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos8 --hint-efi=hd1,msdos8 --hint-baremetal=ahci1,msdos8 --hint='hd0,msdos8'  71809429-d5b3-4036-916f-297cb5b278a2
		else
		  search --no-floppy --fs-uuid --set=root 71809429-d5b3-4036-916f-297cb5b278a2
		fi
		echo	'Loading Linux 3.4.63-2.44-desktop ...'
		linux	/boot/vmlinuz-3.4.63-2.44-desktop root=UUID=71809429-d5b3-4036-916f-297cb5b278a2   video=1280x1024 resume=/dev/disk/by-id/ata-ST31000528AS_9VP1EHSQ-part3 splash=silent quiet showopts
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd-3.4.63-2.44-desktop
	}
	menuentry 'openSUSE 12.2, with Linux 3.4.63-2.44-desktop (recovery mode)' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.4.63-2.44-desktop-recovery-71809429-d5b3-4036-916f-297cb5b278a2' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos8'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos8 --hint-efi=hd1,msdos8 --hint-baremetal=ahci1,msdos8 --hint='hd0,msdos8'  71809429-d5b3-4036-916f-297cb5b278a2
		else
		  search --no-floppy --fs-uuid --set=root 71809429-d5b3-4036-916f-297cb5b278a2
		fi
		echo	'Loading Linux 3.4.63-2.44-desktop ...'
		linux	/boot/vmlinuz-3.4.63-2.44-desktop root=UUID=71809429-d5b3-4036-916f-297cb5b278a2  showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset  x11failsafe
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd-3.4.63-2.44-desktop
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_ppc_terminfo ###
### END /etc/grub.d/20_ppc_terminfo ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-4505-3E99' {
	insmod part_msdos
	insmod fat
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  4505-3E99
	else
	  search --no-floppy --fs-uuid --set=root 4505-3E99
	fi
	chainloader +1
}
menuentry 'Microsoft Windows XP Professional (on /dev/sda3)' --class windows --class os $menuentry_id_option 'osprober-chain-6A380E7D380E4911' {
	insmod part_msdos
	insmod ntfs
	set root='hd0,msdos3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  6A380E7D380E4911
	else
	  search --no-floppy --fs-uuid --set=root 6A380E7D380E4911
	fi
	drivemap -s (hd0) ${root}
	chainloader +1
}
menuentry 'Ubuntu 13.04 (13.04)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-d02dacdd-9676-4a25-b7aa-8079aed70fb5' {
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos8'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8  d02dacdd-9676-4a25-b7aa-8079aed70fb5
	else
	  search --no-floppy --fs-uuid --set=root d02dacdd-9676-4a25-b7aa-8079aed70fb5
	fi
	linux /boot/vmlinuz-3.8.0-33-lowlatency root=/dev/sda8 ro quiet splash $vt_handoff
	initrd /boot/initrd.img-3.8.0-33-lowlatency
}
submenu 'Advanced options for Ubuntu 13.04 (13.04)' $menuentry_id_option 'osprober-gnulinux-advanced-d02dacdd-9676-4a25-b7aa-8079aed70fb5' {
	menuentry 'Ubuntu'\\'' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option '\\''gnulinux-simple-d02dacdd-9676-4a25-b7aa-8079aed70fb5 (on /dev/sda8)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.8.0-33-lowlatency--d02dacdd-9676-4a25-b7aa-8079aed70fb5' {
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos8'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8  d02dacdd-9676-4a25-b7aa-8079aed70fb5
		else
		  search --no-floppy --fs-uuid --set=root d02dacdd-9676-4a25-b7aa-8079aed70fb5
		fi
		linux /boot/vmlinuz-3.8.0-33-lowlatency root=/dev/sda8 ro quiet splash $vt_handoff
		initrd /boot/initrd.img-3.8.0-33-lowlatency
	}
	menuentry 'Ubuntu, with Linux 3.8.0-33-lowlatency'\\'' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option '\\''gnulinux-3.8.0-33-lowlatency-advanced-d02dacdd-9676-4a25-b7aa-8079aed70fb5 (on /dev/sda8)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.8.0-33-lowlatency--d02dacdd-9676-4a25-b7aa-8079aed70fb5' {
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos8'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8  d02dacdd-9676-4a25-b7aa-8079aed70fb5
		else
		  search --no-floppy --fs-uuid --set=root d02dacdd-9676-4a25-b7aa-8079aed70fb5
		fi
		linux /boot/vmlinuz-3.8.0-33-lowlatency root=/dev/sda8 ro quiet splash $vt_handoff
		initrd /boot/initrd.img-3.8.0-33-lowlatency
	}
	menuentry 'Ubuntu, with Linux 3.8.0-33-lowlatency (recovery mode)'\\'' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option '\\''gnulinux-3.8.0-33-lowlatency-recovery-d02dacdd-9676-4a25-b7aa-8079aed70fb5 (on /dev/sda8)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.8.0-33-lowlatency--d02dacdd-9676-4a25-b7aa-8079aed70fb5' {
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos8'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8  d02dacdd-9676-4a25-b7aa-8079aed70fb5
		else
		  search --no-floppy --fs-uuid --set=root d02dacdd-9676-4a25-b7aa-8079aed70fb5
		fi
		linux /boot/vmlinuz-3.8.0-33-lowlatency root=/dev/sda8 ro recovery nomodeset
		initrd /boot/initrd.img-3.8.0-33-lowlatency
	}
	menuentry 'Ubuntu, with Linux 3.8.0-33-generic'\\'' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option '\\''gnulinux-3.8.0-33-generic-advanced-d02dacdd-9676-4a25-b7aa-8079aed70fb5 (on /dev/sda8)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.8.0-33-generic--d02dacdd-9676-4a25-b7aa-8079aed70fb5' {
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos8'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8  d02dacdd-9676-4a25-b7aa-8079aed70fb5
		else
		  search --no-floppy --fs-uuid --set=root d02dacdd-9676-4a25-b7aa-8079aed70fb5
		fi
		linux /boot/vmlinuz-3.8.0-33-generic root=/dev/sda8 ro quiet splash $vt_handoff
		initrd /boot/initrd.img-3.8.0-33-generic
	}
	menuentry 'Ubuntu, with Linux 3.8.0-33-generic (recovery mode)'\\'' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option '\\''gnulinux-3.8.0-33-generic-recovery-d02dacdd-9676-4a25-b7aa-8079aed70fb5 (on /dev/sda8)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.8.0-33-generic--d02dacdd-9676-4a25-b7aa-8079aed70fb5' {
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos8'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8  d02dacdd-9676-4a25-b7aa-8079aed70fb5
		else
		  search --no-floppy --fs-uuid --set=root d02dacdd-9676-4a25-b7aa-8079aed70fb5
		fi
		linux /boot/vmlinuz-3.8.0-33-generic root=/dev/sda8 ro recovery nomodeset
		initrd /boot/initrd.img-3.8.0-33-generic
	}
	menuentry 'Ubuntu, with Linux 3.5.0-37-lowlatency'\\'' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option '\\''gnulinux-3.5.0-37-lowlatency-advanced-d02dacdd-9676-4a25-b7aa-8079aed70fb5 (on /dev/sda8)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.5.0-37-lowlatency--d02dacdd-9676-4a25-b7aa-8079aed70fb5' {
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos8'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8  d02dacdd-9676-4a25-b7aa-8079aed70fb5
		else
		  search --no-floppy --fs-uuid --set=root d02dacdd-9676-4a25-b7aa-8079aed70fb5
		fi
		linux /boot/vmlinuz-3.5.0-37-lowlatency root=/dev/sda8 ro quiet splash $vt_handoff
		initrd /boot/initrd.img-3.5.0-37-lowlatency
	}
	menuentry 'Ubuntu, with Linux 3.5.0-37-lowlatency (recovery mode)'\\'' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option '\\''gnulinux-3.5.0-37-lowlatency-recovery-d02dacdd-9676-4a25-b7aa-8079aed70fb5 (on /dev/sda8)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.5.0-37-lowlatency--d02dacdd-9676-4a25-b7aa-8079aed70fb5' {
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos8'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8  d02dacdd-9676-4a25-b7aa-8079aed70fb5
		else
		  search --no-floppy --fs-uuid --set=root d02dacdd-9676-4a25-b7aa-8079aed70fb5
		fi
		linux /boot/vmlinuz-3.5.0-37-lowlatency root=/dev/sda8 ro recovery nomodeset
		initrd /boot/initrd.img-3.5.0-37-lowlatency
	}
}

menuentry 'Slackware Linux (Slackware 14.0)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-c6dbab74-939e-413d-861e-b918e96ac3df' {
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos9'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9  c6dbab74-939e-413d-861e-b918e96ac3df
	else
	  search --no-floppy --fs-uuid --set=root c6dbab74-939e-413d-861e-b918e96ac3df
	fi
	linux /boot/vmlinuz-custom-3.12 root=/dev/sda9 ro append = "video=640x480 vga = normal
}
submenu 'Advanced options for Slackware Linux (Slackware 14.0)' $menuentry_id_option 'osprober-gnulinux-advanced-c6dbab74-939e-413d-861e-b918e96ac3df' {
	menuentry 'Slack13.12 (on /dev/sda9)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-custom-3.12--c6dbab74-939e-413d-861e-b918e96ac3df' {
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos9'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9  c6dbab74-939e-413d-861e-b918e96ac3df
		else
		  search --no-floppy --fs-uuid --set=root c6dbab74-939e-413d-861e-b918e96ac3df
		fi
		linux /boot/vmlinuz-custom-3.12 root=/dev/sda9 ro 
		}
}

menuentry 'Windows 7 (loader) (on /dev/sdb2)' --class windows --class os $menuentry_id_option 'osprober-chain-121EE4321EE41091' {
	insmod part_msdos
	insmod ntfs
	set root='hd0,msdos2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos2 --hint-efi=hd1,msdos2 --hint-baremetal=ahci1,msdos2 --hint='hd0,msdos2'  121EE4321EE41091
	else
	  search --no-floppy --fs-uuid --set=root 121EE4321EE41091
	fi
	chainloader +1
}
##-##-##-##
The line immediately preceding this comment, the lone "]" is the infamous "line 337"
##-##-##-##
### END /etc/grub.d/30_os-prober ###

### 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.

menuentry 'Windows Boot Loader' --class windows {
        insmod part_msdos
	insmod ntfs
        set root='hd0,msdos3'
        drivemap -s (hd0) ${root}
	chainloader +1
}
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/7Ult ###
# 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.

menuentry 'Windows Boot Loader' --class windows {
        insmod part_msdos
	insmod ntfs
        set root='hd0,msdos3'
        drivemap -s (hd0) ${root}
	chainloader +1
}
### END /etc/grub.d/7Ult ###

### BEGIN /etc/grub.d/90_persistent ###
### END /etc/grub.d/90_persistent ###
Quote:
Originally Posted by yancek View Post
If the drive with Slackware on it is attached when you run grub-mkconfig, it should detect Slackware. You don't need to use it and if you don't want it in the menu, delete that menuentry. Also, where did Ubuntu and xp come from? You didn't mention those in your original post and where are they, which drive?
Please pay no attention to that man behind the curtain! I didn't mention those for brevity and focus as I am unconcerned with those other than removing them. To be clear, I want 2 main entries in my Grub menu - OpenSuse, and Win7.


Quote:
Originally Posted by yancek View Post
If you haven't resolved this, you might try do an online search for bootinfoscript, go to the site and read the instructions then download it to any Linux system and run it after making it executable. It is a bash script and outputs detailed information on boot files, dirves, partitions, uuids, etc.
I have partly resolved this by getting Win7 to boot from my 2nd disk bootloader, LilO, from Slackware. I say "partly" because I don't consider this over just because all systems boot now. I want to learn how to get Grub2 to work properly.

Truth be told, this fail has pointed up to me that I have generated considerable cruft in a system that has evolved and been added to for too long, and soon I think I need to relegate these drives to standalone boxes, and make my main box 2 or 3 clean installs.

Last edited by enorbet; 12-06-2013 at 04:50 PM. Reason: brevity and clarity
 
Old 12-06-2013, 05:04 PM   #6
enorbet
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 14 is Main OpSys on Main PC, 2ndary are OpenSuSe 13 and SolydK
Posts: 783

Original Poster
Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
Quote:
Originally Posted by John VV View Post
SUSE uses a ton ( and i do mean a ton) of auto config scripts
manually configuring anything is not the best idea . Tweaking a config file yes , but not manually making one .
I don't think I mentioned manually making a grub 2 config. In fact, it should now be clear, that while I am more comfortable with manual control in Slackware, I choose to not try to make OpenSuse conform to Slackware rules, but rather learn it's own merits and limitations.


Quote:
Originally Posted by John VV View Post
the default setting for suse it to NOT look for other bootloaders and "alien" os's

using the yast GUI is normally the best thing , the /boot/grub.conf is a mix of a "template " config file and scripts

open yast2 ( i use KDE4 so "kickoff" / computer / yast2 )
open the "bootloader" gui tool
in the top section is a dropdown menu
grub2 is default but lilo is listed
for suse to auto config the system there is a button to the right of the dropdown menu
" Boot loader options"
click it
then put a check in the " probe for foreign OS"
and click "ok" and in the next window also click "ok"

then reboot

NOTE:
if you make changes to other os bootloaders then you have to rerun the gui bootloader tool to REMAKE the suse grub config


i also have SL6 installed using it own grub 0.9 version on it's own drive
when i update SL6's kernel i need to remake the grub2 config in suse
4 mouse clicks and it is done .
Thank you for your responses. I did look at the Yast Bootloader app, and after having resolved this to my satisfaction, I will try it first to see if it can simplify my overlying problem of persistence through kernel updates.

It still does bother me that with no edits, Grub2's auto config is lacking enough to generate it's own errors, effectively breaking itself. But then, this is why I prefer Admins be people and I only toy with automatic systems, realizing that even though Operating Systems may try to deal with Multi-Boot, the emphasis and safety from many problems is StandAlone Single OpSys.
 
Old 12-06-2013, 05:07 PM   #7
enorbet
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 14 is Main OpSys on Main PC, 2ndary are OpenSuSe 13 and SolydK
Posts: 783

Original Poster
Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
Thanks to only 2 replies I think I am close to a proper fix and soon should be able to mark this SOLVED. It is no longer urgent since I can now boot all systems, but I remain determined to get Grub2 right.
 
Old 12-06-2013, 07:02 PM   #8
yancek
Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 5,322

Rep: Reputation: 854Reputation: 854Reputation: 854Reputation: 854Reputation: 854Reputation: 854Reputation: 854
Quote:
The line immediately preceding this comment, the lone "]" is the infamous "line 337"
Is that a typo in your comment? It is actually '}' not a ']' and as shown in your grub.cfg, it is correct: }

Your grub.cfg shows windows 7 installed on sda1 and sda2, is that correct?
 
Old 12-06-2013, 08:49 PM   #9
enorbet
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 14 is Main OpSys on Main PC, 2ndary are OpenSuSe 13 and SolydK
Posts: 783

Original Poster
Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
Quote:
Originally Posted by yancek View Post
Is that a typo in your comment? It is actually '}' not a ']' and as shown in your grub.cfg, it is correct: }

Your grub.cfg shows windows 7 installed on sda1 and sda2, is that correct?
Greetz
Yes, my comment contains the typo, not the config... too many times typing "[code]" etc and not really a sign of increasing age diminishing mental capacity :P LOL

Grub.cfg has the single entry on line 337 of

Code:
 }
I, too, wondered why that was considered a syntax error.

I'm not sure what to say about the device location, since I find it a little confusing now that we have progressed through SATA drives, thru UUIDs on to what appears to be Brand and Model info in auto-generated fstab. What I can say is that according to SuSe's Partition Manager, it does see it as /dev/sda. However, /dev/sda1 is an old Fat Partition no longer bootable (unless, maybe I put FreeDOS on it), /dev/sda2 is an old XP-64bit install that should not boot since Win7 usurps it's ability, placing it in the windows boot loaders as "Older Version of Windows". The correct location of the Windows Boot should be /dev/sda3, assuming that SuSe is consistent in drive labeling.

For reference, while this is accessed by Slackware on /dev/sda9 (and is labeled exactly that in /etc/fstab) this is the "/etc/lilo.conf" entry that now correctly boots Win7

Code:
 other = /dev/sda3
label = Win7
If SuSe is indeed consistent, then it seems that I may be able to fix this problem by deleting all the duplication and things I don't want, leaving just the basics SuSe requires and editing the Win7 entry to say "/dev/sda3" instead or 1 or 2. I will try this tonight and then, if that works, see about placing the Win7 entry in 40_Custom abd turning off OSProber.

Thanks again for your help.
 
Old 12-08-2013, 05:09 AM   #10
enorbet
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 14 is Main OpSys on Main PC, 2ndary are OpenSuSe 13 and SolydK
Posts: 783

Original Poster
Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
Eureka!

Greetings and again, Thank You

It is now fixed with redundancy, in that I can boot everything I want to from each of two drives, with Lilo from Slackware, and Grub2 from OpenSuse.

The problem turns out to be interesting, at least to me, and maybe you will find it curious as well. I choose which disk is first to boot with the bios menu for Boot Order. When I choose the drive on Sata0 I get the SuSe Grub2 loader and when I choose the drive on Sata3 I get Slackware.

In this configuration Slackware, although on a higher order controller, because it is selected as 1st Boot, sees itself and Win7 as being on /dev/sda. All works normal and fine.

However when Sata0 is selected as 1st Boot, once SuSe is up, the Partition Manager sees the drive on Sata3 as /dev/sda, the first drive, NOT the boot drive. Grub2, once told to see it as /dev/sdb ( or rather 'hd1,msdos3' to be exact ) boots Win7 just fine. Simply deleting everything in 30_OSProber (after a backup copy was made, ofc) solved the wrongful drive labeling issue.

This is still less than perfect, with drive recognition inconsistencies, but at least all works now, seems as if it will survive updates, so I'm marking this SOLVED!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Setting up GRUB2 to replace Lilo for Slack 14.0 Mercury305 Slackware 5 10-03-2012 10:01 PM
Having trouble booting Zenwalk, both from GRUB2 and LILO. jrvinton Zenwalk 3 03-26-2012 05:30 PM
grub, grub2, lilo? BING, GAG, gujin syslinux ... ? catkin Linux - Software 30 12-14-2011 01:50 PM
Lilo vs grub1 vs grub2 honeybadger Linux - General 8 12-03-2010 12:42 PM
[SOLVED] Grub/ Grub2/ Lilo - can´t install any of them properly! spoovy Slackware 26 11-19-2010 07:35 AM


All times are GMT -5. The time now is 11:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration