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

Notices


Reply
  Search this Thread
Old 03-01-2013, 04:28 PM   #1
skippyV
LQ Newbie
 
Registered: Apr 2009
Posts: 1

Rep: Reputation: 0
install grub2 to root partition


I have multiple partitions, Ubuntu installed on one and grub2 installed in the MBR.
When I installed Debian (6.07) on a new partition I wanted to install grub for that partition but was unsuccessful.
Used the "Advanced Install" process and reached the "Grub install" options but kept getting a red screen of error after attempting to install to '/dev/sda6'.

During the partition stage I gave Debian 2 partitions ('/' and '/home') and made '/' bootable.
I verified the root partition for Debian is '/dev/sda6'.

The reason for wanting grub (or grub2) also installed in the Debian partition is because I plan on installing the Xen hypervisor.
That way when I do "update-grub" from within Debian, it will update the "right" config files and display a new (2nd) menu during the boot process.

So my question is: how do I install grub (or grub2) into the root partition of Debian to allow chainloading?
I have no problem re-installing Debian if that is the best choice.
 
Old 03-01-2013, 05:45 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Quote:
Used the "Advanced Install" process and reached the "Grub install" options but kept getting a red screen of error after attempting to install to '/dev/sda6'.
Does Debian give you the option to continue in spite of the red screen?
 
Old 03-01-2013, 06:07 PM   #3
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
If you get rid of the bootable flag you will be all right. Grub does not need a bootable flag to work.

Grub, incase you are worried, is installed on your Debian system.

If you do not want it to boot everything on your drive, installing grub to the / partition is the way to go.

The box in the installer should list all detected OS's when it gets done installing grub on your new system and then wants to know where you want the active part of it installed. Installing to the MBR (Master Boot Record) is best.

You can, however, install to the new / partition. I do this all the time because I use a custom menu that will get copied to the new install after I boot to it from what ever install is handling my grub duties.

When you install to the new / you will not be able to boot to your new install until you boot to what ever install, Ubuntu I assume, is handling your screen menu chores.

After booting to it you need to go to terminal and run;
Code:
sudo update-grub
This will add your new install to the /boot/grub/grub.cfg file.

Installing grub from your new Debian install to the MBR should give you a screen menu containing all existing installs.

If you do not want Debian handling that job from then on simply boot to which ever install you want handling that and run;
Code:
sudo grub-install /dev/sdx
where x is the drive designation (sda, sdb, sdi - what ever it is).

That command will simply install the grub from that install on the MBR and when you reboot that will be where your screen menu originates from. Make sure that grub has been updated for that install or you will not include your latest installations.

I have 16 installs of linux on this box spread over 3 drives. There is not one boot flag.
 
  


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] Moving root partition when using grub2 eldiener Linux - Software 1 10-08-2012 04:32 AM
How to move Grub2 from mbr to root partition BillD Linux - Software 3 03-17-2011 07:07 AM
Install grub2 in partition is possible? miros84 Linux - Software 1 11-14-2010 02:59 PM
[SOLVED] Install LILO on the root partition shaylocomotive Slackware 16 01-05-2010 08:52 AM
Resize Root partition after install OpEn_SoUrCe_RoCkS Mandriva 8 04-01-2008 06:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:15 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
Open Source Consulting | Domain Registration