Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Re-configure Grub manually to add OS

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
LeoComarre
Posts: 4
Joined: 2018-03-28 16:45

Re-configure Grub manually to add OS

#1 Post by LeoComarre »

Hi. I need to reconfigure GRUB to include an operating system.
The situation is as follows: I installed Windows on a primary partition, then created new partitions for Debian. The GRUB configured at the end of the Debian install worked fine. I then installed Android on a new partition and a GRUB config was created, wiping the previous one, but only presenting W10 and Android. From a live session I reconfigured GRUB to recover access to Debian, but Android is not present.
Is there a way I can use the contents of menu.lst from the Android boot to edit the GRUB as configured from the live session, in order to have all three systems present on startup?
MTIA

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Re-configure Grub manually to add OS

#2 Post by Head_on_a_Stick »

You can add a menuentry via /etc/grub.d/40_custom, use `update-grub` to change the configuration after editing the file.
deadbang

LeoComarre
Posts: 4
Joined: 2018-03-28 16:45

Re: Re-configure Grub manually to add OS

#3 Post by LeoComarre »

Head_on_a_Stick wrote:You can add a menuentry via /etc/grub.d/40_custom, use `update-grub` to change the configuration after editing the file.
Thanks for the quick response. Will do as you suggest.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Re-configure Grub manually to add OS

#4 Post by debiman »

a perfect use case for rescatux.
after rescuing your debian's grub, issue

Code: Select all

update-grub
from your debian install.
assuming os-prober is installed, that should fix things without needing a custom grub entry.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Re-configure Grub manually to add OS

#5 Post by p.H »

Head_on_a_Stick wrote:You can add a menuentry via /etc/grub.d/40_custom, use `update-grub` to change the configuration after editing the file.
Or you can add a menuentry in /boot/grub/custom.cfg which is included at runtime, not requiring to run update-grub after each modification.

Note that you may have to adjust the menu entry from GRUB 1 syntax (menu.lst) to GRUB 2 syntax (grub.cfg).

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Re-configure Grub manually to add OS

#6 Post by debiman »

p.H wrote:Note that you may have to adjust the menu entry from GRUB 1 syntax (menu.lst) to GRUB 2 syntax (grub.cfg).
oh yes, i noticed that but then forgot to comment on it.

Post Reply