Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Trouble installing gentoo alongside Mint
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
PCC322
n00b
n00b


Joined: 29 May 2019
Posts: 48

PostPosted: Sun Oct 27, 2019 4:54 pm    Post subject: Trouble installing gentoo alongside Mint Reply with quote

I finishing reinstalling gentoo last night after an hdd failure and had it booting with no problem. I want to multi boot with Mint so I created a fifth partition with roughly half of the drive set aside for Mint. Today I installed Mint into the extra partition. All of the partitions I set up for gentoo appear unchanged but the system now boots straight to Mint with the GRUB screen I am able to access only showing the Mint kernel. The bios boot select only lets me choose the physical disc.

Any ideas on how I can fix this so I can get back into gentoo?
Back to top
View user's profile Send private message
apiaio
Apprentice
Apprentice


Joined: 04 Dec 2008
Posts: 218

PostPosted: Sun Oct 27, 2019 5:18 pm    Post subject: Reply with quote

I think, that you should run command
Code:
grub-mkconfig -o /boot/grub/grub.cfg

After that during startup you will see all installations on your comp.
Back to top
View user's profile Send private message
PCC322
n00b
n00b


Joined: 29 May 2019
Posts: 48

PostPosted: Sun Oct 27, 2019 5:52 pm    Post subject: Reply with quote

Should I do that from the terminal inside Mint or should I use a bootable drive to get into gentoo and do it from there?
Back to top
View user's profile Send private message
apiaio
Apprentice
Apprentice


Joined: 04 Dec 2008
Posts: 218

PostPosted: Sun Oct 27, 2019 5:57 pm    Post subject: Reply with quote

PCC322 wrote:
Should I do that from the terminal inside Mint or should I use a bootable drive to get into gentoo and do it from there?
From the terminal inside Mint
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7653
Location: Saint Amant, Acadiana

PostPosted: Sun Oct 27, 2019 6:08 pm    Post subject: Reply with quote

There is a very important component missing. Whatever you do you should know what you are doing. Also, to get proper help you should tell how your Gentoo boots, what bootloader is used, is there chainloading or you use Grub from Mint to boot Gentoo, where is Gentoo kernel located - common boot partition with Mint? All these "little details" play big role ...
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
PCC322
n00b
n00b


Joined: 29 May 2019
Posts: 48

PostPosted: Sun Oct 27, 2019 9:06 pm    Post subject: Reply with quote

Jaglover wrote:
There is a very important component missing. Whatever you do you should know what you are doing. Also, to get proper help you should tell how your Gentoo boots, what bootloader is used, is there chainloading or you use Grub from Mint to boot Gentoo, where is Gentoo kernel located - common boot partition with Mint? All these "little details" play big role ...


I setup gentoo to boot with GRUB2 in sda2, which I believe also has the gentoo kernel. sda3 has swap, sda4 has gentoo root. While partitioning I made a fifth partition, sda5, which the mint install split in two. I was hoping to use a common boot partition but I foolishly assumed mint was going to play nice with my plans.

I don't know what chainloading is. I was hoping to be able to select kernel from grub2 during initial boot.
Back to top
View user's profile Send private message
apiaio
Apprentice
Apprentice


Joined: 04 Dec 2008
Posts: 218

PostPosted: Mon Oct 28, 2019 8:09 am    Post subject: Reply with quote

PCC322.

Using command
Code:
grub-mkconfig -o /boot/grub/grub.cfg
did not help?
I boot from Mint 5 OS Gentoo included. Please try once more from Mint terminal as root
Code:
grub2-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
and send us message you will see after that.
Back to top
View user's profile Send private message
apurkrt
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2011
Posts: 114
Location: Czechia, Europe

PostPosted: Mon Oct 28, 2019 12:24 pm    Post subject: Reply with quote

I had dual boot gentoo-arch half a year ago. Grub was on the gentoo partition. Before calling "grub-mkconfig" (from gentoo), it was necessary to have the arch root partition mounted (somewhere). Also I think I installed sys-boot/os-prober in gentoo (it might be already installed in mint).
Back to top
View user's profile Send private message
PCC322
n00b
n00b


Joined: 29 May 2019
Posts: 48

PostPosted: Mon Oct 28, 2019 10:07 pm    Post subject: Reply with quote

apiaio wrote:
PCC322.

Using command
Code:
grub-mkconfig -o /boot/grub/grub.cfg
did not help?
I boot from Mint 5 OS Gentoo included. Please try once more from Mint terminal as root
Code:
grub2-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
and send us message you will see after that.


From Mint, grub found gentoo and I now have "gentoo/linux (on /dev/sda4)" on the grub menu but gives some errors about failing to start Load Kernel Modules and failure to active swap /swapfile and ultimately dumps me back in to Mint log in. My gentoo password doesn't work and Mint password leads me back to Mint log in.

I haven't done anything but install the operating systems and don't mind reinstalling. Is there a better course of action that has worked for others?
Back to top
View user's profile Send private message
Muso
Veteran
Veteran


Joined: 22 Oct 2002
Posts: 1057
Location: The Holy city of Honolulu

PostPosted: Mon Oct 28, 2019 11:23 pm    Post subject: Reply with quote

Just curious as to why you have two flavors of Linux. I understand a Windows/Linux dual boot, but why Linux/Linux?
_________________
"You can lead a horticulture but you can't make her think" ~ Dorothy Parker
2020 is the year of the Linux Desktop!
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7653
Location: Saint Amant, Acadiana

PostPosted: Tue Oct 29, 2019 1:31 am    Post subject: Reply with quote

@Muso

I have Mint in VirtualBox, just to support friends who use it. I had Debian, too, for same reason. No dual or triple booting, virtual machines work great.

@PCC322,

what would reinstalling Mint possibly give to you? Reinstalling Gentoo because of misconfigured bootloader, hope you didn't mean that? The better "course of action" is to take control and correct the bootloader configuration. Apparently the command line for Gentoo kernel is wrong. I personally have no love for automated Grub configuration and the whole Grub looks like a terrible bloat to me. I think it has some conf file in /etc you are supposed to edit to impose your will on it?
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Muso
Veteran
Veteran


Joined: 22 Oct 2002
Posts: 1057
Location: The Holy city of Honolulu

PostPosted: Tue Oct 29, 2019 1:39 am    Post subject: Reply with quote

Jaglover wrote:
@Muso

I have Mint in VirtualBox, just to support friends who use it. I had Debian, too, for same reason. No dual or triple booting, virtual machines work great.


I agree. I use both vmplayer & virtualbox for various images.

(Now I have to change my sig)
_________________
"You can lead a horticulture but you can't make her think" ~ Dorothy Parker
2020 is the year of the Linux Desktop!
Back to top
View user's profile Send private message
apiaio
Apprentice
Apprentice


Joined: 04 Dec 2008
Posts: 218

PostPosted: Tue Oct 29, 2019 4:19 pm    Post subject: Reply with quote

PCC322 wrote:

From Mint, grub found gentoo and I now have "gentoo/linux (on /dev/sda4)" on the grub menu but gives some errors about failing to start Load Kernel Modules and failure to active swap /swapfile and ultimately dumps me back in to Mint log in. My gentoo password doesn't work and Mint password leads me back to Mint log in.

I haven't done anything but install the operating systems and don't mind reinstalling. Is there a better course of action that has worked for others?


IMHO problem is not in Mint grub, but in gentoo kernel configuration. You can make test. Chroot into gentoo, install lilo. Your lilo.conf should looks like that
Code:
boot = /dev/sda
map = /boot/.map

menu-scheme=Wb
prompt
timeout=50
delay = 50

 image = /boot/NameOfYourKernel
        root = /dev/sda4
        label = Gentoo           
        read-only     

In the past it worked for me, but it is long time ago. If you have the same errors "failing to start Load Kernel Modules" you will know, that problem is in your gentoo installation.

Edit: Or you can install grub instead lilo.


Last edited by apiaio on Tue Oct 29, 2019 5:02 pm; edited 2 times in total
Back to top
View user's profile Send private message
GDH-gentoo
Apprentice
Apprentice


Joined: 20 Jul 2019
Posts: 264
Location: South America

PostPosted: Tue Oct 29, 2019 4:52 pm    Post subject: Reply with quote

PCC322 wrote:
I setup gentoo to boot with GRUB2 in sda2, which I believe also has the gentoo kernel. sda3 has swap, sda4 has gentoo root. While partitioning I made a fifth partition, sda5, which the mint install split in two. I was hoping to use a common boot partition but I foolishly assumed mint was going to play nice with my plans.

What do you mean? You don't actually have a single /boot partition? If you do, post the contents of the /boot directory and the contents of /boot/grub/grub.cfg (from Mint), so that we can see what GRUB is actually configured to do.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7653
Location: Saint Amant, Acadiana

PostPosted: Tue Oct 29, 2019 5:08 pm    Post subject: Reply with quote

Finally when Grub found something it calls Gentoo there is mismatch with kernel modules and the login seems to be to Mint. Makes me think perhaps it is booting Gentoo kernel, but mounts wrong root partition. Even Grub2 can be commanded to do the right thing, it is up to the administrator. Loading kernel at boot is a very simple and straightforward task, it takes Grub2 with all its automagic to make it complicated and difficult.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
apiaio
Apprentice
Apprentice


Joined: 04 Dec 2008
Posts: 218

PostPosted: Tue Oct 29, 2019 7:41 pm    Post subject: Reply with quote

Thinking about partition /dev/sda4 and MBR. Should not be 4th partition extended ?

PCC322. What kind of partition table do you use?
Back to top
View user's profile Send private message
PCC322
n00b
n00b


Joined: 29 May 2019
Posts: 48

PostPosted: Wed Oct 30, 2019 3:54 pm    Post subject: Reply with quote

Muso wrote:
Just curious as to why you have two flavors of Linux. I understand a Windows/Linux dual boot, but why Linux/Linux?


I am used to using Mint and am learning Gentoo. It seemed like it would be helpful to have both options on one laptop. All of my laptops are old and I doubt they would handle VMs.

apiaio wrote:
PCC322 wrote:

From Mint, grub found gentoo and I now have "gentoo/linux (on /dev/sda4)" on the grub menu but gives some errors about failing to start Load Kernel Modules and failure to active swap /swapfile and ultimately dumps me back in to Mint log in. My gentoo password doesn't work and Mint password leads me back to Mint log in.

I haven't done anything but install the operating systems and don't mind reinstalling. Is there a better course of action that has worked for others?


IMHO problem is not in Mint grub, but in gentoo kernel configuration. You can make test. Chroot into gentoo, install lilo. Your lilo.conf should looks like that
Code:
boot = /dev/sda
map = /boot/.map

menu-scheme=Wb
prompt
timeout=50
delay = 50

 image = /boot/NameOfYourKernel
        root = /dev/sda4
        label = Gentoo           
        read-only     

In the past it worked for me, but it is long time ago. If you have the same errors "failing to start Load Kernel Modules" you will know, that problem is in your gentoo installation.

Edit: Or you can install grub instead lilo.


I will give LILO a try.

GDH-gentoo wrote:
PCC322 wrote:
I setup gentoo to boot with GRUB2 in sda2, which I believe also has the gentoo kernel. sda3 has swap, sda4 has gentoo root. While partitioning I made a fifth partition, sda5, which the mint install split in two. I was hoping to use a common boot partition but I foolishly assumed mint was going to play nice with my plans.

What do you mean? You don't actually have a single /boot partition? If you do, post the contents of the /boot directory and the contents of /boot/grub/grub.cfg (from Mint), so that we can see what GRUB is actually configured to do.


I made a boot partition, which gentoo is using, but I have no idea what Mint is using because it has an opaque automated install.

I will try to get the contents posted today.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7653
Location: Saint Amant, Acadiana

PostPosted: Wed Oct 30, 2019 4:20 pm    Post subject: Reply with quote

My last call for common sense. Instead of spending a little time reading Grub manual and then spending a few minutes to set it up properly - it has been days trying random measures. Will monkey paint the Mona Lisa when given a palette?

Check where is Gentoo kernel located to get correct path for Grub. - Not done
Edit Grub conf in Mint /etc to point it to Gentoo kernel, make sure the kernel command line is correct. - Not done
Use Grub2 automated script to update grub.cfg. - Not done

Above will get the Gentoo kernel booted. If there are still errors loading Gentoo then this will be a new topic.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
GDH-gentoo
Apprentice
Apprentice


Joined: 20 Jul 2019
Posts: 264
Location: South America

PostPosted: Wed Oct 30, 2019 7:15 pm    Post subject: Reply with quote

PCC322 wrote:
GDH-gentoo wrote:
What do you mean? You don't actually have a single /boot partition? If you do, post the contents of the /boot directory and the contents of /boot/grub/grub.cfg (from Mint), so that we can see what GRUB is actually configured to do.

I made a boot partition, which gentoo is using, but I have no idea what Mint is using because it has an opaque automated install.

In that case, in addition to the above, also post the output of the mount command, invoked with no arguments from a terminal in Mint. Let's see how invasive this automated install was.
Back to top
View user's profile Send private message
PCC322
n00b
n00b


Joined: 29 May 2019
Posts: 48

PostPosted: Fri Nov 01, 2019 6:26 pm    Post subject: Reply with quote

Contents of /boot/grub/grub.cfg, which was the boot partition set up during gentoo install:

http://dpaste.com/0BGKER8

Output from mount command inside Mint:


https://0x0.st/zYnY.txt

/boot/grub/grub.cfg in Mint's root directory

https://0x0.st/zY5o.txt
Back to top
View user's profile Send private message
GDH-gentoo
Apprentice
Apprentice


Joined: 20 Jul 2019
Posts: 264
Location: South America

PostPosted: Sat Nov 02, 2019 5:41 pm    Post subject: Reply with quote

OK. According to this:
  • GRUB thinks /dev/sda is using GPT partitioning ("hd0,gptN"). So this is a BIOS with GPT setup, or a UEFI setup. If it is the former, I suppose /dev/sda1 is (was?) the BIOS GRUB partition.
  • Gentoo's rootfs is /dev/sda4, and Mint's rootfs is actually /dev/sda6. Do you know what is in /dev/sda5, then? Using lsblk -o name,type,partlabel,partuuid,mountpoint from a terminal in Mint might help.
  • /dev/sda2 is Gentoo's /boot partition, but Mint is not using it. You don't have it mounted. Mint's /boot appears to be in its rootfs (/dev/sda6).
If all of this is correct, then you have the Gentoo kernel, vmlinuz-4.19.72-gentoo, in /dev/sda2, and the Mint kernel and initramfs, vmlinuz-4.15.0-54-generic and initrd.img-4.15.0-54-generic, respectively, in /dev/sda6. GRUB can support this setup quite fine, but grub-mkconfig is likely not smart enough to create correct configuration files.

You actually have three GRUBs:
  • The one you get on Gentoo when you do emerge sys-boot/grub, 'Gentoo GRUB'.
  • The you get on Mint when you run the installer, 'Mint GRUB'.
  • The one that boots the machine, 'installed GRUB'. It is created when grub-install is run, either directly by you, or indirectly by some Mint automated mechanism. When done from Gentoo, installed GRUB is a copy of Gentoo GRUB and will use configuration and modules from /dev/sda2. When done from Mint, installed GRUB is a copy of Mint GRUB and will use configuration and modules from /dev/sda6.
You can have only one distribution 'control' installed GRUB. Mint's installer seems to have impolitely taken control, so Mint's grub.cfg in /dev/sda6 is the 'active' one. If you are familiar with that distribution and installed Gentoo for learning, you might be better off letting Mint control installed GRUB. But you'll have to manually correct the configuration for booting Gentoo, do that again every time you update the Gentoo kernel, and presumably also do that again every time you update Mint or its kernel, if that procedure invokes some automatic modification of the bootloader. I would't be surprised if Mint invoked grub-mkconfig under the hood, so you'd have to do some cleaning up afterwards.

PCC322 wrote:
Contents of /boot/grub/grub.cfg, which was the boot partition set up during gentoo install:

http://dpaste.com/0BGKER8

[...]

/boot/grub/grub.cfg in Mint's root directory

https://0x0.st/zY5o.txt

Both are incorrect, although each of them is half-correct. In particular, as Jaglover said, the Gentoo menu entries are actually booting Mint with the Gentoo kernel. If you want to keep and maintain this dual-boot setup, I can make suggestions in a follow-up post.
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