https://wiki.archlinux.org/api.php?action=feedcontributions&user=Enyaw+ecurb&feedformat=atomArchWiki - User contributions [en]2024-03-29T08:49:02ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=ASUS_Eee_PC_1001px&diff=113890ASUS Eee PC 1001px2010-08-12T10:38:51Z<p>Enyaw ecurb: </p>
<hr />
<div>[[Category:ASUS (English)]]<br />
<br />
==Introduction==<br />
How to install Archlinux on the [http://commercial.asus.com/product/detail/52 Asus Eee PC 1001px]. <br />
<br />
This article was written for the stock kernel 2.6.34-ARCH. The netbook runs absolutely fine after little configuration.<br />
<br />
The same model was sold in Germany under the name [http://www.notebooksbilliger.de/asus+eee+pc+r101+win7+schwarz Eee PC R101].<br />
<br />
==Installation==<br />
The netbook probably comes with a 32bit-Windows installed. The Intel Atom 450N however supports x86_64-instructions and 64bit-Arch runs perfectly fine.<br />
<br />
To boot from an USB stick it is neccessary to deactivate the "Boot Booster"-option in the BIOS or otherwise the Asus seems to skip all detection scans and will just boot from harddisk. Press F2 repeatedly during the fortunately short POST to enter the BIOS. Deactivate "Boot Booster" and select "Removable Dev." as 1st boot device. <br />
<br />
Personal Remark: For me it still was neccessary to press Esc during POST and manually select the USB stick to boot from it. This may be a BIOS-bug (ver. 0403)<br />
<br />
When partitioning you may want to keep the EFI-partition (usually the last, smallest partition). It allows to use the "Boot Booster"-Feature and to jump over certain tests before booting. Don't panic however if you deleted it, the partition may be restored. Look on the eeePC-Forum for it.<br />
<br />
==Sound==<br />
<br />
The soundcard is correctly recognized but alsa does not feature the correct model-option (yet) to setup the rather interesting pin connections. What works mostly is adding<br />
<br />
options indel-hda-snd model=lifebook<br />
<br />
to your <code>/etc/modprobe/modprobe.conf</code>. I did not however get the internal microphone working. The external microphone over the combined audio jack was not tested.<br />
<br />
==Laptop Mode Tools & powersaving==<br />
<br />
The powersaving-mechanisms provided by [[Laptop Mode Tools]] seem to work. <br />
<br />
Standby (Suspend-to-ram) works perfectly fine with hotkey. Hibernate (Suspend-to-disk) was not tested.<br />
<br />
CPU frequency scaling works. After installing [[Cpufrequtils]] and adding <code>acpi-cpufreq</code> to your MODULES in <code>/etc/rc.conf</code> laptop-mode does a perfectly fine job taking care of your frequencies.<br />
<br />
Spinning down the harddrive works.<br />
<br />
Adjusting the brightness of the display works with hotkeys after adding the following to your kernel-boot-options<br />
acpi_osi=Linux acpi_backlight=vendor<br />
I did however not find out how to adjust the brightness manually, eg. per command-line.<br />
<br />
Personal Remark: The overall endurance seems good. While I never actually reached the promised 10h, 8h-9h are possible with dimmed display, 4h while really working with it. The power-saving-support is probably not worse than on windows.<br />
<br />
==Issueless hardware==<br />
===Graphics===<br />
<br />
The integrated GPU (Pineview) is supported with KMS by <code>i915</code> meaning xf86-video-intel.<br />
<br />
===(W)LAN===<br />
<br />
The WLAN-chip is fully supported by <code>ath9k</code> in all three modes of operation (b/g/n).<br />
Ethernet works fine.<br />
<br />
===Input===<br />
<br />
Webcam and Touchpad work. <br />
<br />
Keyboard also does its job.<br />
<br />
SD Card reader works.<br />
<br />
==Hardware information==<br />
<br />
===lspci===<br />
00:00.0 Host bridge: Intel Corporation Pineview DMI Bridge<br />
00:02.0 VGA compatible controller: Intel Corporation Pineview Integrated Graphics Controller<br />
00:02.1 Display controller: Intel Corporation Pineview Integrated Graphics Controller<br />
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)<br />
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)<br />
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)<br />
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)<br />
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)<br />
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)<br />
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02) <br />
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)<br />
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)<br />
00:1f.0 ISA bridge: Intel Corporation Tigerpoint LPC Controller (rev 02)<br />
00:1f.2 SATA controller: Intel Corporation 82801GR/GH (ICH7 Family) SATA AHCI Controller (rev 02)<br />
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)<br />
01:00.0 Ethernet controller: Atheros Communications Atheros AR8132 / L1c Gigabit Ethernet Adapter (rev c0)<br />
02:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)<br />
<br />
===lsusb===<br />
Bus 005 Device 002: ID 0b05:1788 ASUSTek Computer, Inc. <br />
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 001 Device 002: ID 13d3:5119 IMC Networks <br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub</div>Enyaw ecurbhttps://wiki.archlinux.org/index.php?title=ASUS_Eee_PC_1001px&diff=113888ASUS Eee PC 1001px2010-08-12T09:55:58Z<p>Enyaw ecurb: </p>
<hr />
<div>[[Category:ASUS (English)]]<br />
<br />
==Introduction==<br />
How to install Archlinux on the [http://commercial.asus.com/product/detail/52 Asus Eee PC 1001px]. <br />
<br />
This article was written for the stock kernel 2.6.34-ARCH. The netbook runs absolutely fine after little configuration.<br />
<br />
The same model was sold in Germany under the name [http://www.notebooksbilliger.de/asus+eee+pc+r101+xp+schwarz Eee PC R101].<br />
<br />
==Installation==<br />
The netbook probably comes with a 32bit-Windows installed. The Intel Atom 450N however supports x86_64-instructions and 64bit-Arch runs perfectly fine.<br />
<br />
To boot from an USB stick it is neccessary to deactivate the "Boot Booster"-option in the BIOS or otherwise the Asus seems to skip all detection scans and will just boot from harddisk. Press F2 repeatedly during the fortunately short POST to enter the BIOS. Deactivate "Boot Booster" and select "Removable Dev." as 1st boot device. <br />
<br />
Personal Remark: For me it still was neccessary to press Esc during POST and manually select the USB stick to boot from it. This may be a BIOS-bug (ver. 0403)<br />
<br />
When partitioning you may want to keep the EFI-partition (usually the last, smallest partition). It allows to use the "Boot Booster"-Feature and to jump over certain tests before booting. Don't panic however if you deleted it, the partition may be restored. Look on the eeePC-Forum for it.<br />
<br />
==Sound==<br />
<br />
The soundcard is correctly recognized but alsa does not feature the correct model-option (yet) to setup the rather interesting pin connections. What works mostly is adding<br />
<br />
options indel-hda-snd model=lifebook<br />
<br />
to your <code>/etc/modprobe/modprobe.conf</code>. I did not however get the internal microphone working. The external microphone over the combined audio jack was not tested.<br />
<br />
==Laptop Mode Tools & powersaving==<br />
<br />
The powersaving-mechanisms provided by [[Laptop Mode Tools]] seem to work. <br />
<br />
Standby (Suspend-to-ram) works perfectly fine with hotkey. Hibernate (Suspend-to-disk) was not tested.<br />
<br />
CPU frequency scaling works. After installing [[Cpufrequtils]] and adding <code>acpi-cpufreq</code> to your MODULES in <code>/etc/rc.conf</code> laptop-mode does a perfectly fine job taking care of your frequencies.<br />
<br />
Spinning down the harddrive works.<br />
<br />
Adjusting the brightness of the display works with hotkeys after adding the following to your kernel-boot-options<br />
acpi_osi=Linux acpi_backlight=vendor<br />
I did however not find out how to adjust the brightness manually, eg. per command-line.<br />
<br />
Personal Remark: The overall endurance seems good. While I never actually reached the promised 10h, 8h-9h are possible with dimmed display, 4h while really working with it. The power-saving-support is probably not worse than on windows.<br />
<br />
==Issueless hardware==<br />
===Graphics===<br />
<br />
The integrated GPU (Pineview) is supported with KMS by <code>i915</code> meaning xf86-video-intel.<br />
<br />
===(W)LAN===<br />
<br />
The WLAN-chip is fully supported by <code>ath9k</code> in all three modes of operation (b/g/n).<br />
Ethernet works fine.<br />
<br />
===Input===<br />
<br />
Webcam and Touchpad work. <br />
<br />
Keyboard also does its job.<br />
<br />
SD Card reader works.<br />
<br />
==Hardware information==<br />
<br />
===lspci===<br />
00:00.0 Host bridge: Intel Corporation Pineview DMI Bridge<br />
00:02.0 VGA compatible controller: Intel Corporation Pineview Integrated Graphics Controller<br />
00:02.1 Display controller: Intel Corporation Pineview Integrated Graphics Controller<br />
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)<br />
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)<br />
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)<br />
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)<br />
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)<br />
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)<br />
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02) <br />
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)<br />
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)<br />
00:1f.0 ISA bridge: Intel Corporation Tigerpoint LPC Controller (rev 02)<br />
00:1f.2 SATA controller: Intel Corporation 82801GR/GH (ICH7 Family) SATA AHCI Controller (rev 02)<br />
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)<br />
01:00.0 Ethernet controller: Atheros Communications Atheros AR8132 / L1c Gigabit Ethernet Adapter (rev c0)<br />
02:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)<br />
<br />
===lsusb===<br />
Bus 005 Device 002: ID 0b05:1788 ASUSTek Computer, Inc. <br />
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 001 Device 002: ID 13d3:5119 IMC Networks <br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
<br />
==References==</div>Enyaw ecurbhttps://wiki.archlinux.org/index.php?title=ASUS_Eee_PC_1001px&diff=113887ASUS Eee PC 1001px2010-08-12T09:54:13Z<p>Enyaw ecurb: Info about SD card reader</p>
<hr />
<div>[[Category:ASUS (English)]]<br />
<br />
==Introduction==<br />
How to install Archlinux on the [http://commercial.asus.com/product/detail/52 Asus Eee PC 1001px]. <br />
<br />
This article was written for the stock kernel 2.6.34-ARCH. The netbook runs absolutely fine after little configuration.<br />
<br />
The same model was sold in Germany under the name [http://www.notebooksbilliger.de/asus+eee+pc+r101+xp+schwarz Eee PC R101].<br />
<br />
==Installation==<br />
The netbook probably comes with a 32bit-Windows installed. The Intel Atom 450N however supports x86_64-instructions and 64bit-Arch runs perfectly fine.<br />
<br />
To boot from an USB stick it is neccessary to deactivate the "Boot Booster"-option in the BIOS or otherwise the Asus seems to skip all detection scans and will just boot from harddisk. Press F2 repeatedly during the fortunately short POST to enter the BIOS. Deactivate "Boot Booster" and select "Removable Dev." as 1st boot device. Rem: For me it still was neccessary to press Esc during POST and manually select the USB stick to boot from it. This may be a BIOS-bug (ver. 0403)<br />
<br />
When partitioning you may want to keep the EFI-partition (usually the last, smallest partition). It allows to use the "Boot Booster"-Feature and to jump over certain tests before booting. Don't panic however if you deleted it, the partition may be restored. Look on the eeePC-Forum for it.<br />
<br />
==Sound==<br />
<br />
The soundcard is correctly recognized but alsa does not feature the correct model-option (yet) to setup the rather interesting pin connections. What works mostly is adding<br />
<br />
options indel-hda-snd model=lifebook<br />
<br />
to your <code>/etc/modprobe/modprobe.conf</code>. I did not however get the internal microphone working. The external microphone over the combined audio jack was not tested.<br />
<br />
==Laptop Mode Tools & powersaving==<br />
<br />
The powersaving-mechanisms provided by [[Laptop Mode Tools]] seem to work. <br />
<br />
Standby (Suspend-to-ram) works perfectly fine with hotkey. Hibernate (Suspend-to-disk) was not tested.<br />
<br />
CPU frequency scaling works. After installing [[Cpufrequtils]] and adding <code>acpi-cpufreq</code> to your MODULES in <code>/etc/rc.conf</code> laptop-mode does a perfectly fine job taking care of your frequencies.<br />
<br />
Spinning down the harddrive works.<br />
<br />
Adjusting the brightness of the display works with hotkeys after adding the following to your kernel-boot-options<br />
acpi_osi=Linux acpi_backlight=vendor<br />
I did however not find out how to adjust the brightness manually, eg. per command-line.<br />
<br />
Personal Remark: The overall endurance seems good. While I never actually reached the promised 10h, 8h-9h are possible with dimmed display, 4h while really working with it. The power-saving-support is probably not worse than on windows.<br />
<br />
==Issueless hardware==<br />
===Graphics===<br />
<br />
The integrated GPU (Pineview) is supported with KMS by <code>i915</code> meaning xf86-video-intel.<br />
<br />
===(W)LAN===<br />
<br />
The WLAN-chip is fully supported by <code>ath9k</code> in all three modes of operation (b/g/n).<br />
Ethernet works fine.<br />
<br />
===Input===<br />
<br />
Webcam and Touchpad work. <br />
Keyboard also does its job.<br />
SD Card reader works.<br />
<br />
==Hardware information==<br />
<br />
===lspci===<br />
00:00.0 Host bridge: Intel Corporation Pineview DMI Bridge<br />
00:02.0 VGA compatible controller: Intel Corporation Pineview Integrated Graphics Controller<br />
00:02.1 Display controller: Intel Corporation Pineview Integrated Graphics Controller<br />
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)<br />
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)<br />
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)<br />
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)<br />
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)<br />
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)<br />
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02) <br />
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)<br />
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)<br />
00:1f.0 ISA bridge: Intel Corporation Tigerpoint LPC Controller (rev 02)<br />
00:1f.2 SATA controller: Intel Corporation 82801GR/GH (ICH7 Family) SATA AHCI Controller (rev 02)<br />
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)<br />
01:00.0 Ethernet controller: Atheros Communications Atheros AR8132 / L1c Gigabit Ethernet Adapter (rev c0)<br />
02:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)<br />
<br />
===lsusb===<br />
Bus 005 Device 002: ID 0b05:1788 ASUSTek Computer, Inc. <br />
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 001 Device 002: ID 13d3:5119 IMC Networks <br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
<br />
==References==</div>Enyaw ecurbhttps://wiki.archlinux.org/index.php?title=ASUS_Eee_PC_1001px&diff=113821ASUS Eee PC 1001px2010-08-11T21:38:16Z<p>Enyaw ecurb: Finishing touches</p>
<hr />
<div>[[Category:ASUS (English)]]<br />
<br />
==Introduction==<br />
How to install Archlinux on the [http://commercial.asus.com/product/detail/52 Asus Eee PC 1001px]. <br />
<br />
This article was written for the stock kernel 2.6.34-ARCH. The netbook runs absolutely fine after little configuration.<br />
<br />
The same model was sold in Germany under the name [http://www.notebooksbilliger.de/asus+eee+pc+r101+xp+schwarz Eee PC R101].<br />
<br />
==Installation==<br />
The netbook probably comes with a 32bit-Windows installed. The Intel Atom 450N however supports x86_64-instructions and 64bit-Arch runs perfectly fine.<br />
<br />
To boot from an USB stick it is neccessary to deactivate the "Boot Booster"-option in the BIOS or otherwise the Asus seems to skip all detection scans and will just boot from harddisk. Press F2 repeatedly during the fortunately short POST to enter the BIOS. Deactivate "Boot Booster" and select "Removable Dev." as 1st boot device. Rem: For me it still was neccessary to press Esc during POST and manually select the USB stick to boot from it. This may be a BIOS-bug (ver. 0403)<br />
<br />
When partitioning you may want to keep the EFI-partition (usually the last, smallest partition). It allows to use the "Boot Booster"-Feature and to jump over certain tests before booting. Don't panic however if you deleted it, the partition may be restored. Look on the eeePC-Forum for it.<br />
<br />
==Sound==<br />
<br />
The soundcard is correctly recognized but alsa does not feature the correct model-option (yet) to setup the rather interesting pin connections. What works mostly is adding<br />
<br />
options indel-hda-snd model=lifebook<br />
<br />
to your <code>/etc/modprobe/modprobe.conf</code>. I did not however get the internal microphone working. The external microphone over the combined audio jack was not tested.<br />
<br />
==Laptop Mode Tools & powersaving==<br />
<br />
The powersaving-mechanisms provided by [[Laptop Mode Tools]] seem to work. <br />
<br />
Standby (Suspend-to-ram) works perfectly fine with hotkey. Hibernate (Suspend-to-disk) was not tested.<br />
<br />
CPU frequency scaling works. After installing [[Cpufrequtils]] and adding <code>acpi-cpufreq</code> to your MODULES in <code>/etc/rc.conf</code> laptop-mode does a perfectly fine job taking care of your frequencies.<br />
<br />
Spinning down the harddrive works.<br />
<br />
Adjusting the brightness of the display works with hotkeys after adding the following to your kernel-boot-options<br />
acpi_osi=Linux acpi_backlight=vendor<br />
I did however not find out how to adjust the brightness manually, eg. per command-line.<br />
<br />
Personal Remark: The overall endurance seems good. While I never actually reached the promised 10h, 8h-9h are possible with dimmed display, 4h while really working with it. The power-saving-support is probably not worse than on windows.<br />
<br />
==Issueless hardware==<br />
===Graphics===<br />
<br />
The integrated GPU (Pineview) is supported with KMS by <code>i915</code> meaning xf86-video-intel.<br />
<br />
===(W)LAN===<br />
<br />
The WLAN-chip is fully supported by <code>ath9k</code> in all three modes of operation (b/g/n).<br />
Ethernet works fine.<br />
<br />
===Input===<br />
<br />
Webcam and Touchpad work. Keyboard also does its job.<br />
<br />
==Hardware information==<br />
<br />
===lspci===<br />
00:00.0 Host bridge: Intel Corporation Pineview DMI Bridge<br />
00:02.0 VGA compatible controller: Intel Corporation Pineview Integrated Graphics Controller<br />
00:02.1 Display controller: Intel Corporation Pineview Integrated Graphics Controller<br />
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)<br />
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)<br />
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)<br />
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)<br />
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)<br />
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)<br />
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02) <br />
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)<br />
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)<br />
00:1f.0 ISA bridge: Intel Corporation Tigerpoint LPC Controller (rev 02)<br />
00:1f.2 SATA controller: Intel Corporation 82801GR/GH (ICH7 Family) SATA AHCI Controller (rev 02)<br />
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)<br />
01:00.0 Ethernet controller: Atheros Communications Atheros AR8132 / L1c Gigabit Ethernet Adapter (rev c0)<br />
02:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)<br />
<br />
===lsusb===<br />
Bus 005 Device 002: ID 0b05:1788 ASUSTek Computer, Inc. <br />
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 001 Device 002: ID 13d3:5119 IMC Networks <br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
<br />
==References==</div>Enyaw ecurbhttps://wiki.archlinux.org/index.php?title=ASUS_Eee_PC_1001px&diff=113820ASUS Eee PC 1001px2010-08-11T21:29:36Z<p>Enyaw ecurb: </p>
<hr />
<div>[[Category:ASUS]]<br />
<br />
==Introduction==<br />
How to install Archlinux on the "Asus Eee PC 1001px". <br />
This article was written for the stock kernel 2.6.34-ARCH. The netbook runs absolutely fine after little configuration.<br />
The same model was sold in Germany under the name "Eee PC R101".<br />
<br />
==Installation==<br />
The netbook probably comes with a 32bit-Windows installed. The Intel Atom 450N however supports x86_64-instructions and 64bit-Arch runs perfectly fine.<br />
<br />
To boot from an USB stick it is neccessary to deactivate the "Boot Booster"-option in the BIOS or otherwise the Asus seems to skip all detection scans and will just boot from harddisk. Press F2 repeatedly during the fortunately short POST to enter the BIOS. Deactivate "Boot Booster" and select "Removable Dev." as 1st boot device. Rem: For me it still was neccessary to press Esc during POST and manually select the USB stick to boot from it. This may be a BIOS-bug (ver. 0403)<br />
<br />
When partitioning you may want to keep the EFI-partition (usually the last, smallest partition). It allows to use the "Boot Booster"-Feature and to jump over certain tests before booting. Don't panic however if you deleted it, the partition may be restored. Look on the eeePC-Forum for it.<br />
<br />
==Sound==<br />
<br />
The soundcard is correctly recognized but alsa does not feature the correct model-option (yet) to setup the rather interesting pin connections. What mostly works is adding<br />
<br />
options indel-hda-snd model=lifebook<br />
<br />
to your <code>/etc/modprobe/modprobe.conf</code>. I did not however get the internal microphone working. The external microphone over the combined audio jack was not tested.<br />
<br />
==Laptop Mode Tools & powersaving==<br />
<br />
The powersaving-mechanisms provided by [[Laptop Mode Tools]] seem to work. <br />
<br />
Standby (Suspend-to-ram) works perfectly fine with hotkey. Hibernate (Suspend-to-disk) was not tested.<br />
<br />
CPU frequency works. After installing [[Cpufrequtils]] and adding <code>acpi-cpufreq</code> to your MODULES in <code>/etc/rc.conf</code> laptop-mode does a perfectly fine job taking care of your frequencies.<br />
<br />
Spinning down the harddrive works.<br />
<br />
Adjusting the brightness of the display works with hotkeys after adding the following to your kernel-boot-options<br />
acpi_osi=Linux acpi_backlight=vendor<br />
I did however not find out how to adjust the brightness manually, eg. per command-line.<br />
<br />
Personal Remark: The overall endurance seems good. While I never actually reached the promised 10h, 8h-9h are possible with dimmed display, 4h while really working with it. The power-saving-support is probably not worse than on windows.<br />
<br />
==Issueless hardware==<br />
===Graphics===<br />
<br />
The integrated GPU (Pineview) is supported with KMS by <code>i915</code> meaning xf86-video-intel.<br />
<br />
===(W)LAN===<br />
<br />
The WLAN-chip is fully supported by <code>ath9k</code> in all three modes of operation (b/g/n).<br />
Ethernet works fine.<br />
<br />
===Input===<br />
<br />
Webcam and Touchpad work. Keyboard also does its job.<br />
<br />
==Hardware information==<br />
<br />
===lspci===<br />
00:00.0 Host bridge: Intel Corporation Pineview DMI Bridge<br />
00:02.0 VGA compatible controller: Intel Corporation Pineview Integrated Graphics Controller<br />
00:02.1 Display controller: Intel Corporation Pineview Integrated Graphics Controller<br />
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)<br />
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)<br />
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)<br />
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)<br />
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)<br />
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)<br />
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02) <br />
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)<br />
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)<br />
00:1f.0 ISA bridge: Intel Corporation Tigerpoint LPC Controller (rev 02)<br />
00:1f.2 SATA controller: Intel Corporation 82801GR/GH (ICH7 Family) SATA AHCI Controller (rev 02)<br />
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)<br />
01:00.0 Ethernet controller: Atheros Communications Atheros AR8132 / L1c Gigabit Ethernet Adapter (rev c0)<br />
02:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)<br />
<br />
===lsusb===<br />
Bus 005 Device 002: ID 0b05:1788 ASUSTek Computer, Inc. <br />
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 001 Device 002: ID 13d3:5119 IMC Networks <br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub</div>Enyaw ecurbhttps://wiki.archlinux.org/index.php?title=ASUS_Eee_PC_1001px&diff=113819ASUS Eee PC 1001px2010-08-11T21:20:54Z<p>Enyaw ecurb: Info for frequency scaling and graphics driver</p>
<hr />
<div>==Introduction==<br />
This article was written for the stock kernel 2.6.34-ARCH. The netbook runs absolutely fine after little configuration.<br />
The same model was sold in Germany under the name "Eee PC R101".<br />
<br />
==Installation==<br />
The netbook probably comes with a 32bit-Windows installed. The Intel Atom 450N however supports x86_64-instructions and 64bit-Arch runs perfectly fine.<br />
<br />
To boot from an USB stick it is neccessary to deactivate the "Boot Booster"-option in the BIOS or otherwise the Asus seems to skip all detection scans and will just boot from harddisk. Press F2 repeatedly during the fortunately short POST to enter the BIOS. Deactivate "Boot Booster" and select "Removable Dev." as 1st boot device. Rem: For me it still was neccessary to press Esc during POST and manually select the USB stick to boot from it. This may be a BIOS-bug (ver. 0403)<br />
<br />
When partitioning you may want to keep the EFI-partition (usually the last, smallest partition). It allows to use the "Boot Booster"-Feature and to jump over certain tests before booting. Don't panic however if you deleted it, the partition may be restored. Look on the eeePC-Forum for it.<br />
<br />
==Sound==<br />
<br />
The soundcard is correctly recognized but alsa does not feature the correct model-option (yet) to setup the rather interesting pin connections. What mostly works is adding<br />
<br />
options indel-hda-snd model=lifebook<br />
<br />
to your <code>/etc/modprobe/modprobe.conf</code>. I did not however get the internal microphone working. The external microphone over the combined audio jack was not tested.<br />
<br />
==Laptop Mode Tools & powersaving==<br />
<br />
The powersaving-mechanisms provided by [[Laptop Mode Tools]] seem to work. <br />
<br />
Standby (Suspend-to-ram) works perfectly fine with hotkey. Hibernate (Suspend-to-disk) was not tested.<br />
<br />
CPU frequency works. After installing [[Cpufrequtils]] and adding <code>acpi-cpufreq</code> to your MODULES in <code>/etc/rc.conf</code> laptop-mode does a perfectly fine job taking care of your frequencies.<br />
<br />
Spinning down the harddrive works.<br />
<br />
Adjusting the brightness of the display works with hotkeys after adding the following to your kernel-boot-options<br />
acpi_osi=Linux acpi_backlight=vendor<br />
I did however not find out how to adjust the brightness manually, eg. per command-line.<br />
<br />
Personal Remark: The overall endurance seems good. While I never actually reached the promised 10h, 8h-9h are possible with dimmed display, 4h while really working with it. The power-saving-support is probably not worse than on windows.<br />
<br />
==Issueless hardware==<br />
===Graphics===<br />
<br />
The integrated GPU (Pineview) is supported with KMS by <code>i915</code> meaning xf86-video-intel.<br />
<br />
===(W)LAN===<br />
<br />
The WLAN-chip is fully supported by <code>ath9k</code> in all three modes of operation (b/g/n).<br />
Ethernet works fine.<br />
<br />
===Input===<br />
<br />
Webcam and Touchpad work. Keyboard also does its job.<br />
<br />
==Hardware information==<br />
<br />
===lspci===<br />
00:00.0 Host bridge: Intel Corporation Pineview DMI Bridge<br />
00:02.0 VGA compatible controller: Intel Corporation Pineview Integrated Graphics Controller<br />
00:02.1 Display controller: Intel Corporation Pineview Integrated Graphics Controller<br />
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)<br />
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)<br />
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)<br />
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)<br />
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)<br />
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)<br />
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02) <br />
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)<br />
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)<br />
00:1f.0 ISA bridge: Intel Corporation Tigerpoint LPC Controller (rev 02)<br />
00:1f.2 SATA controller: Intel Corporation 82801GR/GH (ICH7 Family) SATA AHCI Controller (rev 02)<br />
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)<br />
01:00.0 Ethernet controller: Atheros Communications Atheros AR8132 / L1c Gigabit Ethernet Adapter (rev c0)<br />
02:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)<br />
<br />
===lsusb===<br />
Bus 005 Device 002: ID 0b05:1788 ASUSTek Computer, Inc. <br />
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 001 Device 002: ID 13d3:5119 IMC Networks <br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub</div>Enyaw ecurbhttps://wiki.archlinux.org/index.php?title=ASUS_Eee_PC_1001px&diff=113818ASUS Eee PC 1001px2010-08-11T21:14:17Z<p>Enyaw ecurb: Added installation instruction for said netbook based on relatively fresh personal experience</p>
<hr />
<div>==Introduction==<br />
This article was written for the stock kernel 2.6.34-ARCH. The netbook runs absolutely fine after little configuration.<br />
The same model was sold in Germany under the name "Eee PC R101".<br />
<br />
==Installation==<br />
The netbook probably comes with a 32bit-Windows installed. The Intel Atom 450N however supports x86_64-instructions and 64bit-Arch runs perfectly fine.<br />
<br />
To boot from an USB stick it is neccessary to deactivate the "Boot Booster"-option in the BIOS or otherwise the Asus seems to skip all detection scans and will just boot from harddisk. Press F2 repeatedly during the fortunately short POST to enter the BIOS. Deactivate "Boot Booster" and select "Removable Dev." as 1st boot device. Rem: For me it still was neccessary to press Esc during POST and manually select the USB stick to boot from it. This may be a BIOS-bug (ver. 0403)<br />
<br />
When partitioning you may want to keep the EFI-partition (usually the last, smallest partition). It allows to use the "Boot Booster"-Feature and to jump over certain tests before booting. Don't panic however if you deleted it, the partition may be restored. Look on the eeePC-Forum for it.<br />
<br />
==Sound==<br />
<br />
The soundcard is correctly recognized but alsa does not feature the correct model-option (yet) to setup the rather interesting pin connections. What mostly works is adding<br />
<br />
options indel-hda-snd model=lifebook<br />
<br />
to your <code>/etc/modprobe/modprobe.conf</code>. I did not however get the internal microphone working. The external microphone over the combined audio jack was not tested.<br />
<br />
==Laptop Mode Tools==<br />
<br />
The power-saving-mechanisms provided by [[Laptop Mode Tools]] seem to work. <br />
Standby (Suspend-to-ram) works perfectly fine with hotkey. Hibernate (Suspend-to-disk) was not tested.<br />
CPU frequency works.<br />
Spinning down the harddrive works.<br />
Adjusting the brightness of the display works with hotkeys after adding the following to your kernel-boot-options<br />
acpi_osi=Linux acpi_backlight=vendor<br />
I did however not find out how to adjust the brightness manually, eg. per command-line.<br />
Personal Remark: The overall endurance seems good. While I never actually reached the promised 10h, 8h-9h are possible with dimmed display, 4h while really working with it. The power-saving-support is probably not worse than on windows.<br />
<br />
==Issueless hardware==<br />
===Graphics===<br />
<br />
The integrated GPU (Pineview) is supported with KMS by <code>i915</code>.<br />
<br />
===(W)LAN===<br />
<br />
The WLAN-chip is fully supported by <code>ath9k</code> in all three modes of operation (b/g/n).<br />
Ethernet also works fine.<br />
<br />
===Input===<br />
<br />
Webcam and Touchpad work. Keyboard also does its job.<br />
<br />
==Hardware information==<br />
<br />
===lspci===<br />
00:00.0 Host bridge: Intel Corporation Pineview DMI Bridge<br />
00:02.0 VGA compatible controller: Intel Corporation Pineview Integrated Graphics Controller<br />
00:02.1 Display controller: Intel Corporation Pineview Integrated Graphics Controller<br />
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)<br />
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)<br />
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)<br />
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)<br />
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)<br />
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)<br />
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02) <br />
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)<br />
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)<br />
00:1f.0 ISA bridge: Intel Corporation Tigerpoint LPC Controller (rev 02)<br />
00:1f.2 SATA controller: Intel Corporation 82801GR/GH (ICH7 Family) SATA AHCI Controller (rev 02)<br />
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)<br />
01:00.0 Ethernet controller: Atheros Communications Atheros AR8132 / L1c Gigabit Ethernet Adapter (rev c0)<br />
02:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)<br />
<br />
===lsusb===<br />
Bus 005 Device 002: ID 0b05:1788 ASUSTek Computer, Inc. <br />
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 001 Device 002: ID 13d3:5119 IMC Networks <br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub</div>Enyaw ecurbhttps://wiki.archlinux.org/index.php?title=Advanced_Linux_Sound_Architecture&diff=112097Advanced Linux Sound Architecture2010-07-16T15:17:36Z<p>Enyaw ecurb: Note that alsaequal-64bit does not work with flashplugin-32bit, hence no sound in flash</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|ALSA|Advanced Linux Sound Architecture}}<br />
<br />
The Advanced Linux Sound Architecture (ALSA) is a Linux kernel component intended to provide device drivers for sound cards. <br />
<br />
Also see how to [[Allow_multiple_programs_to_play_sound_at_once|allow multiple programs to play sound at once]]<br />
<br />
{{Note|For an alternative sound environment, see the [[Open Sound System]] page.}}<br />
<br />
==Installation==<br />
===Kernel drivers===<br />
<br />
ALSA has been included in the 2.6 kernels and is included in all Arch '''kernel26*''' packages. If you build a custom kernel, do not forget to enable the correct ALSA driver.<br />
<br />
All necessary modules should be detected and loaded automatically by udev. No special configuration is required unless an ISA card is being used. '''NEVER''' use alsaconf if you have a PCI or ISAPNP sound card, as the entries alsaconf adds to the modprobe.conf file might break udev's autodetection.<br />
<br />
===Userspace utilities===<br />
<br />
* Required for native ALSA programs and administration<br />
# pacman -S alsa-utils<br />
* Recommended if you want to use applications with OSS sound support in combination with dmix:<br />
# pacman -S alsa-oss<br />
<br />
All ALSA programs will most likely have alsa-lib as a dependency, pacman will handle this automatically.<br />
<br />
==Configuration==<br />
===Set the default sound card===<br />
<br />
Telephony-capable modems and snd-pcsp (the internal PC speaker ALSA module) can conflict with the sound card for the default sound card slot. (pcspkr is another, non-ALSA PC speaker module. It will not conflict with ALSA sound cards.) To prevent this, discover your sound card model name with [http://linux.die.net/man/8/lspci lspci(8)] and your ALSA driver module names with ls(1):<br />
<br />
$ ls -l /sys/module/snd/holders<br />
total 0<br />
lrwxrwxrwx 1 root root 0 2009-06-02 23:49 snd_ac97_codec -> ../../snd_ac97_codec<br />
lrwxrwxrwx 1 root root 0 2009-06-02 23:49 snd_intel8x0 -> ../../snd_intel8x0<br />
lrwxrwxrwx 1 root root 0 2009-06-02 23:49 snd_intel8x0m -> ../../snd_intel8x0m<br />
lrwxrwxrwx 1 root root 0 2009-06-02 23:49 snd_pcm -> ../../snd_pcm<br />
lrwxrwxrwx 1 root root 0 2009-06-02 23:53 snd_pcsp -> ../../snd_pcsp<br />
lrwxrwxrwx 1 root root 0 2009-06-02 23:49 snd_timer -> ../../snd_timer<br />
<br />
Then add the names of your sound card modules to:<br />
<br />
{{file |name=/etc/modprobe.d/modprobe.conf (prior to module-init-tools 3.8, use /etc/modprobe.conf) |content=<br />
options snd-intel8x0 index=0<br />
options snd-pcsp index=1<br />
}}<br />
<br />
These entries ensure that the Intel 82801DB-ICH4 sound card will become card 0 and the PC speaker will become card 1.<br />
NB: Some modules do not support indexing options eg. snd-hda-intel. If you experience problems on on reboot edit /etc/modprobe.d/modprobe.conf to just have the modules.<br />
<br />
If you do not want snd-pcsp to load at all you can add the following to:<br />
<br />
{{file |name=/etc/rc.conf |content=MODULES=(... !snd-pcsp)<br />
}}<br />
<br />
If you want the PC speaker completely disabled, you can additionally add the following to:<br />
<br />
{{file |name=/etc/rc.conf |content=MODULES=(... !pcspkr)<br />
}}<br />
<br />
<br />
{{Note| You will need to unload all your sound modules and reload them for the changes to take effect. It might be easier to reboot. Your choice. }}<br />
<br />
===Making sure the sound modules are loaded===<br />
<br />
You can assume that udev will autodetect your sound properly, including the OSS compatibility modules. You can check this with the command<br />
<br />
$ lsmod|grep '^snd' | column -t<br />
snd_usb_audio 69696 0 <br />
snd_usb_lib 13504 1 snd_usb_audio<br />
snd_rawmidi 20064 1 snd_usb_lib<br />
snd_hwdep 7044 1 snd_usb_audio<br />
snd_seq_oss 29412 0 <br />
snd_seq_midi_event 6080 1 snd_seq_oss<br />
snd_seq 46220 4 snd_seq_oss,snd_seq_midi_event<br />
snd_seq_device 6796 3 snd_rawmidi,snd_seq_oss,snd_seq<br />
snd_pcm_oss 45216 0 <br />
snd_mixer_oss 15232 1 snd_pcm_oss<br />
snd_intel8x0 27932 0 <br />
snd_ac97_codec 87648 1 snd_intel8x0<br />
snd_ac97_bus 1792 1 snd_ac97_codec<br />
snd_pcm 76296 4 snd_usb_audio,snd_pcm_oss,snd_intel8x0,snd_ac97_codec<br />
snd_timer 19780 2 snd_seq,snd_pcm<br />
snd 43776 12 snd_usb_audio,snd_rawmidi,snd_hwdep,snd_seq_oss,snd_seq,snd_seq_device,<br />
snd_pcm_oss,snd_mixer_oss,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer<br />
snd_page_alloc 7944 2 snd_intel8x0,snd_pcm<br />
<br />
If the output looks similar, your sound drivers have been successfully autodetected (note that in this case, snd_intel8x0 and snd_usb_audio are the drivers for the hardware devices). You might also want to check the directory '''/dev/snd''' for the right device files:<br />
<br />
$ ls -l /dev/snd<br />
total 0<br />
crw-rw---- 1 root audio 116, 0 Apr 8 14:17 controlC0<br />
crw-rw---- 1 root audio 116, 32 Apr 8 14:17 controlC1<br />
crw-rw---- 1 root audio 116, 24 Apr 8 14:17 pcmC0D0c<br />
crw-rw---- 1 root audio 116, 16 Apr 8 14:17 pcmC0D0p<br />
crw-rw---- 1 root audio 116, 25 Apr 8 14:17 pcmC0D1c<br />
crw-rw---- 1 root audio 116, 56 Apr 8 14:17 pcmC1D0c<br />
crw-rw---- 1 root audio 116, 48 Apr 8 14:17 pcmC1D0p<br />
crw-rw---- 1 root audio 116, 1 Apr 8 14:17 seq<br />
crw-rw---- 1 root audio 116, 33 Apr 8 14:17 timer<br />
<br />
If you have at least the devices '''controlC0''' and '''pcmC0D0p''' or similar, then your sound modules have been detected and loaded properly.<br />
<br />
If this is not the case, your sound modules have not been detected properly. '''If you want any help on IRC or the forums, please post the output of the above commands.''' To solve this, you can try loading the modules manually:<br />
<br />
* Locate the module for your soundcard: [http://www.alsa-project.org/main/index.php/Matrix:Main ALSA Soundcard Matrix] The module will be prefixed with 'snd-' (for example: 'snd-via82xx').<br />
* Load modules:<br />
# modprobe snd-NAME-OF-MODULE<br />
# modprobe snd-pcm-oss<br />
* Check for the device files in '''/dev/snd''' (see above) and/or try if '''alsamixer''' or '''amixer''' have reasonable output.<br />
* Add '''snd-NAME-OF-MODULE''' and '''snd-pcm-oss''' to the list of MODULES in {{Filename|/etc/rc.conf}} to ensure they are loaded next time (make sure '''snd-NAME-OF-MODULE''' is before '''snd-pcm-oss''').<br />
<br />
===Unmute the channels and test===<br />
<br />
In this section, we assume that you are logged in as root. If you want to perform these steps as an unprivileged user, you have to skip to the next section ''Setup Permissions'' first.<br />
<br />
* Unmute Soundcard<br />
<br />
The current version of ALSA installs with all channels '''muted by default''', so even if installation completes successfully and all devices are working properly you will hear no sound. You will need to unmute the channels manually. It is recommended to use {{Codeline|alsamixer}} to accomplish this. From the alsamixer text ui, the label "MM" below a channel indicates that the channel is muted, and "00" indicates that it is open. Press the 'm' key to toggle MM/00. Use arrow-keys left and right to navigate through the channels and the arrow-keys up and down to adjust the volume. Such things as Master and PCM and possibly Speaker will need to unmuted for your sound to work.<br />
<br />
{{Note | When using '''{{Codeline|amixer}}''', be sure to '''unmute''' as well as bring volumes up to a specific level in percent, i.e you need to use that % sign. '''{{Codeline|amixer}}''' understands the percent sign (%), not numbers. If you use a number (say, 90) then '''{{Codeline|amixer}}''' will take it as 100%, which can harm your speakers.}}<br />
<br />
# amixer set Master 90% unmute<br />
# amixer set PCM 85% unmute<br />
<br />
* Try to play a WAV file<br />
<br />
# aplay /usr/share/sounds/alsa/Front_Center.wav<br />
<br />
{{Note | Some cards need to have digital output muted/turned off in order to hear analog sound. For the Soundblaster Audigy LS mute the IEC958 channel.}}<br />
<br />
If you cannot hear anything, double check your mixer settings, being sure to unmute PCM, MASTER (and some machines such as the IBM Thinkpad have an additional 'SPEAKER' channel) and try the alsaconf utility as root:<br />
# alsaconf<br />
<br />
* [[Allow multiple programs to play sound at once]]<br />
<br />
===Setup Permissions===<br />
<br />
To be able to use the sound card as a user, follow these steps:<br />
<br />
* Add your user to the audio group:<br />
# gpasswd -a USERNAME audio<br />
<br />
* Log your user out and back in to ensure the audio group is loaded.<br />
<br />
===Restore ALSA Mixer settings at startup===<br />
<br />
* Run {{Codeline|alsactl store}} once to create {{Filename|/etc/asound.state}}.<br />
<br />
# alsactl store<br />
<br />
* Edit {{Filename|/etc/[[rc.conf]]}} and add {{Codeline|"alsa"}} to the list of daemons to start on boot-up. This will store the mixer settings on every shutdown and restore them when you boot.<br />
<br />
* If the mixer settings are not loaded on boot-up, add the following line to {{Filename|/etc/rc.local}}:<br />
<br />
# alsactl restore<br />
<br />
* These methods still may not work, or you may prefer to have audio settings for individual users. In this case, run {{Codeline|alsactl store -f ~/.asoundrc}} as a normal user. This will save and restore volume settings on a per user basis. To automate this process, add the respective commands to {{Filename|~/.bash_login}} and {{Filename|~/.bash_logout}}, or the correct locations for the shell of your choice.<br />
<br />
For zsh, use {{Filename|~/.zlogin}} and {{Filename|~/.zlogout}}.<br />
<br />
===Getting SPDIF Output===<br />
<br />
(from gralves from the Gentoo forums)<br />
* In GNOME Volume Control, under the Options tab, change the IEC958 to PCM. This option can be enabled in the preferences.<br />
* If you don't have GNOME Volume Control installed,<br />
** Edit /etc/asound.state. This file is where alsasound stores your mixer settings.<br />
** Find a line that says: 'IEC958 Playback Switch'. Near it you will find a line saying value:false. Change it to value:true.<br />
** Now find this line: 'IEC958 Playback AC97-SPSA'. Change its value to 0.<br />
** Restart ALSA.<br />
<br />
Alternative way to enable SPDIF output automatically on login (tested on SoundBlaster Audigy):<br />
<br />
* add following lines to {{Filename|/etc/rc.local}}:<br />
# Use COAX-digital output<br />
amixer set 'IEC958 Optical' 100 unmute<br />
amixer set 'Audigy Analog/Digital Output Jack' on<br />
<br />
You can see the name of your card's digital output with:<br />
$ amixer scontrols<br />
<br />
===Switching Audio Devices on Per-User Basis===<br />
<br />
Located in {{Filename|/usr/share/alsa/alsa.conf}} is a list of defaults that alsa uses out of the box. These can be overridden on a per-user basis in your {{Filename|~/.asoundrc}} file.<br />
{{File|name=~/.asoundrc|content=<br />
defaults.ctl.card 1<br />
defaults.pcm.card 1<br />
defaults.pcm.device 1}}<br />
The 'pcm' options affect which card and device will be used for audio playback. However it is the 'ctl' option affects which card is used by control utilities like alsamixer, amixer, and the like.<br />
<br />
To find out which numbers correspond to what audio device, use {{Codeline|aplay -l}}.<br />
$ aplay -l<br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: Intel [HDA Intel], device 1: Conexant Digital [Conexant Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 1: JamLab [JamLab], device 0: USB Audio [USB Audio]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 2: Audio [Altec Lansing XT1 - USB Audio], device 0: USB Audio [USB Audio]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
<br />
===System-Wide Equalizer===<br />
====Using AlsaEqual (provides UI)====<br />
<br />
Install [http://aur.archlinux.org/packages.php?ID=27066 alsaequal] from the [[AUR]].<br />
<br />
{{Note | If you have a x86_64-system and are using a 32bit-flashplugin the sound in flash will not work. Either you have to disable alsaequal or build alsaequal for 32bit.}}<br />
<br />
After installing package Insert the following into your ALSA configuration file ({{Filename|~/.asoundrc}} or {{Filename|/etc/asound.conf}}):<br />
<br />
ctl.equal {<br />
type equal;<br />
}<br />
<br />
pcm.plugequal {<br />
type equal;<br />
# Modify the line below if you don't<br />
# want to use sound card 0.<br />
#slave.pcm "plughw:0,0";<br />
#by default we want to play from more sources at time:<br />
slave.pcm "plug:dmix";<br />
}<br />
<br />
#pcm.equal {<br />
# Or if you want the equalizer to be your<br />
# default soundcard uncomment the following<br />
# line and comment the above line.<br />
pcm.!default {<br />
type plug;<br />
slave.pcm plugequal;<br />
}<br />
<br />
<br />
Then Reload your alsa settings (as root).<br />
# /etc/rc.d/alsa restart<br />
not sure if this is really needed - more important is to shut down all applications using ALSA...<br />
<br />
And you are ready to change your equalizer using command<br />
$ alsamixer -D equal<br />
<br />
Note that configuration file is different for each user (until not specified else) it's saved in '''$HOME/.alsaequal.bin'''.<br />
so if you want to use AlsaEqual with [[mpd]] or another software running under different user, you can configure it using<br />
# su mpd -c 'alsamixer -D equal'<br />
or eg. you can make symlink to your '''.alsaequal.bin''' in his home...<br />
<br />
====Using mbeq====<br />
{{Note | This method requires the use of a ladspa plugin which might use quite a bit of CPU when sound plays. In addition, this was made with stereophonic sound (e.g. headphones) in mind.}}<br />
<br />
* You will need, in addition to the aforementioned userspace utilities, alsa-plugins.<br />
# pacman -S alsa-plugins<br />
* Get the ladspa and swh-plugins packages too if you don't already have them.<br />
# pacman -S ladspa swh-plugins<br />
* If you haven't already created either an {{Filename|~/.asoundrc}} or a {{Filename|/etc/asound.conf}} file, then create either one<br />
$ vim ~/.asoundrc<br />
* Insert the following into your ALSA configuration file ({{Filename|~/.asoundrc}} or {{Filename|/etc/asound.conf}}):<br />
<br />
{{file |name=/etc/asound.conf |content=pcm.eq {<br />
type ladspa<br><br />
# The output from the EQ can either go direct to a hardware device<br />
# (if you have a hardware mixer, e.g. SBLive/Audigy) or it can go<br />
# to the software mixer shown here.<br />
#slave.pcm "plughw:0,0"<br />
slave.pcm "plug:dmix"<br><br />
# Sometimes you may need to specify the path to the plugins,<br />
# especially if you've just installed them. Once you've logged<br />
# out/restarted this shouldn't be necessary, but if you get errors<br />
# about being unable to find plugins, try uncommenting this.<br />
#path "/usr/lib/ladspa"<br><br />
plugins [<br />
{<br />
label mbeq<br />
id 1197<br />
input {<br />
#this setting is here by example, edit to your own taste<br />
#bands: 50hz, 100hz, 156hz, 220hz, 311hz, 440hz, 622hz, 880hz, 1250hz, 1750hz, 25000hz,<br />
#50000hz, 10000hz, 20000hz<br />
controls [ -5 -5 -5 -5 -5 -10 -20 -15 -10 -10 -10 -10 -10 -3 -2 ]<br />
}<br />
}<br />
]<br />
}<br><br />
# Redirect the default device to go via the EQ - you may want to do<br />
# this last, once you're sure everything is working. Otherwise all<br />
# your audio programs will break/crash if something has gone wrong.<br><br />
pcm.!default {<br />
type plug<br />
slave.pcm "eq"<br />
}<br><br />
# Redirect the OSS emulation through the EQ too (when programs are running through "aoss")<br><br />
pcm.dsp0 {<br />
type plug<br />
slave.pcm "eq"<br />
}<br />
}}<br />
<br />
*Reload your alsa settings (as root).<br />
# /etc/rc.d/alsa restart<br />
<br />
*You should be good to go (if not, ask in the forum).<br />
<br />
==Troubleshooting==<br />
===Model Settings===<br />
<br />
Although Alsa detects your soundcard through the BIOS at times Alsa may not be able to recognize your [http://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio-Models.txt model type]. The soundcard chip can be found in <code>alsamixer</code> (e.g. ALC662) and the model can be set in {{Filename|/etc/modprobe.d/modprobe.conf}}. For example:<br />
<br />
options snd-hda-intel model=MODEL<br />
<br />
There are other model settings too. For most cases Alsa defaults will do. If you want to look at more specific settings for your soundcard take a look at the [http://bugtrack.alsa-project.org/main/index.php/Matrix:Main Alsa Soundcard List] find your model, then Details, then look at the "Setting up modprobe..." section. Enter these values in {{Filename|/etc/modprobe.d/modprobe.conf}}. For example, for an Intel AC97 audio:<br />
<br />
<pre># ALSA portion<br />
alias char-major-116 snd<br />
alias snd-card-0 snd-intel8x0<br />
# module options should go here<br />
<br />
# OSS/Free portion<br />
alias char-major-14 soundcore<br />
alias sound-slot-0 snd-card-0<br />
<br />
# card #1<br />
alias sound-service-0-0 snd-mixer-oss<br />
alias sound-service-0-1 snd-seq-oss<br />
alias sound-service-0-3 snd-pcm-oss<br />
alias sound-service-0-8 snd-seq-oss<br />
alias sound-service-0-12 snd-pcm-oss</pre><br />
<br />
===Conflicting PC Speaker===<br />
<br />
Remember, ALSA installs with all channels '''muted by default''' (see previous section, [[Advanced Linux Sound Architecture#Unmute the channels and test|unmuting your soundcard]]).<br />
<br />
However, if you're sure nothing is muted, that your drivers are installed correctly, and that your volume is right, but you still do not hear anything, then try blacklisting snd-pcsp from your modules array in rc.conf:<br />
<br />
MODULES=(!snd-pcsp ... )<br />
<br />
Note that this will disable your PC's internal speaker.<br />
If that doesn't work, then try adding the following line to <code>/etc/modprobe.d/modprobe.conf</code>:<br />
<br />
options snd-NAME-OF-MODULE ac97_quirk=0<br />
<br />
The above fix has been observed to work with <code>via82xx</code><br />
options snd-NAME-OF-MODULE ac97_quirk=1<br />
The above fix has been reported to work with <code>snd_intel8x0</code><br />
<br />
===No Microphone Input===<br />
<br />
First of all, make sure that the microphone really doesn't work.<br />
Run these commands:<br />
arecord -d 5 test-mic.wav<br />
aplay test-mic.wav<br />
<br />
You may want to see arecord's man page to play with it a little bit.<br />
Anyway, if you are unable to hear anything, your microphone is not working.<br />
<br />
Some programs use try to use OSS as the main input software. Add the following line to <code>/etc/rc.conf</code> to prevent OSS modules from being loaded:<br />
<br />
MODULES=(!snd_pcm_oss !snd_mixer_oss !snd_seq_oss ... )<br />
<br />
===Internal Microphone not working===<br />
<br />
First make sure all the volume levels are up under recording in alsamixer. In my case adding the following option to /etc/sound.conf and reloading the snd-* module produced a new volume setting called Capture which was capturing for the internal mic. For eg, for snd-hda-intel add <br />
<br />
options snd-hda-intel enable_msi=1<br />
<br />
Then reload the module (as below), up the recording volume of Capture and then test.<br />
<br />
rmmod snd-hda-intel<br />
modprobe snd-hda-intel<br />
<br />
===No Sound with Onboard Intel Sound Card===<br />
<br />
There may be an issue with two conflicting modules loaded, namely <code>snd_intel8x0</code> and <code>snd_intel8x0m</code>. In this case, edit <code>rc.conf</code> and in the MODULES array blacklist the latter one so that it reads <code>!snd_intel8x0m</code> afterwards.<br />
<br />
''Muting'' the "External Amplifier" in <code>alsamixer</code> or <code>amixer</code> may also help. See [http://alsa.opensrc.org/index.php/Intel8x0#Dell_Inspiron_8600_.28and_probably_others.29 the ALSA wiki].<br />
<br />
With '''Intel Corporation 82801 I (ICH9 Family) HD Audio Controller''' on laptop, you may need to add this line to<br />
<br />
/etc/modprobe.d/sound.conf<br />
options snd-hda-intel model=laptop<br />
<br />
or<br />
options snd-hda-intel model=laptop enable=1 index=0<br />
<br />
Otherwise, the pcspkr may not work, and only the headphone have sound.<br />
<br />
===Poor Sound Quality===<br />
<br />
If you experience poor sound quality, try setting the PCM volume (in alsamixer) to a level such that gain is 0.<br />
<br />
===Pops When Starting and Stopping Playback===<br />
<br />
Some modules can power off your sound card when not in use. this can make an audible noise when powering down your sound card. If you find this annoying try "modinfo snd-MY-MODULE", and look for a module option that adjusts or disables this feature. <br />
<br />
for example: to disable the power saving mode using snd-hda-intel add "options snd-hda-intel power_save=0" in /etc/modprobe.d/modprobe.conf. or try it with "modprobe snd-hda-intel power_save=0"<br />
<br />
===Alsamixer Does Not Run===<br />
<br />
If running alsamixer does not work and you wind up with the following error<br />
alsamixer: function snd_ctl_open failed for default: No such device or directory<br />
<br />
You should first check /etc/group to ensure that your current user is in the 'audio' group. Don't forget to log out and log in again for the group changes.<br />
<br />
Then you might need to re-install your kernel. Run 'pacman -S kernel26' or whichever patchset you prefer to use.<br />
<br />
===S/PDIF Output Does Not Work===<br />
<br />
If the optical/coaxial digital output of your motherboard/sound card is not working or stopped working, and have already enabled and unmuted it in alsamixer, try running<br />
iecset audio on<br />
<br />
as root.<br />
<br />
You can also put this command in rc.local as it sometimes it may stop working after a reboot.<br />
<br />
===HDMI Output Does Not Work===<br />
<br />
If the HDMI output of your motherboard/sound card is not working or stopped working, and have already enabled and unmuted it in alsamixer, try the following.<br />
<br />
Query for Playback Devices:<br />
<br />
% aplay -l<br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: NVidia [HDA NVidia], device 0: ALC1200 Analog [ALC1200 Analog]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: NVidia [HDA NVidia], device 1: ALC1200 Digital [ALC1200 Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]<br />
Subdevices: 0/1<br />
Subdevice #0: subdevice #0<br />
<br />
Now that we have the info for the HDMI device, try a test, In the example below, 0 is the card number and 3 is the device number.<br />
<br />
% aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Center.wav<br />
<br />
If aplay does not output any errors, but still no sound is heared, "reboot" the receiver, monitor or tv set. Since the HDMI interface executes a handshake on connection, it might have noticed before that there was no audio stream embedded, and disabled audio decoding.<br />
<br />
If the test is successful, edit/create asound.conf in /etc to set HDMI as the default audio device, reboot, and audio should now work. There might be a better way to do this??<br />
<br />
% cat /etc/asound.conf<br />
pcm.!default {<br />
type plug<br />
slave.pcm {<br />
type hw<br />
card 0<br />
device 3<br />
}<br />
}<br />
<br />
If the this inconclusive<br />
<br />
===No Adjustable PCM Channel===<br />
<br />
You may find that you lack adjustable PCM channel. In this case try to remove all sound-related stuff from MODULES section in /etc/rc.conf, except for snd-NAME-OF-MODULE and snd-pcm-oss.<br />
<br />
===HP TX2500===<br />
<br />
Add these 2 lines into {{Filename|/etc/modprobe.d/modprobe.conf}}:<br />
options snd-cmipci mpu_port=0x330 fm_port=0x388<br />
options snd-hda-intel index=0 model=toshiba position_fix=1<br />
<br />
And don't forget to enable 'hal' in the DAEMONS section of your {{Filename|/etc/rc.conf}}.<br />
<br />
options snd-hda-intel model=hp (works for tx2000cto)<br />
<br />
===Skipping Sound When Playing MP3===<br />
<br />
If you have sound skipping when playing MP3 files and you have more then 2 speakers attached to your computer (i.e. > 2 speaker system), run alsamixer and disable the channels for the speakers that you '''DON'T''' have (i.e. don't enable the sound for the center speaker if you don't have a center speaker.<br />
<br />
===Using a USB Headset and External USB Sound Cards===<br />
<br />
If you are using a USB headset with ALSA you can try using asoundconf (currently only available from the AUR) to set the headset as the primary sound output. ''note: before running please make sure you have usb audio module enabled<br />
#modprobe snd-usb-audio<br />
<br />
you can add this to /etc/rc.conf if you wish''<br />
<br />
# asoundconf is-active<br />
# asoundconf list<br />
# asoundconf set-default-card <chosen soundcard><br />
<br />
===KDE Settings===<br />
<br />
* Start up KDE:<br />
# startx<br />
<br />
* Set up the volumes as you want them for this user (each user has their own settings):<br />
# alsamixer<br />
<br />
Log out and log back in as user xyz to get sound to work (I had to kill X, logout then log back in as user xyz, then start X and open Firefox and bam audio working on YouTube)<br />
<br />
* '''KDE 3.3:''' Go to ''K Menu &rarr; Multimedia &rarr; KMix''<br />
** Choose ''Settings &rarr; Configure KMix...''<br />
** Uncheck the option "Restore volumes on logon"<br />
** Press OK, and you should be all set. Now your volumes will be the same from the command line or within KDE.<br />
<br />
===Error 'Unkown hardware' Appears After a Kernel Update===<br />
<br />
The following messages may be displayed during the start-up ALSA after the kernel update:<br />
Unknown hardware "foo" "bar" ...<br />
Hardware is initialized using a guess method<br />
/usr/sbin/alsactl: set_control:nnnn:failed to obtain info for control #mm (No such file or directory)<br />
<br />
Then, try to store ALSA mixer settings again:<br />
# alsactl store<br />
<br />
===HDA Analyzer===<br />
<br />
If the mappings to your audio pins(plugs) do not correspond but ALSA works fine, you could try HDA Analyzer -- a pyGTK2 GUI for HD-audio control can be found [http://www.alsa-project.org/main/index.php/HDA_Analyzer at the ALSA wiki].<br />
Try tweaking the Widget Control section of the PIN nodes, to make microphones IN and headphone jacks OUT. Referring to the Config Defaults heading is a good idea.<br />
<br />
===Beep system===<br />
<br />
If you have this annoying beep every time you use backspace or when you run halt/reboot from X, just run the following commands.<br />
# amixer set Beep 0% mute<br />
# alsactl store<br />
<br />
After that, you can remove<br />
xset -b<br />
from your ~/.xinitrc and<br />
MODULES=(!pcspkr !snd-pcsp)<br />
from /etc/rc.conf (only if you used them for solving your beep problem).<br />
<br />
==Example configurations==<br />
The following should serve as a guide for more advanced setups. The configuration takes place in /etc/asound.conf as mentioned earlier in this article. None of the following configurations are guaranteed to be working. <br />
<br />
===Upmixing of stereo sources to 7.1 using dmix while saturated sources do not get upmixed===<br />
# 2008-11-15<br />
#<br />
# This .asoundrc will allow the following:<br />
#<br />
# - upmix stereo files to 7.1 speakers.<br />
# - playback real 7.1 sounds, on 7.1 speakers,<br />
# - allow the playback of both stereo (upmixed) and surround(7.1) sources at the same time.<br />
# - use the 6th and 7th channel (side speakers) as a separate soundcard, i.e. for headphones<br />
# (This is called the "alternate" output throughout the file, device names prefixed with 'a')<br />
# - play mono sources in stereo (like skype & ekiga) on the alterate output<br />
#<br />
# Make sure you have "8 Channels" and NOT "6 Channels" selected in alsamixer!<br />
#<br />
# Please try the following commands, to make sure everything is working as it should.<br />
#<br />
# To test stereo upmix : speaker-test -c2 -Ddefault -twav<br />
# To test surround(5.1): speaker-test -c6 -Dplug:dmix6 -twav<br />
# To test surround(7.1): speaker-test -c6 -Dplug:dmix8 -twav<br />
# To test alternative output: speaker-test -c2 -Daduplex -twav<br />
# To test mono upmix: speaker-test -c1 -Dmonoduplex -twav<br />
#<br />
#<br />
# It may not work out of the box for all cards. If it doesnt work for you, read the comments throughout the file.<br />
# The basis of this file was written by wishie of #alsa, and then modified with info from various sources by <br />
# squisher. Svenstaro modified it for 7.1 output support.<br />
<br />
#Define the soundcard to use<br />
pcm.snd_card {<br />
type hw<br />
card 0<br />
device 0<br />
}<br />
<br />
# 8 channel dmix - output whatever audio, to all 8 speakers<br />
pcm.dmix8 {<br />
type dmix<br />
ipc_key 1024<br />
ipc_key_add_uid false<br />
ipc_perm 0660<br />
slave {<br />
pcm "snd_card"<br />
rate 48000<br />
channels 8<br />
period_time 0<br />
period_size 1024<br />
buffer_time 0<br />
buffer_size 5120<br />
}<br />
<br />
# Some cards, like the "nforce" variants require the following to be uncommented. <br />
# It routes the audio to the correct speakers.<br />
# bindings {<br />
# 0 0<br />
# 1 1<br />
# 2 4<br />
# 3 5<br />
# 4 2<br />
# 5 3<br />
# 6 6<br />
# 7 7<br />
# }<br />
}<br />
<br />
# upmixing - duplicate stereo data to all 8 channels<br />
pcm.ch71dup {<br />
type route<br />
slave.pcm dmix8<br />
slave.channels 8<br />
ttable.0.0 1<br />
ttable.1.1 1<br />
ttable.0.2 1<br />
ttable.1.3 1<br />
ttable.0.4 0.5<br />
ttable.1.4 0.5<br />
ttable.0.5 0.5<br />
ttable.1.5 0.5<br />
ttable.0.6 1<br />
ttable.1.7 1<br />
}<br />
<br />
# this creates a six channel soundcard<br />
# and outputs to the eight channel one<br />
# i.e. for usage in mplayer I had to define in ~/.mplayer/config:<br />
# ao=alsa:device=dmix6<br />
# channels=6<br />
pcm.dmix6 {<br />
type route<br />
slave.pcm dmix8<br />
slave.channels 8<br />
ttable.0.0 1<br />
ttable.1.1 1<br />
ttable.2.2 1<br />
ttable.3.3 1<br />
ttable.4.4 1<br />
ttable.5.5 1<br />
ttable.6.6 1<br />
ttable.7.7 1<br />
}<br />
<br />
# share the microphone, i.e. because virtualbox grabs it by default<br />
pcm.microphone {<br />
type dsnoop<br />
ipc_key 1027<br />
slave {<br />
pcm "snd_card"<br />
}<br />
}<br />
<br />
# rate conversion, needed i.e. for wine<br />
pcm.2chplug {<br />
type plug<br />
slave.pcm "ch71dup"<br />
}<br />
pcm.a2chplug {<br />
type plug<br />
slave.pcm "dmix8"<br />
}<br />
<br />
# routes the channel for the alternative<br />
# 2 channel output, which becomes the 7th and 8th channel <br />
# on the real soundcard<br />
#pcm.alt2ch {<br />
# type route<br />
# slave.pcm "a2chplug"<br />
# slave.channels 8<br />
# ttable.0.6 1<br />
# ttable.1.7 1<br />
#}<br />
<br />
# skype and ekiga are only mono, so route left channel to the right channel<br />
# note: this gets routed to the alternative 2 channels<br />
pcm.mono_playback {<br />
type route<br />
slave.pcm "a2chplug"<br />
slave.channels 8<br />
# Send Skype channel 0 to the L and R speakers at full volume<br />
#ttable.0.6 1<br />
#ttable.0.7 1<br />
}<br />
<br />
# 'full-duplex' device for use with aoss<br />
pcm.duplex {<br />
type asym<br />
playback.pcm "2chplug"<br />
capture.pcm "microphone"<br />
}<br />
<br />
#pcm.aduplex {<br />
# type asym<br />
# playback.pcm "alt2ch"<br />
# capture.pcm "microphone"<br />
#}<br />
<br />
pcm.monoduplex {<br />
type asym<br />
playback.pcm "mono_playback"<br />
capture.pcm "microphone"<br />
}<br />
<br />
# for aoss<br />
pcm.dsp0 "duplex"<br />
ctl.mixer0 "duplex"<br />
<br />
# softvol manages volume in alsa<br />
# i.e. wine likes this<br />
pcm.mainvol {<br />
type softvol<br />
slave.pcm "duplex"<br />
control {<br />
name "2ch-Upmix Master"<br />
card 0<br />
}<br />
}<br />
<br />
#pcm.!default "mainvol"<br />
<br />
# set the default device according to the environment<br />
# variable ALSA_DEFAULT_PCM and default to mainvol<br />
pcm.!default {<br />
@func refer<br />
name { @func concat <br />
strings [ "pcm."<br />
{ @func getenv<br />
vars [ ALSA_DEFAULT_PCM ]<br />
default "mainvol"<br />
}<br />
]<br />
}<br />
}<br />
<br />
# uncomment the following if you want to be able to control<br />
# the mixer device through environment variables as well<br />
#ctl.!default {<br />
# @func refer<br />
# name { @func concat <br />
# strings [ "ctl."<br />
# { @func getenv<br />
# vars [ ALSA_DEFAULT_CTL<br />
# ALSA_DEFAULT_PCM<br />
# ]<br />
# default "duplex"<br />
# }<br />
# ]<br />
# }<br />
#}<br />
<br />
===Surround51 incl. upmix stereo & dmix, swap L/R, bad speaker position in room===<br />
<br />
Bad practice but works fine for almost everything without additional per-program/file customization:<br />
pcm.!default {<br />
type route<br />
## forwards to the mixer pcm defined below<br />
slave.pcm dmix51<br />
slave.channels 6<br />
<br />
## "Native Channels" stereo, swap left/right<br />
ttable.0.1 1<br />
ttable.1.0 1<br />
## original normal left/right commented out<br />
# ttable.0.0 1<br />
# ttable.1.1 1<br />
<br />
## route "native surround" so it still works but weaken signal (+ RL/RF swap) <br />
## because my rear speakers are more like random than really behind me<br />
ttable.2.3 0.7<br />
ttable.3.2 0.7<br />
ttable.4.4 0.7<br />
ttable.5.5 0.7<br />
<br />
## stereo => quad speaker "upmix" for "rear" speakers + swap L/R<br />
ttable.0.3 1<br />
ttable.1.2 1<br />
<br />
## stereo L+R => join to Center & Subwoofer 50%/50%<br />
ttable.0.4 0.5<br />
ttable.1.4 0.5<br />
ttable.0.5 0.5<br />
ttable.1.5 0.5<br />
## to test: "$ speaker-test -c6 -twav" and: "$ speaker-test -c2 -twav"<br />
}<br />
<br />
pcm.dmix51 {<br />
type dmix<br />
ipc_key 1024<br />
# let multiple users share<br />
ipc_key_add_uid false <br />
# IPC permissions (octal, default 0600)<br />
# I think changing this fixed something - but I'm not sure what.<br />
ipc_perm 0660 # <br />
slave {<br />
## this is specific to my hda_intel. Often hd:0 is just allready it; To find: $ aplay -L <br />
pcm surround51 <br />
# this rate makes my soundcard crackle<br />
# rate 44100<br />
# this rate stops flash in firefox from playing audio, but I don't need that<br />
rate 48000<br />
channels 6<br />
## Any other values in the 4 lines below seem to make my soundcard crackle, too<br />
period_time 0<br />
period_size 1024<br />
buffer_time 0<br />
buffer_size 4096<br />
}<br />
}<br />
<br />
==External Resources==<br />
<br />
* [http://www.mjmwired.net/kernel/Documentation/sound/alsa/ALSA-Configuration.txt Advanced ALSA module configuration]<br />
* [http://alsa.opensrc.org/index.php/Main_Page Unofficial ALSA Wiki]<br />
* [http://alsa.opensrc.org/index.php/Aadebug A simple shell script to aid ALSA audio debugging]<br />
* [http://bbs.archlinux.org/viewtopic.php?id=36815 HOWTO: Compile driver from svn]<br />
* [http://gentoo-wiki.com/HOWTO_Set_up_a_system-wide_equaliser_with_ALSA_and_LADSPA HOWTO Set up a system-wide equaliser with ALSA and LADSPA]<br />
<br />
* [http://archux.com/page/setting-audio Simple instructions for setting up ALSA]<br />
<!-- vim: set ft=Wikipedia: --></div>Enyaw ecurbhttps://wiki.archlinux.org/index.php?title=GRUB&diff=110809GRUB2010-07-05T07:19:52Z<p>Enyaw ecurb: How to use drivemap to dual-boot windows on a different harddrive</p>
<hr />
<div>[[Category:Boot process (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|GRUB2}}<br />
<br />
{{Article summary start}}<br />
{{Article summary text|Covers various aspects of the next generation of the GRand Unified Bootloader (GRUB2).}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|GRUB}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|GNU GRUB -- GNU Project|http://www.gnu.org/software/grub/}}<br />
{{Article summary link|GNU GRUB Wiki|http://grub.enbug.org/}}<br />
{{Article summary end}}<br />
<br />
[http://www.gnu.org/software/grub/grub-2.en.html GRUB2] is the next generation of the GRand Uniform Bootloader (GRUB). GRUB2 is derived from [http://www.nongnu.org/pupa/ PUPA] which was a research project to investigate the next generation of GRUB. GRUB 2 has been rewritten from scratch to clean up everything and provide modularity and portability [http://www.gnu.org/software/grub/grub-2-faq.en.html#q1].<br />
<br />
Briefly, the ''bootloader'' is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the Linux kernel. The kernel, in turn, initializes the rest of the operating system.<br />
<br />
Currently, [[GRUB]] (i.e. version 0.9x) is the de facto standard bootloader of Linux, and is expected to be superseded by GRUB2 in the near future. When this happens, "GRUB" will become "GRUB Legacy". Even though Grub2 has been worked on since February 2005 and Grub (version 0.9x) is referred to as grub-legacy in some places over the internet, this is yet *not* the case. The new Grub2 still isn't fully implemented.<br />
<br />
== Preface ==<br />
<br />
GRUB2 is still under development and therefore caution should be observed. '''Consider yourself warned!''' GRUB2 may not behave as expected, features may be missing, and functionality may change. Without any specific reason to use GRUB2, users should consider installing the more stable [[GRUB]] instead.<br />
<br />
=== Notes for current GRUB users ===<br />
<br />
* There are differences in the commands of GRUB and GRUB2. Familiarize yourself with [http://grub.enbug.org/CommandList GRUB2 commands] before proceeding (e.g. "find" has been replaced with "search").<br />
<br />
* GRUB2 is now ''modular'' and no longer requires "stage 1.5". As a result, the bootloader itself is limited -- modules are loaded from the hard drive as needed to expand functionality (e.g. for [[LVM]] or RAID support).<br />
<br />
* Device naming has changed between GRUB and GRUB2. Partitions are numbered from 1 instead of 0 while drives are still numbered from 0. For example, {{Filename|/dev/sda1}} would be referred to as {{Codeline|(hd0,1)}} using GRUB2.<br />
<br />
== Installation ==<br />
<br />
The GRUB2 package can be installed with pacman (and will replace {{Package Official|grub}}, if it is installed):<br />
# pacman -S grub2<br />
<br />
Additionally, GRUB2 must be installed to the boot sector of a drive or partition to serve as a bootloader. This is covered in the [[#Bootloader installation]] section.<br />
<br />
=== Installing GRUB2 during Arch Linux installation ===<br />
<br />
* Skip the '''Install Bootloader''' step and exit the installer. <br />
* Configure the network:<br />
# aif -p partial-configure-network<br />
* From the installer's live shell, chroot to the installed system:<br />
# mount -o bind /dev /mnt/dev<br />
# chroot /mnt bash<br />
* Install the GRUB2 package:<br />
# pacman -Sy grub2<br />
<br />
=== Bootloader Installation ===<br />
<br />
GRUB2 may be installed from a live environment, or directly from a running Arch install.<br />
<br />
In most cases, installing GRUB2 is as easy as running the '''grub-install''' command as root:<br />
# grub-install /dev/sda --no-floppy<br />
<br />
Where the <code>--no-floppy</code> tells to not search for floppy devices which will vastly improve the command's overall execution time on many systems (it will also prevent the issue below from occuring) and where {{Filename|/dev/sda}} is the destination of the installation (in this case the MBR of the first SATA disk). If you use [[LVM]] for your {{Filename|/boot}}, you can install GRUB2 on multiple physical disks. <br />
<br />
Executing grub-install without the <code>--no-floppy</code> flag can also lead to this when there is a problem detecting the path of the floppy device:<br />
<br />
grub-probe: error: Cannot get the real path of '/dev/fd0'<br />
Auto-detection of a filesystem module failed.<br />
Please specify the module with the option '--modules' explicitly.<br />
<br />
Thus it is recommended to use the <code>--no-floppy</code> switch, if you don't want to have your MBR on a floppy. If you do, you also want to set floppy as the first boot device in BIOS.<br />
<br />
== Configuration ==<br />
<br />
The configuration files are <code>/etc/default/grub</code> and <code>/etc/grub.d/*</code>. These files are used to generate the <code>/boot/grub/grub.cfg</code> file. You can also choose to manually edit <code>grub.cfg</code>.<br />
<br />
=== grub-mkconfig ===<br />
<br />
The grub-mkconfig script can be used to generate a {{Filename|grub.cfg}} file. By default the script outputs to stdout. To generate a {{Filename|grub.cfg}} file run the command:<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
=== grub.cfg ===<br />
<br />
A basic grub file uses the following options<br />
* {{Codeline|(hdX,Y)}} is the partition {{Codeline|Y}} on disk {{Codeline|X}}, partition numbers starting at 1, disk numbers starting at 0<br />
* {{Codeline|1=set default=N}} is the default boot entry that is chosen after timeout for user action<br />
* {{Codeline|1=set timeout=M}} is the time {{Codeline|M}} to wait in seconds for a user selection before default is booted<br />
* {{Codeline|<nowiki>menuentry "title" {entry options}</nowiki>}} is a boot entry titled {{Codeline|title}}<br />
* {{Codeline|1=set root=(hdX,Y)}} sets the boot partition, where the kernel and GRUB modules are stored (boot need not be a separate partition, and may simply be a directory under the "root" partition ({{Filename|/}})<br />
<br />
An example configuration:<br />
<br />
{{File<br />
|name=/boot/grub/grub.cfg<br />
|content=<nowiki><br />
# Config file for GRUB2 - The GNU GRand Unified Bootloader<br />
# /boot/grub/grub.cfg<br />
<br />
# DEVICE NAME CONVERSIONS<br />
#<br />
# Linux Grub<br />
# -------------------------<br />
# /dev/fd0 (fd0)<br />
# /dev/sda (hd0)<br />
# /dev/sdb2 (hd1,2)<br />
# /dev/sda3 (hd0,3)<br />
#<br />
<br />
# Timeout for menu<br />
set timeout=5<br />
<br />
# Set default boot entry as Entry 0<br />
set default=0<br />
<br />
# (0) Arch Linux<br />
menuentry "Arch Linux" {<br />
set root=(hd0,1)<br />
linux /vmlinuz26 root=/dev/sda3 ro<br />
initrd /kernel26.img<br />
}<br />
<br />
## (1) Windows<br />
#menuentry "Windows" {<br />
#set root=(hd0,3)<br />
#chainloader +1<br />
#}<br />
</nowiki>}}<br />
<br />
If you choose to modify <code>grub.cfg</code> completely manually and won't even generate the first <code>grub.cfg</code>, you should know that if you do not have a separate boot partition, <code>/boot</code> must prefix entries in <code>grub.cfg</code>. Example:<br />
<br />
# (0) Arch Linux<br />
menuentry "Arch Linux" {<br />
set root=(hd0,1)<br />
linux '''/boot/'''vmlinuz26 root=/dev/sda1 ro<br />
initrd '''/boot/'''kernel26.img<br />
}<br />
<br />
=== Dual-booting ===<br />
<br />
<br />
==== Using grub-mkconfig ====<br />
The best way to add other entries is editing the {{Filename|/etc/grub.d/40_custom}}. The entries in this file will be automatically added when running '''grub-mkconfig'''.<br />
After adding the new lines, run <br />
# grub-mkconfig -o /boot/grub/grub.cfg <br />
to generate an updated {{Filename|grub.cfg}}.<br />
<br />
===== With GNU/Linux =====<br />
<br />
Assuming that the other distro is on partition {{Filename|sda2}}:<br />
<br />
menuentry "Other Linux" {<br />
set root=(hd0,2)<br />
linux /boot/vmlinuz (add other options here as required)<br />
initrd /boot/initrd.img (if the other kernel uses/needs one)<br />
}<br />
<br />
===== With Windows =====<br />
<br />
This assumes that your Windows partition is {{Filename|sda3}}.<br />
<br />
# (2) Windows XP<br />
menuentry "Windows XP" {<br />
set root=(hd0,3)<br />
chainloader +1<br />
}<br />
<br />
If the windows bootloader is on an entirely different harddrive than grub, it may be neccessary to trick windows into believing that it is in fact the first harddrive. This was possible in the old grub with <code>map</code> and is now done with <code>drivemap</code>. Assume grub is on hd0 and windows on hd2, you need to add the following after <code>set root</code><br />
<br />
drivemap -s hd0 hd2 <br />
<br />
==== With Windows via EasyBCD and NeoGRUB ====<br />
<br />
Since EasyBCD's NeoGRUB currently does not understand the GRUB2 menu format, chainload to it by replacing the contents of your {{Filename|C:\NST\menu.lst}} file with lines similar to the following:<br />
<br />
default 0<br />
timeout 1<br />
<br />
title Chainload into GRUB v2<br />
root (hd0,7)<br />
kernel /boot/grub/core.img<br />
<br />
===Visual Configuration===<br />
<br />
In GRUB2 it is possible, by default to change the look of the menu.<br />
<br />
====Background image and bitmap fonts====<br />
<br />
GRUB2 comes with support for background images and bitmap fonts in pf2 format. The unifont font is included in the grub2 package under the filename {{Filename|unicode.pf2}}, or, as only ascii characters under the name {{Filename|ascii.pf2}}. Image formats supported include tga, png and jpeg, providing the correct modules are loaded. The maximum supported resolution depends on your hardware. There are two ways of setting a tga file as background. Two sample configurations are shown below.<br />
<br />
=====The new über method=====<br />
<br />
Edit <code>/etc/default/grub</code> like this:<br />
GRUB_GFXMODE=1024x768x32<br />
GRUB_GFXPAYLOAD_LINUX=keep<br />
GRUB_BACKGROUND="/boot/grub/archlinux.tga"<br />
#GRUB_THEME="/path/to/gfxtheme"<br />
<br />
To generate the changes, run: <br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
=====The deprecated method=====<br />
<br />
This is the piece of text that would be generated. You can choose to add it manually to grub.cfg:<br />
if loadfont /usr/share/grub/unicode.pf2 ; then<br />
set gfxmode="1024x768x32"<br />
set gfxpayload=keep<br />
insmod gfxterm<br />
insmod vbe<br />
terminal_output gfxterm<br />
if terminal_output gfxterm; then true ; else<br />
terminal gfxterm<br />
fi<br />
fi<br />
insmod tga<br />
background_image /boot/grub/archlinux.tga<br />
<br />
{{Note|If this example doesn't work for you try to replace {{Codeline|1=gfxmode="1024x768x32"}} by {{Codeline|1=vbemode="0x105"}}.}}<br />
{{Note|To show all the modes you can use the {{Codeline|1=vbeinfo}} command at grub2 prompt (you need to load the vbe module before).}}<br />
{{Note|If you have installed Grub on a separate partition, /boot/grub/archlinux.tga becomes /grub/archlinux.tga.}}<br />
<br />
====Menu colors====<br />
<br />
As in Grub (0.9x), you can change the menu colors in Grub2. The available colors for GRUB2 are at http://www.gnu.org/software/grub/manual/html_node/color.html. <br />
Here's an example:<br />
<br />
=====The new über method=====<br />
Edit <code>/etc/default/grub</code>:<br />
GRUB_COLOR_NORMAL="light-blue/black"<br />
GRUB_COLOR_HIGHLIGHT="light-cyan/blue"<br />
<br />
Execute:<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
=====The deprecated method=====<br />
<br />
### BEGIN /etc/grub.d/00_header ###<br />
....<br />
'''set menu_color_normal=light-blue/black'''<br />
'''set menu_color_highlight=light-cyan/blue'''<br />
....<br />
### END /etc/grub.d/00_header ###<br />
<br />
====Hidden menu====<br />
<br />
One of the unique features of Grub2 is hiding/skipping the menu and showing it by holding "Shift" when needed. You can also adjust whether you want to see the timeout counter.<br />
<br />
=====The new über method=====<br />
<br />
Edit <code>/etc/default/grub</code> as you wish. Here's an example where the comments from the beginning of the two lines have been removed to enable the feature, the timeout has been set to five seconds and to be shown to the user:<br />
GRUB_HIDDEN_TIMEOUT=5<br />
GRUB_HIDDEN_TIMEOUT_QUIET=false<br />
<br />
And run:<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
=====The deprecated method=====<br />
<br />
Once again, you can choose to be an exception and do this manually as shown here:<br />
<br />
....<br />
set locale_dir=($root)/boot/grub/locale<br />
set lang=en<br />
'''insmod gettext'''<br />
''''if sleep --interruptible 5 ; then'''<br />
'''set timeout=0'''<br />
'''fi'''<br />
### END /etc/grub.d/00_header ###<br />
....<br />
<br />
====Setting the framebuffer resolution ====<br />
<br />
===== The new über method =====<br />
<br />
Grub2 can set the framebuffer for both grub2 itself and the kernel. The old ''vga='' way is deprecated. The preferred method is editing <code>/etc/default/grub</code> as the following sample:<br />
<br />
GRUB_GFXMODE=1024x768x32<br />
GRUB_GFXPAYLOAD_LINUX=keep<br />
<br />
To generate the changes, run: <br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
The gfxpayload property will make sure the kernel keeps the resolution.<br />
<br />
If this method does not work for you, the deprecated vga= method will still work. Just<br />
add the vga= setting next to the "GRUB_CMDLINE_LINUX_DEFAULT=" line in "/etc/default/grub"<br />
for eg: "GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vga=792" will give you a 1024x768 resolution<br />
<br />
<br />
===== The deprecated method =====<br />
<br />
Again, you can add the configuration manually to grub.cfg as shown below.<br />
<br />
if loadfont /usr/share/grub/unicode.pf2 ; then<br />
set gfxmode="1024x768x32" <br />
set gfxpayload=keep<br />
insmod gfxterm<br />
insmod vbe<br />
terminal_output gfxterm<br />
if terminal_output gfxterm; then true ; else<br />
terminal gfxterm<br />
fi<br />
fi<br />
<br />
=== Other Options ===<br />
<br />
==== LVM ====<br />
<br />
If you use [[LVM]] for your {{Filename|/boot}}, add the following before menuentry lines:<br />
<br />
insmod lvm<br />
<br />
and specify your root in the menuentry as:<br />
<br />
set root=(''lvm_group_name''-''lvm_logical_boot_partition_name'')<br />
<br />
Example:<br />
<br />
# (0) Arch Linux<br />
menuentry "Arch Linux" {<br />
insmod lvm<br />
set root=(VolumeGroup-lv_boot)<br />
# you can only set following two lines<br />
linux /vmlinuz26 root=/dev/mapper/VolumeGroup-root ro<br />
initrd /kernel26.img<br />
}<br />
<br />
==== Raid ====<br />
<br />
Grub2 provides convenient handling of raid-volumes. You need to add<br />
<br />
insmod raid<br />
<br />
which allows you to address the volume natively. E.g. {{Filename|/dev/md0}} becomes<br />
<br />
set root=(md0)<br />
<br />
whereas a partitioned raid-volume (e.g. {{Filename|/dev/md0p1}}) becomes <br />
<br />
set root=(md0,1)<br />
<br />
==== Persistent block device naming ====<br />
You can use UUIDs to detect partitions instead of the "old" '''/dev/sd*''' and '''/dev/hd*''' scheming. It has the advantage of detecting partitions by their unique UUIDs, which is needed by some people booting with complicated partition setups.<br />
<br />
UUIDs are used by default in the recent versions of grub2 - there's no downside in it anyway except that you need to re-generate the grub.cfg file every time you resize or reformat your partitions. Remember this when modifying partitions with Live-CD.<br />
<br />
===== The new über method =====<br />
<br />
The recent versions of grub2 use UUIDs by default. You can re-enable the use of UUIDS by simply commenting the UUID line (this is also what it looks like by default):<br />
#GRUB_DISABLE_LINUX_UUID=true<br />
you can also just set the value as <code>false</code> as shown here:<br />
GRUB_DISABLE_LINUX_UUID=false<br />
<br />
Either way don't forget to generate the changes:<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
===== The deprecated method =====<br />
<br />
To list UUIDs, from a running system:<br />
# blkid<br />
<br />
Replace the value of the {{Codeline|root}} pointer on the linux line with the following:<br />
<br />
linux /vmlinuz26 root='''/dev/disk/by-uuid/<UUID>''' ro<br />
<br />
However, you still have to set Grub2's notion of a root partition. In order to do that, use the {{Codeline|search}} command:<br />
<br />
search --no-floppy --fs-uuid <UUID> --set root<br />
<br />
What the <code>--no-floppy</code> flag does has already been explained. An example boot entry using Persistent block device naming would look like:<br />
<br />
menuentry "Arch Linux" {<br />
'''search --no-floppy --fs-uuid 355ccb5c-99e1-400d-b612-451f9247e35e --set root'''<br />
linux /boot/vmlinuz26 '''root=/dev/disk/by-uuid/355ccb5c-99e1-400d-b612-451f9247e35e''' ro<br />
initrd /boot/kernel26.img<br />
}<br />
<br />
==== Using Labels ====<br />
<br />
It is possible to use labels, human-readable strings attached to filesystems, by using the {{Codeline|--label}} option to {{Codeline|search}}. First of all, label your existing partition:<br />
<br />
# tune2fs -L a <LABEL> <PARTITION><br />
<br />
Then, add an entry using labels. An example of this:<br />
<br />
menuentry "Arch Linux, session texte" {<br />
search --label archroot --set root<br />
linux /boot/vmlinuz26 root=/dev/disk/by-label/archroot ro<br />
initrd /boot/kernel26.img<br />
}<br />
<br />
== Using the command shell ==<br />
<br />
Since the MBR is too small to store all GRUB2 modules, only the menu and a few basic commands reside there. The majority of GRUB2 functionality remains in modules in {{Filename|/boot/grub}}, which are inserted as needed. In error conditions (e.g. if the partition layout changes) GRUB2 may fail to boot. When this happens, a command shell may appear.<br />
<br />
GRUB2 offers multiple shells/prompts. If there is a problem reading the menu but the bootloader is able to find the disk, you will likely be dropped to the "normal" shell:<br />
<br />
sh:grub><br />
<br />
If there is a more serious problem (e.g. GRUB cannot find required files), you may instead be dropped to the "rescue" shell:<br />
<br />
grub rescue><br />
<br />
The rescue shell is a restricted subset of the normal shell, offering much less functionality. If dumped to the rescue shell, first try inserting the "normal" module, then starting the "normal" shell:<br />
<br />
grub rescue> set prefix=(hdX,Y)/boot/grub<br />
grub rescue> insmod (hdX,Y)/boot/grub/normal.mod<br />
rescue:grub> normal<br />
<br />
<br />
====parttool or legacy hide/unhide====<br />
If you have a win9x paradigm with hidden C disks GRUB legacy had the hide/unhide feature. In GRUB2 this has been replaced by parttool. For example, to boot the third C disk of three win9x installations on the CLI enter the CLI and:<br />
parttool hd0,1 hidden+ boot-<br />
parttool hd0,2 hidden+ boot-<br />
parttool hd0,3 hidden- boot+<br />
set root=hd0,3<br />
chainloader +1<br />
boot<br />
<br />
== Using the rescue console ==<br />
<br />
See [[#Using the command shell]] first. If unable to activate the standard shell, one possible solution is to boot using a live CD or some other rescue disk to correct configuration errors and reinstall GRUB. However, such a boot disk is not always available (nor necessary); the rescue console is surprisingly robust.<br />
<br />
The available commands in GRUB rescue include "insmod", "ls", "set", and "unset". This example uses "set" and "insmod". "set" modifies variables and "insmod" inserts new modules to add functionality.<br />
<br />
Before starting, the user must know the location of their {{Filename|/boot}} partition (be it a separate partition, or a subdirectory under their root):<br />
<br />
grub rescue> set prefix=(hdX,Y)/boot/grub<br />
<br />
where X is the physical drive number and Y is the partition number.<br />
<br />
To expand console capabilities, insert the "linux" module:<br />
<br />
grub rescue> insmod (hdX,Y)/boot/grub/linux.mod<br />
<br />
{{Note|With a separate boot partition, omit {{Filename|/boot}} from the path, (i.e. type {{Codeline|1=set prefix=(hdX,Y)/grub}} and {{Codeline|insmod (hdX,Y)/grub/linux.mod}}).}}<br />
<br />
This introduces the "linux" and "initrd" commands, which should be familiar (see [[#Configuration]]).<br />
<br />
An example, booting Arch Linux:<br />
<br />
set root=(hd0,5)<br />
linux /boot/vmlinuz26 root=/dev/sda5<br />
initrd /boot/kernel26.img<br />
boot<br />
<br />
With a separate boot partition, again change the lines accordingly:<br />
<br />
set root=(hd0,5)<br />
linux /vmlinuz26 root=/dev/sda6<br />
initrd /kernel26.img<br />
boot<br />
<br />
After successfully booting the Arch Linux installation, users can correct {{Filename|grub.cfg}} as needed and then run:<br />
<br />
# grub-install /dev/sda --no-floppy<br />
<br />
to reinstall GRUB2 and fix the problem completely, changing {{Filename|/dev/sda}} if needed. See [[#Bootloader installation]] for details.<br />
<br />
== Combining the use of UUID's and basic scripting ==<br />
--[[User:Celilo|Celilo]] 06:04, 19 March 2010 (EDT)<br />
<br />
If you like the idea of using UUID's to avoid unreliable bios mappings or are struggling with grub syntax, here is an example boot menu item that uses UUID's and a small script to direct grub to the proper disk partitions for your system. All you need to do is replace the UUID's in the sample with the correct UUID's for your system. (The example applies to a system with a boot and root partition. You will obviously need to modify the grub configuration if you have additional partitions.)<br />
<br />
menuentry "Arch Linux 64" {<br />
set uuid_grub_boot=ece0448f-bb08-486d-9864-ac3271bd8d07 #Enter the UUID of your boot partition (this is where grub and your kernel reside) <br />
set uuid_os_root=c55da16f-e2af-4603-9e0b-03f5f565ec4a #Enter the UUID of the partition containing the root partition of your Arch Linux installation. <br />
#(Note: this may be the same as your boot partition) <br />
search --no-floppy --fs-uuid $uuid_os_root --set=root #Here we set the grub "root" variable by locating the uuid of the root partition identified above<br />
search --no-floppy --fs-uuid $uuid_grub_boot --set=grub_boot #Here we set a custom variable grub_boot by locating the uuid of the boot partition identified above<br />
#Here's the magic. We test to see if the boot and root partitions have the same UUID. If they do we append /boot to the $grub_boot variable. For ex. (hd0,1) becomes (hd0,1)/boot. <br />
if [ $uuid_grub_boot == $uuid_os_root ] ; then <br />
set grub_boot=$grub_boot/boot<br />
fi<br />
# $grub_boot now points to the correct location, so the following will properly find the kernel and initrd<br />
linux ($grub_boot)/vmlinuz26 root=/dev/disk/by-uuid/$uuid_os_root ro<br />
initrd ($grub_boot)/kernel26.img<br />
}<br />
<br />
<br />
<br />
== Troubleshooting ==<br />
<br />
Any troubleshooting should be added here.<br />
<br />
=== msdos-style error message ===<br />
<br />
grub-setup: warn: This msdos-style partition label has no post-MBR gap; embedding won't be possible!<br />
grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists.<br />
However, blocklists are UNRELIABLE and its use is discouraged.<br />
grub-setup: error: If you really want blocklists, use --force.<br />
<br />
This error may occur when you try installing GRUB2 in a VMware container. Read more about it [http://bbs.archlinux.org/viewtopic.php?pid=581760#p581760 here]. Hopefully a fix will be provided soon.<br />
<br />
It also happens when the first partition starts just after the MBR, without the usual space of 60-something block before the first partition.<br />
<br />
=== Other ===<br />
I couldn't figure out how to uninstall grub1, and install grub2 to the MBR, as it isn't being booted by default. It is still booting grub1. So, an easy work-around, is rename {{Filename|menu.lst.pacsave}} or whatever, to {{Filename|menu.lst}} (in /boot/grub/) and for each menu entry that you would like to use grub2, at the end type {{Codeline|"chainloader +1"}}. This will tell grub1 to forward control to grub2. This is an ugly hack though, so I advise setting the {{Filename|menu.lst}}'s timout as 0, otherwise the total timeout would be grub1's time out + grub2's which, for me would equal more than 18 seconds, which is quite a bit.<br />
<br />
P.S. hopefully someone figures out how to pry grub1's dead fingers off of my MBR, and place grub2 on it :) .<br />
<br />
In my case it had to do with my boot partition. Say boot-partition is {{Codeline|(hd0,1)}} and your root is {{Codeline|(hd0,3)}} (grub2 naming). grub-setup searches for {{Filename|(hd0,3)/boot/grub/core.img}}. Just because it's on {{Filename|(hd0,1)/grub/core.img}}, it is unable to find it. So I copied the grub-folder to my root partition and everything worked fine:<br />
<br />
E.g. (as root:)<br />
# mount /boot<br />
# cp -a /boot/grub /<br />
# umount /boot<br />
# mv /grub /boot/<br />
# grub-install /dev/sda</div>Enyaw ecurbhttps://wiki.archlinux.org/index.php?title=GRUB&diff=110808GRUB2010-07-05T07:12:18Z<p>Enyaw ecurb: Section about addressing and booting Raid-volumes</p>
<hr />
<div>[[Category:Boot process (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|GRUB2}}<br />
<br />
{{Article summary start}}<br />
{{Article summary text|Covers various aspects of the next generation of the GRand Unified Bootloader (GRUB2).}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|GRUB}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|GNU GRUB -- GNU Project|http://www.gnu.org/software/grub/}}<br />
{{Article summary link|GNU GRUB Wiki|http://grub.enbug.org/}}<br />
{{Article summary end}}<br />
<br />
[http://www.gnu.org/software/grub/grub-2.en.html GRUB2] is the next generation of the GRand Uniform Bootloader (GRUB). GRUB2 is derived from [http://www.nongnu.org/pupa/ PUPA] which was a research project to investigate the next generation of GRUB. GRUB 2 has been rewritten from scratch to clean up everything and provide modularity and portability [http://www.gnu.org/software/grub/grub-2-faq.en.html#q1].<br />
<br />
Briefly, the ''bootloader'' is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the Linux kernel. The kernel, in turn, initializes the rest of the operating system.<br />
<br />
Currently, [[GRUB]] (i.e. version 0.9x) is the de facto standard bootloader of Linux, and is expected to be superseded by GRUB2 in the near future. When this happens, "GRUB" will become "GRUB Legacy". Even though Grub2 has been worked on since February 2005 and Grub (version 0.9x) is referred to as grub-legacy in some places over the internet, this is yet *not* the case. The new Grub2 still isn't fully implemented.<br />
<br />
== Preface ==<br />
<br />
GRUB2 is still under development and therefore caution should be observed. '''Consider yourself warned!''' GRUB2 may not behave as expected, features may be missing, and functionality may change. Without any specific reason to use GRUB2, users should consider installing the more stable [[GRUB]] instead.<br />
<br />
=== Notes for current GRUB users ===<br />
<br />
* There are differences in the commands of GRUB and GRUB2. Familiarize yourself with [http://grub.enbug.org/CommandList GRUB2 commands] before proceeding (e.g. "find" has been replaced with "search").<br />
<br />
* GRUB2 is now ''modular'' and no longer requires "stage 1.5". As a result, the bootloader itself is limited -- modules are loaded from the hard drive as needed to expand functionality (e.g. for [[LVM]] or RAID support).<br />
<br />
* Device naming has changed between GRUB and GRUB2. Partitions are numbered from 1 instead of 0 while drives are still numbered from 0. For example, {{Filename|/dev/sda1}} would be referred to as {{Codeline|(hd0,1)}} using GRUB2.<br />
<br />
== Installation ==<br />
<br />
The GRUB2 package can be installed with pacman (and will replace {{Package Official|grub}}, if it is installed):<br />
# pacman -S grub2<br />
<br />
Additionally, GRUB2 must be installed to the boot sector of a drive or partition to serve as a bootloader. This is covered in the [[#Bootloader installation]] section.<br />
<br />
=== Installing GRUB2 during Arch Linux installation ===<br />
<br />
* Skip the '''Install Bootloader''' step and exit the installer. <br />
* Configure the network:<br />
# aif -p partial-configure-network<br />
* From the installer's live shell, chroot to the installed system:<br />
# mount -o bind /dev /mnt/dev<br />
# chroot /mnt bash<br />
* Install the GRUB2 package:<br />
# pacman -Sy grub2<br />
<br />
=== Bootloader Installation ===<br />
<br />
GRUB2 may be installed from a live environment, or directly from a running Arch install.<br />
<br />
In most cases, installing GRUB2 is as easy as running the '''grub-install''' command as root:<br />
# grub-install /dev/sda --no-floppy<br />
<br />
Where the <code>--no-floppy</code> tells to not search for floppy devices which will vastly improve the command's overall execution time on many systems (it will also prevent the issue below from occuring) and where {{Filename|/dev/sda}} is the destination of the installation (in this case the MBR of the first SATA disk). If you use [[LVM]] for your {{Filename|/boot}}, you can install GRUB2 on multiple physical disks. <br />
<br />
Executing grub-install without the <code>--no-floppy</code> flag can also lead to this when there is a problem detecting the path of the floppy device:<br />
<br />
grub-probe: error: Cannot get the real path of '/dev/fd0'<br />
Auto-detection of a filesystem module failed.<br />
Please specify the module with the option '--modules' explicitly.<br />
<br />
Thus it is recommended to use the <code>--no-floppy</code> switch, if you don't want to have your MBR on a floppy. If you do, you also want to set floppy as the first boot device in BIOS.<br />
<br />
== Configuration ==<br />
<br />
The configuration files are <code>/etc/default/grub</code> and <code>/etc/grub.d/*</code>. These files are used to generate the <code>/boot/grub/grub.cfg</code> file. You can also choose to manually edit <code>grub.cfg</code>.<br />
<br />
=== grub-mkconfig ===<br />
<br />
The grub-mkconfig script can be used to generate a {{Filename|grub.cfg}} file. By default the script outputs to stdout. To generate a {{Filename|grub.cfg}} file run the command:<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
=== grub.cfg ===<br />
<br />
A basic grub file uses the following options<br />
* {{Codeline|(hdX,Y)}} is the partition {{Codeline|Y}} on disk {{Codeline|X}}, partition numbers starting at 1, disk numbers starting at 0<br />
* {{Codeline|1=set default=N}} is the default boot entry that is chosen after timeout for user action<br />
* {{Codeline|1=set timeout=M}} is the time {{Codeline|M}} to wait in seconds for a user selection before default is booted<br />
* {{Codeline|<nowiki>menuentry "title" {entry options}</nowiki>}} is a boot entry titled {{Codeline|title}}<br />
* {{Codeline|1=set root=(hdX,Y)}} sets the boot partition, where the kernel and GRUB modules are stored (boot need not be a separate partition, and may simply be a directory under the "root" partition ({{Filename|/}})<br />
<br />
An example configuration:<br />
<br />
{{File<br />
|name=/boot/grub/grub.cfg<br />
|content=<nowiki><br />
# Config file for GRUB2 - The GNU GRand Unified Bootloader<br />
# /boot/grub/grub.cfg<br />
<br />
# DEVICE NAME CONVERSIONS<br />
#<br />
# Linux Grub<br />
# -------------------------<br />
# /dev/fd0 (fd0)<br />
# /dev/sda (hd0)<br />
# /dev/sdb2 (hd1,2)<br />
# /dev/sda3 (hd0,3)<br />
#<br />
<br />
# Timeout for menu<br />
set timeout=5<br />
<br />
# Set default boot entry as Entry 0<br />
set default=0<br />
<br />
# (0) Arch Linux<br />
menuentry "Arch Linux" {<br />
set root=(hd0,1)<br />
linux /vmlinuz26 root=/dev/sda3 ro<br />
initrd /kernel26.img<br />
}<br />
<br />
## (1) Windows<br />
#menuentry "Windows" {<br />
#set root=(hd0,3)<br />
#chainloader +1<br />
#}<br />
</nowiki>}}<br />
<br />
If you choose to modify <code>grub.cfg</code> completely manually and won't even generate the first <code>grub.cfg</code>, you should know that if you do not have a separate boot partition, <code>/boot</code> must prefix entries in <code>grub.cfg</code>. Example:<br />
<br />
# (0) Arch Linux<br />
menuentry "Arch Linux" {<br />
set root=(hd0,1)<br />
linux '''/boot/'''vmlinuz26 root=/dev/sda1 ro<br />
initrd '''/boot/'''kernel26.img<br />
}<br />
<br />
=== Dual-booting ===<br />
<br />
<br />
==== Using grub-mkconfig ====<br />
The best way to add other entries is editing the {{Filename|/etc/grub.d/40_custom}}. The entries in this file will be automatically added when running '''grub-mkconfig'''.<br />
After adding the new lines, run <br />
# grub-mkconfig -o /boot/grub/grub.cfg <br />
to generate an updated {{Filename|grub.cfg}}.<br />
<br />
===== With GNU/Linux =====<br />
<br />
Assuming that the other distro is on partition {{Filename|sda2}}:<br />
<br />
menuentry "Other Linux" {<br />
set root=(hd0,2)<br />
linux /boot/vmlinuz (add other options here as required)<br />
initrd /boot/initrd.img (if the other kernel uses/needs one)<br />
}<br />
<br />
===== With Windows =====<br />
<br />
This assumes that your Windows partition is {{Filename|sda3}}.<br />
<br />
# (2) Windows XP<br />
menuentry "Windows XP" {<br />
set root=(hd0,3)<br />
chainloader +1<br />
}<br />
<br />
==== With Windows via EasyBCD and NeoGRUB ====<br />
<br />
Since EasyBCD's NeoGRUB currently does not understand the GRUB2 menu format, chainload to it by replacing the contents of your {{Filename|C:\NST\menu.lst}} file with lines similar to the following:<br />
<br />
default 0<br />
timeout 1<br />
<br />
title Chainload into GRUB v2<br />
root (hd0,7)<br />
kernel /boot/grub/core.img<br />
<br />
===Visual Configuration===<br />
<br />
In GRUB2 it is possible, by default to change the look of the menu.<br />
<br />
====Background image and bitmap fonts====<br />
<br />
GRUB2 comes with support for background images and bitmap fonts in pf2 format. The unifont font is included in the grub2 package under the filename {{Filename|unicode.pf2}}, or, as only ascii characters under the name {{Filename|ascii.pf2}}. Image formats supported include tga, png and jpeg, providing the correct modules are loaded. The maximum supported resolution depends on your hardware. There are two ways of setting a tga file as background. Two sample configurations are shown below.<br />
<br />
=====The new über method=====<br />
<br />
Edit <code>/etc/default/grub</code> like this:<br />
GRUB_GFXMODE=1024x768x32<br />
GRUB_GFXPAYLOAD_LINUX=keep<br />
GRUB_BACKGROUND="/boot/grub/archlinux.tga"<br />
#GRUB_THEME="/path/to/gfxtheme"<br />
<br />
To generate the changes, run: <br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
=====The deprecated method=====<br />
<br />
This is the piece of text that would be generated. You can choose to add it manually to grub.cfg:<br />
if loadfont /usr/share/grub/unicode.pf2 ; then<br />
set gfxmode="1024x768x32"<br />
set gfxpayload=keep<br />
insmod gfxterm<br />
insmod vbe<br />
terminal_output gfxterm<br />
if terminal_output gfxterm; then true ; else<br />
terminal gfxterm<br />
fi<br />
fi<br />
insmod tga<br />
background_image /boot/grub/archlinux.tga<br />
<br />
{{Note|If this example doesn't work for you try to replace {{Codeline|1=gfxmode="1024x768x32"}} by {{Codeline|1=vbemode="0x105"}}.}}<br />
{{Note|To show all the modes you can use the {{Codeline|1=vbeinfo}} command at grub2 prompt (you need to load the vbe module before).}}<br />
{{Note|If you have installed Grub on a separate partition, /boot/grub/archlinux.tga becomes /grub/archlinux.tga.}}<br />
<br />
====Menu colors====<br />
<br />
As in Grub (0.9x), you can change the menu colors in Grub2. The available colors for GRUB2 are at http://www.gnu.org/software/grub/manual/html_node/color.html. <br />
Here's an example:<br />
<br />
=====The new über method=====<br />
Edit <code>/etc/default/grub</code>:<br />
GRUB_COLOR_NORMAL="light-blue/black"<br />
GRUB_COLOR_HIGHLIGHT="light-cyan/blue"<br />
<br />
Execute:<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
=====The deprecated method=====<br />
<br />
### BEGIN /etc/grub.d/00_header ###<br />
....<br />
'''set menu_color_normal=light-blue/black'''<br />
'''set menu_color_highlight=light-cyan/blue'''<br />
....<br />
### END /etc/grub.d/00_header ###<br />
<br />
====Hidden menu====<br />
<br />
One of the unique features of Grub2 is hiding/skipping the menu and showing it by holding "Shift" when needed. You can also adjust whether you want to see the timeout counter.<br />
<br />
=====The new über method=====<br />
<br />
Edit <code>/etc/default/grub</code> as you wish. Here's an example where the comments from the beginning of the two lines have been removed to enable the feature, the timeout has been set to five seconds and to be shown to the user:<br />
GRUB_HIDDEN_TIMEOUT=5<br />
GRUB_HIDDEN_TIMEOUT_QUIET=false<br />
<br />
And run:<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
=====The deprecated method=====<br />
<br />
Once again, you can choose to be an exception and do this manually as shown here:<br />
<br />
....<br />
set locale_dir=($root)/boot/grub/locale<br />
set lang=en<br />
'''insmod gettext'''<br />
''''if sleep --interruptible 5 ; then'''<br />
'''set timeout=0'''<br />
'''fi'''<br />
### END /etc/grub.d/00_header ###<br />
....<br />
<br />
====Setting the framebuffer resolution ====<br />
<br />
===== The new über method =====<br />
<br />
Grub2 can set the framebuffer for both grub2 itself and the kernel. The old ''vga='' way is deprecated. The preferred method is editing <code>/etc/default/grub</code> as the following sample:<br />
<br />
GRUB_GFXMODE=1024x768x32<br />
GRUB_GFXPAYLOAD_LINUX=keep<br />
<br />
To generate the changes, run: <br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
The gfxpayload property will make sure the kernel keeps the resolution.<br />
<br />
If this method does not work for you, the deprecated vga= method will still work. Just<br />
add the vga= setting next to the "GRUB_CMDLINE_LINUX_DEFAULT=" line in "/etc/default/grub"<br />
for eg: "GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vga=792" will give you a 1024x768 resolution<br />
<br />
<br />
===== The deprecated method =====<br />
<br />
Again, you can add the configuration manually to grub.cfg as shown below.<br />
<br />
if loadfont /usr/share/grub/unicode.pf2 ; then<br />
set gfxmode="1024x768x32" <br />
set gfxpayload=keep<br />
insmod gfxterm<br />
insmod vbe<br />
terminal_output gfxterm<br />
if terminal_output gfxterm; then true ; else<br />
terminal gfxterm<br />
fi<br />
fi<br />
<br />
=== Other Options ===<br />
<br />
==== LVM ====<br />
<br />
If you use [[LVM]] for your {{Filename|/boot}}, add the following before menuentry lines:<br />
<br />
insmod lvm<br />
<br />
and specify your root in the menuentry as:<br />
<br />
set root=(''lvm_group_name''-''lvm_logical_boot_partition_name'')<br />
<br />
Example:<br />
<br />
# (0) Arch Linux<br />
menuentry "Arch Linux" {<br />
insmod lvm<br />
set root=(VolumeGroup-lv_boot)<br />
# you can only set following two lines<br />
linux /vmlinuz26 root=/dev/mapper/VolumeGroup-root ro<br />
initrd /kernel26.img<br />
}<br />
<br />
==== Raid ====<br />
<br />
Grub2 provides convenient handling of raid-volumes. You need to add<br />
<br />
insmod raid<br />
<br />
which allows you to address the volume natively. E.g. {{Filename|/dev/md0}} becomes<br />
<br />
set root=(md0)<br />
<br />
whereas a partitioned raid-volume (e.g. {{Filename|/dev/md0p1}}) becomes <br />
<br />
set root=(md0,1)<br />
<br />
==== Persistent block device naming ====<br />
You can use UUIDs to detect partitions instead of the "old" '''/dev/sd*''' and '''/dev/hd*''' scheming. It has the advantage of detecting partitions by their unique UUIDs, which is needed by some people booting with complicated partition setups.<br />
<br />
UUIDs are used by default in the recent versions of grub2 - there's no downside in it anyway except that you need to re-generate the grub.cfg file every time you resize or reformat your partitions. Remember this when modifying partitions with Live-CD.<br />
<br />
===== The new über method =====<br />
<br />
The recent versions of grub2 use UUIDs by default. You can re-enable the use of UUIDS by simply commenting the UUID line (this is also what it looks like by default):<br />
#GRUB_DISABLE_LINUX_UUID=true<br />
you can also just set the value as <code>false</code> as shown here:<br />
GRUB_DISABLE_LINUX_UUID=false<br />
<br />
Either way don't forget to generate the changes:<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
===== The deprecated method =====<br />
<br />
To list UUIDs, from a running system:<br />
# blkid<br />
<br />
Replace the value of the {{Codeline|root}} pointer on the linux line with the following:<br />
<br />
linux /vmlinuz26 root='''/dev/disk/by-uuid/<UUID>''' ro<br />
<br />
However, you still have to set Grub2's notion of a root partition. In order to do that, use the {{Codeline|search}} command:<br />
<br />
search --no-floppy --fs-uuid <UUID> --set root<br />
<br />
What the <code>--no-floppy</code> flag does has already been explained. An example boot entry using Persistent block device naming would look like:<br />
<br />
menuentry "Arch Linux" {<br />
'''search --no-floppy --fs-uuid 355ccb5c-99e1-400d-b612-451f9247e35e --set root'''<br />
linux /boot/vmlinuz26 '''root=/dev/disk/by-uuid/355ccb5c-99e1-400d-b612-451f9247e35e''' ro<br />
initrd /boot/kernel26.img<br />
}<br />
<br />
==== Using Labels ====<br />
<br />
It is possible to use labels, human-readable strings attached to filesystems, by using the {{Codeline|--label}} option to {{Codeline|search}}. First of all, label your existing partition:<br />
<br />
# tune2fs -L a <LABEL> <PARTITION><br />
<br />
Then, add an entry using labels. An example of this:<br />
<br />
menuentry "Arch Linux, session texte" {<br />
search --label archroot --set root<br />
linux /boot/vmlinuz26 root=/dev/disk/by-label/archroot ro<br />
initrd /boot/kernel26.img<br />
}<br />
<br />
== Using the command shell ==<br />
<br />
Since the MBR is too small to store all GRUB2 modules, only the menu and a few basic commands reside there. The majority of GRUB2 functionality remains in modules in {{Filename|/boot/grub}}, which are inserted as needed. In error conditions (e.g. if the partition layout changes) GRUB2 may fail to boot. When this happens, a command shell may appear.<br />
<br />
GRUB2 offers multiple shells/prompts. If there is a problem reading the menu but the bootloader is able to find the disk, you will likely be dropped to the "normal" shell:<br />
<br />
sh:grub><br />
<br />
If there is a more serious problem (e.g. GRUB cannot find required files), you may instead be dropped to the "rescue" shell:<br />
<br />
grub rescue><br />
<br />
The rescue shell is a restricted subset of the normal shell, offering much less functionality. If dumped to the rescue shell, first try inserting the "normal" module, then starting the "normal" shell:<br />
<br />
grub rescue> set prefix=(hdX,Y)/boot/grub<br />
grub rescue> insmod (hdX,Y)/boot/grub/normal.mod<br />
rescue:grub> normal<br />
<br />
<br />
====parttool or legacy hide/unhide====<br />
If you have a win9x paradigm with hidden C disks GRUB legacy had the hide/unhide feature. In GRUB2 this has been replaced by parttool. For example, to boot the third C disk of three win9x installations on the CLI enter the CLI and:<br />
parttool hd0,1 hidden+ boot-<br />
parttool hd0,2 hidden+ boot-<br />
parttool hd0,3 hidden- boot+<br />
set root=hd0,3<br />
chainloader +1<br />
boot<br />
<br />
== Using the rescue console ==<br />
<br />
See [[#Using the command shell]] first. If unable to activate the standard shell, one possible solution is to boot using a live CD or some other rescue disk to correct configuration errors and reinstall GRUB. However, such a boot disk is not always available (nor necessary); the rescue console is surprisingly robust.<br />
<br />
The available commands in GRUB rescue include "insmod", "ls", "set", and "unset". This example uses "set" and "insmod". "set" modifies variables and "insmod" inserts new modules to add functionality.<br />
<br />
Before starting, the user must know the location of their {{Filename|/boot}} partition (be it a separate partition, or a subdirectory under their root):<br />
<br />
grub rescue> set prefix=(hdX,Y)/boot/grub<br />
<br />
where X is the physical drive number and Y is the partition number.<br />
<br />
To expand console capabilities, insert the "linux" module:<br />
<br />
grub rescue> insmod (hdX,Y)/boot/grub/linux.mod<br />
<br />
{{Note|With a separate boot partition, omit {{Filename|/boot}} from the path, (i.e. type {{Codeline|1=set prefix=(hdX,Y)/grub}} and {{Codeline|insmod (hdX,Y)/grub/linux.mod}}).}}<br />
<br />
This introduces the "linux" and "initrd" commands, which should be familiar (see [[#Configuration]]).<br />
<br />
An example, booting Arch Linux:<br />
<br />
set root=(hd0,5)<br />
linux /boot/vmlinuz26 root=/dev/sda5<br />
initrd /boot/kernel26.img<br />
boot<br />
<br />
With a separate boot partition, again change the lines accordingly:<br />
<br />
set root=(hd0,5)<br />
linux /vmlinuz26 root=/dev/sda6<br />
initrd /kernel26.img<br />
boot<br />
<br />
After successfully booting the Arch Linux installation, users can correct {{Filename|grub.cfg}} as needed and then run:<br />
<br />
# grub-install /dev/sda --no-floppy<br />
<br />
to reinstall GRUB2 and fix the problem completely, changing {{Filename|/dev/sda}} if needed. See [[#Bootloader installation]] for details.<br />
<br />
== Combining the use of UUID's and basic scripting ==<br />
--[[User:Celilo|Celilo]] 06:04, 19 March 2010 (EDT)<br />
<br />
If you like the idea of using UUID's to avoid unreliable bios mappings or are struggling with grub syntax, here is an example boot menu item that uses UUID's and a small script to direct grub to the proper disk partitions for your system. All you need to do is replace the UUID's in the sample with the correct UUID's for your system. (The example applies to a system with a boot and root partition. You will obviously need to modify the grub configuration if you have additional partitions.)<br />
<br />
menuentry "Arch Linux 64" {<br />
set uuid_grub_boot=ece0448f-bb08-486d-9864-ac3271bd8d07 #Enter the UUID of your boot partition (this is where grub and your kernel reside) <br />
set uuid_os_root=c55da16f-e2af-4603-9e0b-03f5f565ec4a #Enter the UUID of the partition containing the root partition of your Arch Linux installation. <br />
#(Note: this may be the same as your boot partition) <br />
search --no-floppy --fs-uuid $uuid_os_root --set=root #Here we set the grub "root" variable by locating the uuid of the root partition identified above<br />
search --no-floppy --fs-uuid $uuid_grub_boot --set=grub_boot #Here we set a custom variable grub_boot by locating the uuid of the boot partition identified above<br />
#Here's the magic. We test to see if the boot and root partitions have the same UUID. If they do we append /boot to the $grub_boot variable. For ex. (hd0,1) becomes (hd0,1)/boot. <br />
if [ $uuid_grub_boot == $uuid_os_root ] ; then <br />
set grub_boot=$grub_boot/boot<br />
fi<br />
# $grub_boot now points to the correct location, so the following will properly find the kernel and initrd<br />
linux ($grub_boot)/vmlinuz26 root=/dev/disk/by-uuid/$uuid_os_root ro<br />
initrd ($grub_boot)/kernel26.img<br />
}<br />
<br />
<br />
<br />
== Troubleshooting ==<br />
<br />
Any troubleshooting should be added here.<br />
<br />
=== msdos-style error message ===<br />
<br />
grub-setup: warn: This msdos-style partition label has no post-MBR gap; embedding won't be possible!<br />
grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists.<br />
However, blocklists are UNRELIABLE and its use is discouraged.<br />
grub-setup: error: If you really want blocklists, use --force.<br />
<br />
This error may occur when you try installing GRUB2 in a VMware container. Read more about it [http://bbs.archlinux.org/viewtopic.php?pid=581760#p581760 here]. Hopefully a fix will be provided soon.<br />
<br />
It also happens when the first partition starts just after the MBR, without the usual space of 60-something block before the first partition.<br />
<br />
=== Other ===<br />
I couldn't figure out how to uninstall grub1, and install grub2 to the MBR, as it isn't being booted by default. It is still booting grub1. So, an easy work-around, is rename {{Filename|menu.lst.pacsave}} or whatever, to {{Filename|menu.lst}} (in /boot/grub/) and for each menu entry that you would like to use grub2, at the end type {{Codeline|"chainloader +1"}}. This will tell grub1 to forward control to grub2. This is an ugly hack though, so I advise setting the {{Filename|menu.lst}}'s timout as 0, otherwise the total timeout would be grub1's time out + grub2's which, for me would equal more than 18 seconds, which is quite a bit.<br />
<br />
P.S. hopefully someone figures out how to pry grub1's dead fingers off of my MBR, and place grub2 on it :) .<br />
<br />
In my case it had to do with my boot partition. Say boot-partition is {{Codeline|(hd0,1)}} and your root is {{Codeline|(hd0,3)}} (grub2 naming). grub-setup searches for {{Filename|(hd0,3)/boot/grub/core.img}}. Just because it's on {{Filename|(hd0,1)/grub/core.img}}, it is unable to find it. So I copied the grub-folder to my root partition and everything worked fine:<br />
<br />
E.g. (as root:)<br />
# mount /boot<br />
# cp -a /boot/grub /<br />
# umount /boot<br />
# mv /grub /boot/<br />
# grub-install /dev/sda</div>Enyaw ecurb