Ubuntu boot problems
It’s a problem you have or you don’t. Yes, many computers boot Ubuntu out-of-the-box, and operate seemingly without flaw. It is hard for those of us with boot issues to believe this.
Boot issues seem to revolve, primarily, around hardware detection problems. Why does Ubuntu have hardware detection problems? My understanding is there is a vast array of hardware and associated firmware out there. Much of that firmware is proprietary. That means someone sold you something that you can’t have. I always laugh at that. Anyway, Ubuntu does the best job it can to guess what open-source drivers will operate your hardware. Sometimes the operating system needs help. Some things, like BIOS settings can hinder the boot process as it attempts to do all its fancy stuff in making the hardware work. This is where boot options, or parameters, come in, and can finally provide the joy we’ve been waiting for.
I have yet to find what I would call a layperson’s guide to boot parameters in Linux, but the parameters that seem most relevant to the latest kernels Ubuntu uses, 2.6.22-14 and 2.6.24-*, have to do with enabling disabled APIC (or vice-versa) and irq polling. What is all that crazy stuff? I will try, in my limited understanding, to explain, and I will describe the simple process of editing these boot options into the kernel line at boot.
Some BIOSes are defective and do not properly route interrupts to the buses. You can read all you want about interrupts and APIC on the world wide web: http://en.wikipedia.org/wiki/Intel_APIC_Architecture
http://www.freepatentsonline.com/4654820.html
For the purpose of this article, it should suffice to say sometimes Ubuntu needs to have local APIC enabled manually, sometimes Ubuntu needs APIC to be disabled, and sometimes Ubuntu needs to have local APIC told to route the interrupts. Much of what is required by the operating system to boot is displayed in the system log and during the boot process if “quiet splash” is removed from the kernel boot options. The scrolling is nearly impossible to follow during the boot, and if the system will not boot at all, it is very difficult to get a full output of the entire process. A verbose boot (with quiet splash removed) should at least let you see where the process hangs. If you can boot, but the boot up is painfully slow, 5-6 minutes, troubleshooting is much easier. Simply running the command dmesg in the terminal will likely reveal the steps that need to be taken. All that computer-like text can look intimidating, but just reading through it, reveals some very human-readable suggestions. For example, “APIC disabled by BIOS. Try using lapic.” “If a device doesn’t work properly try the option pci=routeirq.” If you haven’t a clue what this means, you are not alone. The system is telling us to try the options as boot parameters. How do we do this? It is very easy.
If you dual boot, you have seen the GRUB menu. If you are trying to boot the live CD, you can edit the boot options by pressing F6 from the opening screen. If you have a slow booting single operating system, the GRUB menu may be hidden. In which case the esc key must be pressed before the boot process begins.
I believe the best way to experiment with boot parameters is from the GRUB menu at start up. Once you have found what works, you can permanently edit the file: /boot/grub/menu.lst by running gksu gedit /boot/grub/menu.lst in a terminal…or whatever text editor you choose. I say experiment with parameters because based on my experience it is an experimental process when the system will not boot at all. If the system boots but takes 5 minutes to do so, then you can run dmesg in the terminal and look for hints like “try acpi=off,” or “try lapic.”
To edit the kernel line from the GRUB menu, using the live cd, trying to get the system to “just boot,” because it wont: press the F6 key. Voila…near the bottom of the window is a line of code beginning with the word ‘kernel.’ Use the arrow key to move to the end of this line, and delete –quiet splash. Add the commands ‘noapic nolapic’ (without any quotes.) Why did I choose those? It’s nostalgia. Those are the parameters that finally allowed me to boot Xubuntu on an old HP laptop for the first time. After pressing F6, you can press F1 and F3 or F6 again and get some suggestions for boot parameters. That is how I first discovered ‘noapic nolapic.’ Other parameters that have worked for me on other systems including several models of Thinkpad, include: ‘lapic’ ‘irqpoll’ ‘pci=routeirq’ ‘apic=off.’ In all instances, I have always deleted –quiet splash.
To edit the kernel line on an installed system, press ‘e’ to edit, when GRUB displays the boot menu. Note: you may need to press the esc key to see the GRUB menu if you are only booting a single operating system. After pressing ‘e,’ use the arrow key to move to the line beginning with the word ‘kernel.’ Now press ‘e’ again. Move to the end of the line, delete –quiet splash, add your parameters of choice, and hit enter. Finally, press ‘b’ to boot. Cross your fingers…if it fails…try, try again. I once failed with noapic nolapic numerous times on a live cd verified by MD5sums. For whatever reason, I burned a new cd from a new image, used noapic nolapic, and I’ll be darn…it booted and installed.
You now know everything I know about boot parameters.
Read all you ever wanted to know (or not know) about boot parameters here: http://www.tldp.org/HOWTO/BootPrompt-HOWTO.html