FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 12-05-2011, 08:34 PM
Alan McKinnon
 
Default Installing Gentoo: Grub, alternate GNU/Linux system on another partition

On Mon, 5 Dec 2011 12:23:28 -0800
"Alan E. Davis" <lngndvs@gmail.com> wrote:

> I'm giving Gentoo another try, having been using Ubuntu for quite a
> while, and more recently Mint. I would like to be able to access
> Mint until the Gentoo system is working as I'd like it.
>
> I have gotten through the install, for the most part, up to grub. I
> can see how to edit the grub.conf file for my Gentoo partition.
> However, it isn't clear to me from the examples how to write a
> grub.conf entry for Mint's root (/) partition, on /dev/sda8. I am
> asking for advice on writing the grub.conf file.
>
> Here are the various partitions involved:
>
> Gentoo:
> /boot /dev/sda1
> / /dev/sda2
>
> Mint (/boot is not separate)
> / /dev/sda8
>
> The Mint kernel is using an initramfs, while I have manually
> configured the kernel on Gentoo, at least for now.
>
> Grub 2 is not transparent to me. The kernel is:
>
> /boot/vmlinuz-3.0.0-13-generic
>
> the initrd-img file is:
>
> /boot/initrd.img-3.0.0-13-generic
>
> My grub.conf file for gentoo would look like this:
>
> ###########
> default 0
> timeout 30
> #splashimage=(hd0,0)/boot/grub/splash.xpm.gz
>
>
> title Gentoo Original
> root (hd0,0)
> kernel /boot/kernel-3.0.6-gentoo-r1 root=/dev/sda2
> ###########
>
>
> I have a few other questions of a more or less minor nature. Perhaps
> better to ask them separately.
>
> Alan Davis

Dual boot scenarios get tricky, it is vital to assume nothing. You left
out a lot of info, so I have to make some reasonable assumptions. Reply
with corrections if we're going to wrong route.

You can only have one primary bootloader, either grub from Gentoo or
grub2 from Mint, it cannot be both. But it looks like that's what you
do have. Seeing as you intend to drop Mint eventually, you must
uninstall grub2 and all it's files from Mint.

Your supplied grub.conf will only work if you have a boot -> . symlink
present on /dev/sda1. Gentoo normally does this for you.

For Mint you probably need something like this:

title Mint
root (hd0,7)
kernel /vmlinuz-<whatever_mint_uses> root=/dev/sda8 ro quiet splash
<any_other_mint_params
initrd /initrd-<whatever_mint_uses>


You can pick up the correct kernel and initrd arguments
from /boot/grub/grub.cfg on /dev/sda8 by looking in the menuentry
sections.


--
Alan McKinnnon
alan.mckinnon@gmail.com
 
Old 12-05-2011, 08:49 PM
Michael Mol
 
Default Installing Gentoo: Grub, alternate GNU/Linux system on another partition

On Mon, Dec 5, 2011 at 4:34 PM, Alan McKinnon <alan.mckinnon@gmail.com> wrote:

> Dual boot scenarios get tricky, it is vital to assume nothing. You left
> out a lot of info, so I have to make some reasonable assumptions. Reply
> with corrections if we're going to wrong route.
>
> You can only have one primary bootloader, either grub from Gentoo or
> grub2 from Mint, it cannot be both. But it looks like that's what you
> do have. Seeing as you intend to drop Mint eventually, you must
> uninstall grub2 and all it's files from Mint.

Not *exactly* true.

Grub can chainload any bootloader that's visible to BIOS. At minimum,
that means you could have grub on /dev/sda chainload grub on /dev/sdb.
I'm uncertain if it means you could chainload a bootloader stored in
the first 512 bytes of /dev/sda8, but I suspect so.

>
> Your supplied grub.conf will only work if you have a boot -> . symlink
> present on /dev/sda1. Gentoo normally does this for you.

So do most distros I've touched. Just an FYI.

I think your instructions will work fine for him, though. I was going
to offer some grub1 stanzas, but I wasn't sure if real_root was
necessary.

--
:wq
 
Old 12-05-2011, 08:58 PM
Grant Edwards
 
Default Installing Gentoo: Grub, alternate GNU/Linux system on another partition

On 2011-12-05, Michael Mol <mikemol@gmail.com> wrote:
>
>> You can only have one primary bootloader, either grub from Gentoo or
>> grub2 from Mint, it cannot be both. But it looks like that's what you
>> do have. Seeing as you intend to drop Mint eventually, you must
>> uninstall grub2 and all it's files from Mint.
>
> Not *exactly* true.

It is for the usual definition of "primary bootloader" as the one that
is loaded and run by the BIOS.

> Grub can chainload any bootloader that's visible to BIOS. At minimum,
> that means you could have grub on /dev/sda

(primary bootloader)

> chainload grub on /dev/sdb

(secondary bootloader).

> I'm uncertain if it means you could chainload a bootloader stored in
> the first 512 bytes of /dev/sda8, but I suspect so.

You're right, you can. Though to get grub2 to install on a partition
like /dev/sda8 instead of in the MBR you have to use the --force
option or you'll get some incomprehensable error message when you try
to do the 'setup' command.

--
Grant Edwards grant.b.edwards Yow! ! The land of the
at rising SONY!!
gmail.com
 
Old 12-05-2011, 10:03 PM
Alan McKinnon
 
Default Installing Gentoo: Grub, alternate GNU/Linux system on another partition

On Mon, 5 Dec 2011 16:49:21 -0500
Michael Mol <mikemol@gmail.com> wrote:

> > You can only have one primary bootloader, either grub from Gentoo or
> > grub2 from Mint, it cannot be both. But it looks like that's what
> > you do have. Seeing as you intend to drop Mint eventually, you must
> > uninstall grub2 and all it's files from Mint.
>
> Not *exactly* true.
>
> Grub can chainload any bootloader that's visible to BIOS.

Yes, you are correct, this can be done.

I figured I wouldn't mention it as it gets confusing. Selecting
Gentoo from grub should load Gentoo. Selecting Mint from grub and
finding ... grub ... is just wierd. Few things baffle users as much as
that. Yes, been there done that :-)

> At minimum,
> that means you could have grub on /dev/sda chainload grub on /dev/sdb.
> I'm uncertain if it means you could chainload a bootloader stored in
> the first 512 bytes of /dev/sda8, but I suspect so.

That works too, I once had a system set up just that way. The
maintenance reduced me to tears

--
Alan McKinnnon
alan.mckinnon@gmail.com
 
Old 12-05-2011, 10:23 PM
Mick
 
Default Installing Gentoo: Grub, alternate GNU/Linux system on another partition

On Monday 05 Dec 2011 21:58:44 Grant Edwards wrote:
> On 2011-12-05, Michael Mol <mikemol@gmail.com> wrote:
> >> You can only have one primary bootloader, either grub from Gentoo or
> >> grub2 from Mint, it cannot be both. But it looks like that's what you
> >> do have. Seeing as you intend to drop Mint eventually, you must
> >> uninstall grub2 and all it's files from Mint.
> >
> > Not *exactly* true.
>
> It is for the usual definition of "primary bootloader" as the one that
> is loaded and run by the BIOS.
>
> > Grub can chainload any bootloader that's visible to BIOS. At minimum,
> > that means you could have grub on /dev/sda
>
> (primary bootloader)
>
> > chainload grub on /dev/sdb
>
> (secondary bootloader).
>
> > I'm uncertain if it means you could chainload a bootloader stored in
> > the first 512 bytes of /dev/sda8, but I suspect so.
>
> You're right, you can. Though to get grub2 to install on a partition
> like /dev/sda8 instead of in the MBR you have to use the --force
> option or you'll get some incomprehensable error message when you try
> to do the 'setup' command.

Last time I installed Ubuntu on a machine that had a different primary
OS/bootloader I chose for it to be installed on the Ubuntu partition and there
was not problem with it. It was GRUB2

Then I chainloaded it from the primary bootloader.

The OS can do the same, but this means that he can either:

a) Install Gentoo's GRUB to the MBR and chainload from Gentoo's grub.conf
Mint's /dev/sda8 boot loader (assuming that he has installed the Mint
bootloader to /dev/sda8 instead of the MBR); or

b) Install Gentoo's GRUB in Gentoo's partition, or some other partition (e.g.
a boot partition specific to Gentoo) and chainload this from Mint's GRUB2.

--
Regards,
Mick
 
Old 12-05-2011, 10:33 PM
Grant Edwards
 
Default Installing Gentoo: Grub, alternate GNU/Linux system on another partition

On 2011-12-05, Mick <michaelkintzios@gmail.com> wrote:
> On Monday 05 Dec 2011 21:58:44 Grant Edwards wrote:
>> On 2011-12-05, Michael Mol <mikemol@gmail.com> wrote:
>> >> You can only have one primary bootloader, either grub from Gentoo or
>> >> grub2 from Mint, it cannot be both. But it looks like that's what you
>> >> do have. Seeing as you intend to drop Mint eventually, you must
>> >> uninstall grub2 and all it's files from Mint.
>> >
>> > Not *exactly* true.
>>
>> It is for the usual definition of "primary bootloader" as the one that
>> is loaded and run by the BIOS.
>>
>> > Grub can chainload any bootloader that's visible to BIOS. At minimum,
>> > that means you could have grub on /dev/sda
>>
>> (primary bootloader)
>>
>> > chainload grub on /dev/sdb
>>
>> (secondary bootloader).
>>
>> > I'm uncertain if it means you could chainload a bootloader stored in
>> > the first 512 bytes of /dev/sda8, but I suspect so.
>>
>> You're right, you can. Though to get grub2 to install on a partition
>> like /dev/sda8 instead of in the MBR you have to use the --force
>> option or you'll get some incomprehensable error message when you try
>> to do the 'setup' command.
>
> Last time I installed Ubuntu on a machine that had a different primary
> OS/bootloader I chose for it to be installed on the Ubuntu partition and there
> was not problem with it. It was GRUB2

I tried that a couple weeks ago with several different versions of
Ubuntu and it didn't work with any of them. The installer was
perfectly happy letting my chose a partition as a destination, and
there were no error messages or warnings, but it just didn't work
after it was installed.

I had to boot the Ubuntu live CD and then install grub2 in the Ubuntu
partition by hand using the --force option.

--
Grant Edwards grant.b.edwards Yow! Am I accompanied by a
at PARENT or GUARDIAN?
gmail.com
 
Old 12-05-2011, 10:43 PM
Neil Bothwick
 
Default Installing Gentoo: Grub, alternate GNU/Linux system on another partition

On Mon, 5 Dec 2011 12:23:28 -0800, Alan E. Davis wrote:

> I'm giving Gentoo another try, having been using Ubuntu for quite a
> while, and more recently Mint. I would like to be able to access Mint
> until the Gentoo system is working as I'd like it.
>
> I have gotten through the install, for the most part, up to grub. I can
> see how to edit the grub.conf file for my Gentoo partition. However, it
> isn't clear to me from the examples how to write a grub.conf entry for
> Mint's root (/) partition, on /dev/sda8. I am asking for advice on
> writing the grub.conf file.

I wouldn't bother, Mint already has Grub2, which makes adding extra
distros a piece of cake. Install Gentoo, without a bootloader, reboot
into Mint and run "sudo grub-update". It will scan your disks, detect the
Gentoo setup and add a menu entry to Mint's bootloader. It is even
sensible enough to recognise that the installation is Gentoo and name it
accordingly.

If you decide to dump Mint, you'll need to install Grub2 on Gentoo and
copy the config file over, but that's all.


--
Neil Bothwick

"Everything takes longer than expected, even when you take
into account Hoffstead's Law." - Hoffstead's Law
 
Old 12-06-2011, 05:50 AM
Mick
 
Default Installing Gentoo: Grub, alternate GNU/Linux system on another partition

On Monday 05 Dec 2011 23:33:12 Grant Edwards wrote:
> On 2011-12-05, Mick <michaelkintzios@gmail.com> wrote:
> > On Monday 05 Dec 2011 21:58:44 Grant Edwards wrote:
> >> On 2011-12-05, Michael Mol <mikemol@gmail.com> wrote:
> >> >> You can only have one primary bootloader, either grub from Gentoo or
> >> >> grub2 from Mint, it cannot be both. But it looks like that's what you
> >> >> do have. Seeing as you intend to drop Mint eventually, you must
> >> >> uninstall grub2 and all it's files from Mint.
> >> >
> >> > Not *exactly* true.
> >>
> >> It is for the usual definition of "primary bootloader" as the one that
> >> is loaded and run by the BIOS.
> >>
> >> > Grub can chainload any bootloader that's visible to BIOS. At minimum,
> >> > that means you could have grub on /dev/sda
> >>
> >> (primary bootloader)
> >>
> >> > chainload grub on /dev/sdb
> >>
> >> (secondary bootloader).
> >>
> >> > I'm uncertain if it means you could chainload a bootloader stored in
> >> > the first 512 bytes of /dev/sda8, but I suspect so.
> >>
> >> You're right, you can. Though to get grub2 to install on a partition
> >> like /dev/sda8 instead of in the MBR you have to use the --force
> >> option or you'll get some incomprehensable error message when you try
> >> to do the 'setup' command.
> >
> > Last time I installed Ubuntu on a machine that had a different primary
> > OS/bootloader I chose for it to be installed on the Ubuntu partition and
> > there was not problem with it. It was GRUB2
>
> I tried that a couple weeks ago with several different versions of
> Ubuntu and it didn't work with any of them. The installer was
> perfectly happy letting my chose a partition as a destination, and
> there were no error messages or warnings, but it just didn't work
> after it was installed.
>
> I had to boot the Ubuntu live CD and then install grub2 in the Ubuntu
> partition by hand using the --force option.

Hmm ... maybe they changed their scripts? It's been some time (more than a
year? ) since I tried it.
--
Regards,
Mick
 
Old 12-06-2011, 10:41 AM
Stroller
 
Default Installing Gentoo: Grub, alternate GNU/Linux system on another partition

On 5 December 2011, at 23:43, Neil Bothwick wrote:
> ...
> I wouldn't bother, Mint already has Grub2, which makes adding extra
> distros a piece of cake. Install Gentoo, without a bootloader, reboot
> into Mint and run "sudo grub-update".

This one. Everyone else who is replying is part of a conspiracy to confuse and cloud the issue.

What version of Grub you're using isn't so important as the principle that *you already have a bootloader, so there's no need to install another one*. Just skip the bootloader section of the Gentoo install completely and add Gentoo to the option list of your exiting bootloader configuration.

Were you installing Gentoo alongside an existing installation of another distro that used Grub 0.9x (for instance) then this could be done (for instance) by booting to the other distro and entering `mount /boot && vi /boot/grub/grub.conf`.

Stroller.
 
Old 12-06-2011, 04:40 PM
Sebastian Beßler
 
Default Installing Gentoo: Grub, alternate GNU/Linux system on another partition

On 05.12.2011 22:58, Grant Edwards wrote:

>> Grub can chainload any bootloader that's visible to BIOS. At minimum,
>> that means you could have grub on /dev/sda

I have a setting with three bootloaders chained. First Grub2 who boots
Gentoo or the Windows XP bootloader. The Windows Bootloader has to
option to start Windows XP or a second Grub2 that loads a Xubuntu
installed with wubi inside of a 30GB file on the ntfs drive C:.

I am more then happy when I get the ok to kill Windows and Xubuntu,
because that chain is very creepy ;-)

Greetings

Sebastian
 

Thread Tools




All times are GMT. The time now is 09:17 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org