Failed Debian 9 GRUB boot loader installation

Help with issues regarding installation of Debian

Failed Debian 9 GRUB boot loader installation

Postby I am a nobody » 2018-05-03 22:37

Hi,

I've just installed Debian 9 to a Dell laptop Inspiron 15 which has multiple partitions, CentOS 6 is installed in /dev/sdb6, I installed Debian 9 in /dev/sdb9 partition and the bootable flag is on. In the step of "Install the GRUB Boot Loader on a hard disk", it changed GRUB boot loader to /dev/sdb9 MBR, but after installation, it still booted from CentOS 6 which uses an older version of GRUB and cannot boot Debian 9. I tried command line "grub-install /dev/sdb9", it did not work either. Appreciate any insight how to force installing Debian 9 boot loader over CentOS 6 and booting from Debian 9 partition MBR.

Thank you.

Kind regards
I am a nobody
 
Posts: 42
Joined: 2012-04-13 03:44

Re: Failed Debian 9 GRUB boot loader installation

Postby sunrat » 2018-05-04 00:04

If you want Debian to take over booting duties, you need to install GRUB to the MBR of the drive, /dev/sdb in your case, not /dev/sdb9. I'm assuming you are using MBR boot rather than UEFI seeing you mentioned it.
If you want CentOS to keep booting duties, you'll have to update it's GRUB when booted from CentOS. In Debian you could do this simply by running update-grub (as long as it's installed to drive MBR), but wou'd have to check if CentOS is the same.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2472
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Failed Debian 9 GRUB boot loader installation

Postby debiman » 2018-05-04 03:18

as root/superuser:
Code: Select all
grub-install /dev/sdX # where X is _one letter_, NOT a number
# then, from either centos or debian:
update-grub # which is the same as:
grub-mkconfig -o /boot/grub/grub.cfg

make sure os-prober is installed.
User avatar
debiman
 
Posts: 3027
Joined: 2013-03-12 07:18

Re: Failed Debian 9 GRUB boot loader installation

Postby I am a nobody » 2018-05-04 04:50

Finally resolved by installing Ubuntou16 which was able to overwrite the boot MBR. Thanks sunrat and debiman.
I am a nobody
 
Posts: 42
Joined: 2012-04-13 03:44


Return to Installation

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable