UbuntuHelp:BootOptions
来自Ubuntu中文
目录
Introduction
This guide shows how to temporarily or permanently change your boot options. This can be necessary if the system freezes when trying to install Ubuntu, or on a system with Ubuntu already installed on it if Ubuntu does not boot or needs adjustment.
Change Boot Options During Ubuntu Install
- This section shows how to change the boot options for installing Ubuntu.
When you boot with the Live CD you will come to this screen: 模板:Http://i18.tinypic.com/6tzzndc.jpg Press the F6 key to select Other Options. This will take you to another screen with a Boot Options line similar to this one: 模板:Http://i16.tinypic.com/7wonyxj.jpg To enable or disable certain boot options, simply add the options you want (from this list, for example) to the end of the Boot Options line, with a space before each one. Once finished, press the Enter key to boot the machine. Here is an example of adding the vga=771 option to the end of the Boot Options line: 模板:Http://i17.tinypic.com/8bz22ir.jpg
Change Boot Options Temporarily On An Existing Ubuntu System
- This section shows how to temporarily change the boot options on an existing installation of Ubuntu.
- These instructions will work on a system that uses Grub - the default boot loader in Ubuntu.
When you boot your computer, you will see a Grub message with a 3 second time-out. When you see this message, press the Esc key: 模板:Http://i34.tinypic.com/a1sns.jpg You will see a menu, which should look similar to this: 模板:Http://i34.tinypic.com/24y4e2d.jpg Choose which kernel you want to work with. If you don't know which one, choose the first line. Press the e key to edit the line, and you will be presented with a screen like this: 模板:Http://i34.tinypic.com/vzc8b5.jpg Then you will be presented with a screen with various lines. Use your down arrow key to move your selection highlight to the "kernel" line. Press the e key to edit the kernel line, and you will be presented with a screen like this: 模板:Http://i35.tinypic.com/szeulk.jpg Add the boot option you wish to add (in the above screenshot, vga=771 was added). Press the Enter key when you are done with the changes. Press the b key to boot the machine with the boot options you selected.
Change Boot Options Permanently On An Existing Ubuntu System
- This section shows how to permanently change the boot options on an existing installation of Ubuntu.
- These instructions will work on a system that uses Grub - the default boot loader in Ubuntu.
In order to permanently change your boot options, you'll need to edit the /boot/grub/menu.lst file. Before you begin, open a terminal window and type this command to back up the file with a copy that has the current date and time appended to its name:
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.`date +~%b-%d-%Y~%T`
Type this command to edit the menu.lst file:
sudo nano /boot/grub/menu.lst
Use your arrow keys to move your cursor to the line that starts with "# kopt=". Add the boot option(s) you'd like to use to the end of that line, with a space before each one. Press the Ctrl and o (this is the letter o) keys at the same time. Verify that the filename is correct (edit the filename if it's not) and press the Enter key to save the file. Press the Ctrl and x keys at the same time to exit the editor. Type this command to update the menu entries in the system:
sudo update-grub
NB! If you instead edit the menu entries directly, your changes will magically disappear the next time update-grub
is run, for instance when the kernel or grub packages are updated.
Common Boot Options
This list is not comprehensive but it contains some of the common options. When presented with the text on the screen "boot:" then the options below can be given. They must have the kernel name before the option.
Example
Adding the vga=771 option: boot: /boot/vmlinuz-2.6.15-26-k7 root=/dev/hda1 ro quiet splash boot: /boot/vmlinuz-2.6.15-26-k7 root=/dev/hda1 ro quiet splash vga=771 Options can be used together such as in this example: /boot/vmlinuz-2.6.15-26-k7 root=/dev/hda1 ro quiet splash noapic nolapic
Kernel Options
These options are used by the kernel, and will apply to any system at any time. The file "Documentation/kernel-parameters.txt" in the relevant linux-source package provides more information.
Option | Impact |
vga=xxx | Set your framebuffer resolution to VESA mode xxx. Check here for a list of possible modes. |
acpi=off OR noacpi | This parameter disables the whole ACPI system. This may prove very useful, for example, if your computer does not support ACPI or if you think the ACPI implementation might cause some problems (for instance random reboots or system lockups). |
acpi=force | Activates the ACPI system even if your computer BIOS date is older than 2000. This parameter overwrites acpi=off and can also be used with current hardware if the ACPI support is not activated despite apm=off. |
pci=noacpi OR acpi=noirq | These parameters disable the PCI IRQ routing |
pci=acpi | This parameter activates the PCI IRQ routing |
acpi_irq_balance | ACPI is allowed to use PIC interrupts to minimize the common use of IRQs. |
acpi_irq_nobalance | ACPI is not allowed to use PIC interrupts. |
acpi=oldboot | Deactivates the ACPI system almost completely; only the components required for the boot process will be used. |
acpi=ht | Impact Deactivates the ACPI system almost completely; only the components required for hyper threading will be used. |
noapic | Disable the "Advanced Programmable Interrupt Controller (APIC)". |
nolapic | Disable the "local APIC". |
apm=off OR noapm | Disable the Advanced Power Management. |
irqpoll | Changes the way the kernel handles interrupt calls (set it to polling). Can be useful in case of hardware interrupt issues. |
xforcevesa | Force X to start using VESA driver. Usefull for some notebooks with uncommon video interfaces. |
Initrd break points
These options will cause the initrd to pause execution and spawn a shell. Only one option at a time may be specified (the last wins). See also: /usr/share/initramfs-tools/init and /usr/share/initramfs-tools/scripts/*.
Option | Impact |
break=top | Break before any scripts are run (including usplash) |
break=modules | Break before any modules are loaded |
break OR break=premount | Break before the premount scripts are run (ie: udev) |
break=mount | Break before the root partition is mounted |
break=bottom | Break before the 'bottom' scripts are run |
break=init | Break just before control is handed over to /sbin/init. |
(This list is far from complete, please feel free to add some options.)
Installer options (user-land)
These options are usually used when installing a system, and are picked up by the installer program or start-up scripts, and not by the kernel.
Option | Impact |
debian-installer/framebuffer=false | Disable framebuffer. |
hw-detect/start_pcmcia=false | Don't start PCMCIA. Personal Computer Memory Card International Association, one of the stranger names for a piece of hardware. :-) Your hardware is an association. |
netcfg/disable_dhcp=true | Force static network config. |
bootkbd=uk | Set keyboard map. Use a two letter ISO country code to get the right letters on the right keys. This option can help with password problems. |
(This list is far from complete, please feel free to add some options.)
See Also
- GrubHowto - A guide for how to configure Grub.