LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-12-2012, 12:03 PM   #1
SteveThePirate87
Member
 
Registered: Jul 2012
Location: Glasgow, UK
Distribution: Ubuntu Mate 15.04
Posts: 66

Rep: Reputation: Disabled
Can't enter SolusOS 1.7 entry on CentOS 6.3 grub menu


Hi guys,

Just wondering, I installed CentOS onto my desktop that originally had SolusOS (debian based distro) on it so i could dual boot between the two. However it seems CentOS's grub has missed out the entry for Solus and i can't boot into it. So i opened up the grub.conf and added a new entry for it but the problem is that i'm guessing i need to enter the kernel path for solus such as the CentOS entries above but i'm stuck on how to do this so i can boot sucessfully to both Cent and Solus.

Is there a command to probe the solus installation in hd0,2 for the info to copy into the grub.conf?

Here is the output of grub.conf and my crappy attempt to add Solus at the bottom;
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,5)
#          kernel /boot/vmlinuz-version ro root=/dev/sdb6
#          initrd /boot/initrd-[generic-]version.img
#boot=/dev/sdb
default=0
timeout=5
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
#hiddenmenu
title CentOS (2.6.32-279.14.1.el6.i686)
	root (hd0,5)
	kernel /boot/vmlinuz-2.6.32-279.14.1.el6.i686 ro root=UUID=5fb797a4-5a54-42ad-888a-49f80300bb73 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=uk LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_LVM rd_NO_DM rhgb quiet
	initrd /boot/initramfs-2.6.32-279.14.1.el6.i686.img
title CentOS (2.6.32-279.el6.i686)
	root (hd0,5)
	kernel /boot/vmlinuz-2.6.32-279.el6.i686 ro root=UUID=5fb797a4-5a54-42ad-888a-49f80300bb73 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=uk LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_LVM rd_NO_DM rhgb quiet
	initrd /boot/initramfs-2.6.32-279.el6.i686.img
title SolusOS
	root (hd0,2)
	chainloader +1
Any ideas?

Cheers

Steve
 
Old 11-12-2012, 01:38 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,876

Rep: Reputation: 349Reputation: 349Reputation: 349Reputation: 349
If you are certain that you didn't install CentOS over Solus, then you should run "/usr/sbin/update-grub2 -o /boot/grub/grub.cfg" (as root, and without the quotes) to probe for bootable OSs and rewrite the grub.cfg file.

It may also work by simply running /usr/sbin/update-grub2.
 
Old 11-12-2012, 02:24 PM   #3
SteveThePirate87
Member
 
Registered: Jul 2012
Location: Glasgow, UK
Distribution: Ubuntu Mate 15.04
Posts: 66

Original Poster
Rep: Reputation: Disabled
Nice one i'll give that command a shot. I'm positive i haven't overwritten solus because i've got it partitioned that cent's / is hda0,5 and the /home is hda0,6 with solus and the swap etc at the beginning. I'll report back later with the results (fingers crossed)

Thanks dude.
 
Old 11-12-2012, 02:55 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,925

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
The Grub file you posted (grub.conf) is from Grub Legacy so updating grub2 isn't going to help. The chainloader entry you have in the grub.conf for Solus should work if your Solus boot files are on the first drive, third partition. It would probably be best to boot CentOS and mount the partition(s) you think Solus boot files are on to make sure you are pointing to the correct partition/files.
 
Old 11-12-2012, 05:31 PM   #5
SteveThePirate87
Member
 
Registered: Jul 2012
Location: Glasgow, UK
Distribution: Ubuntu Mate 15.04
Posts: 66

Original Poster
Rep: Reputation: Disabled
I'm getting an Error13: Invalid or unsupported executable format. Googling this says it basically can't find the kernel image, is that right? Would installing grub2 fix this issue or is there a more recommended solution i could try?
 
Old 11-12-2012, 07:58 PM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,925

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Quote:
Error13: Invalid or unsupported executable format.
You might have your Solus entry pointing to the swap partition, that is, if CentOS and Solus are the only operating systems you have. I would suggest going to the site below and reading the information on the bootinfoscript, downloading it and running it. It will produce a file named results.txt in your user /home directory. Review it and if you can't figure it out, post the file here.

http://sourceforge.net/projects/bootinfoscript/
 
2 members found this post helpful.
Old 11-13-2012, 03:59 AM   #7
SteveThePirate87
Member
 
Registered: Jul 2012
Location: Glasgow, UK
Distribution: Ubuntu Mate 15.04
Posts: 66

Original Poster
Rep: Reputation: Disabled
Hi

Here is the output of the script
Code:
                  Boot Info Script 0.61      [1 April 2012]


============================= Boot Info Summary: ===============================

 => Grub Legacy0.97 is installed in the MBR of /dev/sdc and looks at sector 
    293660672 on boot drive #1 for the stage2 file.  A stage2 file is at this 
    location on /dev/sdc.  Stage2 looks on partition #6 for 
    /boot/grub/grub.conf..

sdc1: __________________________________________________________________________

    File system:       swap
    Boot sector type:  Grub2 (v1.99)
    Boot sector info:  Grub2 (v1.99) is installed in the boot sector of sdc1 
                       and looks at sector 50434 of the same hard drive for 
                       core.img, but core.img can not be found at this 
                       location.

sdc2: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  SolusOS Eveline
    Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sdc3: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sdc4: __________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info: 

sdc5: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sdc6: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  CentOS release 6.3 (Final) 
                       Kernel on an
    Boot files:        /boot/grub/menu.lst /boot/grub/grub.conf /etc/fstab

============================ Drive/Partition Info: =============================

Drive: sdc _____________________________________________________________________

Disk /dev/sdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sdc1               2,048     2,869,247     2,867,200  82 Linux swap / Solaris
/dev/sdc2           2,869,248    23,349,247    20,480,000  83 Linux
/dev/sdc3    *     23,349,248   228,149,247   204,800,000  83 Linux
/dev/sdc4         228,149,248   312,580,095    84,430,848   5 Extended
/dev/sdc5         228,153,344   292,100,095    63,946,752  83 Linux
/dev/sdc6    *    292,102,144   312,580,095    20,477,952  83 Linux


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sdc1        eb064b23-7e58-4500-9655-af237daae998   swap       
/dev/sdc2        fc789d96-cf57-46a4-a67e-2c6797e96265   ext4       
/dev/sdc3        b8708a17-a0e0-49a6-a253-6755d517ca9d   ext4       
/dev/sdc5        b025b7af-7296-4e78-bc97-5f53d0d2018d   ext4       
/dev/sdc6        5fb797a4-5a54-42ad-888a-49f80300bb73   ext4       _CentOS-6.3-i386

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/sdc5        /home                    ext4       (rw)
/dev/sdc6        /                        ext4       (rw)


=========================== sdc2/boot/grub/grub.cfg: ===========================

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

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos2)'
search --no-floppy --fs-uuid --set fc789d96-cf57-46a4-a67e-2c6797e96265
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos2)'
search --no-floppy --fs-uuid --set fc789d96-cf57-46a4-a67e-2c6797e96265
insmod jpeg
background_image -m stretch /usr/share/backgrounds/splash.jpg
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos2)'
search --no-floppy --fs-uuid --set fc789d96-cf57-46a4-a67e-2c6797e96265
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos2)'
search --no-floppy --fs-uuid --set fc789d96-cf57-46a4-a67e-2c6797e96265
insmod jpeg
if background_image /usr/share/backgrounds/splash.jpg; then
  true
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'SolusOS GNU/Linux, with Linux 3.3.6-solusos' --class solusos --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos2)'
	search --no-floppy --fs-uuid --set fc789d96-cf57-46a4-a67e-2c6797e96265
	echo	'Loading Linux 3.3.6-solusos ...'
	linux	/boot/vmlinuz-3.3.6-solusos root=UUID=fc789d96-cf57-46a4-a67e-2c6797e96265 ro  quiet splash vga=792
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.3.6-solusos
}
menuentry 'SolusOS GNU/Linux, with Linux 3.3.6-solusos (recovery mode)' --class solusos --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos2)'
	search --no-floppy --fs-uuid --set fc789d96-cf57-46a4-a67e-2c6797e96265
	echo	'Loading Linux 3.3.6-solusos ...'
	linux	/boot/vmlinuz-3.3.6-solusos root=UUID=fc789d96-cf57-46a4-a67e-2c6797e96265 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.3.6-solusos
}
### END /etc/grub.d/10_linux ###

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

### BEGIN /etc/grub.d/30_os-prober ###
### 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.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sdc2/etc/fstab: ================================

--------------------------------------------------------------------------------
# UNCONFIGURED FSTAB FOR BASE SYSTEM
proc	/proc	proc	defaults	0	0
# /dev/sda1
UUID=eb064b23-7e58-4500-9655-af237daae998	swap	swap	sw	0	0
# /dev/sda2
UUID=fc789d96-cf57-46a4-a67e-2c6797e96265	/	ext4	rw,errors=remount-ro	0	1
# /dev/sda3
UUID=b8708a17-a0e0-49a6-a253-6755d517ca9d	/home	ext4	rw,errors=remount-ro	0	0
tmpfs	/tmp	tmpfs	nodev,nosuid	0	0--------------------------------------------------------------------------------

=================== sdc2: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

   4.071651459 = 4.371902464    boot/grub/core.img                             1
   3.686855316 = 3.958730752    boot/grub/grub.cfg                             1
   4.624767303 = 4.965806080    boot/initrd.img-3.3.6-solusos                  2
   4.440341949 = 4.767780864    boot/vmlinuz-3.3.6-solusos                     1
   4.624767303 = 4.965806080    initrd.img                                     2
   4.440341949 = 4.767780864    vmlinuz                                        1

========================== sdc6/boot/grub/grub.conf: ===========================

--------------------------------------------------------------------------------
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,5)
#          kernel /boot/vmlinuz-version ro root=/dev/sdb6
#          initrd /boot/initrd-[generic-]version.img
#boot=/dev/sdb
default=0
timeout=5
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
#hiddenmenu
title CentOS (2.6.32-279.14.1.el6.i686)
	root (hd0,5)
	kernel /boot/vmlinuz-2.6.32-279.14.1.el6.i686 ro root=UUID=5fb797a4-5a54-42ad-888a-49f80300bb73 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=uk LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_LVM rd_NO_DM rhgb quiet
	initrd /boot/initramfs-2.6.32-279.14.1.el6.i686.img
title CentOS (2.6.32-279.el6.i686)
	root (hd0,5)
	kernel /boot/vmlinuz-2.6.32-279.el6.i686 ro root=UUID=5fb797a4-5a54-42ad-888a-49f80300bb73 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=uk LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_LVM rd_NO_DM rhgb quiet
	initrd /boot/initramfs-2.6.32-279.el6.i686.img
title SolusOS
	root (hd0,2)
	kernel /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
--------------------------------------------------------------------------------

=============================== sdc6/etc/fstab: ================================

--------------------------------------------------------------------------------

#
# /etc/fstab
# Created by anaconda on Mon Nov 12 15:15:38 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=5fb797a4-5a54-42ad-888a-49f80300bb73 /                       ext4    defaults        1 1
UUID=b025b7af-7296-4e78-bc97-5f53d0d2018d /home                   ext4    defaults        1 2
UUID=eb064b23-7e58-4500-9655-af237daae998 swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
--------------------------------------------------------------------------------

=================== sdc6: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

 140.303272247 = 150.649491456  boot/grub/grub.conf                            1
 140.303272247 = 150.649491456  boot/grub/menu.lst                             1
 140.028438568 = 150.354391040  boot/grub/stage2                               1
 141.947853088 = 152.415346688  boot/initramfs-2.6.32-279.14.1.el6.i686.img    1
 141.214405060 = 151.627812864  boot/initramfs-2.6.32-279.el6.i686.img         2
 141.394096375 = 151.820754944  boot/vmlinuz-2.6.32-279.14.1.el6.i686          1
 140.539169312 = 150.902784000  boot/vmlinuz-2.6.32-279.el6.i686               1

========= Devices which don't seem to have a corresponding hard drive: =========

sdd sde sdf sdg 

=============================== StdErr Messages: ===============================

  No volume groups found
mdadm: No arrays found in config file or automatically
 
Old 11-13-2012, 10:17 AM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,925

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
The bootinfoscript shows Solus and its boot files are on sdc2. Grub Legacy counts drives and partitions from zero (0) while Grub2 counts drives from zero (0) and partitions fro one (1). Change the entry in the grub.conf file for Solus to:

Quote:
title SolusOS
root (hd0,1)
chainloader +1
Or you could use this:

Quote:
title SolusOS
root (hd0,1)
kernel /boot/grub/core.img
#savedefault
#boot
The savedefault and boot lines above will not be read as they have the hash mark (#), if that fails you could remove the hash mark. Some systems require them, others don't.

What I find curious about your system is that you seem to have only one drive yet it is labelled as sdc?
Did you have other drives attached during the installation?
Are you able to boot CentOS with the entry you have in its grub.conf file?
Normally, booting sdc6 would require a root entry for Grub of (hd2,5) and for Solus (hd2,1)??

Last edited by yancek; 11-13-2012 at 10:21 AM.
 
1 members found this post helpful.
Old 11-13-2012, 10:44 AM   #9
SteveThePirate87
Member
 
Registered: Jul 2012
Location: Glasgow, UK
Distribution: Ubuntu Mate 15.04
Posts: 66

Original Poster
Rep: Reputation: Disabled
Hi,

Code:
title SolusOS
root (hd0,1)
kernel /boot/grub/core.img
#savedefault
#boot
worked a treat! It brought up the solus grub menu which in turn booted into SolusOS. I think the partitions where showing as sdc because i had a usb flash drive and usb hard drive plugged in and somehow labeled the system partitions up a bit. It shows as sdb when just one of them was plugged in and with none its sda.

Thanks for that by the way Yancek, you were very helpful I appreciate it.

Steve
 
  


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] Weird: During bootup, I must enter input at grub menu to boot. hwclock related? Arodef Red Hat 1 11-08-2012 11:41 PM
Fedora 17 -- custom entry does not show up in grub menu. People'spoet Linux - Kernel 3 06-13-2012 03:49 AM
[SOLVED] can not enter grub menu sumeet inani Linux - Newbie 1 05-23-2012 12:40 PM
[SOLVED] adding Ubuntu boot entry into openSUSE GRUB menu subuntu SUSE / openSUSE 11 01-28-2010 10:00 PM
questions about GRUB menu entry commands m4rtin Linux - Software 8 09-12-2007 06:56 PM


All times are GMT -5. The time now is 03:33 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration