LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices

Reply
 
Search this Thread
Old 01-24-2012, 07:10 PM   #1
ruggetier
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Rep: Reputation: Disabled
Question how to get grub2 to work properly in mbr of multi-boot system with lvm


Hello forum,
Im new member, glad to be here and sending greetings to all helping hands out there.

Now here is my story:
After a major breakdown Im trying to set up a multi boot system like so:
  • inevitable XP
  • Linux Mint for daily use "out of the box"
  • Bodhi for fiddling and fun
  • Scientific Linux with focus on security, for coding Salome simulations and other work stuff

This time I decided to use lvm for obvious reasons, I never did this before.

Mint installation went well (including dualboot), but after installing Bodhi I was surprised when the bootmenue only showed Bodhi and XP entries Mint was gone.

Since then Im trying to get grub to list all three OSes, but all the infos i could find do not apply, because they either do not cover lvm or multiboot, just dualboot with lvm, what I already have achieved twice ;-)

Heres some infos that might be of relevance:
  • I did not use /boot partitions but wrote grub directly on sda
  • Filesystem of all Linux partitions is ext4
So now Scientific Linux is yet to be installed, and I hope you people could point me out the proper proceedings so that in the end I can choose among all of them.

Many thanks :wave:
 
Old 01-24-2012, 09:43 PM   #2
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Squeeze
Posts: 585

Rep: Reputation: 118Reputation: 118
I'f Mint is for daily use, I'll assume it controls grub and its configuration files. Remember only one OS has 'control' of GRUB's menu.

To return control to Mint, do this:
1. From the GRUB menu, press c for GRUB's command line
2. Set root with set root='(hdx,y)' where x is the drive and y the partition on the drive where you installed Mint. Remember partitions start with 1.
3. Load the kernel with linux /boot/vmlinuz....... root=/dev/<lvm root device>. If you don't know the version of the kernel, press <tab> for a list.
4. Load the initramfs with initrd /boot/initrd...... If you don't know the version of the kernel, press <tab> for a list. This must match the kernel.
5. Boot the kernel with the command 'boot'.

Once Mint is loaded give Mint control of GRUB again with:
Code:
sudo grub-install /dev/sda
Update GRUB's menu with:
Code:
sudo update-grub
If you cannot determine the root device or kernel version, you may also do this:
Mount your Mint partition in Bodhi
Code:
mkdir /mnt/mint ; mount /dev/sdx /mnt/mint
where sdx is the partition with Mint

Look at your grub.cfg file in Mint:
Code:
cat /mnt/mint/boot/grub/grub.cfg | less
Look for the first menuentry line. Within the menuentry section, note the set root=, linux and initrd lines. Use these as the values for the Steps 1 to 5 above.

I don't use lvm, do I'm not sure of any specifics for lvm.

If this don't work, post back with any error message.

Last edited by towheedm; 01-24-2012 at 09:47 PM.
 
Old 01-27-2012, 08:59 PM   #3
ruggetier
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks towheedm but before I tried your approach I rebooted once again and updated grub and it worked! I have no idea why it didnt before, I must have messed sth up.

Then I tried to install Scientific Linux, but it does not support grub2. That means you have to have a /boot partition outside the lvm. I didnt want that so I swiched to CAElinux wich comes with Salome in a package. This ones a ubuntu derivate so no probs here with grub2.

For now everything is fine :wave:
 
  


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] How to repair grub2 in MBR? win7/10.10 dual boot. Nizzok Linux - Newbie 9 01-11-2013 09:56 AM
Multi-disk, multi-boot system does not boot after fresh install anth0ny5 Linux - Software 8 08-17-2011 02:02 AM
Trying to repair Grub2 for Ubuntu 10.04 in multi-boot scenario thepenquin Linux - Newbie 3 01-10-2011 09:56 AM
[SOLVED] Multi-boot grub2 destroyed on windows 7 reboot hhoyt Linux - Software 5 08-17-2010 03:01 PM


All times are GMT -5. The time now is 05:43 PM.

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