LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Boot problem with grub/Debian/Mint (https://www.linuxquestions.org/questions/linux-software-2/boot-problem-with-grub-debian-mint-4175597571/)

sigma957 01-16-2017 09:19 AM

Boot problem with grub/Debian/Mint
 
I run Debian testing on my machine. I had a free partition so I tried to install Linux Mint 18.1. It installed grub but now the Mint install isn't working. I have a Debian grub on my second hard drive.

I want to run the bootloader from Debian. I have two hard drives.

Here is the link to the bootinfoscript.

http://pastebin.ubuntu.com/23810781/

What do I need to do from Debian to get rid of the Mint/Ubuntu bootloader?

Thanks

wagscat123 01-16-2017 09:24 AM

Your best bet to remove the Mint/Ubuntu option easily is probably GRUB Customizer: http://www.linuxserve.com/2015/05/ho...er-406-in.html

Brains 01-16-2017 01:49 PM

Have you tried running command: sudo update-grub from within Debian?
By rights, grub will look for vmlinuz and initrd in other partitions and should find Mint's and configure it properly.

EDIT: From within Debian, run command: sudo fdisk -l to find the name of the Debian drive, then install grub to it with command: sudo grub-install /dev/sd(?) before running update-grub command. Install grub to where it should be either the partition or the drive on the Debian side. You may not need to run update-grub as the install should find Mint. By doing the install in Debian you are configuring grub to use Debian's grub boot configuration.

sigma957 01-16-2017 06:29 PM

drive sdb has an EFI partition. I have to boot to that drive to get the debian grub. Why is it there? I've tried installing it to sda and the ubuntu one is still there. My bios shows debian and ubuntu as boot options. But if I select debian, it doesn't work. If I select the second drive, then it finds the debian grub.

What is EFI?

Thanks.

colorpurple21859 01-16-2017 07:33 PM

Did you try to install debian grub to sdb?

Brains 01-16-2017 11:00 PM

In short, UEFI is the new way of doing things as part to overcome old BIOS limitations. A quick google search can give you the lowdown, so I need not explain further.
Normally, the first drive will have the EFI partition.
Quote:

sdb1: __________________________________________________________________________

File system: vfat
Boot sector type: -
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /efi/debian/grubx64.efi /efi/ubuntu/fwupx64.efi
/efi/ubuntu/grubx64.efi /efi/ubuntu/MokManager.efi
/efi/ubuntu/shimx64.efi
According to the quote above from your configuration file, you have four Ubuntu and one Debian boot files, non of which mention Mint, but according to the same file grub for Mint is installed in the MBR of the first drive.
Just taking a guess here, but did you switch out the original drive with a new one without partitioning the new one GPT?
Tell the whole story regarding all the Ubuntu boot files in /dev/sdb, if they belong to old installations that don't exist, they should be removed.
Quote:

My bios shows debian and ubuntu as boot options
How many Ubuntu does the bios offer?
Since Mint is installed in BIOS mode, and Debian in UEFI mode, coupled with all those extra boot options, it's easy to see how it's hard to make sense of your posts. If you want to boot Debian, switch computer settings to UEFI instead of legacy BIOS. If the drive with the EFI partition was the first drive it would be easier to get one's head around this. I'm guessing you just need to swap the SATA cables of the drives to make it the first or it is done in settings, then reinstall Ubuntu in UEFI mode.
EDIT: If you can boot into one of them, preferably Debian, run command: efibootmgr to display what the computer's firmware sees, and post it.
ANOTHER EDIT: If you can get into Debian, run the grub-install command to the Debian partition, something like: grub-install /dev/sdb2 or sda2 if you set the drives in proper order first, it might enable Mint also, but you need to set the computer to UEFI mode first.

Brains 01-17-2017 03:47 AM

sdb2/boot/grub/grub.cfg:
According to this section highlighted above of the boot info script you provide. The Debian Stretch grub.cfg file has already found and is configured to boot:
Code:

Debian GNU/Linux, with Linux 4.8.0-1-amd64 (Stretch /dev/sdb2)
Debian GNU/Linux, with Linux 4.8.0-2-amd64 (Stretch /dev/sdb2)
Debian GNU/Linux, with Linux 3.16.0-4-amd64 (Jessie kernel? /dev/sdb2)
Debian GNU/Linux, with Linux 3.16-3-amd64 (Jessie kernel? /dev/sdb2)
Debian GNU/Linux, with Linux 3.16-2-amd64 (Jessie kernel? /dev/sdb2)
Arch (on /dev/sda11)
Linux Mint 17 Qiana (17) (on /dev/sda2)
Debian GNU/Linux, with Linux 3.14-1-amd64 (on /dev/sda7)(Jessie)
Debian GNU/Linux, with Linux 3.2.0-4-amd64 (on /dev/sda7)(Jessie)
Arch1 (on /dev/sda8)

Because it's /etc/fstab and grub.cfg goes by UUID of the partitions, swapping the order of the drives should not have any ill effect other than booting up the Arch installations as their fstab do not use UUID, which can easily be edited, but it looks like it's been this way for a while so it might not be necessary to swap them for the firmware to work.
There is no mention anywhere of Mint having a /boot/grub/grub.cfg, suggesting the grub in the MBR of sda is from your attempt to install grub to sda from Debian, which would also explain why Debian Stretch grub.cfg has all those OSs listed as menu entries, and also suggesting grub was not installed in Mint.

What is confusing, is how you mention getting Debian and Ubuntu in BIOS menu, if this is a UEFI system, those are likely to be the boot files in the EFI partition of the second drive which I quoted earlier, thus it is necessary to point to the second drive. Although, one would think, if the computer is set to boot the first drive in Legacy BIOS mode, grub would pop up and go straight to the Debian partition in the second drive to boot it when selected, it sounds like you say this does not work, meaning the UEFI firmware may prevent this from happening, or you have it set to UEFI instead of Legacy BIOS trying to boot sda which requires Legacy mode. Some computers also have UEFI with CSM, which if I got it right, allows booting both, my laptop pukes when I use this setting.

You have yet to mention if this is a UEFI system, so hopefully this post will help. Since there is no sign of Windows being installed and if it is a UEFI system (which sounds like it is), you can go either way, set it to boot in Legacy BIOS mode and select the first drive with grub installed to the MBR from within Stretch, or set it to UEFI and reinstall grub to Debian Stretch in /dev/sdb2. Probably better to go the Legacy BIOS mode which may eliminate the need to go through BIOS menu.

Ztcoracat 01-17-2017 10:50 PM

Boot into Debian become root 'su' and 'update-grub'and reboot:-

-::-You should be able to use the arrow keys to choose which os you want to boot into.-::-

If you still can't boot into Mint after that; launch g-parted in Debian and tell us if the Mint partition (which should be a ext 3 or 4 partition) is flagged 'bootable' or not?

Ztcoracat 01-17-2017 10:54 PM

Quote:

Originally Posted by colorpurple21859 (Post 5655938)
Did you try to install debian grub to sdb?

If he did it failed-
Code:

No boot loader is installed in the MBR of /dev/sdb.

colorpurple21859 01-18-2017 05:08 AM

depends on if the op was in bios mode or efi mode and which disk the running system is calling sdb

Ztcoracat 01-18-2017 06:50 PM

Quote:

Originally Posted by colorpurple21859 (Post 5656668)
depends on if the op was in bios mode or efi mode and which disk the running system is calling sdb

Got it:-:)

At this point we don't know if BIOS was set to UEFI.
That may be the case if an efi partition was created instead of MBR.

Having another look at the bootinfo. script Mint is on /dev/sda2 as an Ext 4 partition. Debian is on /dev/sdb2.

I'm thinking that updating Grub should help.
That is if Debian boots.

aragorn2101 01-24-2017 02:59 AM

Quote:

Originally Posted by Brains (Post 5656069)
What is confusing, is how you mention getting Debian and Ubuntu in BIOS menu, if this is a UEFI system, ...

You have yet to mention if this is a UEFI system ...

Exactly.

I know UEFI systems quite well, so I might help here. I have a UEFI laptop and I also have a BIOS PC on which I installed a GPT hard disk. The GPT hard disk cannot be used to boot any OS since the PC is BIOS, so I boot from a smaller MBR disk.

So, sigma957, please shed some light here. Give us more details about your system and how did you proceed to install these Mint and Debian.

yancek 01-24-2017 06:51 AM

Your first drive where you seem to have Mint installed, is an MBR drive with Grub code in the master boot record pointing, probably? to Debian on sda7. Your second drive with one of the Debian installs, is EFI with GPT partitioning. Mixing MBR and EFI is almost always problematic although I understand it is possible to do by selecting a specific drive from the BIOS on boot.

If you look at the grub.cfg file for the newer Debian on sdb2, it shows entries for it's partition, for Arch and Mint on sda as well as the other Debian install on sda7. Also, note that the menuentries for Debian on sdb2 show it as gpt while the other systems on sda all show msdos (MBR) partitions. I don't think that will work. You can boot Linux systems with MBR/GPT partitioning if you have a separate BIOS boot partition. You need to decide whether you are going to use EFI or not.

I agree with the above post about the EFI partition being on the second drive. Unusual for sure.

I don't think the Mint EFI files are named Mint but rather say ubuntu so I expect those ubuntu files on the EFI partition are the Mint files.

Quote:

What is EFI?
Read the link at the Ubuntu documentation site below. Would have been more useful if you had read it before installing Mint, but...

https://help.ubuntu.com/community/UEFI


All times are GMT -5. The time now is 04:56 AM.