Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing GRUB on the partition
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2772

PostPosted: Mon Mar 27, 2017 3:32 pm    Post subject: Installing GRUB on the partition Reply with quote

Hi, ALL,
I followed the Handbook when I installed Gentoo. My partitioning scheme is exactly as it is described.

However I split the hard drive in half. The first half I have Gentoo. The second half is dedicated to Oracle Solaris.

Trying to Google I found this article, which explains how to make Solaris and Linux dual-boot (thru the chainloading). However that blog is talking about installing Linux GRUB on the partition and not the MBR.

Can I do the same with Gentoo? Is command to do that the same?
Or it is different with the latest GRUB release?

Or maybe I should install os-prober and it will detect the presence of Solaris?

I have /dev/sda1 - /dev/sda4 for Gentoo, just like in the HB and /dev/sda5 for Solaris.

Thank you.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7132
Location: almost Mile High in the USA

PostPosted: Mon Mar 27, 2017 4:19 pm    Post subject: Reply with quote

Yes it should work, grub is grub no matter the distribution. However make sure you use the right commands for the grub or other bootloader you installed on your MBR. It looks like Oracle Solaris uses something that looks like Grub-legacy and grub2 seems to be fairly common like on Ubuntu.

FWIW, on my laptop I have Win7 chainloading Grub2 as Win7 has problems with suspend/resume when not on MBR :(
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3076
Location: Illinois, USA

PostPosted: Mon Mar 27, 2017 4:32 pm    Post subject: Reply with quote

eccerr0r wrote:
FWIW, on my laptop I have Win7 chainloading Grub2 as Win7 has problems with suspend/resume when not on MBR :(
I have XP loading grub legacy.

Windows is the non-flexible bootloader, so I feel if you dual-boot, accommodate the 800 pound Gorilla.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7132
Location: almost Mile High in the USA

PostPosted: Mon Mar 27, 2017 4:34 pm    Post subject: Reply with quote

Tony0945 wrote:
I have XP loading grub legacy.

Windows is the non-flexible bootloader, so I feel if you dual-boot, accommodate the 800 pound Gorilla.

Indeed, a lot of things are that way in life it seems. :(
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2772

PostPosted: Mon Mar 27, 2017 5:20 pm    Post subject: Reply with quote

@eccerr0r,
So, I should be using:
Code:

grub-install --boot-directory=/mnt/boot --force --no-floppy /dev/sda1


as /dev/sda1 is the partition explicitly created for GRUB?

Or I should use /dev/sda2, partition where kernel and grub configuration are stored?

Thank you.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7132
Location: almost Mile High in the USA

PostPosted: Mon Mar 27, 2017 5:27 pm    Post subject: Reply with quote

Well that's the thing with Gentoo, there are so many ways to configure it's hard to know what the right solution is.

Key points: you need to be installing something on the MBR to initiate boot. Then you may or may not need to put boot sectors on partitions so you can chainload them.

The command you have there will install an mbr on /dev/sda1 but not on /dev/sda, which may or may not be what you want. Usually I'd install to /dev/sda top level MBR, and make sure that grub partition is mounted and indeed use --boot-directory like you have to tell grub you want to install its files there.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Mon Mar 27, 2017 11:52 pm    Post subject: Re: Installing GRUB on the partition Reply with quote

ONEEYEMAN wrote:
which explains how to make Solaris and Linux dual-boot (thru the chainloading).

Can I do the same with Gentoo? Is command to do that the same?


Gentoo just packs software. AFAIK grub 1 and grub2 supports chainloading. It has nothing to do with gentoo, your question should ask, does my Bootloader called xy supports feature xy.

I suggest, you do as I always do, writing manually boot entries for the bootloader.

Warning: those automated grub scripts (which e.g. linux mint used) are a means of a possible data destruction! Causes additional time loss because of fixing scripted data loss!

Chainloading is for sure well explained in several grub examples.


https://docs.oracle.com/cd/E26502_01/html/E28983/gkvif.html

Quote:
menuentry "<title>" {
insmod part_msdos
insmod part_sunpc
insmod part_gpt
insmod zfs
search --no-floppy --fs-uuid --set=root f3d8ef099730bafa
zfs-bootfs /ROOT/<BE name>/@/ zfs_bootfs
set kern=/platform/i86pc/kernel/amd64/unix
echo -n "Loading ${root}/ROOT/<BE name>/@$kern: "
$multiboot /ROOT/<BE name>/@/$kern $kern -B $zfs_bootfs
set gfxpayload="1024x768x32;1024x768x16;800x600x16;640x480x16;640x480x15;640x480x32"
insmod gzio
echo -n "Loading ${root}/ROOT/<BE name>/@/platform/i86pc/amd64/boot_archive: "
$module /ROOT/<BE name>/@/platform/i86pc/amd64/boot_archive
}


Not sure what the current solaris version is. looks like plain old grub syntax to me. nothinh special
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Tue Mar 28, 2017 10:35 am    Post subject: Reply with quote

if installing grub to the partition boot record I would emerge and use grub-static, which is legacy grub and does not complain about being on a partition.
The howto manual is at https://www.gnu.org/software/grub/manual/legacy/grub.html
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum