Error Reading /boot/grub/grub.conf
-Clone This Bug -Last Comment First Last Prev Next This bug is not in your last search results. Bug753373 - error reading /boot/grub/grub.conf Summary: error reading /boot/grub/grub.conf Status: CLOSED DUPLICATE of bug 734709 Aliases: None Product: Fedora Classification: Fedora Component: system-config-boot (Show other bugs) Sub Component: --- Version: 16 Hardware: x86_64 Linux Priority unspecified Severity high TargetMilestone: --- TargetRelease: --- Assigned To: Harald Hoyer QA Contact: Fedora Extras Quality Assurance Docs Contact: URL: Whiteboard: Keywords: Depends On: Blocks: Show dependency tree /graph Reported: 2011-11-11 21:25 EST by Mohammed Arafa Modified: 2011-11-15 03:25 EST (History) CC List: 1 user (show) harald See Also: Fixed In Version: Doc Type: Bug Fix Doc Text: Story Points: --- Clone Of: Environment: Last Closed: 2011-11-15 03:25:32 EST Type: --- Regression: --- Mount Type: --- Documentation: --- CRM: Verified Versions: Category: --- oVirt Team: --- RHEL 7.3 requirements from Atomic Host: Cloudforms Team: --- Attachments (Terms of Use) Add an attachment (proposed patch, testcase, etc.) Groups: None (edit) Description Mohammed Arafa 2011-11-11 21:25:40 EST Description of problem: running system-config-boot throws up the error : error reading /boot/grub/grub.conf Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: Comment 1 Harald Hoyer 2011-11-15 03:25:32 EST *** This bug has been marked as a duplicate of bug 734709 *** Note You need to log in before you can comment on or make changes to this bug. Format For Printing -XML -Clone This Bug -Top of page First Last Prev Next This bug is not in your last search results. Home | New | Search | [?] | Reports | Requests | Help | NewAccount | Log In [x] | Forgot Password Login: [x] | Report Bugzilla Bug Legal
Computing Tutorials Open Source Pro LearnWhat is Linux? Training Certification Events Webinars CommunityParticipate Q&A Forums Blogs ResourcesNewsletter Distributions Publications Infographics Photos Videos Jobs Carla Schroder June 12, 2014 How to Rescue a Non-booting GRUB 2 on Linux Once upon a time we had legacy GRUB, the Grand Unified Linux Bootloader version 0.97. Legacy GRUB had many virtues, but it became old and its developers did yearn for https://bugzilla.redhat.com/show_bug.cgi?id=753373 more functionality, and thus did GRUB 2 come into the world. GRUB 2 is a major rewrite with several significant differences. It boots removable media, and can be configured with an option to enter your system BIOS. It's more complicated to configure with all kinds of scripts to wade through, and https://www.linux.com/learn/how-rescue-non-booting-grub-2-linux instead of having a nice fairly simple /boot/grub/menu.lst file with all configurations in one place, the default is /boot/grub/grub.cfg. Which you don't edit directly, oh no, for this is not for mere humans to touch, but only other scripts. We lowly humans may edit /etc/default/grub, which controls mainly the appearance of the GRUB menu. We may also edit the scripts in /etc/grub.d/. These are the scripts that boot your operating systems, control external applications such as memtest and os_prober, and theming./boot/grub/grub.cfg is built from /etc/default/grub and /etc/grub.d/* when you run the update-grub command, which you must run every time you make changes. The good news is that the update-grub script is reliable for finding kernels, boot files, and adding all operating systems to your GRUB boot menu, so you don't have to do it manually. We're going to learn how to fix two of the more common failures. When you boot up your system and it stops at the grub> prompt, that is the full GRUB 2 command shell. That
operations performed by your computer between the moment when you switch it on and the moment it's ready for you to log in. During this time, all kinds of incomprehensible messages scroll up the screen, but they're not something http://www.tuxradar.com/content/how-fix-linux-boot-problems you usually take much notice of, and most linux distros cover them up with a https://rewoo.wordpress.com/2013/02/08/repairing-a-broken-grub-conf-in-centos-2/ pretty splash screen and a nice encouraging progress bar. This is all fine, of course, until it stops working. In this tutorial we'll examine the boot process in more detail, looking in particular at what can go wrong, and how to diagnose and fix the problem. Grokking the problem When I'm teaching Linux on one of my courses, many attendees tell error reading me they are interested in troubleshooting of one form or another. Some of them are looking for a cookbook approach - "If you see the error message X, run command Y", but troubleshooting rarely works that way. My initial advice to anyone who needs to troubleshoot is always the same: "The most important thing in troubleshooting is to understand how the system is supposed to work in the first place. The second most important thing is figuring error reading /boot/grub/grub.conf out exactly what the system was trying to do when it went wrong." Figure 1: the normal sequence of events when booting Linux. With this in mind, let's take a look at how Linux boots. Knowing the normal sequence of events, and determining how far it got before it ran into trouble, are key to diagnosing and fixing boot-time problems. Figure 1 above, right shows the normal sequence of events (green arrows) and indicates some of the possible failure paths (red arrows). Picking yourself up by your bootstraps Booting is a multi-stage affair. When a PC is powered up, control initially passes to a program (called the BIOS) stored in read-only memory on the motherboard. The BIOS performs a self-test of the hardware and scouts around looking for a device to boot from. The BIOS provides configuration screens that allow you to assign the order in which it searches for a bootable device, and modern BIOSes support a wide range of boot devices, including PXE booting from a network server. The only case we consider here is booting from the hard drive. The BIOS loads the Master Boot Record (MBR) of the selected boot device and executes it. (If this fails, the BIOS will report something like "Missing Operating System", and come to a screaming halt.) The MBR occupies the very first sector of the drive. I
modules on CentOS 6.3. The upgrading process removes the already loaded kernel modules in a running system. This results in a kernel oops and a broken init ramdisk for the currently running kernel. Sometimes it happens that a kernel oops occures during writing the new grub configuration. On the next boot grub cannot find any configuration files and falls back to the grub shell. You will get a prompt like this: grub > Experts will be able to boot the system typing the commands for grub directly in the prompt and boot the system manually. But if you entered the lines and the system is up and running again, you won't find any grub configuration. On CentOS you are not able to generate a grub configuration from scratch via any scripts or tools like the Debian update-grub. CentOS itself uses grubby to generate the kernel entries. But grubby needs a template from which it can generate the entries. Last but not least this template will be generated by reading an existing grub entry. This approach ends up in a worst case scenario if you have misconfigured your /boot/grub/grub.conf, /etc/grub.conf or /boot/grub/menu.lst (the both last entries are only symlinks to /boot/grub/grub.conf) and you now try to reset your configuration. And again big trouble, if generating the grub.conf failed - for example during a kernel crash. In my situation it was a kernel crash. It is absolutely impossible to regenerate a grub.conf from scratch with any of the tools delivered by CentOS. My solution: boot your system via Install-Disk or by grub command line prompt create an empty new /boot/grub/grub.conf add the next code snippet to your grub.conf default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title CentOS (2.6.32-279.22.1.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-279.22.1.el6.x86_64 ro root=/dev/sda3 initrd /initramfs-2.6.32-279.22.1.el6.x86_64.img N O T E: I have a separated /boot partition on my systems. In standard configuration delivered by CentOS /boot and / will be on the same partition. In this case, the path to kernel and initrd will start with /boot/vmlinuz... and /boot/initramfs... . The root partition mostly will be root=/dev/sda1. Try to boot your system with your manually built grub.conf. If anything works fine you can add new boot entries by CentOS' tool grubby. For example: root@host:~ $ grubby --add-kernel="/boot/vmlinuz-2.6.32-279.22.1.el6.x86_64"\ --initrd="/boot/initramfs-2.6.32-279.22.1.el6.x86_64.img"\ --title="CentOS (2.6.32-279.22.1.el6.x86_64)" --copy-default --make-default The tool grubby will replace the /dev/sda? device file with the UUID string of the partition. Y