个人工具

“UbuntuHelp:BootOptions”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第2行: 第2行:
 
{{Languages|UbuntuHelp:BootOptions}}
 
{{Languages|UbuntuHelp:BootOptions}}
 
== Introduction ==
 
== 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.
+
This guide explains how to temporarily or permanently change your boot options. Boot options may be necessary if a system freezes when trying to install Ubuntu or if an existing installation will not boot or otherwise needs adjustment.
== Change Boot Options During Ubuntu Install ==
+
== Change Boot Options During Install ==
* This section shows how to change the boot options for installing Ubuntu.
+
When you boot with an Ubuntu Live CD you will be presented with a screen similar to this:
When you boot with the Live CD you will come to this screen:
+
 
{{http://i18.tinypic.com/6tzzndc.jpg}}
 
{{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:
 
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}}
 
{{http://i16.tinypic.com/7wonyxj.jpg}}
To enable or disable certain boot options, simply add the options you want (from this [[UbuntuHelp:BootOptions#Common_Boot_Options|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.
+
To enable or disable certain boot options, simply add or remove the options you need (from this [[UbuntuHelp:BootOptions#Common_Boot_Options|list]], for example) to the end of the Boot Options line, with a space between 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:
 
Here is an example of adding the ''vga=771'' option to the end of the Boot Options line:
 
{{http://i17.tinypic.com/8bz22ir.jpg}}
 
{{http://i17.tinypic.com/8bz22ir.jpg}}
== Change Boot Options Temporarily On An Existing Ubuntu System ==
+
== Change Boot Options Temporarily For An Existing Installation ==
* This section shows how to temporarily change the boot options on an existing installation of Ubuntu.
+
* These instructions only apply to installations that use Grub - Ubuntu's default boot loader.
* 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 timer. When you see this message, press the '''Esc''' key:
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}}
 
{{http://i34.tinypic.com/a1sns.jpg}}
You will see a menu, which should look similar to this:
+
You will see a menu which will look similar to this:
 
{{http://i34.tinypic.com/24y4e2d.jpg}}
 
{{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:
 
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}}
 
{{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:  
+
Then you will be presented with a screen with various lines. Use your down arrow key to highlight the "kernel" line. Press the '''e''' key to edit the kernel line. You will be presented with a screen like this:  
 
{{http://i35.tinypic.com/szeulk.jpg}}
 
{{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.
+
Then add or subtract whichever boot option you wish (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 ==
+
== Change Boot Options Permanently On An Existing Installation ==
* This section shows how to permanently change the boot options on an existing installation of Ubuntu.
+
* These instructions only apply to systems that use Grub - Ubuntu's default boot loader.
* 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.
 
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:
 
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:
第37行: 第34行:
 
</nowiki></pre>
 
</nowiki></pre>
 
Use your arrow keys to move your cursor to the line that starts with "# kopt=".
 
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.
+
Add or subtract whichever boot option(s) you'd like to the end of that line, with a space between each one.
 
Press the '''Ctrl''' and '''o''' (this is the letter '''o''') keys at the same time.
 
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.
 
Verify that the filename is correct (edit the filename if it's not) and press the '''Enter''' key to save the file.
第45行: 第42行:
 
sudo update-grub
 
sudo update-grub
 
</nowiki></pre>
 
</nowiki></pre>
NB! If you instead edit the menu entries directly, your changes will magically disappear the next time <code><nowiki>update-grub</nowiki></code> is run, for instance when the kernel or grub packages are updated.
+
Note: If you edit the menu entries directly from Grub, your changes will disappear the next time <code><nowiki>update-grub</nowiki></code> is run, for instance or when the kernel or grub packages are updated.
 
== Common Boot Options ==
 
== Common Boot Options ==
This list is not comprehensive but it contains some of the common options.
+
This list is not comprehensive but it contains some common boot options.
When presented with the text on the screen "boot:" then the options below can be given.
+
When presented with the text on the screen "boot:" then the boot options below can be given.
 
They must have the kernel name before the option.
 
They must have the kernel name before the option.
 
=== Example ===
 
=== Example ===
第57行: 第54行:
 
/boot/vmlinuz-2.6.15-26-k7 root=/dev/hda1 ro quiet splash noapic nolapic
 
/boot/vmlinuz-2.6.15-26-k7 root=/dev/hda1 ro quiet splash noapic nolapic
 
=== Kernel Options ===
 
=== Kernel Options ===
These options are used by the kernel, and will apply to any system at any time.
+
Note: These options are used by the kernel, and will apply to any installation at any time.
 
The file "Documentation/kernel-parameters.txt" in the relevant linux-source package provides
 
The file "Documentation/kernel-parameters.txt" in the relevant linux-source package provides
 
more information.
 
more information.
第124行: 第121行:
 
(This list is far from complete, please feel free to add some options.)
 
(This list is far from complete, please feel free to add some options.)
 
== See Also ==
 
== See Also ==
* [[UbuntuHelp:GrubHowto|GrubHowto]] - A guide for how to configure Grub.
+
* [[UbuntuHelp:GrubHowto|GrubHowto]] - A guide for configuring Grub.
 
----
 
----
 
[[category:CategoryCleanup]]
 
[[category:CategoryCleanup]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2008年12月16日 (二) 18:02的版本


Introduction

This guide explains how to temporarily or permanently change your boot options. Boot options may be necessary if a system freezes when trying to install Ubuntu or if an existing installation will not boot or otherwise needs adjustment.

Change Boot Options During Install

When you boot with an Ubuntu Live CD you will be presented with a screen similar to this: 模板: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 or remove the options you need (from this list, for example) to the end of the Boot Options line, with a space between 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 For An Existing Installation

  • These instructions only apply to installations that use Grub - Ubuntu's default boot loader.

When you boot your computer, you will see a Grub message with a 3 second timer. When you see this message, press the Esc key: 模板:Http://i34.tinypic.com/a1sns.jpg You will see a menu which will 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 highlight the "kernel" line. Press the e key to edit the kernel line. You will be presented with a screen like this: 模板:Http://i35.tinypic.com/szeulk.jpg Then add or subtract whichever boot option you wish (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 Installation

  • These instructions only apply to systems that use Grub - Ubuntu's default boot loader.

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 or subtract whichever boot option(s) you'd like to the end of that line, with a space between 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

Note: If you edit the menu entries directly from Grub, your changes will disappear the next time update-grub is run, for instance or when the kernel or grub packages are updated.

Common Boot Options

This list is not comprehensive but it contains some common boot options. When presented with the text on the screen "boot:" then the boot 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

Note: These options are used by the kernel, and will apply to any installation 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