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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-01-2014, 01:58 AM
|
#1
|
Member
Registered: Jan 2013
Location: EU
Distribution: Debian
Posts: 269
Rep:
|
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!
|
|
|
09-01-2014, 02:28 PM
|
#2
|
Moderator
Registered: Mar 2008
Posts: 22,350
|
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.
|
|
|
09-01-2014, 02:53 PM
|
#3
|
LQ Addict
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841
|
I would say because of orphaned inodes.
|
|
|
09-01-2014, 05:14 PM
|
#4
|
Member
Registered: Jan 2013
Location: EU
Distribution: Debian
Posts: 269
Original Poster
Rep:
|
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.
|
|
|
09-01-2014, 05:30 PM
|
#5
|
LQ Addict
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841
|
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.
|
|
|
09-01-2014, 08:10 PM
|
#6
|
Moderator
Registered: Mar 2008
Posts: 22,350
|
|
|
|
All times are GMT -5. The time now is 09:38 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|