Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions
User Name
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.


  Search this Thread
Old 01-24-2012, 08:10 PM   #1
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, 10:43 PM   #2
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
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:
sudo grub-install /dev/sda
Update GRUB's menu with:
sudo update-grub
If you cannot determine the root device or kernel version, you may also do this:
Mount your Mint partition in Bodhi
mkdir /mnt/mint ; mount /dev/sdx /mnt/mint
where sdx is the partition with Mint

Look at your grub.cfg file in Mint:
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 10:47 PM.
Old 01-27-2012, 09:59 PM   #3
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:


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 10:56 AM
Multi-disk, multi-boot system does not boot after fresh install anth0ny5 Linux - Software 8 08-17-2011 03:02 AM
Trying to repair Grub2 for Ubuntu 10.04 in multi-boot scenario thepenquin Linux - Newbie 3 01-10-2011 10:56 AM
[SOLVED] Multi-boot grub2 destroyed on windows 7 reboot hhoyt Linux - Software 5 08-17-2010 04:01 PM > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 02:30 PM.

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