Re-configure Grub manually to add OS

New to Debian (Or Linux in general)? Ask your questions here!

Re-configure Grub manually to add OS

Postby LeoComarre » 2018-03-28 19:25

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
LeoComarre
 
Posts: 4
Joined: 2018-03-28 16:45

Re: Re-configure Grub manually to add OS

Postby Head_on_a_Stick » 2018-03-28 19:31

You can add a menuentry via /etc/grub.d/40_custom, use `update-grub` to change the configuration after editing the file.
dbruce wrote:Ubuntu forums try to be like a coffee shop in Seattle. Debian forums strive for the charm and ambience of a skinhead bar in Bacau. We intend to keep it that way.
User avatar
Head_on_a_Stick
 
Posts: 8324
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Re-configure Grub manually to add OS

Postby LeoComarre » 2018-03-28 19:37

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.
LeoComarre
 
Posts: 4
Joined: 2018-03-28 16:45

Re: Re-configure Grub manually to add OS

Postby debiman » 2018-03-29 07:14

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.
User avatar
debiman
 
Posts: 3064
Joined: 2013-03-12 07:18

Re: Re-configure Grub manually to add OS

Postby p.H » 2018-03-29 14:18

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).
p.H
 
Posts: 651
Joined: 2017-09-17 07:12

Re: Re-configure Grub manually to add OS

Postby debiman » 2018-03-29 14:46

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.
User avatar
debiman
 
Posts: 3064
Joined: 2013-03-12 07:18


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable