LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-01-2014, 01:58 AM   #1
displace
Member
 
Registered: Jan 2013
Location: EU
Distribution: Debian
Posts: 269

Rep: Reputation: 25
How does GRUB2 know to display a menu upon boot?


Hi

I was wondering this for a long time. Suppose you have a linux distro installed like Ubuntu or some equivalent. The system will automatically boot to desktop without displaying any boot menus, but after hard reseting the PC, it will stop the booting procedure, and display the boot menu instead.

My question is how does GRUB2 know that the system has not been shut down properly?

Regards!
 
Old 09-01-2014, 02:28 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,350

Rep: Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690
Pretty sure the menu is there always or at least in most cases. It has been not selected to show in cases where one distro is installed. Usually pressing the spacebar at some time in boot will cause the default menu to appear.
 
Old 09-01-2014, 02:53 PM   #3
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I would say because of orphaned inodes.
 
Old 09-01-2014, 05:14 PM   #4
displace
Member
 
Registered: Jan 2013
Location: EU
Distribution: Debian
Posts: 269

Original Poster
Rep: Reputation: 25
The menu does not appear normally, the OS boots automatically, and a splash screen is displayed. The menu only appears when the computer has not been properly shut down. The thing is that my rootfs is encrypted, so it's not possible to read data from it, and it is decrypted only after the kernel has loaded/booted. that means after the GRUB stage. Another possibility is that it writes to the unencrypted boot partition. I did a sha1sum of the entire file tree, and it did not seem to change. Additionally I did a sha1sum of the first 2048 sectors that didn't change either.

I'm puzzled, I must have missed something.
 
Old 09-01-2014, 05:30 PM   #5
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
But keep in mind that if improperly shutdown all of your previously mounted including where your the 1 that /etc/default/grub resides & grub hidden timeout on will go thru a fsck to find it / will be first. So grub is going to default to allowing acces to all tools. Which once selected grub does fsck.
 
Old 09-01-2014, 08:10 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,350

Rep: Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690
http://forum.xbmc.org/showthread.php?tid=64857
 
  


Reply

Tags
grub boot menu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why will GRUB2 boot menu display if Windows 7 Retail disc is inserted, otherwise... WhiteyMcQ-Tip Debian 16 10-04-2013 08:34 AM
Display GRUB2 Menu On external Monitor (HDMI) MG00711 Linux - Hardware 3 09-15-2013 11:40 AM
[SOLVED] How do I update the grub2 boot menu mrapathy Debian 15 05-24-2013 01:56 PM
[SOLVED] Editing the grub2 boot menu in a dual boot machine Chriscrof Linux - Newbie 13 07-15-2010 01:14 AM
GRUB2 - FreeBSD-8.0 does not show up in triple boot menu, dual boot menu it does.. wiliweld *BSD 7 05-03-2010 01:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration