I cant get grub to display a menu

Programming, for all ages and all languages.
Post Reply
bilsch01
Member
Member
Posts: 42
Joined: Sat Dec 19, 2015 10:48 am

I cant get grub to display a menu

Post by bilsch01 »

In the past I always installed Ubuntu after WinXP or Vista was on a machine - installing along side of Windows. In doing this I always got the grub boot menu in the deal. This time I'm not including a Windows partition at all. I put three small empty primary partitions at the beginning of the drive and then a large extended partition at the end where I instal Ubuntu and linux swap. It is set up the way I want it. However I didn't get a grub boot menu because there was no other OS present when I installed Ubuntu, I don't want to do a grub install because I already have the grub files and directories in the system and I don't think it will get me the boot menu any way. In the past I could install my barebones real mode hobby 'OS' beginning in the boot sector of an empty partition and put the chainloader statement in the grub boot menu entry in grub.cfg file, as follows:

Code: Select all

menuentry "jinx" {
	insmod chain
	set root=(hd0,3)
	chainloader +1
}
Or I could put it in file /etc/grub.d/40_custom and then run grub-mkconfig program. But neither of those now get me a boot menu item for the hobby OS because no boot menu is ever displayed in the first place. QUESTION: how do I get the grub boot menu in my situation?

Thanks. Bill S.
FallenAvatar
Member
Member
Posts: 283
Joined: Mon Jan 03, 2011 6:58 pm

Re: I cant get grub to display a menu

Post by FallenAvatar »

First result in google for "ubuntu grub config show boot menu"

http://askubuntu.com/questions/16042/ho ... -boot-time

- Monk
User avatar
BrightLight
Member
Member
Posts: 901
Joined: Sat Dec 27, 2014 9:11 am
Location: Maadi, Cairo, Egypt
Contact:

Re: I cant get grub to display a menu

Post by BrightLight »

Keep pressing and releasing shift during BIOS POST and keep doing that until the purple GRUB screen appears. Viola! You have a GRUB boot menu.
Not sure how you make the menu appear automatically, though.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
onlyonemac
Member
Member
Posts: 1146
Joined: Sat Mar 01, 2014 2:59 pm

Re: I cant get grub to display a menu

Post by onlyonemac »

omarrx024 wrote:Not sure how you make the menu appear automatically, though.
Show the menu and disable the timeout in grub.cfg:

Code: Select all

set timeout_style=menu
set timeout=-1
bilsch01 wrote:Or I could put it in file /etc/grub.d/40_custom and then run grub-mkconfig program. But neither of those now get me a boot menu item for the hobby OS because no boot menu is ever displayed in the first place. QUESTION: how do I get the grub boot menu in my situation?
It should be in /etc/grub.d/40_custom and use sudo update-grub to update the grub.cfg file. If you use this method, it will overwrite what I posted above to show the menu; you'll also need to edit /etc/default/grub to specify these options. GRUB_TIMEOUT=-1 is the option to disable the timeout (which implicitly shows the menu as well), although there should be another option to just show the menu without disabling the timeout although I don't know what that option is because the grub menu has always appeared for me even when I've installed Ubuntu on a computer with no other operating systems on it.
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.

Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
Post Reply