LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Sabayon
User Name
Password
Sabayon This forum is for the discussion of Sabayon Linux.

Notices

Reply
 
Search this Thread
Old 04-07-2012, 08:08 PM   #1
Fred Caro
Member
 
Registered: May 2007
Posts: 677

Rep: Reputation: 60
updating grub on sabayon8 while dualbooting with ubuntu 10.04


As I understand it there is no 'update-grub' on sabayon8 as it uses grub 1.99 so my latest Ubuntu kernel is not recognised on the boot options page and that page cannot be easily updated.
Would I have to use a text editor to add a line to the /boot/grub/menu.list? If so what happens if that kernel has not been properly recognised by Sabayon, would boot hang or loop?

Fred.
 
Old 04-08-2012, 01:19 AM   #2
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Squeeze
Posts: 585

Rep: Reputation: 118Reputation: 118
GRUB 1.99 does not use menu.lst or grub.conf. Those are for grub-legacy.

GRUB2 is quite different and uses several files to generate its grub.cfg boot script. The files are /etc/default/grub which contains the GRUB variables and the scripts in /etc/grub.d which are used to generate the menu entries.

To update the boot script use:
Code:
sudo grub-mkconfig -o /boot/grub/grub.cfg
 
Old 04-09-2012, 02:06 PM   #3
Fred Caro
Member
 
Registered: May 2007
Posts: 677

Original Poster
Rep: Reputation: 60
grub2 and grub 1.99

Sorry to question but are you sure grub 1.99 is the same as, or responds the same as, grub2. The boot section on my layout is controled by Sabayon and not Ubuntu so there might be some differences in the way grub is configured.You will appreciate I am reluctant to run a command as 'root' on a sensitive part if I am not sure 1.99=2.
Thanks, perhaps I am being overly cautious.

Fred
 
Old 04-09-2012, 02:43 PM   #4
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Squeeze
Posts: 585

Rep: Reputation: 118Reputation: 118
You are damn right on being overly cautious. But to answer your question, yes GRUB2=1.99. GRUB-legacy is any GRUB version < 0.97 (which is the more common GRUB-legacy version used by the distros). GRUB2 started with version 1.9x with 1.97 being the more popular GRUB2 used by the distros.

Any version <=0.97 is now referred to as GRUB-legacy and any version >=1.9x is now referred to as GRUB2 to differentiate between it and GRUB-legacy.

The first version of Sabayon I used was 5.5 and it had GRUB2 by default. Sabayon 7 uses 1.99 also. It follows that Sabayon 8 which I'm now hearing about would certainly use GRUB2 v1.99.

Of course you can verify this by looking for a menu.lst or grub.conf file. These only exists for GRUB-legacy. Again, GRUB2 uses the files I mentioned in my first post.

You can always generate a new boot script without touching your existing one with:
Code:
sudo grub-mkconfig -o ~/Documents/mygrub.cfg
You can then inspect this file to verify for yourself.

Also,
Code:
info -f grub
would give you the info pages for GRUB2.

While most distros install GRUB2 to /boot/grub, some distros such as Fedora and openSUSE uses GRUB-legacy by default, and so places it's GRUB2 files in /boot/grub2. They have also renamed some of the GRUB2 script such as grub-mkconfig and grub-install to grub2-mkconfig and grub2-install.

Last edited by towheedm; 04-09-2012 at 02:51 PM.
 
Old 04-09-2012, 07:20 PM   #5
Fred Caro
Member
 
Registered: May 2007
Posts: 677

Original Poster
Rep: Reputation: 60
grub/saayon

Dear...,
the readout for 'info -f grub':

fred@sabayon-fred ~ $ info -f grub
info: grub: No such file or directory
fred@sabayon-fred ~ $

the readout from the previous is:

red@sabayon-fred ~ $ info -f grub
info: grub: No such file or directory
fred@sabayon-fred ~ $ sudo grub-mkconfig -o ~/Documents/mygrub.cfg

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

Password:
fred is not in the sudoers file. This incident will be reported.
fred@sabayon-fred ~ $ the following happened using 'su'

fred@sabayon-fred ~ $ su
Password:
sabayon-fred fred # grub-mkconfig -o ~/Documents/mygrub.cfg
/sbin/grub-mkconfig: line 264: /root/Documents/mygrub.cfg.new: No such file or directory
sabayon-fred fred #

Any ideas, Fred.
 
Old 04-09-2012, 07:47 PM   #6
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Squeeze
Posts: 585

Rep: Reputation: 118Reputation: 118
Please use code tags, it makes the reading so much easier.

Are you the only user on the system, or is there a different administrator who initially set up the system. I may be wrong but I think Sabayon uses sudo by default.

But we can do it with su:
Code:
su -mc "grub-mkconfig -o ~/Documents/mygrub.cfg
-m : preserve environment
-c : execute command

or:
Code:
su -c "grub-mkconfig -o /home/fred/Documents/mygrub.cfg"
Also try (without the -f option):
Code:
info grub
or:
Code:
su -c "info grub"
 
Old 04-10-2012, 02:06 PM   #7
Fred Caro
Member
 
Registered: May 2007
Posts: 677

Original Poster
Rep: Reputation: 60
update grub

Hello again. The output of your first suggestion is as follows,

code:
fred@sabayon-fred ~ $ su -mc "grub-mkconfig -o ~/Documents/mygrub.cfg
> ^C
fred@sabayon-fred ~ $

oops.

code:

fred@sabayon-fred ~ $ su -mc "grub-mkconfig -o ~/Documents/mygrub.cfg
> ^C
fred@sabayon-fred ~ $ su -mc "grub-mkconfig -o ~/Documents/mygrub.cfg"
Password:
Generating grub.cfg ...
Found background image: default-splash.png
Found linux image: /boot/kernel-genkernel-x86_64-3.2.0-sabayon
Found initrd image: /boot/initramfs-genkernel-x86_64-3.2.0-sabayon
No volume groups found
Found Ubuntu 10.04.4 LTS (10.04) on /dev/sda6
done
fred@sabayon-fred ~ $

This seems to getting somewhere but it does not tell me if it has found the latest kernel. Don't think I have got the tag thing right.
Please note that "sudoers" seems to exist in theory but there is no group for it and, more importantly, man or info searches result in a fruitless result. You have to give more specific searches, i.e., "man grub-probe" and so on. Oh yes I am the only user/admin, which is probably a good thing!

Fred.
 
Old 04-11-2012, 05:37 PM   #8
Fred Caro
Member
 
Registered: May 2007
Posts: 677

Original Poster
Rep: Reputation: 60
grub 1.99

Thanks. I did send the tenuous results to a file which convinced me to try the:

(su) grub-mkconfig -o /boot/grub/grub.cfg

It worked but I still don't know why. Also could not reconstitute your grub guide.

Fred.
 
Old 04-11-2012, 07:51 PM   #9
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Squeeze
Posts: 585

Rep: Reputation: 118Reputation: 118
Quote:
It worked but I still don't know why.
You don't know why what worked?

Quote:
Also could not reconstitute your grub guide.
I don't quite get what you mean by 'reconstitute'?
 
Old 04-14-2012, 08:41 PM   #10
Fred Caro
Member
 
Registered: May 2007
Posts: 677

Original Poster
Rep: Reputation: 60
sabayon/ubuntu boot issue

The solution given worked fine until sabayon updated then sabayon would not boot but the previously obscured ubuntu kernel would.
I cannot recreate any error outputs (nor would I want to) but I can say that the /grub.cfg file became 'read only' and the corresponding 'rc.log' file output a time stamp of the same value. Chmod would not change the permissions on /boot/grub/.
I did find a trojan on Ubuntu that was shifted.

I ended up reinstalling Sabayon8 on freed space.

Fred.
 
  


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
Problem after updating Ubuntu 10.04 with GNU GRUB version 1.98-1ubuntu10 leopoldb Linux - Laptop and Netbook 3 06-11-2011 05:01 AM
DualBooting with GRUB ; Need Help Editing GRUB blooperspree Linux - Software 2 11-04-2006 11:23 AM
Back to Slack! Questions on dualbooting with GRUB instead of LILO Matt.Ramos Slackware - Installation 1 04-17-2006 08:23 PM
Dualbooting WinXP and Suse 10.0 using GRUB Zmyrgel Linux - Newbie 5 01-27-2006 02:58 PM
GRUB & Dualbooting mrizos Linux - Newbie 1 11-18-2004 02:25 PM


All times are GMT -5. The time now is 05:49 AM.

Main Menu
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