LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-22-2019, 04:29 AM   #1
Terry Coats
Member
 
Registered: Mar 2017
Posts: 122

Rep: Reputation: 54
grub boots into wrong OS


I'm having a problem where when I select the OS to
boot grub boots into something else.I want to boot
into fedora 30 but grub boots KDE Neon instead. Here's
some relevant parts from the grub.cfg.
Code:
menuentry 'Fedora 30 (Workstation Edition) (on /dev/sdb3)' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-5a656eb7-fffd-47da-aac6-f312af550ac6' {
	insmod part_gpt
	insmod ext2
	set root='hd1,gpt3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  5a656eb7-fffd-47da-aac6-f312af550ac6
	else
	  search --no-floppy --fs-uuid --set=root 5a656eb7-fffd-47da-aac6-f312af550ac6
	fi
	linux /boot/vmlinuz-5.3.7-200.fc30.x86_64 root=/dev/sdb3
	initrd /boot/initramfs-5.3.7-200.fc30.x86_64.img
}
and
Code:
menuentry 'KDE neon User Edition 5.17 (18.04) (on /dev/sda3)' --class neon --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-02057186-e22d-4227-a1eb-55d50de8916e' {
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  02057186-e22d-4227-a1eb-55d50de8916e
	else
	  search --no-floppy --fs-uuid --set=root 02057186-e22d-4227-a1eb-55d50de8916e
	fi
	linux /boot/vmlinuz-5.0.0-36-generic root=UUID=02057186-e22d-4227-a1eb-55d50de8916e ro quiet splash $vt_handoff
	initrd /boot/initrd.img-5.0.0-36-generic
}
Ok, so I pick fedora and after a bit the KDE Neon login
screen comes up. The first time I saw this I thought
I must have made a mistake in picking but no it happens
every time. Also there seems to be some strange mixture
of Fedora and KDE Neon. While Neon was running I thought
well I'm going to go ahead and compile a wireless driver
for it that I need for my tplink device(for Neon). I started
the make and it complained about a fedora folder being
missing. The tplink make thought it was on fedora even though
everything else says KDE Neon!
I just don't understand what is going on. I'm fairly
knowledgeable with years of Linux experience but lately
it's been throwing me curves.
I've looked at what grub expects to load using the "e"
key to see what it is going to use and everything looks
proper. Everything fedora but KDE Neon loads instead.
Does anybody have any ideas how this can happen?
Oh, and I looked and it's the Neon kernel showing in /boot.
 
Old 11-22-2019, 04:42 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Redacted data is essentially useless. Go run boot-repair in report mode or bootinfo (basically the same thing) and post the entire report - uneditted - and we may be able to help.

I might be inclined to bet we'll find more than one EFI partition, but that is just guess-work.
 
Old 11-22-2019, 05:04 AM   #3
Terry Coats
Member
 
Registered: Mar 2017
Posts: 122

Original Poster
Rep: Reputation: 54
http://paste.ubuntu.com/p/XJvr7hpXg5/
If you want the whole text posted here
I'll do it but it's a lot.
 
Old 11-22-2019, 06:17 AM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
You have mixed an EFI install of KDE Neon with a Legacy install of Fedora. You do have two EFI partitions, one on each drive which isn't necessarily a problem but look at those 2 partitions (sda1 and sdb2). The files there are all ubuntu which would be KDE Neon.

At the top of the output you posted, it shows Grub in the MBR of sdb (Legacy install) which is looking for the Grub core.img file on sdb3. That's Fedora which you should be able to boot by enabling Legacy boot in the BIOS firmware and setting sdb to first boot priority in the BIOS. sdb1 is a BIOS boot partition which is used on a GPT drive with a Legacy install.

Either reinstall Fedora UEFI on the second (sdb) drive or reinstall Grub EFI from Fedora. If you can't boot Fedora, you might need to chroot from Neon or use the Fedora install medium.

Boot repair was going to do this but using sdb5 (Linux Mint) as the / partition which you neglected to mention. Do you still have that installed?
 
Old 11-22-2019, 06:33 AM   #5
Terry Coats
Member
 
Registered: Mar 2017
Posts: 122

Original Poster
Rep: Reputation: 54
Quote:
Originally Posted by yancek View Post
You have mixed an EFI install of KDE Neon with a Legacy install of Fedora. You do have two EFI partitions, one on each drive which isn't necessarily a problem but look at those 2 partitions (sda1 and sdb2). The files there are all ubuntu which would be KDE Neon.

At the top of the output you posted, it shows Grub in the MBR of sdb (Legacy install) which is looking for the Grub core.img file on sdb3. That's Fedora which you should be able to boot by enabling Legacy boot in the BIOS firmware and setting sdb to first boot priority in the BIOS. sdb1 is a BIOS boot partition which is used on a GPT drive with a Legacy install.

Either reinstall Fedora UEFI on the second (sdb) drive or reinstall Grub EFI from Fedora. If you can't boot Fedora, you might need to chroot from Neon or use the Fedora install medium.

Boot repair was going to do this but using sdb5 (Linux Mint) as the / partition which you neglected to mention. Do you still have that installed?
Linux Mint is my main OS. The others are for playing with and testing. The presence of boot
stuff all over the place is from trying to get uefi boot to work and OS installs installing
their own boot stuff without my permission. I've also had a bad time of sda(hd0) and sdb(hd1)
flipping back and forth making it hard to determine which drive has which OS. I'm going to
remove all boot stuff from everything except sda and see how things go. Thanks for replying.
 
Old 11-22-2019, 03:55 PM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Quote:
I'm going to
remove all boot stuff from everything except sda and see how things go
OK. That won't help to boot Fedora, if you still want to do that you need to reinstall Grub EFI. If that isn't a problem, no worries.
You might want to set the drive with Mint on it to first boot priority as the Mint EFI files are on sdb2. You can see the grub.cfg file on the EFI partition beginning at line 1535 of boot repair and it points to sdb5, your Mint partition. The EFI grub.cfg file on sda1 points to sda2 which is Ubuntu 19.04, beginning at line 212 of boot repair.

Last edited by yancek; 11-23-2019 at 05:39 AM.
 
Old 11-22-2019, 07:31 PM   #7
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
At the grub menuentry e for edit on the linux line change root=/dev/sdb3 to root=UUID=<sdb3 uuid>
If it works then may have to create a custom menuentry for fedora
 
  


Reply



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
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
Unable to boot into GRUB loader: GRUB command shell boots up: urgent issue wombat53 Linux - Software 9 09-04-2009 06:20 AM
Fedora 9 boots (long delay) as single core if I go to GRUB menu, otherwise boots fine saravkrish Fedora 1 05-27-2008 07:59 AM
grub boots into wrong partition. davemar Ubuntu 3 08-29-2007 04:32 PM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:04 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