https://wiki.archlinux.org/api.php?action=feedcontributions&user=Anthonyclark&feedformat=atomArchWiki - User contributions [en]2024-03-28T18:01:40ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=227647ASUS U31SD2012-10-08T20:10:47Z<p>Anthonyclark: /* (Pre-install) Configuring GPT (Erasing the whole disk) */</p>
<hr />
<div>[[Category:ASUS]]<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
==System Specification==<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
==What DOESN'T work out of the box==<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Fn Volume Keys (see below)<br />
<br />
==What Works out of the Box / With default configuration==<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Bluetooth<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
==Not Tested==<br />
*HDMI<br />
<br />
==Installation==<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
===(Pre-install) Configuring GPT (Erasing the whole disk)===<br />
I assume you are installing Arch as the single OS on your machine. We choose GPT because it's newer, it supports larger partition tables, and the machine in focus here does have UEFI but my revision allows you to turn that off in BIOS<br />
<br />
Delete all of your partitions using `cfdisk`. Once you are done with that, run `cgdisk /dev/sda` to load up the GPT partitioner (or gdisk if you feel better that way). Before you make your usual partitions, you want to create '''2 MB''' partition at the very top. In `cgdisk` you create a new partition, assuring the start sector is 2048 (should be by default), and the ending size should be +2MB. <br />
<br />
This assures that grub2 has it's proper place to store it's core.img needed to boot. <br />
<br />
This partition will not have a filesystem, so start installing Arch on /dev/sda2 or where ever your /boot or /root is.<br />
<br />
After you are sure your 2MB partition exists and your other partition are created using cgdisk or gdisk, write the changes and run `parted /dev/sda`. You need to set the 'bios_grub' flag on that 2MB partition you made using `set 1 bios_grub on`.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
===(Arch Installer) Installing===<br />
*Assure that you do not install/configure anything on the first 2MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
Install everything as usual.<br />
<br />
Now Install GRUB2<br />
{{bc|1=$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda}}<br />
<br />
Lastly, make a grub config. (also do this if you make changes /etc/default/grub)<br />
{{bc|$ grub-mkconfig -o /boot/grub/grub.cfg}}<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
==Input / Touchpad==<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in {{bc| /etc/X/xorg.conf.d/10-synaptics.}}<br />
<br />
==Bluetooth==<br />
Installing a tool like "blueman" from the AUR and starting the bluetooth DAEMON allowed communication to bluetooth keyboards and mice.<br />
Bluetooth speakers not tested. (*users feel free to add to this)<br />
<br />
==Nvidia GPU (Optimus)==<br />
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}<br />
Read the [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus page. I will only outline a few things...<br />
<br />
You need to install the packages (and all of their dependencies) :<br />
*bumblebee<br />
*nvidia-bumblebee<br />
*nvidia-utils-bumblebee<br />
*bbswitch<br />
<br />
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.<br />
<br />
Be sure to add 'bumblebeed' to your DAEMONS array in '''rc.conf'''.<br />
<br />
Once you reboot, you should start seeing huge power saving.<br />
<br />
To check and make sure that you aren't using your GPU all the time:<br />
{{bc|<nowiki>$ lsmod | grep nv</nowiki>}}<br />
Should return nothing, this means your GPU is off.<br />
<br />
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.<br />
<br />
==Sound==<br />
Install the typical ALSA packages (libs, oss, plugins, utils).<br />
After the installation, you need to launch alsamixer<br />
{{bc|$ alsamixer}}<br />
<br />
And raise the '''SPEAKER''' level, pressing '''ESC''' to save. You should now have (low quality) sound. This is a work in progress.<br />
<br />
==Suspend / Hibernate==<br />
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.<br />
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}<br />
<br />
Create a script:<br />
{{bc|$ nano /etc/pm/sleep.d/20-asus-u31sd}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
<br />
BUSES="0000:00:1a.0 0000:00:1d.0"<br />
<br />
case "${1}" in<br />
hibernate|suspend)<br />
# Switch USB buses off<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind<br />
done<br />
;;<br />
resume|thaw)<br />
# Switch USB buses back on<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind<br />
done<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
Give it executable flag:<br />
{{bc|$ chmod +x /etc/pm/sleep.d/20-asus-u31sd}}<br />
<br />
If you want sleep your machine when you '''close your lid''', you need to edit ACPI handler script:<br />
<br />
{{bc|$ nano /etc/acpi/handler.sh}}<br />
<br />
Change line 20, to this:<br />
{{bc|<nowiki> SLPB|SBTN) pm-suspend ;;</nowiki>}}<br />
<br />
And Towards the bottom, make lines 58 and 59 look line like this:<br />
{{bc|close)<br />
pm-suspend<br />
}}<br />
<br />
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.<br />
<br />
==Fn Multimedia Keys==<br />
As with most Asus laptops/netbooks, this laptop sends its Multimedia events via ACPI. Using `acpi_listen`, I was able to discover the button commands the buttons sent to acpi. Add the following to your '''/etc/acpi/handler.sh''' file (make sure you add this after the ;; in the button/lid section):<br />
{{bc|<br />
button/volumeup)<br />
amixer set Master 5+<br />
;;<br />
button/volumedown)<br />
amixer set Master 5-<br />
;;<br />
button/mute)<br />
amixer set Master toggle<br />
;;<br />
}}<br />
<br />
You can mess with these values to move your volume at different intervals, 5 seemed to work well for me.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=227632ASUS U31SD2012-10-08T19:19:17Z<p>Anthonyclark: /* Installation */</p>
<hr />
<div>[[Category:ASUS]]<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
==System Specification==<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
==What DOESN'T work out of the box==<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Fn Volume Keys (see below)<br />
<br />
==What Works out of the Box / With default configuration==<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Bluetooth<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
==Not Tested==<br />
*HDMI<br />
<br />
==Installation==<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
===(Pre-install) Configuring GPT (Erasing the whole disk)===<br />
I assume you are installing Arch as the single OS on your machine. We choose GPT because it's newer, it supports larger partition tables, and the machine in focus here does have UEFI but my revision allows you to turn that off in BIOS<br />
<br />
<working on this><br />
<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
===(Arch Installer) Installing===<br />
*Assure that you do not install/configure anything on the first 2MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
Install everything as usual.<br />
<br />
Now Install GRUB2<br />
{{bc|1=$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda}}<br />
<br />
Lastly, make a grub config. (also do this if you make changes /etc/default/grub)<br />
{{bc|$ grub-mkconfig -o /boot/grub/grub.cfg}}<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
==Input / Touchpad==<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in {{bc| /etc/X/xorg.conf.d/10-synaptics.}}<br />
<br />
==Bluetooth==<br />
Installing a tool like "blueman" from the AUR and starting the bluetooth DAEMON allowed communication to bluetooth keyboards and mice.<br />
Bluetooth speakers not tested. (*users feel free to add to this)<br />
<br />
==Nvidia GPU (Optimus)==<br />
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}<br />
Read the [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus page. I will only outline a few things...<br />
<br />
You need to install the packages (and all of their dependencies) :<br />
*bumblebee<br />
*nvidia-bumblebee<br />
*nvidia-utils-bumblebee<br />
*bbswitch<br />
<br />
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.<br />
<br />
Be sure to add 'bumblebeed' to your DAEMONS array in '''rc.conf'''.<br />
<br />
Once you reboot, you should start seeing huge power saving.<br />
<br />
To check and make sure that you aren't using your GPU all the time:<br />
{{bc|<nowiki>$ lsmod | grep nv</nowiki>}}<br />
Should return nothing, this means your GPU is off.<br />
<br />
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.<br />
<br />
==Sound==<br />
Install the typical ALSA packages (libs, oss, plugins, utils).<br />
After the installation, you need to launch alsamixer<br />
{{bc|$ alsamixer}}<br />
<br />
And raise the '''SPEAKER''' level, pressing '''ESC''' to save. You should now have (low quality) sound. This is a work in progress.<br />
<br />
==Suspend / Hibernate==<br />
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.<br />
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}<br />
<br />
Create a script:<br />
{{bc|$ nano /etc/pm/sleep.d/20-asus-u31sd}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
<br />
BUSES="0000:00:1a.0 0000:00:1d.0"<br />
<br />
case "${1}" in<br />
hibernate|suspend)<br />
# Switch USB buses off<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind<br />
done<br />
;;<br />
resume|thaw)<br />
# Switch USB buses back on<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind<br />
done<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
Give it executable flag:<br />
{{bc|$ chmod +x /etc/pm/sleep.d/20-asus-u31sd}}<br />
<br />
If you want sleep your machine when you '''close your lid''', you need to edit ACPI handler script:<br />
<br />
{{bc|$ nano /etc/acpi/handler.sh}}<br />
<br />
Change line 20, to this:<br />
{{bc|<nowiki> SLPB|SBTN) pm-suspend ;;</nowiki>}}<br />
<br />
And Towards the bottom, make lines 58 and 59 look line like this:<br />
{{bc|close)<br />
pm-suspend<br />
}}<br />
<br />
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.<br />
<br />
==Fn Multimedia Keys==<br />
As with most Asus laptops/netbooks, this laptop sends its Multimedia events via ACPI. Using `acpi_listen`, I was able to discover the button commands the buttons sent to acpi. Add the following to your '''/etc/acpi/handler.sh''' file (make sure you add this after the ;; in the button/lid section):<br />
{{bc|<br />
button/volumeup)<br />
amixer set Master 5+<br />
;;<br />
button/volumedown)<br />
amixer set Master 5-<br />
;;<br />
button/mute)<br />
amixer set Master toggle<br />
;;<br />
}}<br />
<br />
You can mess with these values to move your volume at different intervals, 5 seemed to work well for me.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=227631ASUS U31SD2012-10-08T19:18:19Z<p>Anthonyclark: /* (Pre-install) Configuring GPT (Erasing the whole disk) */</p>
<hr />
<div>[[Category:ASUS]]<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
==System Specification==<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
==What DOESN'T work out of the box==<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Fn Volume Keys (see below)<br />
<br />
==What Works out of the Box / With default configuration==<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Bluetooth<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
==Not Tested==<br />
*HDMI<br />
<br />
==Installation==<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
===(Pre-install) Configuring GPT (Erasing the whole disk)===<br />
I assume you are installing Arch as the single OS on your machine. We choose GPT because it's newer, it supports larger partition tables, and the machine in focus here does have UEFI but my revision allows you to turn that off in BIOS<br />
<br />
<working on this><br />
<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
===(Arch Installer) Installing===<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
===(Post-install) Installing GRUB2===<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
{{bc|$ mount -o bind /dev /mnt/dev}}<br />
{{bc|$ mount -t proc /proc /mnt/proc}}<br />
{{bc|$ mount -t sysfs /sys /mnt/sys}}<br />
<br />
Now enter the chroot.<br />
{{bc|$ chroot /mnt bash}}<br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
{{bc|$ parted /dev/sda}}<br />
{{bc|$(parted) set 1 bios_grub on}}<br />
{{bc|$(parted) set 2 boot on}}<br />
<br />
Now Install GRUB2<br />
{{bc|1=$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda}}<br />
<br />
Lastly, make a grub config. (also do this if you make changes /etc/default/grub)<br />
{{bc|$ grub-mkconfig -o /boot/grub/grub.cfg}}<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
==Input / Touchpad==<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in {{bc| /etc/X/xorg.conf.d/10-synaptics.}}<br />
<br />
==Bluetooth==<br />
Installing a tool like "blueman" from the AUR and starting the bluetooth DAEMON allowed communication to bluetooth keyboards and mice.<br />
Bluetooth speakers not tested. (*users feel free to add to this)<br />
<br />
==Nvidia GPU (Optimus)==<br />
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}<br />
Read the [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus page. I will only outline a few things...<br />
<br />
You need to install the packages (and all of their dependencies) :<br />
*bumblebee<br />
*nvidia-bumblebee<br />
*nvidia-utils-bumblebee<br />
*bbswitch<br />
<br />
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.<br />
<br />
Be sure to add 'bumblebeed' to your DAEMONS array in '''rc.conf'''.<br />
<br />
Once you reboot, you should start seeing huge power saving.<br />
<br />
To check and make sure that you aren't using your GPU all the time:<br />
{{bc|<nowiki>$ lsmod | grep nv</nowiki>}}<br />
Should return nothing, this means your GPU is off.<br />
<br />
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.<br />
<br />
==Sound==<br />
Install the typical ALSA packages (libs, oss, plugins, utils).<br />
After the installation, you need to launch alsamixer<br />
{{bc|$ alsamixer}}<br />
<br />
And raise the '''SPEAKER''' level, pressing '''ESC''' to save. You should now have (low quality) sound. This is a work in progress.<br />
<br />
==Suspend / Hibernate==<br />
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.<br />
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}<br />
<br />
Create a script:<br />
{{bc|$ nano /etc/pm/sleep.d/20-asus-u31sd}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
<br />
BUSES="0000:00:1a.0 0000:00:1d.0"<br />
<br />
case "${1}" in<br />
hibernate|suspend)<br />
# Switch USB buses off<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind<br />
done<br />
;;<br />
resume|thaw)<br />
# Switch USB buses back on<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind<br />
done<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
Give it executable flag:<br />
{{bc|$ chmod +x /etc/pm/sleep.d/20-asus-u31sd}}<br />
<br />
If you want sleep your machine when you '''close your lid''', you need to edit ACPI handler script:<br />
<br />
{{bc|$ nano /etc/acpi/handler.sh}}<br />
<br />
Change line 20, to this:<br />
{{bc|<nowiki> SLPB|SBTN) pm-suspend ;;</nowiki>}}<br />
<br />
And Towards the bottom, make lines 58 and 59 look line like this:<br />
{{bc|close)<br />
pm-suspend<br />
}}<br />
<br />
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.<br />
<br />
==Fn Multimedia Keys==<br />
As with most Asus laptops/netbooks, this laptop sends its Multimedia events via ACPI. Using `acpi_listen`, I was able to discover the button commands the buttons sent to acpi. Add the following to your '''/etc/acpi/handler.sh''' file (make sure you add this after the ;; in the button/lid section):<br />
{{bc|<br />
button/volumeup)<br />
amixer set Master 5+<br />
;;<br />
button/volumedown)<br />
amixer set Master 5-<br />
;;<br />
button/mute)<br />
amixer set Master toggle<br />
;;<br />
}}<br />
<br />
You can mess with these values to move your volume at different intervals, 5 seemed to work well for me.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=227629ASUS U31SD2012-10-08T19:15:08Z<p>Anthonyclark: /* What DOESN'T work out of the box */</p>
<hr />
<div>[[Category:ASUS]]<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
==System Specification==<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
==What DOESN'T work out of the box==<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Fn Volume Keys (see below)<br />
<br />
==What Works out of the Box / With default configuration==<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Bluetooth<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
==Not Tested==<br />
*HDMI<br />
<br />
==Installation==<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
===(Pre-install) Configuring GPT (Erasing the whole disk)===<br />
You must install some tools that are not included in the installer (you do not have to upgrade pacman):<br />
{{bc|$ dhcpcd eth0}}<br />
Update `pacman` and install `gdisk`<br />
{{bc|$ pacman -Syy }}<br />
{{bc|$ pacman -S gdisk}}<br />
Launch `gdisk`<br />
{{bc|$ gdisk /dev/sda}}<br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
{{bc|<br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
}}<br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
===(Arch Installer) Installing===<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
===(Post-install) Installing GRUB2===<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
{{bc|$ mount -o bind /dev /mnt/dev}}<br />
{{bc|$ mount -t proc /proc /mnt/proc}}<br />
{{bc|$ mount -t sysfs /sys /mnt/sys}}<br />
<br />
Now enter the chroot.<br />
{{bc|$ chroot /mnt bash}}<br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
{{bc|$ parted /dev/sda}}<br />
{{bc|$(parted) set 1 bios_grub on}}<br />
{{bc|$(parted) set 2 boot on}}<br />
<br />
Now Install GRUB2<br />
{{bc|1=$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda}}<br />
<br />
Lastly, make a grub config. (also do this if you make changes /etc/default/grub)<br />
{{bc|$ grub-mkconfig -o /boot/grub/grub.cfg}}<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
==Input / Touchpad==<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in {{bc| /etc/X/xorg.conf.d/10-synaptics.}}<br />
<br />
==Bluetooth==<br />
Installing a tool like "blueman" from the AUR and starting the bluetooth DAEMON allowed communication to bluetooth keyboards and mice.<br />
Bluetooth speakers not tested. (*users feel free to add to this)<br />
<br />
==Nvidia GPU (Optimus)==<br />
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}<br />
Read the [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus page. I will only outline a few things...<br />
<br />
You need to install the packages (and all of their dependencies) :<br />
*bumblebee<br />
*nvidia-bumblebee<br />
*nvidia-utils-bumblebee<br />
*bbswitch<br />
<br />
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.<br />
<br />
Be sure to add 'bumblebeed' to your DAEMONS array in '''rc.conf'''.<br />
<br />
Once you reboot, you should start seeing huge power saving.<br />
<br />
To check and make sure that you aren't using your GPU all the time:<br />
{{bc|<nowiki>$ lsmod | grep nv</nowiki>}}<br />
Should return nothing, this means your GPU is off.<br />
<br />
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.<br />
<br />
==Sound==<br />
Install the typical ALSA packages (libs, oss, plugins, utils).<br />
After the installation, you need to launch alsamixer<br />
{{bc|$ alsamixer}}<br />
<br />
And raise the '''SPEAKER''' level, pressing '''ESC''' to save. You should now have (low quality) sound. This is a work in progress.<br />
<br />
==Suspend / Hibernate==<br />
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.<br />
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}<br />
<br />
Create a script:<br />
{{bc|$ nano /etc/pm/sleep.d/20-asus-u31sd}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
<br />
BUSES="0000:00:1a.0 0000:00:1d.0"<br />
<br />
case "${1}" in<br />
hibernate|suspend)<br />
# Switch USB buses off<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind<br />
done<br />
;;<br />
resume|thaw)<br />
# Switch USB buses back on<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind<br />
done<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
Give it executable flag:<br />
{{bc|$ chmod +x /etc/pm/sleep.d/20-asus-u31sd}}<br />
<br />
If you want sleep your machine when you '''close your lid''', you need to edit ACPI handler script:<br />
<br />
{{bc|$ nano /etc/acpi/handler.sh}}<br />
<br />
Change line 20, to this:<br />
{{bc|<nowiki> SLPB|SBTN) pm-suspend ;;</nowiki>}}<br />
<br />
And Towards the bottom, make lines 58 and 59 look line like this:<br />
{{bc|close)<br />
pm-suspend<br />
}}<br />
<br />
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.<br />
<br />
==Fn Multimedia Keys==<br />
As with most Asus laptops/netbooks, this laptop sends its Multimedia events via ACPI. Using `acpi_listen`, I was able to discover the button commands the buttons sent to acpi. Add the following to your '''/etc/acpi/handler.sh''' file (make sure you add this after the ;; in the button/lid section):<br />
{{bc|<br />
button/volumeup)<br />
amixer set Master 5+<br />
;;<br />
button/volumedown)<br />
amixer set Master 5-<br />
;;<br />
button/mute)<br />
amixer set Master toggle<br />
;;<br />
}}<br />
<br />
You can mess with these values to move your volume at different intervals, 5 seemed to work well for me.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193489ASUS U31SD2012-04-10T03:13:07Z<p>Anthonyclark: /* (Pre-install) Configuring GPT (Erasing the whole disk) */</p>
<hr />
<div>[[Category: Asus (English)]]<br />
{{i18n|Asus U31SD}}<br />
<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
==System Specification==<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
==What DOESN'T work out of the box==<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See GPT and GRUB2 guide below)<br />
*Fn Volume Keys (see below)<br />
<br />
==What Works out of the Box / With default configuration==<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Bluetooth<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
==Not Tested==<br />
*HDMI<br />
<br />
==Installation==<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
===(Pre-install) Configuring GPT (Erasing the whole disk)===<br />
You must install some tools that are not included in the installer (you do not have to upgrade pacman):<br />
{{bc|$ dhcpcd eth0}}<br />
Update `pacman` and install `gdisk`<br />
{{bc|$ pacman -Syy }}<br />
{{bc|$ pacman -S gdisk}}<br />
Launch `gdisk`<br />
{{bc|$ gdisk /dev/sda}}<br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
{{bc|<br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
}}<br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
===(Arch Installer) Installing===<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
===(Post-install) Installing GRUB2===<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
{{bc|$ mount -o bind /dev /mnt/dev}}<br />
{{bc|$ mount -t proc /proc /mnt/proc}}<br />
{{bc|$ mount -t sysfs /sys /mnt/sys}}<br />
<br />
Now enter the chroot.<br />
{{bc|$ chroot /mnt bash}}<br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
{{bc|$ parted /dev/sda}}<br />
{{bc|$(parted) set 1 bios_grub on}}<br />
{{bc|$(parted) set 2 boot on}}<br />
<br />
Now Install GRUB2<br />
{{bc|1=$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda}}<br />
<br />
Lastly, make a grub config. (also do this if you make changes /etc/default/grub)<br />
{{bc|$ grub-mkconfig -o /boot/grub/grub.cfg}}<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
==Input / Touchpad==<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in {{bc| /etc/X/xorg.conf.d/10-synaptics.}}<br />
<br />
==Bluetooth==<br />
Installing a tool like "blueman" from the AUR and starting the bluetooth DAEMON allowed communication to bluetooth keyboards and mice.<br />
Bluetooth speakers not tested. (*users feel free to add to this)<br />
<br />
==Nvidia GPU (Optimus)==<br />
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}<br />
Read the [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus page. I will only outline a few things...<br />
<br />
You need to install the packages (and all of their dependencies) :<br />
*bumblebee<br />
*nvidia-bumblebee<br />
*nvidia-utils-bumblebee<br />
*bbswitch<br />
<br />
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.<br />
<br />
Be sure to add 'bumblebeed' to your DAEMONS array in '''rc.conf'''.<br />
<br />
Once you reboot, you should start seeing huge power saving.<br />
<br />
To check and make sure that you aren't using your GPU all the time:<br />
{{bc|<nowiki>$ lsmod | grep nv</nowiki>}}<br />
Should return nothing, this means your GPU is off.<br />
<br />
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.<br />
<br />
==Sound==<br />
Install the typical ALSA packages (libs, oss, plugins, utils).<br />
After the installation, you need to launch alsamixer<br />
{{bc|$ alsamixer}}<br />
<br />
And raise the '''SPEAKER''' level, pressing '''ESC''' to save. You should now have (low quality) sound. This is a work in progress.<br />
<br />
==Suspend / Hibernate==<br />
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.<br />
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}<br />
<br />
Create a script:<br />
{{bc|$ nano /etc/pm/sleep.d/20-asus-u31sd}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
<br />
BUSES="0000:00:1a.0 0000:00:1d.0"<br />
<br />
case "${1}" in<br />
hibernate|suspend)<br />
# Switch USB buses off<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind<br />
done<br />
;;<br />
resume|thaw)<br />
# Switch USB buses back on<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind<br />
done<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
Give it executable flag:<br />
{{bc|$ chmod +x /etc/pm/sleep.d/20-asus-u31sd}}<br />
<br />
If you want sleep your machine when you '''close your lid''', you need to edit ACPI handler script:<br />
<br />
{{bc|$ nano /etc/acpi/handler.sh}}<br />
<br />
Change line 20, to this:<br />
{{bc|<nowiki> SLPB|SBTN) pm-suspend ;;</nowiki>}}<br />
<br />
And Towards the bottom, make lines 58 and 59 look line like this:<br />
{{bc|close)<br />
pm-suspend<br />
}}<br />
<br />
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.<br />
<br />
=Fn Multimedia Keys=<br />
As with most Asus laptops/netbooks, this laptop sends its Multimedia events via ACPI. Using `acpi_listen`, I was able to discover the button commands the buttons sent to acpi. Add the following to your '''/etc/acpi/handler.sh''' file (make sure you add this after the ;; in the button/lid section):<br />
<pre><br />
button/volumeup)<br />
amixer set Master 5+<br />
;;<br />
button/volumedown)<br />
amixer set Master 5-<br />
;;<br />
button/mute)<br />
amixer set Master toggle<br />
;;<br />
</pre><br />
<br />
You can mess with these values to move your volume at different intervals, 5 seemed to work well for me.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193484ASUS U31SD2012-04-09T21:36:26Z<p>Anthonyclark: Added fn keys</p>
<hr />
<div>[[Category: Asus (English)]]<br />
{{i18n|Asus U31SD}}<br />
<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
==System Specification==<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
==What DOESN'T work out of the box==<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See GPT and GRUB2 guide below)<br />
*Fn Volume Keys (see below)<br />
<br />
==What Works out of the Box / With default configuration==<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Bluetooth<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
==Not Tested==<br />
*HDMI<br />
<br />
==Installation==<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
===(Pre-install) Configuring GPT (Erasing the whole disk)===<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
{{bc|$ dhcpcd eth0}}<br />
Update `pacman` and install `gdisk`<br />
{{bc|$ pacman -Syy }}<br />
{{bc|$ pacman -S gdisk}}<br />
Launch `gdisk`<br />
{{bc|$ gdisk /dev/sda}}<br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
{{bc|<br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
}}<br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
===(Arch Installer) Installing===<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
===(Post-install) Installing GRUB2===<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
{{bc|$ mount -o bind /dev /mnt/dev}}<br />
{{bc|$ mount -t proc /proc /mnt/proc}}<br />
{{bc|$ mount -t sysfs /sys /mnt/sys}}<br />
<br />
Now enter the chroot.<br />
{{bc|$ chroot /mnt bash}}<br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
{{bc|$ parted /dev/sda}}<br />
{{bc|$(parted) set 1 bios_grub on}}<br />
{{bc|$(parted) set 2 boot on}}<br />
<br />
Now Install GRUB2<br />
{{bc|1=$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda}}<br />
<br />
Lastly, make a grub config. (also do this if you make changes /etc/default/grub)<br />
{{bc|$ grub-mkconfig -o /boot/grub/grub.cfg}}<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
==Input / Touchpad==<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in {{bc| /etc/X/xorg.conf.d/10-synaptics.}}<br />
<br />
==Bluetooth==<br />
Installing a tool like "blueman" from the AUR and starting the bluetooth DAEMON allowed communication to bluetooth keyboards and mice.<br />
Bluetooth speakers not tested. (*users feel free to add to this)<br />
<br />
==Nvidia GPU (Optimus)==<br />
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}<br />
Read the [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus page. I will only outline a few things...<br />
<br />
You need to install the packages (and all of their dependencies) :<br />
*bumblebee<br />
*nvidia-bumblebee<br />
*nvidia-utils-bumblebee<br />
*bbswitch<br />
<br />
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.<br />
<br />
Be sure to add 'bumblebeed' to your DAEMONS array in '''rc.conf'''.<br />
<br />
Once you reboot, you should start seeing huge power saving.<br />
<br />
To check and make sure that you aren't using your GPU all the time:<br />
{{bc|<nowiki>$ lsmod | grep nv</nowiki>}}<br />
Should return nothing, this means your GPU is off.<br />
<br />
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.<br />
<br />
==Sound==<br />
Install the typical ALSA packages (libs, oss, plugins, utils).<br />
After the installation, you need to launch alsamixer<br />
{{bc|$ alsamixer}}<br />
<br />
And raise the '''SPEAKER''' level, pressing '''ESC''' to save. You should now have (low quality) sound. This is a work in progress.<br />
<br />
==Suspend / Hibernate==<br />
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.<br />
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}<br />
<br />
Create a script:<br />
{{bc|$ nano /etc/pm/sleep.d/20-asus-u31sd}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
<br />
BUSES="0000:00:1a.0 0000:00:1d.0"<br />
<br />
case "${1}" in<br />
hibernate|suspend)<br />
# Switch USB buses off<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind<br />
done<br />
;;<br />
resume|thaw)<br />
# Switch USB buses back on<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind<br />
done<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
Give it executable flag:<br />
{{bc|$ chmod +x /etc/pm/sleep.d/20-asus-u31sd}}<br />
<br />
If you want sleep your machine when you '''close your lid''', you need to edit ACPI handler script:<br />
<br />
{{bc|$ nano /etc/acpi/handler.sh}}<br />
<br />
Change line 20, to this:<br />
{{bc|<nowiki> SLPB|SBTN) pm-suspend ;;</nowiki>}}<br />
<br />
And Towards the bottom, make lines 58 and 59 look line like this:<br />
{{bc|close)<br />
pm-suspend<br />
}}<br />
<br />
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.<br />
<br />
=Fn Multimedia Keys=<br />
As with most Asus laptops/netbooks, this laptop sends its Multimedia events via ACPI. Using `acpi_listen`, I was able to discover the button commands the buttons sent to acpi. Add the following to your '''/etc/acpi/handler.sh''' file (make sure you add this after the ;; in the button/lid section):<br />
<pre><br />
button/volumeup)<br />
amixer set Master 5+<br />
;;<br />
button/volumedown)<br />
amixer set Master 5-<br />
;;<br />
button/mute)<br />
amixer set Master toggle<br />
;;<br />
</pre><br />
<br />
You can mess with these values to move your volume at different intervals, 5 seemed to work well for me.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193480ASUS U31SD2012-04-09T21:06:04Z<p>Anthonyclark: /* What DOESN'T work out of the box */</p>
<hr />
<div>[[Category: Asus (English)]]<br />
{{i18n|Asus U31SD}}<br />
<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
==System Specification==<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
==What DOESN'T work out of the box==<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See GPT and GRUB2 guide below)<br />
*Fn Volume Keys<br />
<br />
==What Works out of the Box / With default configuration==<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Bluetooth<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
==Not Tested==<br />
*HDMI<br />
<br />
==Installation==<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
===(Pre-install) Configuring GPT (Erasing the whole disk)===<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
{{bc|$ dhcpcd eth0}}<br />
Update `pacman` and install `gdisk`<br />
{{bc|$ pacman -Syy }}<br />
{{bc|$ pacman -S gdisk}}<br />
Launch `gdisk`<br />
{{bc|$ gdisk /dev/sda}}<br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
{{bc|<br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
}}<br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
===(Arch Installer) Installing===<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
===(Post-install) Installing GRUB2===<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
{{bc|$ mount -o bind /dev /mnt/dev}}<br />
{{bc|$ mount -t proc /proc /mnt/proc}}<br />
{{bc|$ mount -t sysfs /sys /mnt/sys}}<br />
<br />
Now enter the chroot.<br />
{{bc|$ chroot /mnt bash}}<br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
{{bc|$ parted /dev/sda}}<br />
{{bc|$(parted) set 1 bios_grub on}}<br />
{{bc|$(parted) set 2 boot on}}<br />
<br />
Now Install GRUB2<br />
{{bc|1=$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda}}<br />
<br />
Lastly, make a grub config. (also do this if you make changes /etc/default/grub)<br />
{{bc|$ grub-mkconfig -o /boot/grub/grub.cfg}}<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
==Input / Touchpad==<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in {{bc| /etc/X/xorg.conf.d/10-synaptics.}}<br />
<br />
==Bluetooth==<br />
Installing a tool like "blueman" from the AUR and starting the bluetooth DAEMON allowed communication to bluetooth keyboards and mice.<br />
Bluetooth speakers not tested. (*users feel free to add to this)<br />
<br />
==Nvidia GPU (Optimus)==<br />
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}<br />
Read the [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus page. I will only outline a few things...<br />
<br />
You need to install the packages (and all of their dependencies) :<br />
*bumblebee<br />
*nvidia-bumblebee<br />
*nvidia-utils-bumblebee<br />
*bbswitch<br />
<br />
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.<br />
<br />
Be sure to add 'bumblebeed' to your DAEMONS array in '''rc.conf'''.<br />
<br />
Once you reboot, you should start seeing huge power saving.<br />
<br />
To check and make sure that you aren't using your GPU all the time:<br />
{{bc|<nowiki>$ lsmod | grep nv</nowiki>}}<br />
Should return nothing, this means your GPU is off.<br />
<br />
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.<br />
<br />
==Sound==<br />
Install the typical ALSA packages (libs, oss, plugins, utils).<br />
After the installation, you need to launch alsamixer<br />
{{bc|$ alsamixer}}<br />
<br />
And raise the '''SPEAKER''' level, pressing '''ESC''' to save. You should now have (low quality) sound. This is a work in progress.<br />
<br />
==Suspend / Hibernate==<br />
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.<br />
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}<br />
<br />
Create a script:<br />
{{bc|$ nano /etc/pm/sleep.d/20-asus-u31sd}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/sh<br />
<br />
BUSES="0000:00:1a.0 0000:00:1d.0"<br />
<br />
case "${1}" in<br />
hibernate|suspend)<br />
# Switch USB buses off<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind<br />
done<br />
;;<br />
resume|thaw)<br />
# Switch USB buses back on<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind<br />
done<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
Give it executable flag:<br />
{{bc|$ chmod +x /etc/pm/sleep.d/20-asus-u31sd}}<br />
<br />
If you want sleep your machine when you '''close your lid''', you need to edit ACPI handler script:<br />
<br />
{{bc|$ nano /etc/acpi/handler.sh}}<br />
<br />
Change line 20, to this:<br />
{{bc|<nowiki> SLPB|SBTN) pm-suspend ;;</nowiki>}}<br />
<br />
And Towards the bottom, make lines 58 and 59 look line like this:<br />
{{bc|close)<br />
pm-suspend<br />
}}<br />
<br />
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193386ASUS U31SD2012-04-09T02:29:07Z<p>Anthonyclark: added bluetooth section</p>
<hr />
<div>[[Category: Asus (English)]]<br />
<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
=System Specification=<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See GPT and GRUB2 guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Bluetooth<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Not Tested=<br />
*HDMI<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==(Pre-install) Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
<br />
==(Arch Installer) Installing==<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
<br />
==(Post-install) Installing GRUB2==<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
<pre>$ mount -o bind /dev /mnt/dev</pre><br />
<pre>$ mount -t proc /proc /mnt/proc</pre><br />
<pre>$ mount -t sysfs /sys /mnt/sys</pre><br />
<br />
Now enter the chroot.<br />
<pre>$ chroot /mnt bash</pre><br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
<pre>$ parted /dev/sda</pre><br />
<pre>$(parted) set 1 bios_grub on</pre><br />
<pre>$(parted) set 2 boot on</pre><br />
<br />
<br />
Now Install GRUB2<br />
<pre>$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda</pre><br />
<br />
<br />
Lastly, make a grub config. (also do this if you make changes /etc/default/grub)<br />
<pre>$ grub-mkconfig -o /boot/grub/grub.cfg</pre><br />
<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in <pre> /etc/X/xorg.conf.d/10-synaptics.</pre><br />
<br />
<br />
=Bluetooth=<br />
Installing a tool like "blueman" from the AUR and starting the bluetooth DAEMON allowed communication to bluetooth keyboards and mice.<br />
Bluetooth speakers not tested. (*users feel free to add to this)<br />
<br />
<br />
=Nvidia GPU (Optimus)=<br />
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}<br />
Read the [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus page. I will only outline a few things...<br />
<br />
You need to install the packages (and all of their dependencies) :<br />
*bumblebee<br />
*nvidia-bumblebee<br />
*nvidia-utils-bumblebee<br />
*bbswitch<br />
<br />
<br />
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.<br />
<br />
Be sure to add 'bumblebeed' to your DAEMONS array in '''rc.conf'''.<br />
<br />
Once you reboot, you should start seeing huge power saving.<br />
<br />
To check and make sure that you aren't using your GPU all the time:<br />
<pre>$ lsmod | grep nv</pre><br />
Should return nothing, this means your GPU is off.<br />
<br />
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.<br />
<br />
=Sound=<br />
Install the typical ALSA packages (libs, oss, plugins, utils).<br />
After the installation, you need to launch alsamixer<br />
<pre>$ alsamixer</pre><br />
<br />
And raise the '''SPEAKER''' level, pressing '''ESC''' to save. You should now have (low quality) sound. This is a work in progress.<br />
<br />
=Suspend / Hibernate=<br />
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.<br />
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}<br />
<br />
Create a script:<br />
<pre>$ nano /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
BUSES="0000:00:1a.0 0000:00:1d.0"<br />
<br />
case "${1}" in<br />
hibernate|suspend)<br />
# Switch USB buses off<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind<br />
done<br />
;;<br />
resume|thaw)<br />
# Switch USB buses back on<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind<br />
done<br />
;;<br />
esac<br />
</pre><br />
<br />
Give it executable flag:<br />
<pre>$ chmod +x /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<br />
If you want sleep your machine when you '''close your lid''', you need to edit ACPI handler script:<br />
<br />
<pre>$ nano /etc/acpi/handler.sh</pre><br />
<br />
Change line 20, to this:<br />
<pre> SLPB|SBTN) pm-suspend ;;</pre><br />
<br />
And Towards the bottom, make lines 58 and 59 look line like this:<br />
<pre>close)<br />
pm-suspend<br />
</pre><br />
<br />
<br />
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193383ASUS U31SD2012-04-09T02:17:00Z<p>Anthonyclark: /* (Post-install) Installing GRUB2 */</p>
<hr />
<div>[[Category: Asus (English)]]<br />
<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
=System Specification=<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See GPT and GRUB2 guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Not Tested=<br />
*Bluetooth<br />
*HDMI<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==(Pre-install) Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
<br />
==(Arch Installer) Installing==<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
<br />
==(Post-install) Installing GRUB2==<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
<pre>$ mount -o bind /dev /mnt/dev</pre><br />
<pre>$ mount -t proc /proc /mnt/proc</pre><br />
<pre>$ mount -t sysfs /sys /mnt/sys</pre><br />
<br />
Now enter the chroot.<br />
<pre>$ chroot /mnt bash</pre><br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
<pre>$ parted /dev/sda</pre><br />
<pre>$(parted) set 1 bios_grub on</pre><br />
<pre>$(parted) set 2 boot on</pre><br />
<br />
<br />
Now Install GRUB2<br />
<pre>$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda</pre><br />
<br />
<br />
Lastly, make a grub config. (also do this if you make changes /etc/default/grub)<br />
<pre>$ grub-mkconfig -o /boot/grub/grub.cfg</pre><br />
<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in <pre> /etc/X/xorg.conf.d/10-synaptics.</pre><br />
<br />
<br />
=Nvidia GPU (Optimus)=<br />
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}<br />
Read the [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus page. I will only outline a few things...<br />
<br />
You need to install the packages (and all of their dependencies) :<br />
*bumblebee<br />
*nvidia-bumblebee<br />
*nvidia-utils-bumblebee<br />
*bbswitch<br />
<br />
<br />
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.<br />
<br />
Be sure to add 'bumblebeed' to your DAEMONS array in '''rc.conf'''.<br />
<br />
Once you reboot, you should start seeing huge power saving.<br />
<br />
To check and make sure that you aren't using your GPU all the time:<br />
<pre>$ lsmod | grep nv</pre><br />
Should return nothing, this means your GPU is off.<br />
<br />
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.<br />
<br />
=Sound=<br />
Install the typical ALSA packages (libs, oss, plugins, utils).<br />
After the installation, you need to launch alsamixer<br />
<pre>$ alsamixer</pre><br />
<br />
And raise the '''SPEAKER''' level, pressing '''ESC''' to save. You should now have (low quality) sound. This is a work in progress.<br />
<br />
=Suspend / Hibernate=<br />
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.<br />
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}<br />
<br />
Create a script:<br />
<pre>$ nano /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
BUSES="0000:00:1a.0 0000:00:1d.0"<br />
<br />
case "${1}" in<br />
hibernate|suspend)<br />
# Switch USB buses off<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind<br />
done<br />
;;<br />
resume|thaw)<br />
# Switch USB buses back on<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind<br />
done<br />
;;<br />
esac<br />
</pre><br />
<br />
Give it executable flag:<br />
<pre>$ chmod +x /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<br />
If you want sleep your machine when you '''close your lid''', you need to edit ACPI handler script:<br />
<br />
<pre>$ nano /etc/acpi/handler.sh</pre><br />
<br />
Change line 20, to this:<br />
<pre> SLPB|SBTN) pm-suspend ;;</pre><br />
<br />
And Towards the bottom, make lines 58 and 59 look line like this:<br />
<pre>close)<br />
pm-suspend<br />
</pre><br />
<br />
<br />
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193382ASUS U31SD2012-04-09T02:16:33Z<p>Anthonyclark: /* (Post-install) Installing GRUB2 */</p>
<hr />
<div>[[Category: Asus (English)]]<br />
<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
=System Specification=<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See GPT and GRUB2 guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Not Tested=<br />
*Bluetooth<br />
*HDMI<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==(Pre-install) Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
<br />
==(Arch Installer) Installing==<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
<br />
==(Post-install) Installing GRUB2==<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
<pre>$ mount -o bind /dev /mnt/dev</pre><br />
<pre>$ mount -t proc /proc /mnt/proc</pre><br />
<pre>$ mount -t sysfs /sys /mnt/sys</pre><br />
<br />
Now enter the chroot.<br />
<pre>$ chroot /mnt bash</pre><br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
<pre>$ parted /dev/sda</pre><br />
<pre>$(parted) set 1 bios_grub on</pre><br />
<pre>$(parted) set 2 boot on</pre><br />
<br />
<br />
Now Install GRUB2<br />
<pre>$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda</pre><br />
<br />
<br />
Lastly, make a grub config. (also do this if you make changes /etc/default/grub)<br />
<pre>$ grub-mkconfig -o /boot/grub/grub.cfg</pre><br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in <pre> /etc/X/xorg.conf.d/10-synaptics.</pre><br />
<br />
<br />
=Nvidia GPU (Optimus)=<br />
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}<br />
Read the [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus page. I will only outline a few things...<br />
<br />
You need to install the packages (and all of their dependencies) :<br />
*bumblebee<br />
*nvidia-bumblebee<br />
*nvidia-utils-bumblebee<br />
*bbswitch<br />
<br />
<br />
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.<br />
<br />
Be sure to add 'bumblebeed' to your DAEMONS array in '''rc.conf'''.<br />
<br />
Once you reboot, you should start seeing huge power saving.<br />
<br />
To check and make sure that you aren't using your GPU all the time:<br />
<pre>$ lsmod | grep nv</pre><br />
Should return nothing, this means your GPU is off.<br />
<br />
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.<br />
<br />
=Sound=<br />
Install the typical ALSA packages (libs, oss, plugins, utils).<br />
After the installation, you need to launch alsamixer<br />
<pre>$ alsamixer</pre><br />
<br />
And raise the '''SPEAKER''' level, pressing '''ESC''' to save. You should now have (low quality) sound. This is a work in progress.<br />
<br />
=Suspend / Hibernate=<br />
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.<br />
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}<br />
<br />
Create a script:<br />
<pre>$ nano /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
BUSES="0000:00:1a.0 0000:00:1d.0"<br />
<br />
case "${1}" in<br />
hibernate|suspend)<br />
# Switch USB buses off<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind<br />
done<br />
;;<br />
resume|thaw)<br />
# Switch USB buses back on<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind<br />
done<br />
;;<br />
esac<br />
</pre><br />
<br />
Give it executable flag:<br />
<pre>$ chmod +x /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<br />
If you want sleep your machine when you '''close your lid''', you need to edit ACPI handler script:<br />
<br />
<pre>$ nano /etc/acpi/handler.sh</pre><br />
<br />
Change line 20, to this:<br />
<pre> SLPB|SBTN) pm-suspend ;;</pre><br />
<br />
And Towards the bottom, make lines 58 and 59 look line like this:<br />
<pre>close)<br />
pm-suspend<br />
</pre><br />
<br />
<br />
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193215ASUS U31SD2012-04-08T00:39:24Z<p>Anthonyclark: /* Suspend / Hibernate */</p>
<hr />
<div>[[Category: Asus (English)]]<br />
<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
=System Specification=<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See GPT and GRUB2 guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Not Tested=<br />
*Bluetooth<br />
*HDMI<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==(Pre-install) Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
<br />
==(Arch Installer) Installing==<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
<br />
==(Post-install) Installing GRUB2==<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
<pre>$ mount -o bind /dev /mnt/dev</pre><br />
<pre>$ mount -t proc /proc /mnt/proc</pre><br />
<pre>$ mount -t sysfs /sys /mnt/sys</pre><br />
<br />
Now enter the chroot.<br />
<pre>$ chroot /mnt bash</pre><br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
<pre>$ parted /dev/sda</pre><br />
<pre>$(parted) set 1 bios_grub on</pre><br />
<pre>$(parted) set 2 boot on</pre><br />
<br />
<br />
Now Install GRUB2<br />
<pre>$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda</pre><br />
<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
<br />
<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in <pre> /etc/X/xorg.conf.d/10-synaptics.</pre><br />
<br />
<br />
=Nvidia GPU (Optimus)=<br />
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}<br />
Read the [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus page. I will only outline a few things...<br />
<br />
You need to install the packages (and all of their dependencies) :<br />
*bumblebee<br />
*nvidia-bumblebee<br />
*nvidia-utils-bumblebee<br />
*bbswitch<br />
<br />
<br />
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.<br />
<br />
Be sure to add 'bumblebeed' to your DAEMONS array in '''rc.conf'''.<br />
<br />
Once you reboot, you should start seeing huge power saving.<br />
<br />
To check and make sure that you aren't using your GPU all the time:<br />
<pre>$ lsmod | grep nv</pre><br />
Should return nothing, this means your GPU is off.<br />
<br />
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.<br />
<br />
=Sound=<br />
Install the typical ALSA packages (libs, oss, plugins, utils).<br />
After the installation, you need to launch alsamixer<br />
<pre>$ alsamixer</pre><br />
<br />
And raise the '''SPEAKER''' level, pressing '''ESC''' to save. You should now have (low quality) sound. This is a work in progress.<br />
<br />
=Suspend / Hibernate=<br />
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.<br />
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}<br />
<br />
Create a script:<br />
<pre>$ nano /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
BUSES="0000:00:1a.0 0000:00:1d.0"<br />
<br />
case "${1}" in<br />
hibernate|suspend)<br />
# Switch USB buses off<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind<br />
done<br />
;;<br />
resume|thaw)<br />
# Switch USB buses back on<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind<br />
done<br />
;;<br />
esac<br />
</pre><br />
<br />
Give it executable flag:<br />
<pre>$ chmod +x /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<br />
If you want sleep your machine when you '''close your lid''', you need to edit ACPI handler script:<br />
<br />
<pre>$ nano /etc/acpi/handler.sh</pre><br />
<br />
Change line 20, to this:<br />
<pre> SLPB|SBTN) pm-suspend ;;</pre><br />
<br />
And Towards the bottom, make lines 58 and 59 look line like this:<br />
<pre>close)<br />
pm-suspend<br />
</pre><br />
<br />
<br />
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193214ASUS U31SD2012-04-08T00:38:56Z<p>Anthonyclark: /* Suspend / Hibernate */</p>
<hr />
<div>[[Category: Asus (English)]]<br />
<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
=System Specification=<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See GPT and GRUB2 guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Not Tested=<br />
*Bluetooth<br />
*HDMI<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==(Pre-install) Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
<br />
==(Arch Installer) Installing==<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
<br />
==(Post-install) Installing GRUB2==<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
<pre>$ mount -o bind /dev /mnt/dev</pre><br />
<pre>$ mount -t proc /proc /mnt/proc</pre><br />
<pre>$ mount -t sysfs /sys /mnt/sys</pre><br />
<br />
Now enter the chroot.<br />
<pre>$ chroot /mnt bash</pre><br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
<pre>$ parted /dev/sda</pre><br />
<pre>$(parted) set 1 bios_grub on</pre><br />
<pre>$(parted) set 2 boot on</pre><br />
<br />
<br />
Now Install GRUB2<br />
<pre>$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda</pre><br />
<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
<br />
<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in <pre> /etc/X/xorg.conf.d/10-synaptics.</pre><br />
<br />
<br />
=Nvidia GPU (Optimus)=<br />
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}<br />
Read the [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus page. I will only outline a few things...<br />
<br />
You need to install the packages (and all of their dependencies) :<br />
*bumblebee<br />
*nvidia-bumblebee<br />
*nvidia-utils-bumblebee<br />
*bbswitch<br />
<br />
<br />
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.<br />
<br />
Be sure to add 'bumblebeed' to your DAEMONS array in '''rc.conf'''.<br />
<br />
Once you reboot, you should start seeing huge power saving.<br />
<br />
To check and make sure that you aren't using your GPU all the time:<br />
<pre>$ lsmod | grep nv</pre><br />
Should return nothing, this means your GPU is off.<br />
<br />
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.<br />
<br />
=Sound=<br />
Install the typical ALSA packages (libs, oss, plugins, utils).<br />
After the installation, you need to launch alsamixer<br />
<pre>$ alsamixer</pre><br />
<br />
And raise the '''SPEAKER''' level, pressing '''ESC''' to save. You should now have (low quality) sound. This is a work in progress.<br />
<br />
=Suspend / Hibernate=<br />
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.<br />
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}<br />
<br />
Create a script:<br />
<pre>$ nano /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
BUSES="0000:00:1a.0 0000:00:1d.0"<br />
<br />
case "${1}" in<br />
hibernate|suspend)<br />
# Switch USB buses off<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind<br />
done<br />
;;<br />
resume|thaw)<br />
# Switch USB buses back on<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind<br />
done<br />
;;<br />
esac<br />
</pre><br />
<br />
Give it executable flag:<br />
<pre>$ chmod +x /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<br />
<br />
If you want sleep your machine when you'''close your lid''', you need to edit ACPI handler script:<br />
<br />
<pre>$ nano /etc/acpi/handler.sh</pre><br />
<br />
Change line 20, to this:<br />
<pre> SLPB|SBTN) pm-suspend ;;</pre><br />
<br />
And Towards the bottom, make lines 58 and 59 look line like this:<br />
<pre>close)<br />
pm-suspend<br />
</pre><br />
<br />
<br />
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193213ASUS U31SD2012-04-08T00:38:03Z<p>Anthonyclark: </p>
<hr />
<div>[[Category: Asus (English)]]<br />
<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
=System Specification=<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See GPT and GRUB2 guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Not Tested=<br />
*Bluetooth<br />
*HDMI<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==(Pre-install) Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
<br />
==(Arch Installer) Installing==<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
<br />
==(Post-install) Installing GRUB2==<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
<pre>$ mount -o bind /dev /mnt/dev</pre><br />
<pre>$ mount -t proc /proc /mnt/proc</pre><br />
<pre>$ mount -t sysfs /sys /mnt/sys</pre><br />
<br />
Now enter the chroot.<br />
<pre>$ chroot /mnt bash</pre><br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
<pre>$ parted /dev/sda</pre><br />
<pre>$(parted) set 1 bios_grub on</pre><br />
<pre>$(parted) set 2 boot on</pre><br />
<br />
<br />
Now Install GRUB2<br />
<pre>$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda</pre><br />
<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
<br />
<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in <pre> /etc/X/xorg.conf.d/10-synaptics.</pre><br />
<br />
<br />
=Nvidia GPU (Optimus)=<br />
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}<br />
Read the [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus page. I will only outline a few things...<br />
<br />
You need to install the packages (and all of their dependencies) :<br />
*bumblebee<br />
*nvidia-bumblebee<br />
*nvidia-utils-bumblebee<br />
*bbswitch<br />
<br />
<br />
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.<br />
<br />
Be sure to add 'bumblebeed' to your DAEMONS array in '''rc.conf'''.<br />
<br />
Once you reboot, you should start seeing huge power saving.<br />
<br />
To check and make sure that you aren't using your GPU all the time:<br />
<pre>$ lsmod | grep nv</pre><br />
Should return nothing, this means your GPU is off.<br />
<br />
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.<br />
<br />
=Sound=<br />
Install the typical ALSA packages (libs, oss, plugins, utils).<br />
After the installation, you need to launch alsamixer<br />
<pre>$ alsamixer</pre><br />
<br />
And raise the '''SPEAKER''' level, pressing '''ESC''' to save. You should now have (low quality) sound. This is a work in progress.<br />
<br />
=Suspend / Hibernate=<br />
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.<br />
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}<br />
<br />
Create a script:<br />
<pre>$ nano /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
BUSES="0000:00:1a.0 0000:00:1d.0"<br />
<br />
case "${1}" in<br />
hibernate|suspend)<br />
# Switch USB buses off<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind<br />
done<br />
;;<br />
resume|thaw)<br />
# Switch USB buses back on<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind<br />
done<br />
;;<br />
esac<br />
</prev<br />
<br />
Give it executable flag:<br />
<pre>$ chmod +x /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<br />
<br />
If you want sleep your machine when you'''close your lid''', you need to edit ACPI handler script:<br />
<br />
<pre>$ nano /etc/acpi/handler.sh</pre><br />
<br />
Change line 20, to this:<br />
<pre> SLPB|SBTN) pm-suspend ;;</pre><br />
<br />
And Towards the bottom, make lines 58 and 59 look line like this:<br />
<pre>close)<br />
pm-suspend<br />
</pre><br />
<br />
<br />
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193212ASUS U31SD2012-04-08T00:36:25Z<p>Anthonyclark: Draft 1</p>
<hr />
<div>[[Category: Asus (English)]]<br />
<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
=System Specification=<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See GPT and GRUB2 guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Not Tested=<br />
*Bluetooth<br />
*HDMI<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
<br />
==Installer Options==<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
<br />
==Installing GRUB2 (post-install)==<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
<pre>$ mount -o bind /dev /mnt/dev</pre><br />
<pre>$ mount -t proc /proc /mnt/proc</pre><br />
<pre>$ mount -t sysfs /sys /mnt/sys</pre><br />
<br />
Now enter the chroot.<br />
<pre>$ chroot /mnt bash</pre><br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
<pre>$ parted /dev/sda</pre><br />
<pre>$(parted) set 1 bios_grub on</pre><br />
<pre>$(parted) set 2 boot on</pre><br />
<br />
<br />
Now Install GRUB2<br />
<pre>$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda</pre><br />
<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
<br />
<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in <pre> /etc/X/xorg.conf.d/10-synaptics.</pre><br />
<br />
<br />
=Nvidia GPU (Optimus)=<br />
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}<br />
Read the [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus page. I will only outline a few things...<br />
<br />
You need to install the packages (and all of their dependencies) :<br />
*bumblebee<br />
*nvidia-bumblebee<br />
*nvidia-utils-bumblebee<br />
*bbswitch<br />
<br />
<br />
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.<br />
<br />
Be sure to add 'bumblebeed' to your DAEMONS array in '''rc.conf'''.<br />
<br />
Once you reboot, you should start seeing huge power saving.<br />
<br />
To check and make sure that you aren't using your GPU all the time:<br />
<pre>$ lsmod | grep nv</pre><br />
Should return nothing, this means your GPU is off.<br />
<br />
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.<br />
<br />
=Sound=<br />
Install the typical ALSA packages (libs, oss, plugins, utils).<br />
After the installation, you need to launch alsamixer<br />
<pre>$ alsamixer</pre><br />
<br />
And raise the '''SPEAKER''' level, pressing '''ESC''' to save. You should now have (low quality) sound. This is a work in progress.<br />
<br />
=Suspend / Hibernate=<br />
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.<br />
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}<br />
<br />
Create a script:<br />
<pre>$ nano /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
BUSES="0000:00:1a.0 0000:00:1d.0"<br />
<br />
case "${1}" in<br />
hibernate|suspend)<br />
# Switch USB buses off<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind<br />
done<br />
;;<br />
resume|thaw)<br />
# Switch USB buses back on<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind<br />
done<br />
;;<br />
esac<br />
</prev<br />
<br />
Give it executable flag:<br />
<pre>$ chmod +x /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<br />
<br />
If you want sleep your machine when you'''close your lid''', you need to edit ACPI handler script:<br />
<br />
<pre>$ nano /etc/acpi/handler.sh</pre><br />
<br />
Change line 20, to this:<br />
<pre> SLPB|SBTN) pm-suspend ;;</pre><br />
<br />
And Towards the bottom, make lines 58 and 59 look line like this:<br />
<pre>close)<br />
pm-suspend<br />
</pre><br />
<br />
<br />
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193211ASUS U31SD2012-04-08T00:33:32Z<p>Anthonyclark: </p>
<hr />
<div>[[Category: Asus (English)]]<br />
<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
=System Specification=<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See GPT and GRUB2 guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
<br />
==Installer Options==<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
<br />
==Installing GRUB2 (post-install)==<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
<pre>$ mount -o bind /dev /mnt/dev</pre><br />
<pre>$ mount -t proc /proc /mnt/proc</pre><br />
<pre>$ mount -t sysfs /sys /mnt/sys</pre><br />
<br />
Now enter the chroot.<br />
<pre>$ chroot /mnt bash</pre><br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
<pre>$ parted /dev/sda</pre><br />
<pre>$(parted) set 1 bios_grub on</pre><br />
<pre>$(parted) set 2 boot on</pre><br />
<br />
<br />
Now Install GRUB2<br />
<pre>$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda</pre><br />
<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
<br />
<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in <pre> /etc/X/xorg.conf.d/10-synaptics.</pre><br />
<br />
<br />
=Nvidia GPU (Optimus)=<br />
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}<br />
Read the [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus page. I will only outline a few things...<br />
<br />
You need to install the packages (and all of their dependencies) :<br />
*bumblebee<br />
*nvidia-bumblebee<br />
*nvidia-utils-bumblebee<br />
*bbswitch<br />
<br />
<br />
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.<br />
<br />
Be sure to add 'bumblebeed' to your DAEMONS array in '''rc.conf'''.<br />
<br />
Once you reboot, you should start seeing huge power saving.<br />
<br />
To check and make sure that you aren't using your GPU all the time:<br />
<pre>$ lsmod | grep nv</pre><br />
Should return nothing, this means your GPU is off.<br />
<br />
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.<br />
<br />
=Sound=<br />
<br />
=Suspend / Hibernate=<br />
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.<br />
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}<br />
<br />
Create a script:<br />
<pre>$ nano /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
BUSES="0000:00:1a.0 0000:00:1d.0"<br />
<br />
case "${1}" in<br />
hibernate|suspend)<br />
# Switch USB buses off<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind<br />
done<br />
;;<br />
resume|thaw)<br />
# Switch USB buses back on<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind<br />
done<br />
;;<br />
esac<br />
</prev<br />
<br />
Give it executable flag:<br />
<pre>$ chmod +x /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<br />
<br />
If you want sleep your machine when you'''close your lid''', you need to edit ACPI handler script:<br />
<br />
<pre>$ nano /etc/acpi/handler.sh</pre><br />
<br />
Change line 20, to this:<br />
<pre> SLPB|SBTN) pm-suspend ;;</pre><br />
<br />
And Towards the bottom, make lines 58 and 59 look line like this:<br />
<pre>close)<br />
pm-suspend<br />
</pre><br />
<br />
<br />
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193210ASUS U31SD2012-04-08T00:32:10Z<p>Anthonyclark: </p>
<hr />
<div>[[Category: Asus (English)]]<br />
<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
=System Specification=<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See GPT and GRUB2 guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
<br />
==Installer Options==<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
<br />
==Installing GRUB2 (post-install)==<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
<pre>$ mount -o bind /dev /mnt/dev</pre><br />
<pre>$ mount -t proc /proc /mnt/proc</pre><br />
<pre>$ mount -t sysfs /sys /mnt/sys</pre><br />
<br />
Now enter the chroot.<br />
<pre>$ chroot /mnt bash</pre><br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
<pre>$ parted /dev/sda</pre><br />
<pre>$(parted) set 1 bios_grub on</pre><br />
<pre>$(parted) set 2 boot on</pre><br />
<br />
<br />
Now Install GRUB2<br />
<pre>$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda</pre><br />
<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
<br />
<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in <pre> /etc/X/xorg.conf.d/10-synaptics.</pre><br />
<br />
<br />
=Nvidia GPU (Optimus)=<br />
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}<br />
Read the [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus. I will outline a few things...<br />
<br />
You need to install the packages (and all of their dependencies) :<br />
*bumblebee<br />
*nvidia-bumblebee<br />
*nvidia-utils-bumblebee<br />
*bbswitch<br />
<br />
<br />
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.<br />
<br />
Be sure to add 'bumblebeed' to your DAEMONS array in '''rc.conf'''.<br />
<br />
Once you reboot, you should start seeing huge power saving.<br />
<br />
To check and make sure that you aren't using your GPU all the time:<br />
<pre>$ lsmod | grep nv</pre><br />
Should return nothing, this means your GPU is off.<br />
<br />
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.<br />
<br />
=Sound=<br />
<br />
=Suspend / Hibernate=<br />
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.<br />
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}<br />
<br />
Create a script:<br />
<pre>$ nano /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
BUSES="0000:00:1a.0 0000:00:1d.0"<br />
<br />
case "${1}" in<br />
hibernate|suspend)<br />
# Switch USB buses off<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind<br />
done<br />
;;<br />
resume|thaw)<br />
# Switch USB buses back on<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind<br />
done<br />
;;<br />
esac<br />
</prev<br />
<br />
Give it executable flag:<br />
<pre>$ chmod +x /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<br />
<br />
If you want sleep your machine when you'''close your lid''', you need to edit ACPI handler script:<br />
<br />
<pre>$ nano /etc/acpi/handler.sh</pre><br />
<br />
Change line 20, to this:<br />
<pre> SLPB|SBTN) pm-suspend ;;</pre><br />
<br />
And Towards the bottom, make lines 58 and 59 look line like this:<br />
<pre>close)<br />
pm-suspend<br />
</pre><br />
<br />
<br />
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193209ASUS U31SD2012-04-08T00:29:34Z<p>Anthonyclark: </p>
<hr />
<div>[[Category: Asus (English)]]<br />
<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
=System Specification=<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See GPT and GRUB2 guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
<br />
==Installer Options==<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
<br />
==Installing GRUB2 (post-install)==<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
<pre>$ mount -o bind /dev /mnt/dev</pre><br />
<pre>$ mount -t proc /proc /mnt/proc</pre><br />
<pre>$ mount -t sysfs /sys /mnt/sys</pre><br />
<br />
Now enter the chroot.<br />
<pre>$ chroot /mnt bash</pre><br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
<pre>$ parted /dev/sda</pre><br />
<pre>$(parted) set 1 bios_grub on</pre><br />
<pre>$(parted) set 2 boot on</pre><br />
<br />
<br />
Now Install GRUB2<br />
<pre>$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda</pre><br />
<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
<br />
<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in <pre> /etc/X/xorg.conf.d/10-synaptics.</pre><br />
<br />
<br />
=Nvidia GPU (Optimus)=<br />
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}<br />
You need to install the packages (and all of their dependencies) :<br />
*bumblebee<br />
*nvidia-bumblebee<br />
*nvidia-utils-bumblebee<br />
*bbswitch<br />
<br />
[https://wiki.archlinux.org/index.php/Bumblebee]<br />
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.<br />
<br />
Be sure to add 'bumblebeed' to your DAEMONS array in '''rc.conf'''.<br />
<br />
Once you reboot, you should start seeing huge power saving.<br />
<br />
To check and make sure that you aren't using your GPU all the time:<br />
<pre>$ lsmod | grep nv</pre><br />
Should return nothing, this means your GPU is off.<br />
<br />
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.<br />
<br />
=Sound=<br />
<br />
=Suspend / Hibernate=<br />
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.<br />
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}<br />
<br />
Create a script:<br />
<pre>$ nano /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
BUSES="0000:00:1a.0 0000:00:1d.0"<br />
<br />
case "${1}" in<br />
hibernate|suspend)<br />
# Switch USB buses off<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind<br />
done<br />
;;<br />
resume|thaw)<br />
# Switch USB buses back on<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind<br />
done<br />
;;<br />
esac<br />
</prev<br />
<br />
Give it executable flag:<br />
<pre>$ chmod +x /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<br />
<br />
If you want sleep your machine when you'''close your lid''', you need to edit ACPI handler script:<br />
<br />
<pre>$ nano /etc/acpi/handler.sh</pre><br />
<br />
Change line 20, to this:<br />
<pre> SLPB|SBTN) pm-suspend ;;</pre><br />
<br />
And Towards the bottom, make lines 58 and 59 look line like this:<br />
<pre>close)<br />
pm-suspend<br />
</pre><br />
<br />
<br />
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193208ASUS U31SD2012-04-08T00:20:50Z<p>Anthonyclark: </p>
<hr />
<div>[[Category: Asus (English)]]<br />
<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
=System Specification=<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See GPT and GRUB2 guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
<br />
==Installer Options==<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
<br />
==Installing GRUB2 (post-install)==<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
<pre>$ mount -o bind /dev /mnt/dev</pre><br />
<pre>$ mount -t proc /proc /mnt/proc</pre><br />
<pre>$ mount -t sysfs /sys /mnt/sys</pre><br />
<br />
Now enter the chroot.<br />
<pre>$ chroot /mnt bash</pre><br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
<pre>$ parted /dev/sda</pre><br />
<pre>$(parted) set 1 bios_grub on</pre><br />
<pre>$(parted) set 2 boot on</pre><br />
<br />
<br />
Now Install GRUB2<br />
<pre>$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda</pre><br />
<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
<br />
<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in <pre> /etc/X/xorg.conf.d/10-synaptics.</pre><br />
<br />
<br />
=Nvidia GPU (Optimus)=<br />
<br />
=Sound=<br />
<br />
=Suspend / Hibernate=<br />
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.<br />
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}<br />
<br />
Create a script:<br />
<pre>$ nano /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
BUSES="0000:00:1a.0 0000:00:1d.0"<br />
<br />
case "${1}" in<br />
hibernate|suspend)<br />
# Switch USB buses off<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind<br />
done<br />
;;<br />
resume|thaw)<br />
# Switch USB buses back on<br />
for bus in $BUSES; do<br />
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind<br />
done<br />
;;<br />
esac<br />
</prev<br />
<br />
Give it executable flag:<br />
<pre>$ chmod +x /etc/pm/sleep.d/20-asus-u31sd</pre><br />
<br />
<br />
<br />
If you want sleep your machine when you'''close your lid''', you need to edit ACPI handler script:<br />
<br />
<pre>$ nano /etc/acpi/handler.sh</pre><br />
<br />
Change line 20, to this:<br />
<pre> SLPB|SBTN) pm-suspend ;;</pre><br />
<br />
And Towards the bottom, make lines 58 and 59 look line like this:<br />
<pre>close)<br />
pm-suspend<br />
</pre></div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193207ASUS U31SD2012-04-08T00:08:47Z<p>Anthonyclark: </p>
<hr />
<div>[[Category: Asus (English)]]<br />
<br />
{{Note|Read the WHOLE guide, it's very verbose}}<br />
<br />
=System Specification=<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See GPT and GRUB2 guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
<br />
==Installer Options==<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
<br />
==Installing GRUB2 (post-install)==<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
<pre>$ mount -o bind /dev /mnt/dev</pre><br />
<pre>$ mount -t proc /proc /mnt/proc</pre><br />
<pre>$ mount -t sysfs /sys /mnt/sys</pre><br />
<br />
Now enter the chroot.<br />
<pre>$ chroot /mnt bash</pre><br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
<pre>$ parted /dev/sda</pre><br />
<pre>$(parted) set 1 bios_grub on</pre><br />
<pre>$(parted) set 2 boot on</pre><br />
<br />
<br />
Now Install GRUB2<br />
<pre>$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda</pre><br />
<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
<br />
<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in <pre> /etc/X/xorg.conf.d/10-synaptics.</pre><br />
<br />
<br />
=Nvidia GPU (Optimus)=<br />
<br />
=Sound=<br />
<br />
=Suspend / Hibernate=</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193206ASUS U31SD2012-04-08T00:04:22Z<p>Anthonyclark: </p>
<hr />
<div>[[Category: Asus (English)]]<br />
<br />
=System Specification=<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See install guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
<br />
==Installer Options==<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
<br />
==Installing GRUB2 (post-install)==<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
<pre>$ mount -o bind /dev /mnt/dev</pre><br />
<pre>$ mount -t proc /proc /mnt/proc</pre><br />
<pre>$ mount -t sysfs /sys /mnt/sys</pre><br />
<br />
Now enter the chroot.<br />
<pre>$ chroot /mnt bash</pre><br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
<pre>$ parted /dev/sda</pre><br />
<pre>$(parted) set 1 bios_grub on</pre><br />
<pre>$(parted) set 2 boot on</pre><br />
<br />
<br />
Now Install GRUB2<br />
<pre>$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda</pre><br />
<br />
<br />
Follow the rest of the Sections below to get all of the hardware working.<br />
<br />
<br />
<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in <pre> /etc/X/xorg.conf.d/10-synaptics.</pre><br />
<br />
<br />
=Nvidia GPU (Optimus)=<br />
<br />
=Sound=<br />
<br />
=Suspend / Hibernate=</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193205ASUS U31SD2012-04-07T23:57:28Z<p>Anthonyclark: </p>
<hr />
<div>[[Category: Asus (English)]]<br />
<br />
<br />
<br />
<br />
=System Specification=<br />
<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See install guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
<br />
==Installing==<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
<br />
==Installing GRUB2 (post-install)==<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
<pre>$ mount -o bind /dev /mnt/dev</pre><br />
<pre>$ mount -t proc /proc /mnt/proc</pre><br />
<pre>$ mount -t sysfs /sys /mnt/sys</pre><br />
<br />
Now enter the chroot.<br />
<pre>$ chroot /mnt bash</pre><br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
<pre>$ parted /dev/sda</pre><br />
<pre>$(parted) set 1 bios_grub on</pre><br />
<pre>$(parted) set 2 boot on</pre><br />
<br />
<br />
Now Install GRUB2<br />
<pre>$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda</pre><br />
<br />
<br />
<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in /etc/X/xorg.conf.d/10-synaptics.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193204ASUS U31SD2012-04-07T23:56:54Z<p>Anthonyclark: </p>
<hr />
<div><br />
[[Category: Asus (English)]]<br />
<br />
=System Specification=<br />
<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See install guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
<br />
==Installing==<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
<br />
==Installing GRUB2 (post-install)==<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
<pre>$ mount -o bind /dev /mnt/dev</pre><br />
<pre>$ mount -t proc /proc /mnt/proc</pre><br />
<pre>$ mount -t sysfs /sys /mnt/sys</pre><br />
<br />
Now enter the chroot.<br />
<pre>$ chroot /mnt bash</pre><br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
<pre>$ parted /dev/sda</pre><br />
<pre>$(parted) set 1 bios_grub on</pre><br />
<pre>$(parted) set 2 boot on</pre><br />
<br />
<br />
Now Install GRUB2<br />
<pre>$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda</pre><br />
<br />
<br />
<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in /etc/X/xorg.conf.d/10-synaptics.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193203ASUS U31SD2012-04-07T23:55:48Z<p>Anthonyclark: </p>
<hr />
<div><br />
[[Category: Asus (English)]]<br />
<br />
=System Specification=<br />
<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See install guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
<br />
==Installing==<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
<br />
==Post Installation==<br />
*CHROOT into your new installation<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
<pre>$ mount -o bind /dev /mnt/dev</pre><br />
<pre>$ mount -t proc /proc /mnt/proc</pre><br />
<pre>$ mount -t sysfs /sys /mnt/sys</pre><br />
<br />
Now enter the chroot.<br />
<pre>$ chroot /mnt bash</pre><br />
<br />
You are now in your new installation.<br />
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
<br />
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
<pre>$ parted /dev/sda</pre><br />
<pre>$(parted) set 1 bios_grub on</pre><br />
<pre>$(parted) set 2 boot on</pre><br />
<br />
<br />
*Installing GRUB2<br />
IF everything went well, running the below command should be successful.<br />
<pre>$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda</pre><br />
<br />
<br />
<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in /etc/X/xorg.conf.d/10-synaptics.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193202ASUS U31SD2012-04-07T23:49:47Z<p>Anthonyclark: </p>
<hr />
<div><br />
[[Category: Asus (English)]]<br />
<br />
=System Specification=<br />
<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See install guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
<br />
==Installing==<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
*Do '''NOT''' install GRUB or any bootloader via the installer.<br />
<br />
<br />
==Post Installation==<br />
*During post-install, we have to '''chroot''' into your new installation and install 'gdisk', 'parted', and 'grub2-bios'.<br />
<br />
After you have exited the installer, mount the required data in order to use your new installation:<br />
<pre>$ mount -o bind /dev /mnt/dev</pre><br />
<pre>$ mount -t proc /proc /mnt/proc</pre><br />
<pre>$ mount -t sysfs /sys /mnt/sys</pre><br />
<br />
Now enter the chroot.<br />
<pre>$ chroot /mnt bash</pre><br />
<br />
You are now in your new installation.<br />
From here, update pacman and install the packages listed above.<br />
<br />
<br />
We need to do a few things here. We need change a '''FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition. <br />
<br />
<pre>$ parted /dev/sda</pre><br />
<pre>$(parted) set 1 bios_grub on</pre><br />
<pre>$(parted) set 2 boot on</pre><br />
<br />
<br />
<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in /etc/X/xorg.conf.d/10-synaptics.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193201ASUS U31SD2012-04-07T23:40:24Z<p>Anthonyclark: </p>
<hr />
<div><br />
[[Category: Asus (English)]]<br />
<br />
=System Specification=<br />
<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See install guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
<br />
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<br />
<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB 8300 GRUB2<br />
2 6144 268287 128.0 MiB 8300 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.<br />
<br />
<br />
At this point, you should '''reboot''' again so the kernel is aware of the disk changes. <br />
<br />
<br />
You do not need to reinstall `gdisk` at this point.<br />
<br />
<br />
''' At this point, you should install archlinux with the installer. '''<br />
<br />
<br />
==Installing==<br />
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2<br />
<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in /etc/X/xorg.conf.d/10-synaptics.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193200ASUS U31SD2012-04-07T23:32:37Z<p>Anthonyclark: </p>
<hr />
<div><br />
[[Category: Asus (English)]]<br />
<br />
=System Specification=<br />
<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See install guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
{(Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}<br />
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: 2<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 83): <br />
Set the bootable flag? (Y/N): Y<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): '''N'''<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 1250263728 sectors (596.2 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 1 1250263727 primary 0xEF<br />
<br />
<br />
Recovery/transformation command (? for help): p<br />
<br />
Disk /dev/sda: 1250263728 sectors, 596.2 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 1250263694<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 201421421 sectors (96.0 GiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 6143 2.0 MiB EF02 GRUB2<br />
2 6144 268287 128.0 MiB EF00 BOOT<br />
3 268288 1048844287 500.0 GiB 8300 ROOT<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
<br />
<br />
<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in /etc/X/xorg.conf.d/10-synaptics.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193199ASUS U31SD2012-04-07T23:28:08Z<p>Anthonyclark: </p>
<hr />
<div><br />
[[Category: Asus (English)]]<br />
<br />
=System Specification=<br />
<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible<br />
<br />
{{Note|This page was written for the i3 model but I'm sure the i5 model not be much different}}<br />
<br />
=What DOESN'T work out of the box=<br />
*Sleep/Hibernate (see below)<br />
*Nvidia GPU (Switchable GPU, see below)<br />
*Disk optimization (!!!!, See install guide below)<br />
<br />
=What Works out of the Box / With default configuration=<br />
*CPU (all cores detected)<br />
*Wireless<br />
*Ethernet<br />
*Framebuffer resolution (nouveau and intel xorg drivers provide this)<br />
*Intel GPU<br />
*Touchpad<br />
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)<br />
*USB<br />
<br />
=Installation=<br />
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).<br />
<br />
==Configuring GPT (Erasing the whole disk)==<br />
You must install some tools that are not included in the installer (you do not have to update pacman):<br />
<pre>$ dhcpcd eth0</pre><br />
Update `pacman` and install `gdisk`<br />
<pre>$ pacman -Syy </pre><br />
<pre>$ pacman -S gdisk</pre><br />
Launch `gdisk`<br />
<pre>$ gdisk /dev/sda</pre><br />
<br />
Since you want to start a new GPT table, choose the option to create a new GPT table.<br />
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.<br />
<br />
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.<br />
<br />
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`. <br />
<br />
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`. <br />
<br />
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.<br />
<br />
Open `gdisk` and press `r`, then press `h`... A common looking process is below:<br />
<br />
{Note|Pay close attention to the bold}<br />
<pre><br />
<br />
Command (? for help): r<br />
Recovery/transformation command (? for help): h<br />
<br />
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,<br />
just hit the Enter key at the below prompt and your MBR partition table will<br />
be untouched.<br />
<br />
Type from one to three GPT partition numbers, separated by spaces, to be<br />
added to the hybrid MBR, in sequence: '''2'''<br />
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): '''N'''<br />
<br />
<br />
Creating entry for GPT partition #2 (MBR partition #1)<br />
Enter an MBR hex code (default 07): <br />
Set the bootable flag? (Y/N): '''Y'''<br />
<br />
Creating entry for GPT partition #1 (MBR partition #2)<br />
Enter an MBR hex code (default 83): <br />
...<br />
Unused partition space(s) found. Use one to protect more partitions? (Y/N): '''N'''<br />
<br />
Recovery/transformation command (? for help): o<br />
<br />
Disk size is 625142448 sectors (298.1 GiB)<br />
MBR disk identifier: 0x00000000<br />
MBR partitions:<br />
<br />
Number Boot Start Sector End Sector Status Code<br />
1 * 566233088 625142414 primary 0x07<br />
2 2048 566233087 primary 0x83<br />
4 1 2047 primary 0xEE<br />
<br />
<br />
Recovery/transformation command (? for help): w<br />
<br />
</pre><br />
<br />
<br />
<br />
<br />
=Input / Touchpad=<br />
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in /etc/X/xorg.conf.d/10-synaptics.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=ASUS_U31SD&diff=193194ASUS U31SD2012-04-07T22:48:43Z<p>Anthonyclark: Created page with "Category: Asus (English) =System Specification= *CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge) *Memory: 4 GB DDR3 SDRAM - can be expanded to a maximum of ..."</p>
<hr />
<div>[[Category: Asus (English)]]<br />
<br />
=System Specification=<br />
<br />
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)<br />
*Memory: 4 GB DDR3 SDRAM - can be expanded to a maximum of 8GB (two DIMM slots)<br />
*WiFi: Atheros Communications Inc. AR9285<br />
*Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet<br />
*Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth<br />
*Hard-Drive: 640GB Hitachi HTS547564A9E384<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel 2nd Generation<br />
*Discrete Graphics: Nvidia GT520M (GF119)<br />
*Sound: Intel Corporation 6 Series/C200<br />
*Screen: 13.3" LCD 1366x768)<br />
*SD Card Reader<br />
*Webcam: V4L compatible</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=PS3_Controller&diff=170773PS3 Controller2011-11-22T08:05:01Z<p>Anthonyclark: Created page with "Category:Input devices (English)"</p>
<hr />
<div>[[Category:Input devices (English)]]</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=Brother_HL-2170W&diff=148837Brother HL-2170W2011-07-11T14:49:45Z<p>Anthonyclark: pxlmono is not recommended for this printer anymore; added alternative</p>
<hr />
<div>[[Category:Printers_(English)]]<br />
This is a short tutorial on installing the Brother HL-2170W (and the HL-2140) printer with [[CUPS]] on Arch Linux. If you previously tried to install the printer in CUPS, remove it.<br />
<br />
This printer will work a few different ways: with Foomatic, with the HP PCL6 driver, or with cupswrapper. For further info on cupswrapper please see the [[Brother MFC-440CN]] guide.<br />
<br />
To avoid some extra Google queries, the HL-2170w web interface default username is 'admin' and the default password is 'access'.<br />
<br />
As of July 2011, The foomatic/ljet4 driver using IPP has been shown to be really successful on most Arch setups, please attempt that first.<br />
<br />
==Using the foomatic/pxlmono driver==<br />
<br />
# Install CUPS and Foomatic: <pre># pacman -S cups foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-filters</pre><br />
# Edit your [[rc.conf]] to start cups on boot: <pre>DAEMONS=(syslog-ng network netfs cups crond)</pre><br />
# Open a web browser to http://localhost:631/<br />
# Click the Add Printer button on the Administration tab, fill out the form, and click Continue<br />
# Pick the Brother HL-2170 from the 'Device:' dropdown menu and continue.<br />
# Pick the 'Brother HL-2170W Foomatic/pxlmono (en).' If this option isn't in the list, then you can opt to manually provide the PPD file as follows (keeping the 'Add Printer' page open):<br />
## Download the pxlmono PPD file from [http://www.linuxprinting.org/show_printer.cgi?recnum=Brother-HL-2170W the OpenPrinting Database] (at the bottom of the page) and save it somewhere. <br />
## Click 'Browse' and select the PPD file you just downloaded in the 'Add Printer' page.<br />
# Now click 'Add Printer' to add the printer. When it asks for a username and password, supply the root account's username and password. <br />
# Configure any other options for your printer.<br />
# Click on the Printers tab and print a test page.<br />
<br />
<br />
<br />
<br />
==Using the foomatic/ljet4 driver using IPP==<br />
''more successful''<br />
<br />
Since the HL-2170w series supports many protocols, you are left with many options. A common option is [http://en.wikipedia.org/wiki/Internet_Printing_Protocol IPP], Internet Printing Protocol. It is recommended that you configure the HL-2170w via its web interface to have a static IP so that the IPP configuration in CUPS will always work.<br />
<br />
# Install CUPS and Foomatic: <pre># pacman -S cups foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-filters ghostscript</pre><br />
# Download the pxlmono PPD file from [http://www.linuxprinting.org/show_printer.cgi?recnum=Brother-HL-2170W the OpenPrinting Database] (Look for ljet4) and save it somewhere. <br />
# Start the cups daemon and optionally edit your [[rc.conf]] to start cups on boot: <pre>DAEMONS=(syslog-ng network netfs cups crond)</pre><br />
# Open a web browser to http://localhost:631/<br />
# Click the Add Printer button on the Administration tab (may cause chromium to crash in which case click on edit configuration and then click save)<br />
# Select IPP from the list.<br />
# In the 'Connection' field, type <pre> ipp://THE_PRINTER_IP/ipp/port1 </pre><br />
# In the next form, give the printer a unique name (no spaces and must the name be UNIQUE from any identical printers configured)<br />
# Configure the default options.<br />
# Click next then print a test page<br />
<br />
<br />
<br />
==Using the HP PCL6 driver==<br />
''This driver is not ideal, but it works. Use the foomatic/pxlmono method above, if possible.''<br />
<br />
# First install CUPS: <pre># pacman -S cups</pre><br />
# Edit your [[rc.conf]] to start cups on boot: <pre>DAEMONS=(syslog-ng network netfs cups crond)</pre><br />
# Start cups: <pre># /etc/rc.d/cups start</pre><br />
# Open a web browser to [http://localhost:631/ http://localhost:631/]<br />
# Click the Add Printer Button (fill out the form) (click Continue)<br />
# Select Internet Printing Protocol (IPP) from the drop down menu (click Continue)<br />
# In the Device URI field add the following line: <pre>http://printer:631/ipp/port1</pre> Where printer is the IP address or DNS name of your printer (click Continue)<br />
# Select "HP" under Make (click Continue)<br />
# Select HP LaserJet Series PCL 6 CUPS (en) (click Add Printer)<br />
<br />
<br />
<br />
==Troubleshooting==<br />
''Some simple reminders''<br />
# Sometimes if you get simple errors like "spool not ready" or "ipp backend failed", there is a good chance you have to resume the printer by selecting the Maintenance drop down and selecting Resume Printer.</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=Lenovo_IdeaPad_S10-3&diff=112457Lenovo IdeaPad S10-32010-07-21T23:23:37Z<p>Anthonyclark: /* Suspend & Hibernate */</p>
<hr />
<div>[[Category: Lenovo (English)]]<br />
<br />
=System Specification=<br />
<br />
*CPU: Intel Atom N450 (1.66 GHz, 512 MB L2 cache)<br />
*Memory: 1 GB DDR2 SDRAM - can be expanded to a maximum of 2GB (one RAM slot)<br />
*WiFi: Broadcom BCM4113<br />
*Hard-Drive: 250 GB 2,5" SATA, 5400 rmp<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel GMA 3150<br />
*Sound: Intel HDA: Realtek ALC272<br />
*Screen: 10.1" LCD 1024x600 (WSVGA)<br />
*5 in 1 Card Reader<br />
*Webcam: Lenovo Easycam<br />
<br />
=Wireless=<br />
The Broadcom BCM4113 card required the [http://aur.archlinux.org/packages.php?ID=19514 broadcom-wl], which is available in AUR.<br />
<br />
Some revisions have an Atheros AR9285 wifi b/g card. The 'ath9k' module is detected by udev and loaded out of the box. Some users report issues with the 'ath9k' driver and this particular chipset. In this case, use the [http://wiki.archlinux.org/index.php/Wireless_Setup#ndiswrapper ndiswrapper] method. Also, add '!ath9k' and 'ndiswrapper' to the MODULES() line in /etc/rc.conf.<br />
<br />
=Graphics=<br />
The Intel GMA 3150 requires the XF86-video-intel module. No Xorg.conf is required.<br />
<br />
=Input=<br />
The keyboard and touchpad work more or less without problems using the XF86-input-keyboard and XF86-input-synaptics modules, respectively. Right- and left clicking works, as well as vertical edge scrolling and right-click tapping. I have not managed to get two- and three finger taps to work, nor two-finger scroll. <br />
<br />
==Funktion Keys==<br />
The function keys only work for some extent, e.g. the keys for turning off the LCD backlight works but not those for turning on and off WiFi, touchpad, etc. To make the volume keys work, map "XF86AudioRaiseVolume" to "amixer set Master 5%+" and "XF86AudioLowerVolume" to "amixer set Master 5%-" <br />
<br />
The brightness keys do not work and do not appear to be recognized by the system. To adjust brightness, I modified this script [http://www.winmoor.nl/Samsung-R519-Display-Brightness.html] and mapped super+up and super+down to the up and down scripts, respectively. <br />
<br />
Create a file called something like "brighness_up" in a directory of your choice, e.g. <br />
<pre>nano /home/your_user_name/scripts/brightness_up</pre><br />
<br />
Paste the text below, and save the file.<br />
<br />
<pre>#!/bin/bash<br />
<br />
# these are the possible values:<br />
# 42 56 70 92 AF CC E5 FF<br />
# 30 40 50 60 70 80 90 100 %<br />
<br />
Current=`sudo setpci -s 00:02.0 F4.B`<br />
case $Current in<br />
42)<br />
sudo setpci -s 00:02.0 F4.B=56<br />
;;<br />
56)<br />
sudo setpci -s 00:02.0 F4.B=70<br />
;;<br />
70)<br />
sudo setpci -s 00:02.0 F4.B=92<br />
;;<br />
92)<br />
sudo setpci -s 00:02.0 F4.B=af<br />
;;<br />
af)<br />
sudo setpci -s 00:02.0 F4.B=cc<br />
;;<br />
cc)<br />
sudo setpci -s 00:02.0 F4.B=e5<br />
;;<br />
e5)<br />
sudo setpci -s 00:02.0 F4.B=ff<br />
;;<br />
esac<br />
Current=`sudo setpci -s 00:02.0 F4.B`<br />
case $Current in<br />
42)<br />
notify-send "Brightness is at 30%"<br />
;;<br />
56)<br />
notify-send "Brightness is at 40%"<br />
;;<br />
70)<br />
notify-send "Brightness is at 50%"<br />
;;<br />
92)<br />
notify-send "Brightness is at 60%"<br />
;;<br />
af)<br />
notify-send "Brightness is at 70%"<br />
;;<br />
cc)<br />
notify-send "Brightness is at 80%"<br />
;;<br />
e5)<br />
notify-send "Brightness is at 90%"<br />
;;<br />
ff)<br />
notify-send "Brightness is at 100%"<br />
;;<br />
esac<br />
</pre><br />
And make the file executable, e.g<br />
<pre>chmod u+x ~/scripts/brightness_up</pre><br />
<br />
For lowering the screen brightness, make a script containing this:<br />
<pre>#!/bin/bash<br />
<br />
# these are the possible values:<br />
# 42 56 70 92 AF CC E5 FF<br />
# 30 40 50 60 70 80 90 100 %<br />
<br />
Current=`sudo setpci -s 00:02.0 F4.B`<br />
case $Current in<br />
ff)<br />
sudo setpci -s 00:02.0 F4.B=e5<br />
;;<br />
e5)<br />
sudo setpci -s 00:02.0 F4.B=cc<br />
;;<br />
cc)<br />
sudo setpci -s 00:02.0 F4.B=af<br />
;;<br />
af)<br />
sudo setpci -s 00:02.0 F4.B=92<br />
;;<br />
92)<br />
sudo setpci -s 00:02.0 F4.B=70<br />
;;<br />
70)<br />
sudo setpci -s 00:02.0 F4.B=56<br />
;;<br />
56)<br />
sudo setpci -s 00:02.0 F4.B=42<br />
;;<br />
esac<br />
Current=`sudo setpci -s 00:02.0 F4.B`<br />
case $Current in<br />
42)<br />
notify-send "Brightness is at 30%"<br />
;;<br />
56)<br />
notify-send "Brightness is at 40%"<br />
;;<br />
70)<br />
notify-send "Brightness is at 50%"<br />
;;<br />
92)<br />
notify-send "Brightness is at 60%"<br />
;;<br />
af)<br />
notify-send "Brightness is at 70%"<br />
;;<br />
cc)<br />
notify-send "Brightness is at 80%"<br />
;;<br />
e5)<br />
notify-send "Brightness is at 90%"<br />
;;<br />
ff)<br />
notify-send "Brightness is at 100%"<br />
;;<br />
esac<br />
</pre><br />
<br />
=Suspend & Hibernate=<br />
Works without any problems after installing acpid.<br />
<br />
=Card Reader=<br />
Works out of the box.<br />
<br />
=Web Cam=<br />
Works out of the box</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=Lenovo_IdeaPad_S10-3&diff=112456Lenovo IdeaPad S10-32010-07-21T23:22:33Z<p>Anthonyclark: /* Wireless */</p>
<hr />
<div>[[Category: Lenovo (English)]]<br />
<br />
=System Specification=<br />
<br />
*CPU: Intel Atom N450 (1.66 GHz, 512 MB L2 cache)<br />
*Memory: 1 GB DDR2 SDRAM - can be expanded to a maximum of 2GB (one RAM slot)<br />
*WiFi: Broadcom BCM4113<br />
*Hard-Drive: 250 GB 2,5" SATA, 5400 rmp<br />
*Optical Drive: None<br />
*Integrated Graphics: Intel GMA 3150<br />
*Sound: Intel HDA: Realtek ALC272<br />
*Screen: 10.1" LCD 1024x600 (WSVGA)<br />
*5 in 1 Card Reader<br />
*Webcam: Lenovo Easycam<br />
<br />
=Wireless=<br />
The Broadcom BCM4113 card required the [http://aur.archlinux.org/packages.php?ID=19514 broadcom-wl], which is available in AUR.<br />
<br />
Some revisions have an Atheros AR9285 wifi b/g card. The 'ath9k' module is detected by udev and loaded out of the box. Some users report issues with the 'ath9k' driver and this particular chipset. In this case, use the [http://wiki.archlinux.org/index.php/Wireless_Setup#ndiswrapper ndiswrapper] method. Also, add '!ath9k' and 'ndiswrapper' to the MODULES() line in /etc/rc.conf.<br />
<br />
=Graphics=<br />
The Intel GMA 3150 requires the XF86-video-intel module. No Xorg.conf is required.<br />
<br />
=Input=<br />
The keyboard and touchpad work more or less without problems using the XF86-input-keyboard and XF86-input-synaptics modules, respectively. Right- and left clicking works, as well as vertical edge scrolling and right-click tapping. I have not managed to get two- and three finger taps to work, nor two-finger scroll. <br />
<br />
==Funktion Keys==<br />
The function keys only work for some extent, e.g. the keys for turning off the LCD backlight works but not those for turning on and off WiFi, touchpad, etc. To make the volume keys work, map "XF86AudioRaiseVolume" to "amixer set Master 5%+" and "XF86AudioLowerVolume" to "amixer set Master 5%-" <br />
<br />
The brightness keys do not work and do not appear to be recognized by the system. To adjust brightness, I modified this script [http://www.winmoor.nl/Samsung-R519-Display-Brightness.html] and mapped super+up and super+down to the up and down scripts, respectively. <br />
<br />
Create a file called something like "brighness_up" in a directory of your choice, e.g. <br />
<pre>nano /home/your_user_name/scripts/brightness_up</pre><br />
<br />
Paste the text below, and save the file.<br />
<br />
<pre>#!/bin/bash<br />
<br />
# these are the possible values:<br />
# 42 56 70 92 AF CC E5 FF<br />
# 30 40 50 60 70 80 90 100 %<br />
<br />
Current=`sudo setpci -s 00:02.0 F4.B`<br />
case $Current in<br />
42)<br />
sudo setpci -s 00:02.0 F4.B=56<br />
;;<br />
56)<br />
sudo setpci -s 00:02.0 F4.B=70<br />
;;<br />
70)<br />
sudo setpci -s 00:02.0 F4.B=92<br />
;;<br />
92)<br />
sudo setpci -s 00:02.0 F4.B=af<br />
;;<br />
af)<br />
sudo setpci -s 00:02.0 F4.B=cc<br />
;;<br />
cc)<br />
sudo setpci -s 00:02.0 F4.B=e5<br />
;;<br />
e5)<br />
sudo setpci -s 00:02.0 F4.B=ff<br />
;;<br />
esac<br />
Current=`sudo setpci -s 00:02.0 F4.B`<br />
case $Current in<br />
42)<br />
notify-send "Brightness is at 30%"<br />
;;<br />
56)<br />
notify-send "Brightness is at 40%"<br />
;;<br />
70)<br />
notify-send "Brightness is at 50%"<br />
;;<br />
92)<br />
notify-send "Brightness is at 60%"<br />
;;<br />
af)<br />
notify-send "Brightness is at 70%"<br />
;;<br />
cc)<br />
notify-send "Brightness is at 80%"<br />
;;<br />
e5)<br />
notify-send "Brightness is at 90%"<br />
;;<br />
ff)<br />
notify-send "Brightness is at 100%"<br />
;;<br />
esac<br />
</pre><br />
And make the file executable, e.g<br />
<pre>chmod u+x ~/scripts/brightness_up</pre><br />
<br />
For lowering the screen brightness, make a script containing this:<br />
<pre>#!/bin/bash<br />
<br />
# these are the possible values:<br />
# 42 56 70 92 AF CC E5 FF<br />
# 30 40 50 60 70 80 90 100 %<br />
<br />
Current=`sudo setpci -s 00:02.0 F4.B`<br />
case $Current in<br />
ff)<br />
sudo setpci -s 00:02.0 F4.B=e5<br />
;;<br />
e5)<br />
sudo setpci -s 00:02.0 F4.B=cc<br />
;;<br />
cc)<br />
sudo setpci -s 00:02.0 F4.B=af<br />
;;<br />
af)<br />
sudo setpci -s 00:02.0 F4.B=92<br />
;;<br />
92)<br />
sudo setpci -s 00:02.0 F4.B=70<br />
;;<br />
70)<br />
sudo setpci -s 00:02.0 F4.B=56<br />
;;<br />
56)<br />
sudo setpci -s 00:02.0 F4.B=42<br />
;;<br />
esac<br />
Current=`sudo setpci -s 00:02.0 F4.B`<br />
case $Current in<br />
42)<br />
notify-send "Brightness is at 30%"<br />
;;<br />
56)<br />
notify-send "Brightness is at 40%"<br />
;;<br />
70)<br />
notify-send "Brightness is at 50%"<br />
;;<br />
92)<br />
notify-send "Brightness is at 60%"<br />
;;<br />
af)<br />
notify-send "Brightness is at 70%"<br />
;;<br />
cc)<br />
notify-send "Brightness is at 80%"<br />
;;<br />
e5)<br />
notify-send "Brightness is at 90%"<br />
;;<br />
ff)<br />
notify-send "Brightness is at 100%"<br />
;;<br />
esac<br />
</pre><br />
<br />
=Suspend & Hibernate=<br />
Works without any problems.<br />
<br />
=Card Reader=<br />
Works out of the box.<br />
<br />
=Web Cam=<br />
Works out of the box</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=Brother_HL-2170W&diff=110232Brother HL-2170W2010-07-01T13:14:44Z<p>Anthonyclark: /* Using the foomatic/pxlmono driver using IPP */</p>
<hr />
<div>[[Category:Printers_(English)]]<br />
[[Category:HOWTOs (English)]]<br />
This is a short tutorial on installing the Brother HL-2170W (and the HL-2140) printer with [[CUPS]] on Arch Linux. If you previously tried to install the printer in CUPS, remove it.<br />
<br />
This printer will work a few different ways: with Foomatic, with the HP PCL6 driver, or with cupswrapper. For further info on cupswrapper please see the [[Brother MFC-440CN]] guide.<br />
<br />
To avoid some extra Google queries, the HL-2170w web interface default username is 'admin' and the default password is 'access'.<br />
<br />
The foomatic/pxlmono driver using IPP has been shown to be really successful on most Arch setups, please attempt that first.<br />
<br />
<br />
==Using the foomatic/pxlmono driver==<br />
<br />
# Install CUPS and Foomatic: <pre># pacman -S cups foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-filters</pre><br />
# Edit your [[rc.conf]] to start cups on boot: <pre>DAEMONS=(syslog-ng network netfs cups crond)</pre><br />
# Open a web browser to http://localhost:631/<br />
# Click the Add Printer button on the Administration tab, fill out the form, and click Continue<br />
# Pick the Brother HL-2170 from the 'Device:' dropdown menu and continue.<br />
# Pick the 'Brother HL-2170W Foomatic/pxlmono (en).' If this option isn't in the list, then you can opt to manually provide the PPD file as follows (keeping the 'Add Printer' page open):<br />
## Download the pxlmono PPD file from [http://www.linuxprinting.org/show_printer.cgi?recnum=Brother-HL-2170W the OpenPrinting Database] (at the bottom of the page) and save it somewhere. <br />
## Click 'Browse' and select the PPD file you just downloaded in the 'Add Printer' page.<br />
# Now click 'Add Printer' to add the printer. When it asks for a username and password, supply the root account's username and password. <br />
# Configure any other options for your printer.<br />
# Click on the Printers tab and print a test page.<br />
<br />
<br />
<br />
==Using the foomatic/pxlmono driver using IPP==<br />
''more successful''<br />
<br />
Since the HL-2170w series supports many protocols, you are left with many options. A common option is [http://en.wikipedia.org/wiki/Internet_Printing_Protocol IPP], Internet Printing Protocol. It is recommended that you configure the HL-2170w via its web interface to have a static IP so that the IPP configuration in CUPS will always work.<br />
<br />
<br />
# Install CUPS and Foomatic: <pre># pacman -S cups foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-filters</pre><br />
# Download the pxlmono PPD file from [http://www.linuxprinting.org/show_printer.cgi?recnum=Brother-HL-2170W the OpenPrinting Database] (at the bottom of the page) and save it somewhere. <br />
# Start the cups daemon and optionally edit your [[rc.conf]] to start cups on boot: <pre>DAEMONS=(syslog-ng network netfs cups crond)</pre><br />
# Open a web browser to http://localhost:631/<br />
# Click the Add Printer button on the Administration tab (may cause chromium to crash in which case click on edit configuration and then click save)<br />
# Select IPP from the list.<br />
# In the 'Connection' field, type <pre> ipp://THE_PRINTER_IP/ipp/port1 </pre><br />
# In the next form, give the printer a unique name (no spaces and must the name be UNIQUE from any identical printers configured)<br />
# Click next then print a test page<br />
<br />
==Using the HP PCL6 driver==<br />
''This driver is not ideal, but it works. Use the foomatic/pxlmono method above, if possible.''<br />
<br />
# First install CUPS: <pre># pacman -S cups</pre><br />
# Edit your [[rc.conf]] to start cups on boot: <pre>DAEMONS=(syslog-ng network netfs cups crond)</pre><br />
# Start cups: <pre># /etc/rc.d/cups start</pre><br />
# Open a web browser to [http://localhost:631/ http://localhost:631/]<br />
# Click the Add Printer Button (fill out the form) (click Continue)<br />
# Select Internet Printing Protocol (IPP) from the drop down menu (click Continue)<br />
# In the Device URI field add the following line: <pre>http://printer:631/ipp/port1</pre> Where printer is the IP address or DNS name of your printer (click Continue)<br />
# Select "HP" under Make (click Continue)<br />
# Select HP LaserJet Series PCL 6 CUPS (en) (click Add Printer)</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=Brother_HL-2170W&diff=110231Brother HL-2170W2010-07-01T13:14:24Z<p>Anthonyclark: /* Using the foomatic/pxlmono driver via IPP */</p>
<hr />
<div>[[Category:Printers_(English)]]<br />
[[Category:HOWTOs (English)]]<br />
This is a short tutorial on installing the Brother HL-2170W (and the HL-2140) printer with [[CUPS]] on Arch Linux. If you previously tried to install the printer in CUPS, remove it.<br />
<br />
This printer will work a few different ways: with Foomatic, with the HP PCL6 driver, or with cupswrapper. For further info on cupswrapper please see the [[Brother MFC-440CN]] guide.<br />
<br />
To avoid some extra Google queries, the HL-2170w web interface default username is 'admin' and the default password is 'access'.<br />
<br />
The foomatic/pxlmono driver using IPP has been shown to be really successful on most Arch setups, please attempt that first.<br />
<br />
<br />
==Using the foomatic/pxlmono driver==<br />
<br />
# Install CUPS and Foomatic: <pre># pacman -S cups foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-filters</pre><br />
# Edit your [[rc.conf]] to start cups on boot: <pre>DAEMONS=(syslog-ng network netfs cups crond)</pre><br />
# Open a web browser to http://localhost:631/<br />
# Click the Add Printer button on the Administration tab, fill out the form, and click Continue<br />
# Pick the Brother HL-2170 from the 'Device:' dropdown menu and continue.<br />
# Pick the 'Brother HL-2170W Foomatic/pxlmono (en).' If this option isn't in the list, then you can opt to manually provide the PPD file as follows (keeping the 'Add Printer' page open):<br />
## Download the pxlmono PPD file from [http://www.linuxprinting.org/show_printer.cgi?recnum=Brother-HL-2170W the OpenPrinting Database] (at the bottom of the page) and save it somewhere. <br />
## Click 'Browse' and select the PPD file you just downloaded in the 'Add Printer' page.<br />
# Now click 'Add Printer' to add the printer. When it asks for a username and password, supply the root account's username and password. <br />
# Configure any other options for your printer.<br />
# Click on the Printers tab and print a test page.<br />
<br />
<br />
<br />
==Using the foomatic/pxlmono driver using IPP==<br />
''more successful''<br />
<br />
Since the HL-2170w series supports many protocols, you are left with many options. A common option is [http://en.wikipedia.org/wiki/Internet_Printing_Protocol IPP], Internet Printing Protocol. It is recommended that you configure the HL-2170w via its web interface to have a static IP so that the IPP configuration in CUPS will always work.<br />
<br />
<br />
# Install CUPS and Foomatic: <pre># pacman -S cups foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-filters</pre><br />
# Download the pxlmono PPD file from [http://www.linuxprinting.org/show_printer.cgi?recnum=Brother-HL-2170W the OpenPrinting Database] (at the bottom of the page) and save it somewhere. <br />
# Start the cups daemon and optionally edit your [[rc.conf]] to start cups on boot: <pre>DAEMONS=(syslog-ng network netfs cups crond)</pre><br />
# Open a web browser to http://localhost:631/<br />
# Click the Add Printer button on the Administration tab (may cause chromium to crash in which case click on edit configuration and then click save)<br />
# Select IPP from the list.<br />
# In the 'Connection' field, type <pre> ipp://THE_PRINTER_IP/ipp/port1 </pre><br />
# In the next form, give the printer a unique name (no spaces and must the name be UNIQUE from any identical printers configured)<br />
# Click next then print a test page<br />
<br />
<br />
<br />
The first method above using the automatic network discovery did not work for me. The IPP method did. Good luck!<br />
<br />
==Using the HP PCL6 driver==<br />
''This driver is not ideal, but it works. Use the foomatic/pxlmono method above, if possible.''<br />
<br />
# First install CUPS: <pre># pacman -S cups</pre><br />
# Edit your [[rc.conf]] to start cups on boot: <pre>DAEMONS=(syslog-ng network netfs cups crond)</pre><br />
# Start cups: <pre># /etc/rc.d/cups start</pre><br />
# Open a web browser to [http://localhost:631/ http://localhost:631/]<br />
# Click the Add Printer Button (fill out the form) (click Continue)<br />
# Select Internet Printing Protocol (IPP) from the drop down menu (click Continue)<br />
# In the Device URI field add the following line: <pre>http://printer:631/ipp/port1</pre> Where printer is the IP address or DNS name of your printer (click Continue)<br />
# Select "HP" under Make (click Continue)<br />
# Select HP LaserJet Series PCL 6 CUPS (en) (click Add Printer)</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=Brother_HL-2170W&diff=110230Brother HL-2170W2010-07-01T13:13:54Z<p>Anthonyclark: </p>
<hr />
<div>[[Category:Printers_(English)]]<br />
[[Category:HOWTOs (English)]]<br />
This is a short tutorial on installing the Brother HL-2170W (and the HL-2140) printer with [[CUPS]] on Arch Linux. If you previously tried to install the printer in CUPS, remove it.<br />
<br />
This printer will work a few different ways: with Foomatic, with the HP PCL6 driver, or with cupswrapper. For further info on cupswrapper please see the [[Brother MFC-440CN]] guide.<br />
<br />
To avoid some extra Google queries, the HL-2170w web interface default username is 'admin' and the default password is 'access'.<br />
<br />
The foomatic/pxlmono driver using IPP has been shown to be really successful on most Arch setups, please attempt that first.<br />
<br />
<br />
==Using the foomatic/pxlmono driver==<br />
<br />
# Install CUPS and Foomatic: <pre># pacman -S cups foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-filters</pre><br />
# Edit your [[rc.conf]] to start cups on boot: <pre>DAEMONS=(syslog-ng network netfs cups crond)</pre><br />
# Open a web browser to http://localhost:631/<br />
# Click the Add Printer button on the Administration tab, fill out the form, and click Continue<br />
# Pick the Brother HL-2170 from the 'Device:' dropdown menu and continue.<br />
# Pick the 'Brother HL-2170W Foomatic/pxlmono (en).' If this option isn't in the list, then you can opt to manually provide the PPD file as follows (keeping the 'Add Printer' page open):<br />
## Download the pxlmono PPD file from [http://www.linuxprinting.org/show_printer.cgi?recnum=Brother-HL-2170W the OpenPrinting Database] (at the bottom of the page) and save it somewhere. <br />
## Click 'Browse' and select the PPD file you just downloaded in the 'Add Printer' page.<br />
# Now click 'Add Printer' to add the printer. When it asks for a username and password, supply the root account's username and password. <br />
# Configure any other options for your printer.<br />
# Click on the Printers tab and print a test page.<br />
<br />
<br />
<br />
==Using the foomatic/pxlmono driver via IPP==<br />
''more successful''<br />
<br />
Since the HL-2170w series supports many protocols, you are left with many options. A common option is [http://en.wikipedia.org/wiki/Internet_Printing_Protocol IPP], Internet Printing Protocol. It is recommended that you configure the HL-2170w via its web interface to have a static IP so that the IPP configuration in CUPS will always work.<br />
<br />
<br />
# Install CUPS and Foomatic: <pre># pacman -S cups foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-filters</pre><br />
# Download the pxlmono PPD file from [http://www.linuxprinting.org/show_printer.cgi?recnum=Brother-HL-2170W the OpenPrinting Database] (at the bottom of the page) and save it somewhere. <br />
# Start the cups daemon and optionally edit your [[rc.conf]] to start cups on boot: <pre>DAEMONS=(syslog-ng network netfs cups crond)</pre><br />
# Open a web browser to http://localhost:631/<br />
# Click the Add Printer button on the Administration tab (may cause chromium to crash in which case click on edit configuration and then click save)<br />
# Select IPP from the list.<br />
# In the 'Connection' field, type <pre> ipp://THE_PRINTER_IP/ipp/port1 </pre><br />
# In the next form, give the printer a unique name (no spaces and must the name be UNIQUE from any identical printers configured)<br />
# Click next then print a test page<br />
<br />
<br />
<br />
The first method above using the automatic network discovery did not work for me. The IPP method did. Good luck!<br />
<br />
==Using the HP PCL6 driver==<br />
''This driver is not ideal, but it works. Use the foomatic/pxlmono method above, if possible.''<br />
<br />
# First install CUPS: <pre># pacman -S cups</pre><br />
# Edit your [[rc.conf]] to start cups on boot: <pre>DAEMONS=(syslog-ng network netfs cups crond)</pre><br />
# Start cups: <pre># /etc/rc.d/cups start</pre><br />
# Open a web browser to [http://localhost:631/ http://localhost:631/]<br />
# Click the Add Printer Button (fill out the form) (click Continue)<br />
# Select Internet Printing Protocol (IPP) from the drop down menu (click Continue)<br />
# In the Device URI field add the following line: <pre>http://printer:631/ipp/port1</pre> Where printer is the IP address or DNS name of your printer (click Continue)<br />
# Select "HP" under Make (click Continue)<br />
# Select HP LaserJet Series PCL 6 CUPS (en) (click Add Printer)</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=Brother_HL-2170W&diff=110229Brother HL-2170W2010-07-01T13:12:16Z<p>Anthonyclark: /* Using the foomatic/pxlmono driver */</p>
<hr />
<div>[[Category:Printers_(English)]]<br />
[[Category:HOWTOs (English)]]<br />
This is a short tutorial on installing the Brother HL-2170W (and the HL-2140) printer with [[CUPS]] on Arch Linux. If you previously tried to install the printer in CUPS, remove it.<br />
<br />
This printer will work a few different ways: with Foomatic, with the HP PCL6 driver, or with cupswrapper. For further info on cupswrapper please see the [[Brother MFC-440CN]] guide.<br />
<br />
To avoid some extra Google queries, the HL-2170w web interface default username is 'admin' and the default password is 'access'.<br />
<br />
<br />
==Using the foomatic/pxlmono driver==<br />
<br />
# Install CUPS and Foomatic: <pre># pacman -S cups foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-filters</pre><br />
# Edit your [[rc.conf]] to start cups on boot: <pre>DAEMONS=(syslog-ng network netfs cups crond)</pre><br />
# Open a web browser to http://localhost:631/<br />
# Click the Add Printer button on the Administration tab, fill out the form, and click Continue<br />
# Pick the Brother HL-2170 from the 'Device:' dropdown menu and continue.<br />
# Pick the 'Brother HL-2170W Foomatic/pxlmono (en).' If this option isn't in the list, then you can opt to manually provide the PPD file as follows (keeping the 'Add Printer' page open):<br />
## Download the pxlmono PPD file from [http://www.linuxprinting.org/show_printer.cgi?recnum=Brother-HL-2170W the OpenPrinting Database] (at the bottom of the page) and save it somewhere. <br />
## Click 'Browse' and select the PPD file you just downloaded in the 'Add Printer' page.<br />
# Now click 'Add Printer' to add the printer. When it asks for a username and password, supply the root account's username and password. <br />
# Configure any other options for your printer.<br />
# Click on the Printers tab and print a test page.<br />
<br />
<br />
<br />
==Using the foomatic/pxlmono driver via IPP==<br />
''more successful''<br />
<br />
Since the HL-2170w series supports many protocols, you are left with many options. A common option is [http://en.wikipedia.org/wiki/Internet_Printing_Protocol IPP], Internet Printing Protocol. It is recommended that you configure the HL-2170w via its web interface to have a static IP so that the IPP configuration in CUPS will always work.<br />
<br />
<br />
# Install CUPS and Foomatic: <pre># pacman -S cups foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-filters</pre><br />
# Download the pxlmono PPD file from [http://www.linuxprinting.org/show_printer.cgi?recnum=Brother-HL-2170W the OpenPrinting Database] (at the bottom of the page) and save it somewhere. <br />
# Start the cups daemon and optionally edit your [[rc.conf]] to start cups on boot: <pre>DAEMONS=(syslog-ng network netfs cups crond)</pre><br />
# Open a web browser to http://localhost:631/<br />
# Click the Add Printer button on the Administration tab (may cause chromium to crash in which case click on edit configuration and then click save)<br />
# Select IPP from the list.<br />
# In the 'Connection' field, type <pre> ipp://THE_PRINTER_IP/ipp/port1 </pre><br />
# In the next form, give the printer a unique name (no spaces and must the name be UNIQUE from any identical printers configured)<br />
# Click next then print a test page<br />
<br />
<br />
<br />
The first method above using the automatic network discovery did not work for me. The IPP method did. Good luck!<br />
<br />
==Using the HP PCL6 driver==<br />
''This driver is not ideal, but it works. Use the foomatic/pxlmono method above, if possible.''<br />
<br />
# First install CUPS: <pre># pacman -S cups</pre><br />
# Edit your [[rc.conf]] to start cups on boot: <pre>DAEMONS=(syslog-ng network netfs cups crond)</pre><br />
# Start cups: <pre># /etc/rc.d/cups start</pre><br />
# Open a web browser to [http://localhost:631/ http://localhost:631/]<br />
# Click the Add Printer Button (fill out the form) (click Continue)<br />
# Select Internet Printing Protocol (IPP) from the drop down menu (click Continue)<br />
# In the Device URI field add the following line: <pre>http://printer:631/ipp/port1</pre> Where printer is the IP address or DNS name of your printer (click Continue)<br />
# Select "HP" under Make (click Continue)<br />
# Select HP LaserJet Series PCL 6 CUPS (en) (click Add Printer)</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=Mac&diff=34845Mac2008-01-08T15:06:31Z<p>Anthonyclark: /* Sound */</p>
<hr />
<div>[[Category:Laptops (English)]]<br />
[[Category:HOWTOs (English)]]<br />
This article attempts to annotate the installation and configuration of Arch Linux on the Apple MacBook. All generations are supported, and relevant details concerning individual specifications have tried to be incorporated wherever necessary.<br />
==Partitioning in OS X==<br />
This section attempts to cover the most practical paths one can take in creating an ideal partition layout in OS X for the MacBook. If one prefers a Linux environment for setting up his or her partitions, the section, [[MacBook#Partitioning in Arch|Partitioning in Arch]], below will cover the specific points that need to be taken into consideration when implementing a partitioning layout on the MacBook. References to more user-friendly applications, such as Apple's "Boot Camp," will be mentioned here, but the depth will not be as great as that knowledge has already been documented extensively elsewhere.<br />
<br />
Before attempting any of the following pre-installation procedures, it is advisable to upgrade your firmware to the latest state released by Apple. You can achieve this either through the "Software Update" application bundled with OS X, or through the downloads on the support section of Apple's [http://www.apple.com/support/downloads/ home page]. ''Note'': The "Software Update" in OS X may not pick up all the firmware updates available for your computer. Therefore, it is possible your chance of having the most update firmware code will be increased by searching through Apple's official download page.<br />
===Single Boot===<br />
Dedicating your MacBook to Arch Linux permits you to follow the [[Official Arch Linux Install Guide]] as in a typical installation. If using rEFIt on a small partition without OS X, be sure not to install your boot loader of choice in the MBR (/dev/sda), but instead to the /boot partition or root partition if you are not going to reserve a separate partition for /boot.<br />
<br />
Also note that the "Auto-Prepare" feature available on the Installation CD will allow you to erase and format your hard drive just fine, but the manual installer uses cfdisk to partition your drive, and it does not have the capability to recognize the GUID partition scheme that your MacBook will be in if formatted with "Disk Utility" (used by default in a normal OS X installation). In that case, it might be best to not use the installer to partition your disk and instead use a GPT-capable partitioner such as parted.<br />
<br />
Furthermore, there are a few caveats discussed below that you should be familiar with in order to avoid any unpleasant outcomes:<br />
* ''Note'': The points discussed below do not apply if you choose to keep a small partition containing OS X and a small EFI System Partition on the same GPT-scheme hard disk you will be installing Arch Linux to. The section that follows assumes you do not want any trace of OS X on your MacBook.<br />
* '''Firmware Updates''' - You will not be able to update the firmware on your MacBook without a hard disk layed out with the GUID Partition Table (GPT) containing an OS X installation and a separate EFI System Partition. If you do not have access to an external OS X environment, it may be best to include a small partition containing OS X as well as an EFI System Partition on the hard drive Arch Linux will be installed onto. With this method, you have the choice of booting Arch Linux through a boot menu, such as rEFIt, or via the firmware default isolated in your MacBook's PRAM (discussed in the second caveat below).<br />
* '''Delayed Boot''' - The mechanism the MacBook uses to boot an operating system does not have the ability to quickly recognize a disk laid out solely with the MBR scheme. Instead, it searches for a familiar GUID partition table that holds an EFI System Partition to transfer its rights to. This scanning can take anywhere between twenty and thirty seconds, in contrast to the process normally taking around ten seconds when the default operating system is selected through Apple's "Startup Disk." Since the "Startup Disk" application on both the OS X Install Disk and the default OS X installation cannot locate an operating system installed within the MBR scheme, there are a few alternative solutions that solve this problem:<br />
:1. Modify the code held in your MacBook's PRAM to skip checking for the GUID Partition Table and boot straight from the MBR. Following this method, you will have a system that boots normally, just like any other would, with an estimated time of around ten seconds from power-on to GRUB. This is actually what Apple's "Startup Disk" does, which is the graphical front-end for the application about to be described.<br />
<br />
'''''Warning:''''' ''If you have adjusted the startup sound on your MacBook to something other than the default it came with, then the startup sound may be reset back to its factory default after the following modifications are made to your system's PRAM. You may have to boot into an external OS X environment in order to change the startup sound back to what you had before.''<br />
<br />
First, boot from an OS X Install Disk (this procedure may not work from an external OS X installation) and open up "Terminal." Use "diskutil list" to obtain the identifier of the disk Arch Linux will be installed onto.<br />
diskutil list<br />
The top part of the output should look something like this:<br />
/dev/disk0<br />
#: type name size identifier<br />
0: FDisk_partition_scheme *111.8 GB disk0<br />
The following command will install the code to your MacBook's PRAM that allows it to boot from the MBR. Replace "[disk identifier]" with the identifier obtained from the above command:<br />
bless --device /dev/[disk identifier] --setBoot -legacy<br />
Using the previous example the command would be:<br />
bless --device /dev/disk0 --setBoot -legacy<br />
Note: The device /dev/disk0 does not actually represent the MBR, even though that is what we type in for the command. The device echoed with the below command, "bless --getBoot", should not be /dev/disk0 but another main block device nomination, such as /dev/disk2. To insure you have correctly set the proper pointer that can boot the MBR, such as /dev/disk2, type the following command:<br />
bless --getBoot<br />
:2. Another option you have is to partition your hard disk with the GPT scheme and keep rEFIt installed on a small partition. This method does not result in as fast of a boot as the above does, but it gives you a boot menu that shows up on startup, allowing you to choose a valid operating system to boot from. This can be achieved by booting your MacBook into Target Disk Mode (Firewire); connecting to another disk with OS X installed, and partitioning your drive with the GPT scheme while creating a small HFS+ partition to hold rEFIt; installing rEFIt onto that partition; and finally typing "cd /efi/refit; ./enable-always.sh". It may be wise to set up '''''all''''' your partitions during this process, so as to avoid having to choose from a very select few partitioners that support the GPT scheme your disk will be laid out in. Furthermore, if you set up your partitions with "Disk Utility" or its back-end diskutil, there is no need to use gptsync to synchronize your partition tables. You can continue the installation process like you normally would (starting with the install step dedicated to filesystem creation), but be sure at the very end to install GRUB onto your boot partition or, if you do not want a separate boot slice, the root partition. You do not want to install onto /dev/sda or else this might prevent rEFIt from acting the way it was designed to.<br />
:3. A third option to counter the delayed boot is to hold the "Option" key on boot to bring up a menu that can transfer control to the MBR (the menu item will be titled "Windows"). Your MacBook will then boot to the MBR as fast as it physically can with the total time it takes to boot dependent upon how fast you confirm your selection at the menu. Holding the "Menu" button on a compatible Apple Remote during boot will also perform this same function.<br />
* '''Startup Sound''' - There is no available method for changing the startup sound on your MacBook without the presence of OS X. If you would like the startup sound on boot to be muted or at a specific volume output when single-booting Arch Linux, then an easy way is to adjust or mute the volume in OS X before Arch is installed. If the startup sound has returned after a firmware upgrade or PRAM modification, or you have already erased OS X and installed Arch Linux and would like to make adjustments now, boot from an external OS X drive (select it from the startup menu by holding "Option" on boot), and make arrangements from there.<br />
<br />
===Dual Boot===<br />
This portion of the article makes the assumption that one wants to install Arch Linux on top of an already-existing OS X configured MacBook. A higher success rate and smoother installation may be achieved by installing OS X from scratch and then following these steps. If this is the preferred option, then you may also decide to setup your partitions through "Disk Utility" before OS X is installed. In the case of a layout incorporating a shared partition, make sure to choose a filesystem that is writable from both OS X and Linux, for example: HFS+ (non-journaled) or FAT32 (more about dual boots with a shared partition [[MacBook#With Shared Partition|below]]). In any case, you always have the option of disabling journaling on the default HFS+ filesystem in OS X in order to allow read/writes from Arch Linux.<br />
====No Shared Partition====<br />
* Optional Step: Install rEFIt. This will give you a boot menu to choose between OS X and Arch Linux on every boot. Download the ".dmg" from the [http://refit.sourceforge.net/ Refit Homepage] and install it. Make sure to install your Linux boot loader (i.e. GRUB or LILO) on your /boot partition or on your root partition if you are not going to have separate partitions for both. Be careful about installing a boot loader to /dev/sda as this can lead to unexpected results with rEFIt.<br />
* Note: You can either partition your hard disk with the command-line application, diskutil, or its GUI front-end, "Boot Camp." Diskutil comes embedded into OS X, while "Non-Leopard" users may find themselves having to download and pay for the latest "Boot Camp" release.<br />
'''1. Partitioning with diskutil:'''<br />
* Note: diskutil partitions a disk differently than most other applications. It creates new partitions by resizing an exisiting partition and creating new ones out of the remaining free space (in the case below the partition to be split is the second one located on /dev/disk0s2). Furthermore, your chances of success will almost always be guaranteed when performing the following operations after a clean OS X installation.<br />
* To partition using diskutil, open the "Terminal" application found in the /Applications/Utilities folder. The following steps can be performed while your OS X volume is mounted.<br />
* Disable journaling on your about-to-be-resized OS X partition. You can do this with "Disk Utility" in OS X or with diskutil through the following command. (Type "ls /Volumes/" to obtain the label of your OS X partition.)<br />
sudo diskutil disableJournal /Volumes/[LABEL]<br />
* Next, type "diskutil list" and you should see something like this:<br />
/dev/disk0<br />
#: type name size identifier<br />
0: GUID_partition_scheme *111.8 GB disk0<br />
1: EFI 200.0 MB disk0s1<br />
2: Apple_HFS Macintosh HD 111.5 GB disk0s2<br />
* Below is the command usage for resizing a partition and reclaiming the remaining free space by creating a new partition. Note the disk identifier from the "diskutil list" command you typed (in the example above it would be disk0s2), and replace [disk identifier] with that identifier. Replace "[disk size]" with the new size of your OS X partition and "[partition size]" with the remaining space calculated via the total amount of space your original OS X partition takes up. Last, replace ["Partition label"] with a name for your new Arch Linux partition.<br />
sudo diskutil resizeVolume [disk identifier] [disk size] "Linux" ["Partition label"] [partition size]<br />
* The example command below resizes the initial OS X partition (disk0s2) to 55.5 gigabytes and then creates the partition assigned to Arch Linux with the free space that was left over. The amount of free space that was left over after the resizing was calculated with the "diskutil list" command used above. "Linux" is the GPT recognized name for any of the possible filesystems most attributed to Linux.<br />
sudo diskutil resizeVolume disk0s2 55.5G "Linux" "Phrakture" 56G<br />
* Reboot.<br />
* Verify your disk was formatted correctly.<br />
diskutil list<br />
'''2. Partitioning with "Boot Camp":'''<br />
The "Boot Camp" application released by Apple is considered by some to be more user-friendly due to its graphical interface and simple procedure.<br />
* ''Note'': Apple no longer officially hosts the "Boot Camp" beta software; you can still obtain the last publicly released version, "Boot Camp 1.4b," from an unofficial mirror site. If you have 10.5 "Leopard," the "Boot Camp" final release comes bundled with the default installation and can be found in /Applications/Utilities. The software can also be extracted from the 10.5 Install Disk and installed onto any supported version of OS X.<br />
* Install "Boot Camp" if it is not already installed, and run the "Boot Camp Assistant" from the /Applications/Utilities folder.<br />
* Partition your hard drive however you like.<br />
<br />
====With Shared Partition====<br />
The easiest way to go about dual booting Arch Linux and OS X with a shared partition is by using Apple's diskutil application, the CLI back-end for "Boot Camp." Partitioning with diskutil keeps you from having to install Arch Linux through the FTP disk in order to use parted to partition and gptsync to sync the GPT and MBR partition tables (diskutil recognizes both the new GPT scheme and the old MBR and creates and syncs them for you upon write). In addition to using diskutil to partition, you will also have a choice of whether or not you want the shared partition to be a "shared" /home folder for both operating systems or a smaller partition while allowing both Arch Linux and OS X to have their own /home folders. You will also have to decide what filesystem to format your shared partition with. The non-journaled HFS+ and FAT32 filesystems are popular for sharing files between Linux and OS X due to both operating systems being able to read/write to them well. In the case of a shared /home, the Case-sensitive HFS+ (Non-Journaled) filesystem is a good way to go considering read/write support for non-journaled HFS+ filesystems is good in Linux, and the "case-sensitive" aspect of the HFS+ filesystem permits good interoperability between Arch Linux and OS X. '''Also, do not forget to synchronize your Arch and OS X UIDs, otherwise you will not have write access to your /home directory from both Arch and OS X;''' the [[MacBook#Home Sharing|Home Sharing]] section of this article describes how to do this.<br />
* Optional Step: Install rEFIt. This will give you a boot menu to choose between OS X and Arch Linux on every boot. Download the ".dmg" from the [http://refit.sourceforge.net/ Refit Homepage] and install it. Make sure to install your Linux boot loader (i.e. GRUB or LILO) on your /boot partition or on your root partition if you are not going to have separate partitions for both. Be careful about installing a boot loader to /dev/sda as this can lead to unexpected results with rEFIt.<br />
* Note: You can either partition your hard disk with the command-line application, diskutil, or its GUI front-end, "Boot Camp." Diskutil comes embedded into OS X while "Non-Leopard" users may find themselves having to download and pay for the latest "Boot Camp" release.<br />
* ''Further note'': diskutil partitions a disk differently than most other applications. It creates new partitions by resizing an exisiting partition and creating new ones out of the remaining free space (in the case below the partition to be split is the second one located on /dev/disk0s2). Furthermore, your chance of success will almost always be guaranteed when performing the following operations after a clean OS X installation.<br />
* Open the "Terminal" application found in the /Applications/Utilities folder. The following steps can be performed while your OS X volume is mounted.<br />
* Disable journaling on your about-to-be-resized OS X partition. You can do this with "Disk Utility" in OS X or with diskutil through the following command. (Type "ls /Volumes/" to obtain the label of your OS X partition.) <br />
sudo diskutil disableJournal /Volumes/[LABEL]<br />
* Type "diskutil list" and you should see something like this:<br />
/dev/disk0<br />
#: type name size identifier<br />
0: GUID_partition_scheme *111.8 GB disk0<br />
1: EFI 200.0 MB disk0s1<br />
2: Apple_HFS Macintosh HD 111.5 GB disk0s2<br />
* Below is the command usage for resizing a partition and reclaiming the remaining free space by creating a new partition(s). Note the disk identifier from the "diskutil list" command you typed (in the example above it would be disk0s2) and replace [disk identifier] with that identifier. Replace "[disk size]" with the new size of your OS X partition and "[partition size]" with the remaining space you want each individual partition to take up, calculated via the total amount of space your original OS X partition takes up. Last, fill in the ["Partition label"] fields with names for your new partitions.<br />
sudo diskutil resizeVolume [disk identifier] [disk size] [partition type] ["Partition label"] [partition size] [partition type] ["Partition label"] [partition size]<br />
* The following example resizes the original OS X partition (disk0s2) to 30GB and sets up a 71.5GB shared, non-journaled HFS+ (Case Sensitive) /home partition and a 10GB Arch Linux root partition:<br />
sudo diskutil resizeVolume disk0s2 30G "Case-sensitive HFS+" "Shared" 71.5G "Linux" "Arch" 10G<br />
* If you would rather use the FAT filesystem on a small shared partition and keep separate /home folders on the Arch Linux and OS X partitions, then you could use something like:<br />
sudo diskutil resizeVolume disk0s2 50G "MS-DOS FAT32" "Shared" 11.5G "Linux" "Arch" 50G<br />
* The commands above do not actually format the partitions. They only store the proper information that the GUID Partition Table needs so it can be read from by applications and the native EFI bootloader. You will now have to format any partitions that can not be formatted in Linux with the desired filesystem. If you chose the Non-Journaled Case-sensitive HFS+ filesystem for your shared partition then you will need to format it with the below command after you reboot. You will then have to run "diskutil list" again to get the identifier for the new shared partition (following the example above it would be disk0s3).<br />
* Reboot<br />
diskutil list<br />
diskutil eraseVolume "Case-sensitive HFS+" "Shared" [disk identifier]<br />
* If you chose the FAT filesystem for your shared partition you can also choose to format it from OS X, but you may end up doing it over again in the Arch Linux installer when it comes time to mount and format your filesystems. To format from OS X type:<br />
newfs_msdos -F 32 -v "Shared" /dev/[disk identifier]<br />
* If throughout this procedure you get a "chosen size is invalid..." error try expressing the size of the partitions in megabytes instead of gigabytes. The original command for a FAT32 formatted shared partition would then look like:<br />
sudo diskutil resizeVolume disk0s2 50000M "MS-DOS FAT32" "Shared" 11500M "Linux" "Arch" 50000M<br />
* If you get a "Resizing encountered error No space left on device (28) on disk" error even though you have verified the total size of the partition you are splitting with "diskutil list", then first resize only the soon-to-be-split partition:<br />
sudo diskutil resizeVolume disk0s2 30G<br />
* Reboot, and then create the rest of the partitions:<br />
sudo diskutil resizeVolume disk0s2 30G "Case-sensitive HFS+" "Shared" 71.5G "Linux" "Arch" 10G<br />
* After using any of the above commands to repartition your MacBook, you can reboot and verify your partitions have been created with "diskutil list".<br />
* ''Note'': It may be best at this point to synchronize the UID of your main account in OS X with the default in Arch Linux. Skip down to the [[MacBook#Home Sharing|Home Sharing]] section of this article for directions on how to do this.<br />
<br />
==Partitioning in Arch==<br />
If you prefer to partition in Linux, there are two tools available to Arch end-users that faciliate this process on the MacBook: parted and refit. GNU Parted will allow the repartitioning of your disk even if it is laid out in GPT format, while the refit package, available in the Arch community repository, allows the synchronization of the MBR table that is created by parted and the GUID Partition Table that is originally on a default OS X installation. If your hard disk is not layed out with the GPT scheme, then you can use the partitioner available through the Arch installer, cfdisk, and you need not follow the rest of the details covered in this section. You can find the scheme your drive is laid out in with Apple's "Disk Utility" or by trying to use cfdisk (the default application run from the Arch installer): if the drive is laid out GPT-style, you will be informed by cfdisk and possibly denied readable and/or writable access to the table.<br />
<br />
''Note'': If you are going to resize the HFS+ partition used by default in OS X, it may be wise to disable journaling prior to the task. You can do this with "Disk Utility" in OS X or with diskutil through the following command:<br />
sudo diskutil disableJournal /Volumes/[LABEL]<br />
Type "ls /Volumes/" to obtain the label of your OS X partition.<br />
<br />
'''Prepare the Arch environment for partitioning:'''<br />
<br />
* Get the latest [http://www.archlinux.org/download/ Arch Linux FTP Install CD] and burn it.<br />
* Reboot, and hold down "C" during startup, so it will boot from the CD, or hold "Option" to select it from the firmware menu. If you installed rEFIt, you can select the Install CD from the boot menu that automatically comes up.<br />
* Type "arch" at the boot prompt or "arch vga=773" if you prefer a higher resolution.<br />
boot: arch vga=773<br />
* Note: Due to a bug in the Apple firmware ([http://refit.sourceforge.net/doc/c4s3_keyboard.html Note from rEFIt FAQ]), some MacBook Pro Core 2 Duo users have reported that the keyboard often does not work at the Arch Linux boot prompt. The only options are to either get a USB keyboard, which should work all the time, or keep rebooting until it works.<br />
* Note: Some MacBook (Pro) Core Duo users report strange keyboard output such as long delays and character doubling. If this is your situation, entering the following at the boot prompt should alleviate any such symptoms:<br />
boot: arch noapic irqpoll acpi=force<br />
* [[Configuring network|Configure your network]] through bash or through the normal Arch install procedure that follows:<br />
/arch/setup<br />
* Select "FTP/HTTP" as the installation source when asked.<br />
* Select "Configure Network" from the "Main Menu."<br />
* Probe and/or select your network interface and either confirm the usage of DHCP or set up your interface statically.<br />
* Exit by selecting "Exit Install" at the "Main Menu."<br />
* Open /etc/pacman.conf in your favorite editor and uncomment the "[community]" header and its "Include" path to enable the repository:<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/community<br />
* Since "ftp://ftp.archlinux.org/" is throttled, configure /etc/pacman.d/core, /etc/pacman.d/community, and /etc/pacman.d/extra for a less slow download by moving a fast mirror to the top in those files. If you do not know which mirrors are the quick ones for you, then any mirror other than "ftp://ftp.archlinux.org/" will do for now.<br />
* Bring the available list of packages up to date, and install the latest versions of refit and parted along with their dependencies. This can be done with one command:<br />
pacman -Sy refit parted<br />
* Continue with the instructions below that are relevant to your particular table layout, either a single boot or dual boot. If you do not have rEFIt installed '''''and''''' you do not plan on dual booting Arch and OS X, feel free to partition how you normally would, possibly ignoring the rest of this section.<br />
<br />
===Single Boot===<br />
<br />
This section '''only''' describes how to prepare your hard disk with parted if you are '''single booting Arch, while keeping rEFIt installed on a small partition.''' If you do not have rEFIt installed on a HFS+ partition and your drive is not layed out in the GPT format, there are no special modifications to consider during the single boot process. If your whole drive is configured with the MBR scheme, then you are advised to use whatever partitioner you feel most comfortable with, as there are no usual restrictions upon how you may partition your drive.<br />
* Note: If you had decided to partition your disk back when you installed rEFIt onto a small partition, these instructions are not relevant; you may move on to the actual installation process described in the [[MacBook#Installation|Installation]] section of this article and select the "Partition Hard Drives" step in the "Prepare Hard Drive" menu on the installer, in order to format your assigned partitions.<br />
* Run the parted application on your hard drive:<br />
parted /dev/sda<br />
* Type "p" to view the current partition table.<br />
(parted) p<br />
* If you installed rEFIt onto a small partition but did not create the other partitions you want, you can now create all the other partitions you desire. If you installed rEFIt on a partition taking up the whole drive, you will have to resize the partition with the following command. ''Note'': The command is based upon the assumption that rEFIt is installed on the '''first''' partition of the hard drive. If rEFIt is installed on any other partition, simply change the number "1" to whichever one it is on.<br />
(parted) resize 1 <START> <END><br />
* For <START> and <END>, use the count in MBs of where you want your partition to start and end.<br />
* To create a swap partition type:<br />
(parted) mkpart primary linux-swap <START> <END><br />
* The same goes for any other regular partition:<br />
(parted) mkpart primary ext2 <START> <END><br />
* ''Note'': Parted only has the ability to format via the ext2, FAT16, FAT32, and linux-swap filesystems. It has the ability to create reiserfs partitions if libreiserfs is installed (not available through the Arch repositories). If you desire to use a filesystem such as ext3, reiserfs, xfs, or jfs, partition your hard drives in the parted application and format them as ext2. Then, during the actual Arch installation process, you will be given the opportunity to perform any other necessary filesystem creation over the original ext2 partition.<br />
* ''Further note'': If you are single booting Arch on a MacBook layed out with the MBR scheme, you will be able to create a logical partition like you would be able to during any other typical pre-installation process. If your hard disk is not layed out MBR-style and instead layed out with the GPT scheme, you cannot create a logical partition as the GPT standard does not support the implementation needed to do so. You can find the scheme your drive is laid out in with Apple's "Disk Utility" or by trying to use cfdisk (the default application run from the Arch installer): if the drive is laid out GPT-style, you will be informed by cfdisk and possibly denied readable and/or writable access to the table.<br />
* Quit parted.<br />
(parted) quit<br />
* Since you are using rEFIt on a small partition without OS X, synchronize your GUID Partition Table with the newly created MBR partition table.<br />
gptsync /dev/sda<br />
* Jump to the [[MacBook#Installation|Installation]] section of this article, and start the installation (/arch/setup).<br />
<br />
===Dual Boot===<br />
<br />
* Run the parted application to partition your hard disk for a dual boot.<br />
parted /dev/sda<br />
* Type "p" to view the current partition table.<br />
(parted) p<br />
* If repartitioning from an OS X configured MacBook that holds an EFI System Partition, resize the current OS X partition first in order to free up space for your new partitions. ''Note'': If you do not have an EFI System Partition and only have an OS X partition, change the number "2" in the following command to whichever partition OS X is on (probably "1").<br />
(parted) resize 2 <START> <END><br />
* For <START> and <END>, use the count in MBs of where you want your partition to start and end.<br />
* If you have any partitions on your disk other than the EFI System Partition and the partition that holds OS X, then remove them with the "rm" command:<br />
(parted) rm <NUMBER><br />
* Replace <NUMBER> with the position the partition rests on your drive. For example, to remove the third partition that comes after the OS X and EFI System Partition, according to your partition table shown with "p", type:<br />
(parted) rm 3<br />
* ''Note'': Be sure not to accidently remove the first or second partitions if that is where OS X and your EFI System Partition reside. Review your work carefully. <br />
* You may now, if you choose, make a partition for swap.<br />
(parted) mkpart primary linux-swap <START> <END><br />
* For <START> and <END>, use the count in MBs of where you want your partition to start and end.<br />
* The same goes for any other regular partition:<br />
(parted) mkpart primary ext2 <START> <END><br />
* ''Note'': Parted only has the ability to format via the ext2, FAT16, FAT32, and linux-swap filesystems. It has the ability to create reiserfs partitions if libreiserfs is installed (not available through the Arch repositories). If you desire to use a filesystem such as ext3, reiserfs, xfs, or jfs, partition your hard drives in the parted application and format them as ext2. Then, during the actual Arch installation process, you will be given the opportunity to perform any other necessary filesystem creation over the original ext2 partition. '''Parted does not have the ability to ''create'' HFS+ filesystems, as may be the case if you desire a shared /home; you need to perform this type of creation in OS X.'''<br />
* ''Further note'': If your hard disk is not layed out MBR-style and layed out with the GPT scheme (the default standard on a typical OS X installation), you cannot create a logical partition as the GPT standard does not support the implementation needed to do so. You can find the scheme your drive is laid out in with Apple's "Disk Utility" or by trying to use cfdisk (the default application run from the Arch installer): if the drive is laid out GPT-style, you will be informed by cfdisk and possibly denied readable and/or writable access to the table.<br />
* Quit parted.<br />
(parted) quit<br />
* Synchronize your GUID Partition Table with your newly created MBR partition table.<br />
gptsync /dev/sda<br />
* Jump to the [[MacBook#Installation|Installation]] section of this article, and start the installation (/arch/setup).<br />
<br />
==rEFIt==<br />
* You can now install the optional rEFIt if you have not done so already. ''Note'': This is not a requirement. It only gives you a menu to choose between OS X and Arch Linux upon every boot.<br />
* In OS X, download the ".dmg" from -> [http://refit.sourceforge.net/ Refit Homepage] and install it.<br />
* If you have already partitioned your hard disk in preparation for the Arch installation, rEFIt may not be enabled by default. You will have to run the "enable.sh" script installed in /efi/refit/.<br />
* Open up "Terminal" and enter:<br />
cd /efi/refit; ./enable.sh<br />
<br />
==Installation==<br />
This section assumes you have already finished partitioning your MacBook in preparation for an Arch installation. If you are single booting Arch Linux '''''and''''' you are not using rEFIt, you may follow the [[Official Arch Linux Install Guide#Common Installation Procedure|Official Arch Linux Install Guide]] with no special modifications, ignoring the rest of this section. '''If you are using rEFIt either in a single boot or dual boot setup, you will need to install your boot loader of choice onto your /boot partition or on your root partition if you are not opting for separation.''' The procedure for doing so is what follows.<br />
* Type "arch" at the boot prompt or "arch vga=773" if you prefer a higher console resolution.<br />
boot: arch vga=773<br />
* Note: Due to a bug in the Apple firmware ([http://refit.sourceforge.net/doc/c4s3_keyboard.html Note from rEFIt FAQ]), some MacBook Pro Core 2 Duo users have reported that the keyboard often does not work at the Arch Linux boot prompt. The only options are to either get a USB keyboard, which should work all the time, or keep rebooting until it works.<br />
* Note: Some MacBook (Pro) Core Duo users report strange keyboard output such as long delays and character doubling. If this is your situation, entering the following at the boot prompt should alleviate any such symptoms:<br />
boot: arch noapic irqpoll acpi=force<br />
* Run the Arch installer:<br />
/arch/setup<br />
* Be sure to work your way down through the menu, and do not forget to select the "Partition Hard Drives" step under the "Prepare Hard Drive" menu to format your partitions and mount them so Arch can be installed onto them. For the rest of the installation, you can follow the [[Official Arch Linux Install Guide#Common Installation Procedure|Official Arch Linux Install Guide]] and install everything normally '''''until you make it to the menu item titled "Install Bootloader."'''''<br />
* ''Note'': The following procedure is unique to GRUB. The GRUB boot loader now has the complete ability to boot your Arch Linux system, is considered stable, and is now recommended more often for Linux installation on a MacBook then LILO. If you wish to use the LILO boot loader, you will have to consult further documentation as the article's contributors have not yet attempted to boot Arch on the MacBook with LILO.<br />
* Select "Install Bootloader" from the "Main Menu" of the installer.<br />
* Choose the option "Use the GRUB bootloader" when asked.<br />
* When you review your GRUB configuration file, make sure that both "root" fields point to the correct partitions and the kernel and initrd paths are correct for your partition setup. If you plan on using a separate boot partition, do not have "/boot" in front of "/vmlinuz26" and "/kernel26.img" on the "kernel" and "initrd" fields respectively. The following example boots Arch Linux from the fourth partition on the hard drive devoted to the root file system. This could pertain to those dual booting OS X with Arch while having an EFI System Partition and a shared home.<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,3)<br />
kernel /boot/vmlinuz26 root=/dev/sda4 ro vga=773<br />
initrd /boot/kernel26.img<br />
* The example below boots Arch from the second partition on the hard drive assigned to /boot, while the third partition is assigned to root (/). This could be an example for those having only rEFIt installed on a small partition and no OS X.<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,1)<br />
kernel /vmlinuz26 root=/dev/sda3 ro vga=773<br />
initrd /kernel26.img<br />
* '''If you are using rEFIt, make sure you install GRUB onto ''a partition'', either your /boot or your /root (i.e. /dev/sda4) if you are not using separate partitions for both.'''<br />
* '''Do not install GRUB onto /dev/sda! Doing so is likely to lead to an unstable post-environment.'''<br />
* If GRUB was successfully installed, choose "Exit Install" from the "Main Menu."<br />
* If you did not partition your disk from OS X using diskutil or "Disk Utility" and instead partitioned with another third-party program or from Linux, sync your partition tables one more time for good measure.<br />
gptsync /dev/sda<br />
* ''NOTE'': If you get an error that GRUB was not installed successfully, it sometimes works if you go through the same steps a second time. If you receive an error message again stating that GRUB was not successfully installed, run the following commands, and then attempt to install GRUB again:<br />
! Replace the "3" with whatever your root partition is (i.e. sda4 -> 4)<br />
! 83 is for ext2/3. If you have something else, type "sfdisk -T" for a list of supported partition types. <br />
# sfdisk -c /dev/sda 3 83<br />
# gptsync /dev/sda<br />
* If you still get an error message when installing GRUB, keep trying those commands. It should work eventually.<br />
* You may now reboot your system. If rEFIt is setup correctly, you will be able to choose the correct icon in the boot menu on startup. If you do not have rEFIt installed, you will have to either hold the "Option" key during startup (or the "Menu" button on a compatable Apple Remote), or follow the instructions below to allow your MacBook to transfer its pre-control rights directly to GRUB (this will save the maximum time possible during a normal boot).<br />
reboot<br />
* If you are single booting without rEFIt and need to save a new instruction set in the PRAM to boot straight from the MBR instead of spending time searching for the GUID Partition Table, hold the "Option" key during startup or the "Menu" button on a compatable Apple Remote and boot into your new Arch Linux setup.<br />
* Then, synchronize your local package database with the one on the FTP/HTTP server you chose as your default during the install process, and install the "eject" package via pacman to eject your Arch installation media. This can all be done with one command:<br />
pacman -Sy eject<br />
* Eject the disk.<br />
eject<br />
* Insert an OS X Install Disk, and reboot while holding either the "C" or "Option" keys to initiate the loading of the DVD.<br />
* Follow the instructions in this article titled "Delayed Boot" under the [[MacBook#Single Boot|Single Boot (Partitioning from OS X)]] section to reconfigure your firmware's default boot device.<br />
* ''Note'': If you are sharing your Arch /home folder with OS X, skip down to the [[MacBook#Home Sharing|Home Sharing]] section of this article before you create your first user account.<br />
* Enjoy your new Arch MacBook!<br />
<br />
==Post Install==<br />
<br />
===Wifi===<br />
====Ndiswrapper====<br />
* First, install the ndiswrapper package like so:<br />
$ pacman -Sy ndiswrapper<br />
* The Lenovo Thinkpad 802.11abgn driver works well with the MacBook. The driver can be obtained through the manufacturer's [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-66449 own page], or directly with the following command:<br />
$ wget -c ftp://ftp.software.ibm.com/pc/pccbbs/mobiles/7iwc28ww.exe<br />
* You need cabextract to extract the file. Get it with pacman.<br />
pacman -S cabextract<br />
* Create a new directory for the soon-to-be extracted files, change the cwd to it, and extract the main file.<br />
mkdir 7iwc28ww; cd 7iwc28ww/; cabextract 7iwc28ww.exe<br />
* Install the driver where <path/to/driver> is the .inf file from the extracted .exe. If you are using the Lenovo Thinkpad 802.11abgn driver, replace <path/to/driver> with ''WINXP_2K/NET5416.INF''.<br />
ndiswrapper -i <path/to/driver><br />
* The below command may have already been executed during installation of the ndiswrapper application, but run it anyway just to be sure the correct alias for wlan0 is written to /etc/modprobe.conf.<br />
ndiswrapper -m<br />
* Verify your driver has been installed properly:<br />
ndiswrapper -l<br />
* Now, you can add "ndiswrapper" to your MODULES array in /etc/rc.conf, and load the module manually:<br />
modprobe ndiswrapper<br />
<br />
====Madwifi====<br />
'''Primary installation through the Arch repositories:'''<br />
* First, install the madwifi driver and madwifi-utils:<br />
pacman -Sy madwifi madwifi-utils<br />
* Then, load the "ath_pci" module. You can also add it to the MODULES list in /etc/rc.conf if you want it to load on a normal boot.<br />
modprobe ath_pci<br />
* And if everything is ok, you should see something like this:<br />
ifconfig <br />
ath0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX <br />
inet6 addr: fe80::219:e3ff:fed4:be51/64 Scope:Link<br />
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br />
RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:0 <br />
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)<br />
* Some MacBook users have reported more success when downloading and installing from SVN. There is a madwifi-svn package in the [[AUR]], which can be found [http://aur.archlinux.org/packages.php?do_Details=1&ID=10492&O=0&L=0&C=0&K=madwifi&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
<br />
===Fan Speed===<br />
* The fan doesn't seem to change speeds with the temperature. We can (somewhat) fix this<br />
* Add 'applesmc' to your MODULES array in /etc/rc.conf<br />
** Modprobe it too<br />
* This creates a bunch of magic files in /sys/devices/platform/applesmc.768<br />
* As root type 'echo 1 > /sys/devices/platform/applesmc.768/fan1_manual'<br />
* As root type 'echo 3500 > /sys/devices/platform/applesmc.768/fan1_output'<br />
** You may want to add this to your /etc/rc.local<br />
** The number can be anywhere from 1800 to 6200.<br />
** I find that for normal use, 3500-4000 is good.<br />
** When it gets really hot, 4500-5000 is good.<br />
** (after you add 'applesmc' to your modules, running 'sensors' will give you a lot more output)<br />
** I'm going to try and write a script to deal with this better. <br />
::''(I've wrote a [http://phpfi.com/246225 simple app in C] to keep my MacBook cold. It's written for xfce4-genmon-plugin, but you can also use it with conky, cron or anything else.) -- [[User:Husio|Husio]] 16:38, 30 June 2007 (EDT)''<br />
<br />
===Temperature Sensors===<br />
* To go along with this, we should be able to read from the temperature sensors.<br />
* Type 'pacman -S lm_sensors'<br />
* To autodetect sensors type 'sensors-detect'<br />
* In /etc/modprobe.conf add:<br />
alias char-major-89 i2c-dev<br />
* In /etc/rc.local add:<br />
modprobe i2c-i801<br />
modprobe eeprom<br />
modprobe coretemp<br />
sensors -s<br />
* Now you can type 'sensors' to see your core temperatures.<br />
<br />
===Suspend===<br />
====Suspend to Ram====<br />
If you want to get your macbook suspend to ram on closing it and you're using acpi, just add to ''/etc/acpi/actions/lm_lid.sh'':<br />
<pre><br />
# Suspend<br />
if [[ `cat /proc/acpi/button/lid/LID0/state | tr -s " " | cut -d" " -f2` = "closed" ]]<br />
then<br />
pm-suspend<br />
fi<br />
</pre><br />
There's some problem with mpd if you suspend when mpd is playing. It can't connect to localhost after waking up.<br />
<br />
===Backlight Control===<br />
====pommed====<br />
* Install the 'pommed' program from community<br />
* Put 'pommed' in your DAEMONS array in /etc/rc.conf<br />
* Start it manually with '/etc/rc.d/pommed start'<br />
You may also want to install gpomme which is GUI for pommed daemon. Edit then ~/.gpommerc and add gpomme to startup (it's not a daemon).<br />
<br />
By default the F1, F2 ... FX keys are disabled and act like Fn+F1, Fn+F2 ... To enable the keys and make use of Fn+FX, modify /etc/pommed.conf.mactel or /etc/pommed.conf.pmac by changing fnmode = 1 to fnmode = 2. Save it as pommed.conf and restart pommed with /etc/rc.d/pommed restart.<br />
<br />
To enable the sound keys (Fn+F3, Fn+F4 and Fn+F5), you have to modify /etc/pommed.conf : change init = -1 to init = 80 and (at least on Macbook 2) change volume = "PCM" to volume = "Front" and after that restart pommed with /etc/rc.d/pommed restart. (Thanks to the [http://wiki.debian.org/MacBook#head-7adc5d72650afca10f8983c100c25ca6a73df7fd Debian Wiki])<br />
<br />
====macbook-backlight====<br />
If you want to control your backlight from console, install macbook-backlight (it's in [[AUR]]). <br />
If you're using acpi, you may also want your ''/etc/acpi/actions/lm_battery.sh'' to look like this:<br />
<pre>if [[ -z $(acpi | grep discharging) ]]<br />
then<br />
/usr/bin/macbook-backlight +80<br />
else<br />
/usr/bin/macbook-backlight -80<br />
fi</pre><br />
<br />
Now you can also set it in pommed.<br />
<br />
===Frequency Scaling===<br />
* Run 'pacman -S cpufrequtils'<br />
* Add speedstep-centrino (be careful, since a recent update it seems to be "acpi_cpufreq"), cpufreq_conservative to your MODULES array in /etc/rc.conf<br />
** Modprobe them manually too.<br />
* Run 'cpufreq-set -c 0 -g conservative' and 'cpufreq-set -c 1 -g conservative'<br />
** Put them in /etc/rc.local to set them on boot<br />
<br />
===X11===<br />
* Type 'pacman -S xorg xf86-video-i810 915resolution<br />
* Type 'X -configure'<br />
* Open /etc/conf.d/915resolution in your editor, uncomment the 'MODE' and 'RESOLUTION'.<br />
* Set the RESOLUTION to '1280 800'<br />
* Add 915resolution to your DAEMONS array in /etc/rc.conf<br />
** Start it manually with /etc/rc.d/915resolution start<br />
<br />
====Touchpad====<br />
With 7.3 version of x.org and kernel 2.6.22 or later, it should work out of the box. If it doesn't follow these instructions for loading the kernel modules:<br />
<br />
* First you must add, appletouch, usbhid, and tsdev modules to the MOD_BLACKLIST array in rc.conf. (This is because udev loads the modules in random order)<br />
* Then add appletouch, usbhid to MODULES array IN THAT ORDER.<br />
<br />
By default the touchpad operates in compatibility mode by emulating a standard mouse. Many users though will find these default settings problematic as the touchpad is too sensitive and will cause accidental cursor jumping and clicking. However, by using a dedicated driver, more advanced features and fine tuning of the touchpad become available.<br />
<br />
* Type 'pacman -S synaptics' to install the driver<br />
* Load the synaptics driver by adding the following line to the Module section of your xorg.conf:<br />
Load "synaptics"<br />
* Add the touchpad to the ServerLayout section:<br />
InputDevice "Synaptics Touchpad" "CorePointer"<br />
* Add this section to your xorg.conf. I will enable horizontal two-finger-scrolling and a right click by tapping the top right hand corner of the touchpad. It switches off mouse clicks for tapping the touchpad, like OSX does.<br />
Section "InputDevice"<br />
Identifier "Synaptics Touchpad"<br />
Driver "synaptics"<br />
Option "CorePointer" <br />
Option "Device" "/dev/input/mice"<br />
Option "Protocol" "auto-dev"<br />
Option "LeftEdge" "100"<br />
Option "RightEdge" "1100"<br />
Option "TopEdge" "50"<br />
Option "BottomEdge" "300"<br />
Option "FingerLow" "20"<br />
Option "FingerHigh" "30"<br />
#We don't want the palm to trigger a tap, therefore a tap has to be quite fast<br />
Option "MaxTapTime" "100"<br />
Option "MaxTapMove" "100"<br />
Option "MaxDoubleTapTime" "200"<br />
Option "VertScrollDelta" "25"<br />
Option "HorizScrollDelta" "60"<br />
Option "VertTwoFingerScroll" "true"<br />
Option "HorizTwoFingerScroll" "0"<br />
Option "FastTaps" "true"<br />
#Tapping the top right-hand corner will trigger a right click<br />
Option "RTCornerButton" "3" <br />
#An ordinary tap will not trigger a click <br />
Option "TapButton1" "0"<br />
Option "TapButton2" "0"<br />
Option "TapButton3" "0"<br />
Option "MinSpeed" "0.5"<br />
Option "MaxSpeed" "3.5"<br />
Option "AccelFactor" "0.05"<br />
EndSection<br />
<br />
* Finally, restart your X server.<br />
<br />
* The [http://wiki.debian.org/MacBook#head-b5e4b425668a24b46ead13b652f997f38318678b Debian Wiki] has also a few suggestions on how to configure right-clicking and scrolling.<br />
* Also, see [[Touchpad_Synaptics|Touchpad Synaptics]] or the synaptics manpages for many more options.<br />
<br />
===Sound===<br />
If you follow the arch wiki on ALSA it pretty much covers the instructions and specifics. However, there is a noticeable crackling sound from the left channel. I fixed this with the following: (as root/sudo)<br />
# mkdir /etc/modprobe.d/<br />
# nano /etc/modprobe.d/options<br />
<br />
Add this line:<br />
# options snd-hda-intel position_fix=1<br />
<br />
<br />
The above commands creates a options file, then specifies a fix. You Must REBOOT!<br />
<br />
===iSight===<br />
There is linux-uvc-isight in the AUR. Some people for whom the normal release didn't work had success with linux-uvc-isight-svn, but if you use that, install linux-uvc-utils-svn as well. Follow the instructions printed in the post-install:<br />
You *must* install and load the firmware to /lib/firmware, e.g:<br />
# mkdir -p /lib/firmware<br />
# cp /\${OSX_MOUNT}/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport /lib/firmware"<br />
# isight-firmware-tool /lib/firmware/AppleUSBVideoSupport<br />
<br />
Load the 'uvcvideo' module and add it to your ''/etc/rc.conf'' if you want it to load at boot. You can find the driver [http://aur.archlinux.org/packages/linux-uvc-isight/ here].<br />
<br />
===Apple Remote===<br />
====lirc====<br />
TODO<br />
<br />
<br />
====appleir [old]====<br />
This patch is only for kernel < 2.6.22. <br />
Load the ''appleir'' module (or add it to the MODULES array in ''/etc/rc.conf''). Then run xev to check the signals, or copy this to ~/.Xmodmap:<br />
keycode 153 = XF86AudioNext<br />
keycode 144 = XF86AudioPrev<br />
keycode 176 = XF86AudioRaiseVolume<br />
keycode 174 = XF86AudioLowerVolume<br />
keycode 162 = XF86AudioPlay<br />
keycode 158 = XF86Favorites<br />
and run xmodmap ~/.Xmodmap.<br />
<br />
===Home Sharing===<br />
<br />
====UID Synchronization====<br />
<br />
'''In OS X:'''<br />
<br />
''Note'': It is recommended that UID/GID manipulation be done immediately after a new user account is created, in OS X as well as in Arch Linux. If you installed OS X from scratch, then this operation is guaranteed to work after logging into your account for the first time.<br />
<br />
'''''Step 1: Change UID and GID(s)'''''<br />
<br />
Pre-Leopard:<br />
<br />
# Open NetInfo Manager located in the /Applications/Utilities folder.<br />
# If not done for you already, enable access to user account transactions by clicking on the closed lock at the bottom of the window, and entering your account password, or root password if you have created a root account.<br />
# Navigate to /users/<new user name> where <new user name> is the name of the account that will have read/write access to the folder that will be shared with the primary user in Arch.<br />
# Change the UID value to 1000 (the value used by default for first user created in Arch).<br />
# Change the GID value to 1000 also.<br />
# Navigate to /groups/<new user name>, automatically saving the changes you have made so far, where <new user name> is, again, the name of the account that will have read/write access to the folder that will be shared with the primary user in Arch. ''Note'': If you get an error message that the transaction is not allowed, log out and log back in.<br />
# Change the GID value to 1000 (the value used by default for user account creation in Arch).<br />
<br />
Leopard:<br />
<br />
In Leopard, the NetInfo Application is not present. A different set of steps is required for UID synchronization:<br />
# Open System Preferences.<br />
# Click on Accounts.<br />
# Unlock the pane if not already done so.<br />
# Right-click on the desired user and select "Advanced Options."<br />
# Change both the UID and GID to match the UID and GID of the account wished to be shared with in Arch (1000 by default for the first user created in Arch).<br />
<br />
'''''Step 2: Change "home" permissions'''''<br />
<br />
# Open up "Terminal" in the /Applications/Utilities folder.<br />
# Enter the following command to reclaim the permission settings of your home folder, replacing <your user name> and <your user group> with the user name whose UID and GID values you just changed and the group name whose GID value you just changed, respectively.<br />
chown -R <your user name>:<your user group> /Users/<your user name><br />
<br />
'''In Arch:'''<br />
<br />
To synchronize your UID in Arch Linux, you are advised to perform this operation ''while creating a new user account.'' It is therefore recommended that you do this as soon as you install Arch Linux, but if you have already set up a normal .... ''(Will finish the rest later--burned out)''<br />
<br />
====fstab Line====</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=Mac&diff=34844Mac2008-01-08T15:04:55Z<p>Anthonyclark: /* Post Install */</p>
<hr />
<div>[[Category:Laptops (English)]]<br />
[[Category:HOWTOs (English)]]<br />
This article attempts to annotate the installation and configuration of Arch Linux on the Apple MacBook. All generations are supported, and relevant details concerning individual specifications have tried to be incorporated wherever necessary.<br />
==Partitioning in OS X==<br />
This section attempts to cover the most practical paths one can take in creating an ideal partition layout in OS X for the MacBook. If one prefers a Linux environment for setting up his or her partitions, the section, [[MacBook#Partitioning in Arch|Partitioning in Arch]], below will cover the specific points that need to be taken into consideration when implementing a partitioning layout on the MacBook. References to more user-friendly applications, such as Apple's "Boot Camp," will be mentioned here, but the depth will not be as great as that knowledge has already been documented extensively elsewhere.<br />
<br />
Before attempting any of the following pre-installation procedures, it is advisable to upgrade your firmware to the latest state released by Apple. You can achieve this either through the "Software Update" application bundled with OS X, or through the downloads on the support section of Apple's [http://www.apple.com/support/downloads/ home page]. ''Note'': The "Software Update" in OS X may not pick up all the firmware updates available for your computer. Therefore, it is possible your chance of having the most update firmware code will be increased by searching through Apple's official download page.<br />
===Single Boot===<br />
Dedicating your MacBook to Arch Linux permits you to follow the [[Official Arch Linux Install Guide]] as in a typical installation. If using rEFIt on a small partition without OS X, be sure not to install your boot loader of choice in the MBR (/dev/sda), but instead to the /boot partition or root partition if you are not going to reserve a separate partition for /boot.<br />
<br />
Also note that the "Auto-Prepare" feature available on the Installation CD will allow you to erase and format your hard drive just fine, but the manual installer uses cfdisk to partition your drive, and it does not have the capability to recognize the GUID partition scheme that your MacBook will be in if formatted with "Disk Utility" (used by default in a normal OS X installation). In that case, it might be best to not use the installer to partition your disk and instead use a GPT-capable partitioner such as parted.<br />
<br />
Furthermore, there are a few caveats discussed below that you should be familiar with in order to avoid any unpleasant outcomes:<br />
* ''Note'': The points discussed below do not apply if you choose to keep a small partition containing OS X and a small EFI System Partition on the same GPT-scheme hard disk you will be installing Arch Linux to. The section that follows assumes you do not want any trace of OS X on your MacBook.<br />
* '''Firmware Updates''' - You will not be able to update the firmware on your MacBook without a hard disk layed out with the GUID Partition Table (GPT) containing an OS X installation and a separate EFI System Partition. If you do not have access to an external OS X environment, it may be best to include a small partition containing OS X as well as an EFI System Partition on the hard drive Arch Linux will be installed onto. With this method, you have the choice of booting Arch Linux through a boot menu, such as rEFIt, or via the firmware default isolated in your MacBook's PRAM (discussed in the second caveat below).<br />
* '''Delayed Boot''' - The mechanism the MacBook uses to boot an operating system does not have the ability to quickly recognize a disk laid out solely with the MBR scheme. Instead, it searches for a familiar GUID partition table that holds an EFI System Partition to transfer its rights to. This scanning can take anywhere between twenty and thirty seconds, in contrast to the process normally taking around ten seconds when the default operating system is selected through Apple's "Startup Disk." Since the "Startup Disk" application on both the OS X Install Disk and the default OS X installation cannot locate an operating system installed within the MBR scheme, there are a few alternative solutions that solve this problem:<br />
:1. Modify the code held in your MacBook's PRAM to skip checking for the GUID Partition Table and boot straight from the MBR. Following this method, you will have a system that boots normally, just like any other would, with an estimated time of around ten seconds from power-on to GRUB. This is actually what Apple's "Startup Disk" does, which is the graphical front-end for the application about to be described.<br />
<br />
'''''Warning:''''' ''If you have adjusted the startup sound on your MacBook to something other than the default it came with, then the startup sound may be reset back to its factory default after the following modifications are made to your system's PRAM. You may have to boot into an external OS X environment in order to change the startup sound back to what you had before.''<br />
<br />
First, boot from an OS X Install Disk (this procedure may not work from an external OS X installation) and open up "Terminal." Use "diskutil list" to obtain the identifier of the disk Arch Linux will be installed onto.<br />
diskutil list<br />
The top part of the output should look something like this:<br />
/dev/disk0<br />
#: type name size identifier<br />
0: FDisk_partition_scheme *111.8 GB disk0<br />
The following command will install the code to your MacBook's PRAM that allows it to boot from the MBR. Replace "[disk identifier]" with the identifier obtained from the above command:<br />
bless --device /dev/[disk identifier] --setBoot -legacy<br />
Using the previous example the command would be:<br />
bless --device /dev/disk0 --setBoot -legacy<br />
Note: The device /dev/disk0 does not actually represent the MBR, even though that is what we type in for the command. The device echoed with the below command, "bless --getBoot", should not be /dev/disk0 but another main block device nomination, such as /dev/disk2. To insure you have correctly set the proper pointer that can boot the MBR, such as /dev/disk2, type the following command:<br />
bless --getBoot<br />
:2. Another option you have is to partition your hard disk with the GPT scheme and keep rEFIt installed on a small partition. This method does not result in as fast of a boot as the above does, but it gives you a boot menu that shows up on startup, allowing you to choose a valid operating system to boot from. This can be achieved by booting your MacBook into Target Disk Mode (Firewire); connecting to another disk with OS X installed, and partitioning your drive with the GPT scheme while creating a small HFS+ partition to hold rEFIt; installing rEFIt onto that partition; and finally typing "cd /efi/refit; ./enable-always.sh". It may be wise to set up '''''all''''' your partitions during this process, so as to avoid having to choose from a very select few partitioners that support the GPT scheme your disk will be laid out in. Furthermore, if you set up your partitions with "Disk Utility" or its back-end diskutil, there is no need to use gptsync to synchronize your partition tables. You can continue the installation process like you normally would (starting with the install step dedicated to filesystem creation), but be sure at the very end to install GRUB onto your boot partition or, if you do not want a separate boot slice, the root partition. You do not want to install onto /dev/sda or else this might prevent rEFIt from acting the way it was designed to.<br />
:3. A third option to counter the delayed boot is to hold the "Option" key on boot to bring up a menu that can transfer control to the MBR (the menu item will be titled "Windows"). Your MacBook will then boot to the MBR as fast as it physically can with the total time it takes to boot dependent upon how fast you confirm your selection at the menu. Holding the "Menu" button on a compatible Apple Remote during boot will also perform this same function.<br />
* '''Startup Sound''' - There is no available method for changing the startup sound on your MacBook without the presence of OS X. If you would like the startup sound on boot to be muted or at a specific volume output when single-booting Arch Linux, then an easy way is to adjust or mute the volume in OS X before Arch is installed. If the startup sound has returned after a firmware upgrade or PRAM modification, or you have already erased OS X and installed Arch Linux and would like to make adjustments now, boot from an external OS X drive (select it from the startup menu by holding "Option" on boot), and make arrangements from there.<br />
<br />
===Dual Boot===<br />
This portion of the article makes the assumption that one wants to install Arch Linux on top of an already-existing OS X configured MacBook. A higher success rate and smoother installation may be achieved by installing OS X from scratch and then following these steps. If this is the preferred option, then you may also decide to setup your partitions through "Disk Utility" before OS X is installed. In the case of a layout incorporating a shared partition, make sure to choose a filesystem that is writable from both OS X and Linux, for example: HFS+ (non-journaled) or FAT32 (more about dual boots with a shared partition [[MacBook#With Shared Partition|below]]). In any case, you always have the option of disabling journaling on the default HFS+ filesystem in OS X in order to allow read/writes from Arch Linux.<br />
====No Shared Partition====<br />
* Optional Step: Install rEFIt. This will give you a boot menu to choose between OS X and Arch Linux on every boot. Download the ".dmg" from the [http://refit.sourceforge.net/ Refit Homepage] and install it. Make sure to install your Linux boot loader (i.e. GRUB or LILO) on your /boot partition or on your root partition if you are not going to have separate partitions for both. Be careful about installing a boot loader to /dev/sda as this can lead to unexpected results with rEFIt.<br />
* Note: You can either partition your hard disk with the command-line application, diskutil, or its GUI front-end, "Boot Camp." Diskutil comes embedded into OS X, while "Non-Leopard" users may find themselves having to download and pay for the latest "Boot Camp" release.<br />
'''1. Partitioning with diskutil:'''<br />
* Note: diskutil partitions a disk differently than most other applications. It creates new partitions by resizing an exisiting partition and creating new ones out of the remaining free space (in the case below the partition to be split is the second one located on /dev/disk0s2). Furthermore, your chances of success will almost always be guaranteed when performing the following operations after a clean OS X installation.<br />
* To partition using diskutil, open the "Terminal" application found in the /Applications/Utilities folder. The following steps can be performed while your OS X volume is mounted.<br />
* Disable journaling on your about-to-be-resized OS X partition. You can do this with "Disk Utility" in OS X or with diskutil through the following command. (Type "ls /Volumes/" to obtain the label of your OS X partition.)<br />
sudo diskutil disableJournal /Volumes/[LABEL]<br />
* Next, type "diskutil list" and you should see something like this:<br />
/dev/disk0<br />
#: type name size identifier<br />
0: GUID_partition_scheme *111.8 GB disk0<br />
1: EFI 200.0 MB disk0s1<br />
2: Apple_HFS Macintosh HD 111.5 GB disk0s2<br />
* Below is the command usage for resizing a partition and reclaiming the remaining free space by creating a new partition. Note the disk identifier from the "diskutil list" command you typed (in the example above it would be disk0s2), and replace [disk identifier] with that identifier. Replace "[disk size]" with the new size of your OS X partition and "[partition size]" with the remaining space calculated via the total amount of space your original OS X partition takes up. Last, replace ["Partition label"] with a name for your new Arch Linux partition.<br />
sudo diskutil resizeVolume [disk identifier] [disk size] "Linux" ["Partition label"] [partition size]<br />
* The example command below resizes the initial OS X partition (disk0s2) to 55.5 gigabytes and then creates the partition assigned to Arch Linux with the free space that was left over. The amount of free space that was left over after the resizing was calculated with the "diskutil list" command used above. "Linux" is the GPT recognized name for any of the possible filesystems most attributed to Linux.<br />
sudo diskutil resizeVolume disk0s2 55.5G "Linux" "Phrakture" 56G<br />
* Reboot.<br />
* Verify your disk was formatted correctly.<br />
diskutil list<br />
'''2. Partitioning with "Boot Camp":'''<br />
The "Boot Camp" application released by Apple is considered by some to be more user-friendly due to its graphical interface and simple procedure.<br />
* ''Note'': Apple no longer officially hosts the "Boot Camp" beta software; you can still obtain the last publicly released version, "Boot Camp 1.4b," from an unofficial mirror site. If you have 10.5 "Leopard," the "Boot Camp" final release comes bundled with the default installation and can be found in /Applications/Utilities. The software can also be extracted from the 10.5 Install Disk and installed onto any supported version of OS X.<br />
* Install "Boot Camp" if it is not already installed, and run the "Boot Camp Assistant" from the /Applications/Utilities folder.<br />
* Partition your hard drive however you like.<br />
<br />
====With Shared Partition====<br />
The easiest way to go about dual booting Arch Linux and OS X with a shared partition is by using Apple's diskutil application, the CLI back-end for "Boot Camp." Partitioning with diskutil keeps you from having to install Arch Linux through the FTP disk in order to use parted to partition and gptsync to sync the GPT and MBR partition tables (diskutil recognizes both the new GPT scheme and the old MBR and creates and syncs them for you upon write). In addition to using diskutil to partition, you will also have a choice of whether or not you want the shared partition to be a "shared" /home folder for both operating systems or a smaller partition while allowing both Arch Linux and OS X to have their own /home folders. You will also have to decide what filesystem to format your shared partition with. The non-journaled HFS+ and FAT32 filesystems are popular for sharing files between Linux and OS X due to both operating systems being able to read/write to them well. In the case of a shared /home, the Case-sensitive HFS+ (Non-Journaled) filesystem is a good way to go considering read/write support for non-journaled HFS+ filesystems is good in Linux, and the "case-sensitive" aspect of the HFS+ filesystem permits good interoperability between Arch Linux and OS X. '''Also, do not forget to synchronize your Arch and OS X UIDs, otherwise you will not have write access to your /home directory from both Arch and OS X;''' the [[MacBook#Home Sharing|Home Sharing]] section of this article describes how to do this.<br />
* Optional Step: Install rEFIt. This will give you a boot menu to choose between OS X and Arch Linux on every boot. Download the ".dmg" from the [http://refit.sourceforge.net/ Refit Homepage] and install it. Make sure to install your Linux boot loader (i.e. GRUB or LILO) on your /boot partition or on your root partition if you are not going to have separate partitions for both. Be careful about installing a boot loader to /dev/sda as this can lead to unexpected results with rEFIt.<br />
* Note: You can either partition your hard disk with the command-line application, diskutil, or its GUI front-end, "Boot Camp." Diskutil comes embedded into OS X while "Non-Leopard" users may find themselves having to download and pay for the latest "Boot Camp" release.<br />
* ''Further note'': diskutil partitions a disk differently than most other applications. It creates new partitions by resizing an exisiting partition and creating new ones out of the remaining free space (in the case below the partition to be split is the second one located on /dev/disk0s2). Furthermore, your chance of success will almost always be guaranteed when performing the following operations after a clean OS X installation.<br />
* Open the "Terminal" application found in the /Applications/Utilities folder. The following steps can be performed while your OS X volume is mounted.<br />
* Disable journaling on your about-to-be-resized OS X partition. You can do this with "Disk Utility" in OS X or with diskutil through the following command. (Type "ls /Volumes/" to obtain the label of your OS X partition.) <br />
sudo diskutil disableJournal /Volumes/[LABEL]<br />
* Type "diskutil list" and you should see something like this:<br />
/dev/disk0<br />
#: type name size identifier<br />
0: GUID_partition_scheme *111.8 GB disk0<br />
1: EFI 200.0 MB disk0s1<br />
2: Apple_HFS Macintosh HD 111.5 GB disk0s2<br />
* Below is the command usage for resizing a partition and reclaiming the remaining free space by creating a new partition(s). Note the disk identifier from the "diskutil list" command you typed (in the example above it would be disk0s2) and replace [disk identifier] with that identifier. Replace "[disk size]" with the new size of your OS X partition and "[partition size]" with the remaining space you want each individual partition to take up, calculated via the total amount of space your original OS X partition takes up. Last, fill in the ["Partition label"] fields with names for your new partitions.<br />
sudo diskutil resizeVolume [disk identifier] [disk size] [partition type] ["Partition label"] [partition size] [partition type] ["Partition label"] [partition size]<br />
* The following example resizes the original OS X partition (disk0s2) to 30GB and sets up a 71.5GB shared, non-journaled HFS+ (Case Sensitive) /home partition and a 10GB Arch Linux root partition:<br />
sudo diskutil resizeVolume disk0s2 30G "Case-sensitive HFS+" "Shared" 71.5G "Linux" "Arch" 10G<br />
* If you would rather use the FAT filesystem on a small shared partition and keep separate /home folders on the Arch Linux and OS X partitions, then you could use something like:<br />
sudo diskutil resizeVolume disk0s2 50G "MS-DOS FAT32" "Shared" 11.5G "Linux" "Arch" 50G<br />
* The commands above do not actually format the partitions. They only store the proper information that the GUID Partition Table needs so it can be read from by applications and the native EFI bootloader. You will now have to format any partitions that can not be formatted in Linux with the desired filesystem. If you chose the Non-Journaled Case-sensitive HFS+ filesystem for your shared partition then you will need to format it with the below command after you reboot. You will then have to run "diskutil list" again to get the identifier for the new shared partition (following the example above it would be disk0s3).<br />
* Reboot<br />
diskutil list<br />
diskutil eraseVolume "Case-sensitive HFS+" "Shared" [disk identifier]<br />
* If you chose the FAT filesystem for your shared partition you can also choose to format it from OS X, but you may end up doing it over again in the Arch Linux installer when it comes time to mount and format your filesystems. To format from OS X type:<br />
newfs_msdos -F 32 -v "Shared" /dev/[disk identifier]<br />
* If throughout this procedure you get a "chosen size is invalid..." error try expressing the size of the partitions in megabytes instead of gigabytes. The original command for a FAT32 formatted shared partition would then look like:<br />
sudo diskutil resizeVolume disk0s2 50000M "MS-DOS FAT32" "Shared" 11500M "Linux" "Arch" 50000M<br />
* If you get a "Resizing encountered error No space left on device (28) on disk" error even though you have verified the total size of the partition you are splitting with "diskutil list", then first resize only the soon-to-be-split partition:<br />
sudo diskutil resizeVolume disk0s2 30G<br />
* Reboot, and then create the rest of the partitions:<br />
sudo diskutil resizeVolume disk0s2 30G "Case-sensitive HFS+" "Shared" 71.5G "Linux" "Arch" 10G<br />
* After using any of the above commands to repartition your MacBook, you can reboot and verify your partitions have been created with "diskutil list".<br />
* ''Note'': It may be best at this point to synchronize the UID of your main account in OS X with the default in Arch Linux. Skip down to the [[MacBook#Home Sharing|Home Sharing]] section of this article for directions on how to do this.<br />
<br />
==Partitioning in Arch==<br />
If you prefer to partition in Linux, there are two tools available to Arch end-users that faciliate this process on the MacBook: parted and refit. GNU Parted will allow the repartitioning of your disk even if it is laid out in GPT format, while the refit package, available in the Arch community repository, allows the synchronization of the MBR table that is created by parted and the GUID Partition Table that is originally on a default OS X installation. If your hard disk is not layed out with the GPT scheme, then you can use the partitioner available through the Arch installer, cfdisk, and you need not follow the rest of the details covered in this section. You can find the scheme your drive is laid out in with Apple's "Disk Utility" or by trying to use cfdisk (the default application run from the Arch installer): if the drive is laid out GPT-style, you will be informed by cfdisk and possibly denied readable and/or writable access to the table.<br />
<br />
''Note'': If you are going to resize the HFS+ partition used by default in OS X, it may be wise to disable journaling prior to the task. You can do this with "Disk Utility" in OS X or with diskutil through the following command:<br />
sudo diskutil disableJournal /Volumes/[LABEL]<br />
Type "ls /Volumes/" to obtain the label of your OS X partition.<br />
<br />
'''Prepare the Arch environment for partitioning:'''<br />
<br />
* Get the latest [http://www.archlinux.org/download/ Arch Linux FTP Install CD] and burn it.<br />
* Reboot, and hold down "C" during startup, so it will boot from the CD, or hold "Option" to select it from the firmware menu. If you installed rEFIt, you can select the Install CD from the boot menu that automatically comes up.<br />
* Type "arch" at the boot prompt or "arch vga=773" if you prefer a higher resolution.<br />
boot: arch vga=773<br />
* Note: Due to a bug in the Apple firmware ([http://refit.sourceforge.net/doc/c4s3_keyboard.html Note from rEFIt FAQ]), some MacBook Pro Core 2 Duo users have reported that the keyboard often does not work at the Arch Linux boot prompt. The only options are to either get a USB keyboard, which should work all the time, or keep rebooting until it works.<br />
* Note: Some MacBook (Pro) Core Duo users report strange keyboard output such as long delays and character doubling. If this is your situation, entering the following at the boot prompt should alleviate any such symptoms:<br />
boot: arch noapic irqpoll acpi=force<br />
* [[Configuring network|Configure your network]] through bash or through the normal Arch install procedure that follows:<br />
/arch/setup<br />
* Select "FTP/HTTP" as the installation source when asked.<br />
* Select "Configure Network" from the "Main Menu."<br />
* Probe and/or select your network interface and either confirm the usage of DHCP or set up your interface statically.<br />
* Exit by selecting "Exit Install" at the "Main Menu."<br />
* Open /etc/pacman.conf in your favorite editor and uncomment the "[community]" header and its "Include" path to enable the repository:<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/community<br />
* Since "ftp://ftp.archlinux.org/" is throttled, configure /etc/pacman.d/core, /etc/pacman.d/community, and /etc/pacman.d/extra for a less slow download by moving a fast mirror to the top in those files. If you do not know which mirrors are the quick ones for you, then any mirror other than "ftp://ftp.archlinux.org/" will do for now.<br />
* Bring the available list of packages up to date, and install the latest versions of refit and parted along with their dependencies. This can be done with one command:<br />
pacman -Sy refit parted<br />
* Continue with the instructions below that are relevant to your particular table layout, either a single boot or dual boot. If you do not have rEFIt installed '''''and''''' you do not plan on dual booting Arch and OS X, feel free to partition how you normally would, possibly ignoring the rest of this section.<br />
<br />
===Single Boot===<br />
<br />
This section '''only''' describes how to prepare your hard disk with parted if you are '''single booting Arch, while keeping rEFIt installed on a small partition.''' If you do not have rEFIt installed on a HFS+ partition and your drive is not layed out in the GPT format, there are no special modifications to consider during the single boot process. If your whole drive is configured with the MBR scheme, then you are advised to use whatever partitioner you feel most comfortable with, as there are no usual restrictions upon how you may partition your drive.<br />
* Note: If you had decided to partition your disk back when you installed rEFIt onto a small partition, these instructions are not relevant; you may move on to the actual installation process described in the [[MacBook#Installation|Installation]] section of this article and select the "Partition Hard Drives" step in the "Prepare Hard Drive" menu on the installer, in order to format your assigned partitions.<br />
* Run the parted application on your hard drive:<br />
parted /dev/sda<br />
* Type "p" to view the current partition table.<br />
(parted) p<br />
* If you installed rEFIt onto a small partition but did not create the other partitions you want, you can now create all the other partitions you desire. If you installed rEFIt on a partition taking up the whole drive, you will have to resize the partition with the following command. ''Note'': The command is based upon the assumption that rEFIt is installed on the '''first''' partition of the hard drive. If rEFIt is installed on any other partition, simply change the number "1" to whichever one it is on.<br />
(parted) resize 1 <START> <END><br />
* For <START> and <END>, use the count in MBs of where you want your partition to start and end.<br />
* To create a swap partition type:<br />
(parted) mkpart primary linux-swap <START> <END><br />
* The same goes for any other regular partition:<br />
(parted) mkpart primary ext2 <START> <END><br />
* ''Note'': Parted only has the ability to format via the ext2, FAT16, FAT32, and linux-swap filesystems. It has the ability to create reiserfs partitions if libreiserfs is installed (not available through the Arch repositories). If you desire to use a filesystem such as ext3, reiserfs, xfs, or jfs, partition your hard drives in the parted application and format them as ext2. Then, during the actual Arch installation process, you will be given the opportunity to perform any other necessary filesystem creation over the original ext2 partition.<br />
* ''Further note'': If you are single booting Arch on a MacBook layed out with the MBR scheme, you will be able to create a logical partition like you would be able to during any other typical pre-installation process. If your hard disk is not layed out MBR-style and instead layed out with the GPT scheme, you cannot create a logical partition as the GPT standard does not support the implementation needed to do so. You can find the scheme your drive is laid out in with Apple's "Disk Utility" or by trying to use cfdisk (the default application run from the Arch installer): if the drive is laid out GPT-style, you will be informed by cfdisk and possibly denied readable and/or writable access to the table.<br />
* Quit parted.<br />
(parted) quit<br />
* Since you are using rEFIt on a small partition without OS X, synchronize your GUID Partition Table with the newly created MBR partition table.<br />
gptsync /dev/sda<br />
* Jump to the [[MacBook#Installation|Installation]] section of this article, and start the installation (/arch/setup).<br />
<br />
===Dual Boot===<br />
<br />
* Run the parted application to partition your hard disk for a dual boot.<br />
parted /dev/sda<br />
* Type "p" to view the current partition table.<br />
(parted) p<br />
* If repartitioning from an OS X configured MacBook that holds an EFI System Partition, resize the current OS X partition first in order to free up space for your new partitions. ''Note'': If you do not have an EFI System Partition and only have an OS X partition, change the number "2" in the following command to whichever partition OS X is on (probably "1").<br />
(parted) resize 2 <START> <END><br />
* For <START> and <END>, use the count in MBs of where you want your partition to start and end.<br />
* If you have any partitions on your disk other than the EFI System Partition and the partition that holds OS X, then remove them with the "rm" command:<br />
(parted) rm <NUMBER><br />
* Replace <NUMBER> with the position the partition rests on your drive. For example, to remove the third partition that comes after the OS X and EFI System Partition, according to your partition table shown with "p", type:<br />
(parted) rm 3<br />
* ''Note'': Be sure not to accidently remove the first or second partitions if that is where OS X and your EFI System Partition reside. Review your work carefully. <br />
* You may now, if you choose, make a partition for swap.<br />
(parted) mkpart primary linux-swap <START> <END><br />
* For <START> and <END>, use the count in MBs of where you want your partition to start and end.<br />
* The same goes for any other regular partition:<br />
(parted) mkpart primary ext2 <START> <END><br />
* ''Note'': Parted only has the ability to format via the ext2, FAT16, FAT32, and linux-swap filesystems. It has the ability to create reiserfs partitions if libreiserfs is installed (not available through the Arch repositories). If you desire to use a filesystem such as ext3, reiserfs, xfs, or jfs, partition your hard drives in the parted application and format them as ext2. Then, during the actual Arch installation process, you will be given the opportunity to perform any other necessary filesystem creation over the original ext2 partition. '''Parted does not have the ability to ''create'' HFS+ filesystems, as may be the case if you desire a shared /home; you need to perform this type of creation in OS X.'''<br />
* ''Further note'': If your hard disk is not layed out MBR-style and layed out with the GPT scheme (the default standard on a typical OS X installation), you cannot create a logical partition as the GPT standard does not support the implementation needed to do so. You can find the scheme your drive is laid out in with Apple's "Disk Utility" or by trying to use cfdisk (the default application run from the Arch installer): if the drive is laid out GPT-style, you will be informed by cfdisk and possibly denied readable and/or writable access to the table.<br />
* Quit parted.<br />
(parted) quit<br />
* Synchronize your GUID Partition Table with your newly created MBR partition table.<br />
gptsync /dev/sda<br />
* Jump to the [[MacBook#Installation|Installation]] section of this article, and start the installation (/arch/setup).<br />
<br />
==rEFIt==<br />
* You can now install the optional rEFIt if you have not done so already. ''Note'': This is not a requirement. It only gives you a menu to choose between OS X and Arch Linux upon every boot.<br />
* In OS X, download the ".dmg" from -> [http://refit.sourceforge.net/ Refit Homepage] and install it.<br />
* If you have already partitioned your hard disk in preparation for the Arch installation, rEFIt may not be enabled by default. You will have to run the "enable.sh" script installed in /efi/refit/.<br />
* Open up "Terminal" and enter:<br />
cd /efi/refit; ./enable.sh<br />
<br />
==Installation==<br />
This section assumes you have already finished partitioning your MacBook in preparation for an Arch installation. If you are single booting Arch Linux '''''and''''' you are not using rEFIt, you may follow the [[Official Arch Linux Install Guide#Common Installation Procedure|Official Arch Linux Install Guide]] with no special modifications, ignoring the rest of this section. '''If you are using rEFIt either in a single boot or dual boot setup, you will need to install your boot loader of choice onto your /boot partition or on your root partition if you are not opting for separation.''' The procedure for doing so is what follows.<br />
* Type "arch" at the boot prompt or "arch vga=773" if you prefer a higher console resolution.<br />
boot: arch vga=773<br />
* Note: Due to a bug in the Apple firmware ([http://refit.sourceforge.net/doc/c4s3_keyboard.html Note from rEFIt FAQ]), some MacBook Pro Core 2 Duo users have reported that the keyboard often does not work at the Arch Linux boot prompt. The only options are to either get a USB keyboard, which should work all the time, or keep rebooting until it works.<br />
* Note: Some MacBook (Pro) Core Duo users report strange keyboard output such as long delays and character doubling. If this is your situation, entering the following at the boot prompt should alleviate any such symptoms:<br />
boot: arch noapic irqpoll acpi=force<br />
* Run the Arch installer:<br />
/arch/setup<br />
* Be sure to work your way down through the menu, and do not forget to select the "Partition Hard Drives" step under the "Prepare Hard Drive" menu to format your partitions and mount them so Arch can be installed onto them. For the rest of the installation, you can follow the [[Official Arch Linux Install Guide#Common Installation Procedure|Official Arch Linux Install Guide]] and install everything normally '''''until you make it to the menu item titled "Install Bootloader."'''''<br />
* ''Note'': The following procedure is unique to GRUB. The GRUB boot loader now has the complete ability to boot your Arch Linux system, is considered stable, and is now recommended more often for Linux installation on a MacBook then LILO. If you wish to use the LILO boot loader, you will have to consult further documentation as the article's contributors have not yet attempted to boot Arch on the MacBook with LILO.<br />
* Select "Install Bootloader" from the "Main Menu" of the installer.<br />
* Choose the option "Use the GRUB bootloader" when asked.<br />
* When you review your GRUB configuration file, make sure that both "root" fields point to the correct partitions and the kernel and initrd paths are correct for your partition setup. If you plan on using a separate boot partition, do not have "/boot" in front of "/vmlinuz26" and "/kernel26.img" on the "kernel" and "initrd" fields respectively. The following example boots Arch Linux from the fourth partition on the hard drive devoted to the root file system. This could pertain to those dual booting OS X with Arch while having an EFI System Partition and a shared home.<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,3)<br />
kernel /boot/vmlinuz26 root=/dev/sda4 ro vga=773<br />
initrd /boot/kernel26.img<br />
* The example below boots Arch from the second partition on the hard drive assigned to /boot, while the third partition is assigned to root (/). This could be an example for those having only rEFIt installed on a small partition and no OS X.<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,1)<br />
kernel /vmlinuz26 root=/dev/sda3 ro vga=773<br />
initrd /kernel26.img<br />
* '''If you are using rEFIt, make sure you install GRUB onto ''a partition'', either your /boot or your /root (i.e. /dev/sda4) if you are not using separate partitions for both.'''<br />
* '''Do not install GRUB onto /dev/sda! Doing so is likely to lead to an unstable post-environment.'''<br />
* If GRUB was successfully installed, choose "Exit Install" from the "Main Menu."<br />
* If you did not partition your disk from OS X using diskutil or "Disk Utility" and instead partitioned with another third-party program or from Linux, sync your partition tables one more time for good measure.<br />
gptsync /dev/sda<br />
* ''NOTE'': If you get an error that GRUB was not installed successfully, it sometimes works if you go through the same steps a second time. If you receive an error message again stating that GRUB was not successfully installed, run the following commands, and then attempt to install GRUB again:<br />
! Replace the "3" with whatever your root partition is (i.e. sda4 -> 4)<br />
! 83 is for ext2/3. If you have something else, type "sfdisk -T" for a list of supported partition types. <br />
# sfdisk -c /dev/sda 3 83<br />
# gptsync /dev/sda<br />
* If you still get an error message when installing GRUB, keep trying those commands. It should work eventually.<br />
* You may now reboot your system. If rEFIt is setup correctly, you will be able to choose the correct icon in the boot menu on startup. If you do not have rEFIt installed, you will have to either hold the "Option" key during startup (or the "Menu" button on a compatable Apple Remote), or follow the instructions below to allow your MacBook to transfer its pre-control rights directly to GRUB (this will save the maximum time possible during a normal boot).<br />
reboot<br />
* If you are single booting without rEFIt and need to save a new instruction set in the PRAM to boot straight from the MBR instead of spending time searching for the GUID Partition Table, hold the "Option" key during startup or the "Menu" button on a compatable Apple Remote and boot into your new Arch Linux setup.<br />
* Then, synchronize your local package database with the one on the FTP/HTTP server you chose as your default during the install process, and install the "eject" package via pacman to eject your Arch installation media. This can all be done with one command:<br />
pacman -Sy eject<br />
* Eject the disk.<br />
eject<br />
* Insert an OS X Install Disk, and reboot while holding either the "C" or "Option" keys to initiate the loading of the DVD.<br />
* Follow the instructions in this article titled "Delayed Boot" under the [[MacBook#Single Boot|Single Boot (Partitioning from OS X)]] section to reconfigure your firmware's default boot device.<br />
* ''Note'': If you are sharing your Arch /home folder with OS X, skip down to the [[MacBook#Home Sharing|Home Sharing]] section of this article before you create your first user account.<br />
* Enjoy your new Arch MacBook!<br />
<br />
==Post Install==<br />
<br />
===Wifi===<br />
====Ndiswrapper====<br />
* First, install the ndiswrapper package like so:<br />
$ pacman -Sy ndiswrapper<br />
* The Lenovo Thinkpad 802.11abgn driver works well with the MacBook. The driver can be obtained through the manufacturer's [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-66449 own page], or directly with the following command:<br />
$ wget -c ftp://ftp.software.ibm.com/pc/pccbbs/mobiles/7iwc28ww.exe<br />
* You need cabextract to extract the file. Get it with pacman.<br />
pacman -S cabextract<br />
* Create a new directory for the soon-to-be extracted files, change the cwd to it, and extract the main file.<br />
mkdir 7iwc28ww; cd 7iwc28ww/; cabextract 7iwc28ww.exe<br />
* Install the driver where <path/to/driver> is the .inf file from the extracted .exe. If you are using the Lenovo Thinkpad 802.11abgn driver, replace <path/to/driver> with ''WINXP_2K/NET5416.INF''.<br />
ndiswrapper -i <path/to/driver><br />
* The below command may have already been executed during installation of the ndiswrapper application, but run it anyway just to be sure the correct alias for wlan0 is written to /etc/modprobe.conf.<br />
ndiswrapper -m<br />
* Verify your driver has been installed properly:<br />
ndiswrapper -l<br />
* Now, you can add "ndiswrapper" to your MODULES array in /etc/rc.conf, and load the module manually:<br />
modprobe ndiswrapper<br />
<br />
====Madwifi====<br />
'''Primary installation through the Arch repositories:'''<br />
* First, install the madwifi driver and madwifi-utils:<br />
pacman -Sy madwifi madwifi-utils<br />
* Then, load the "ath_pci" module. You can also add it to the MODULES list in /etc/rc.conf if you want it to load on a normal boot.<br />
modprobe ath_pci<br />
* And if everything is ok, you should see something like this:<br />
ifconfig <br />
ath0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX <br />
inet6 addr: fe80::219:e3ff:fed4:be51/64 Scope:Link<br />
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br />
RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:0 <br />
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)<br />
* Some MacBook users have reported more success when downloading and installing from SVN. There is a madwifi-svn package in the [[AUR]], which can be found [http://aur.archlinux.org/packages.php?do_Details=1&ID=10492&O=0&L=0&C=0&K=madwifi&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
<br />
===Fan Speed===<br />
* The fan doesn't seem to change speeds with the temperature. We can (somewhat) fix this<br />
* Add 'applesmc' to your MODULES array in /etc/rc.conf<br />
** Modprobe it too<br />
* This creates a bunch of magic files in /sys/devices/platform/applesmc.768<br />
* As root type 'echo 1 > /sys/devices/platform/applesmc.768/fan1_manual'<br />
* As root type 'echo 3500 > /sys/devices/platform/applesmc.768/fan1_output'<br />
** You may want to add this to your /etc/rc.local<br />
** The number can be anywhere from 1800 to 6200.<br />
** I find that for normal use, 3500-4000 is good.<br />
** When it gets really hot, 4500-5000 is good.<br />
** (after you add 'applesmc' to your modules, running 'sensors' will give you a lot more output)<br />
** I'm going to try and write a script to deal with this better. <br />
::''(I've wrote a [http://phpfi.com/246225 simple app in C] to keep my MacBook cold. It's written for xfce4-genmon-plugin, but you can also use it with conky, cron or anything else.) -- [[User:Husio|Husio]] 16:38, 30 June 2007 (EDT)''<br />
<br />
===Temperature Sensors===<br />
* To go along with this, we should be able to read from the temperature sensors.<br />
* Type 'pacman -S lm_sensors'<br />
* To autodetect sensors type 'sensors-detect'<br />
* In /etc/modprobe.conf add:<br />
alias char-major-89 i2c-dev<br />
* In /etc/rc.local add:<br />
modprobe i2c-i801<br />
modprobe eeprom<br />
modprobe coretemp<br />
sensors -s<br />
* Now you can type 'sensors' to see your core temperatures.<br />
<br />
===Suspend===<br />
====Suspend to Ram====<br />
If you want to get your macbook suspend to ram on closing it and you're using acpi, just add to ''/etc/acpi/actions/lm_lid.sh'':<br />
<pre><br />
# Suspend<br />
if [[ `cat /proc/acpi/button/lid/LID0/state | tr -s " " | cut -d" " -f2` = "closed" ]]<br />
then<br />
pm-suspend<br />
fi<br />
</pre><br />
There's some problem with mpd if you suspend when mpd is playing. It can't connect to localhost after waking up.<br />
<br />
===Backlight Control===<br />
====pommed====<br />
* Install the 'pommed' program from community<br />
* Put 'pommed' in your DAEMONS array in /etc/rc.conf<br />
* Start it manually with '/etc/rc.d/pommed start'<br />
You may also want to install gpomme which is GUI for pommed daemon. Edit then ~/.gpommerc and add gpomme to startup (it's not a daemon).<br />
<br />
By default the F1, F2 ... FX keys are disabled and act like Fn+F1, Fn+F2 ... To enable the keys and make use of Fn+FX, modify /etc/pommed.conf.mactel or /etc/pommed.conf.pmac by changing fnmode = 1 to fnmode = 2. Save it as pommed.conf and restart pommed with /etc/rc.d/pommed restart.<br />
<br />
To enable the sound keys (Fn+F3, Fn+F4 and Fn+F5), you have to modify /etc/pommed.conf : change init = -1 to init = 80 and (at least on Macbook 2) change volume = "PCM" to volume = "Front" and after that restart pommed with /etc/rc.d/pommed restart. (Thanks to the [http://wiki.debian.org/MacBook#head-7adc5d72650afca10f8983c100c25ca6a73df7fd Debian Wiki])<br />
<br />
====macbook-backlight====<br />
If you want to control your backlight from console, install macbook-backlight (it's in [[AUR]]). <br />
If you're using acpi, you may also want your ''/etc/acpi/actions/lm_battery.sh'' to look like this:<br />
<pre>if [[ -z $(acpi | grep discharging) ]]<br />
then<br />
/usr/bin/macbook-backlight +80<br />
else<br />
/usr/bin/macbook-backlight -80<br />
fi</pre><br />
<br />
Now you can also set it in pommed.<br />
<br />
===Frequency Scaling===<br />
* Run 'pacman -S cpufrequtils'<br />
* Add speedstep-centrino (be careful, since a recent update it seems to be "acpi_cpufreq"), cpufreq_conservative to your MODULES array in /etc/rc.conf<br />
** Modprobe them manually too.<br />
* Run 'cpufreq-set -c 0 -g conservative' and 'cpufreq-set -c 1 -g conservative'<br />
** Put them in /etc/rc.local to set them on boot<br />
<br />
===X11===<br />
* Type 'pacman -S xorg xf86-video-i810 915resolution<br />
* Type 'X -configure'<br />
* Open /etc/conf.d/915resolution in your editor, uncomment the 'MODE' and 'RESOLUTION'.<br />
* Set the RESOLUTION to '1280 800'<br />
* Add 915resolution to your DAEMONS array in /etc/rc.conf<br />
** Start it manually with /etc/rc.d/915resolution start<br />
<br />
====Touchpad====<br />
With 7.3 version of x.org and kernel 2.6.22 or later, it should work out of the box. If it doesn't follow these instructions for loading the kernel modules:<br />
<br />
* First you must add, appletouch, usbhid, and tsdev modules to the MOD_BLACKLIST array in rc.conf. (This is because udev loads the modules in random order)<br />
* Then add appletouch, usbhid to MODULES array IN THAT ORDER.<br />
<br />
By default the touchpad operates in compatibility mode by emulating a standard mouse. Many users though will find these default settings problematic as the touchpad is too sensitive and will cause accidental cursor jumping and clicking. However, by using a dedicated driver, more advanced features and fine tuning of the touchpad become available.<br />
<br />
* Type 'pacman -S synaptics' to install the driver<br />
* Load the synaptics driver by adding the following line to the Module section of your xorg.conf:<br />
Load "synaptics"<br />
* Add the touchpad to the ServerLayout section:<br />
InputDevice "Synaptics Touchpad" "CorePointer"<br />
* Add this section to your xorg.conf. I will enable horizontal two-finger-scrolling and a right click by tapping the top right hand corner of the touchpad. It switches off mouse clicks for tapping the touchpad, like OSX does.<br />
Section "InputDevice"<br />
Identifier "Synaptics Touchpad"<br />
Driver "synaptics"<br />
Option "CorePointer" <br />
Option "Device" "/dev/input/mice"<br />
Option "Protocol" "auto-dev"<br />
Option "LeftEdge" "100"<br />
Option "RightEdge" "1100"<br />
Option "TopEdge" "50"<br />
Option "BottomEdge" "300"<br />
Option "FingerLow" "20"<br />
Option "FingerHigh" "30"<br />
#We don't want the palm to trigger a tap, therefore a tap has to be quite fast<br />
Option "MaxTapTime" "100"<br />
Option "MaxTapMove" "100"<br />
Option "MaxDoubleTapTime" "200"<br />
Option "VertScrollDelta" "25"<br />
Option "HorizScrollDelta" "60"<br />
Option "VertTwoFingerScroll" "true"<br />
Option "HorizTwoFingerScroll" "0"<br />
Option "FastTaps" "true"<br />
#Tapping the top right-hand corner will trigger a right click<br />
Option "RTCornerButton" "3" <br />
#An ordinary tap will not trigger a click <br />
Option "TapButton1" "0"<br />
Option "TapButton2" "0"<br />
Option "TapButton3" "0"<br />
Option "MinSpeed" "0.5"<br />
Option "MaxSpeed" "3.5"<br />
Option "AccelFactor" "0.05"<br />
EndSection<br />
<br />
* Finally, restart your X server.<br />
<br />
* The [http://wiki.debian.org/MacBook#head-b5e4b425668a24b46ead13b652f997f38318678b Debian Wiki] has also a few suggestions on how to configure right-clicking and scrolling.<br />
* Also, see [[Touchpad_Synaptics|Touchpad Synaptics]] or the synaptics manpages for many more options.<br />
<br />
===Sound===<br />
If you follow the arch wiki on ALSA it pretty much covers the instructions and specifics. However, there is a noticeable crackling sound from the left channel. I fixed this with the following: (as root/sudo)<br />
# mkdir /etc/modprobe.d/<br />
# nano /etc/modprobe.d/options<br />
# cat options snd-hda-intel position_fix=1 >> /etc/modprobe.d/options<br />
<br />
The above commands creates a options file, then specifies a fix. You Must REBOOT!<br />
<br />
<br />
===iSight===<br />
There is linux-uvc-isight in the AUR. Some people for whom the normal release didn't work had success with linux-uvc-isight-svn, but if you use that, install linux-uvc-utils-svn as well. Follow the instructions printed in the post-install:<br />
You *must* install and load the firmware to /lib/firmware, e.g:<br />
# mkdir -p /lib/firmware<br />
# cp /\${OSX_MOUNT}/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport /lib/firmware"<br />
# isight-firmware-tool /lib/firmware/AppleUSBVideoSupport<br />
<br />
Load the 'uvcvideo' module and add it to your ''/etc/rc.conf'' if you want it to load at boot. You can find the driver [http://aur.archlinux.org/packages/linux-uvc-isight/ here].<br />
<br />
===Apple Remote===<br />
====lirc====<br />
TODO<br />
<br />
<br />
====appleir [old]====<br />
This patch is only for kernel < 2.6.22. <br />
Load the ''appleir'' module (or add it to the MODULES array in ''/etc/rc.conf''). Then run xev to check the signals, or copy this to ~/.Xmodmap:<br />
keycode 153 = XF86AudioNext<br />
keycode 144 = XF86AudioPrev<br />
keycode 176 = XF86AudioRaiseVolume<br />
keycode 174 = XF86AudioLowerVolume<br />
keycode 162 = XF86AudioPlay<br />
keycode 158 = XF86Favorites<br />
and run xmodmap ~/.Xmodmap.<br />
<br />
===Home Sharing===<br />
<br />
====UID Synchronization====<br />
<br />
'''In OS X:'''<br />
<br />
''Note'': It is recommended that UID/GID manipulation be done immediately after a new user account is created, in OS X as well as in Arch Linux. If you installed OS X from scratch, then this operation is guaranteed to work after logging into your account for the first time.<br />
<br />
'''''Step 1: Change UID and GID(s)'''''<br />
<br />
Pre-Leopard:<br />
<br />
# Open NetInfo Manager located in the /Applications/Utilities folder.<br />
# If not done for you already, enable access to user account transactions by clicking on the closed lock at the bottom of the window, and entering your account password, or root password if you have created a root account.<br />
# Navigate to /users/<new user name> where <new user name> is the name of the account that will have read/write access to the folder that will be shared with the primary user in Arch.<br />
# Change the UID value to 1000 (the value used by default for first user created in Arch).<br />
# Change the GID value to 1000 also.<br />
# Navigate to /groups/<new user name>, automatically saving the changes you have made so far, where <new user name> is, again, the name of the account that will have read/write access to the folder that will be shared with the primary user in Arch. ''Note'': If you get an error message that the transaction is not allowed, log out and log back in.<br />
# Change the GID value to 1000 (the value used by default for user account creation in Arch).<br />
<br />
Leopard:<br />
<br />
In Leopard, the NetInfo Application is not present. A different set of steps is required for UID synchronization:<br />
# Open System Preferences.<br />
# Click on Accounts.<br />
# Unlock the pane if not already done so.<br />
# Right-click on the desired user and select "Advanced Options."<br />
# Change both the UID and GID to match the UID and GID of the account wished to be shared with in Arch (1000 by default for the first user created in Arch).<br />
<br />
'''''Step 2: Change "home" permissions'''''<br />
<br />
# Open up "Terminal" in the /Applications/Utilities folder.<br />
# Enter the following command to reclaim the permission settings of your home folder, replacing <your user name> and <your user group> with the user name whose UID and GID values you just changed and the group name whose GID value you just changed, respectively.<br />
chown -R <your user name>:<your user group> /Users/<your user name><br />
<br />
'''In Arch:'''<br />
<br />
To synchronize your UID in Arch Linux, you are advised to perform this operation ''while creating a new user account.'' It is therefore recommended that you do this as soon as you install Arch Linux, but if you have already set up a normal .... ''(Will finish the rest later--burned out)''<br />
<br />
====fstab Line====</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=Mac&diff=34843Mac2008-01-08T14:58:41Z<p>Anthonyclark: /* Post Install */</p>
<hr />
<div>[[Category:Laptops (English)]]<br />
[[Category:HOWTOs (English)]]<br />
This article attempts to annotate the installation and configuration of Arch Linux on the Apple MacBook. All generations are supported, and relevant details concerning individual specifications have tried to be incorporated wherever necessary.<br />
==Partitioning in OS X==<br />
This section attempts to cover the most practical paths one can take in creating an ideal partition layout in OS X for the MacBook. If one prefers a Linux environment for setting up his or her partitions, the section, [[MacBook#Partitioning in Arch|Partitioning in Arch]], below will cover the specific points that need to be taken into consideration when implementing a partitioning layout on the MacBook. References to more user-friendly applications, such as Apple's "Boot Camp," will be mentioned here, but the depth will not be as great as that knowledge has already been documented extensively elsewhere.<br />
<br />
Before attempting any of the following pre-installation procedures, it is advisable to upgrade your firmware to the latest state released by Apple. You can achieve this either through the "Software Update" application bundled with OS X, or through the downloads on the support section of Apple's [http://www.apple.com/support/downloads/ home page]. ''Note'': The "Software Update" in OS X may not pick up all the firmware updates available for your computer. Therefore, it is possible your chance of having the most update firmware code will be increased by searching through Apple's official download page.<br />
===Single Boot===<br />
Dedicating your MacBook to Arch Linux permits you to follow the [[Official Arch Linux Install Guide]] as in a typical installation. If using rEFIt on a small partition without OS X, be sure not to install your boot loader of choice in the MBR (/dev/sda), but instead to the /boot partition or root partition if you are not going to reserve a separate partition for /boot.<br />
<br />
Also note that the "Auto-Prepare" feature available on the Installation CD will allow you to erase and format your hard drive just fine, but the manual installer uses cfdisk to partition your drive, and it does not have the capability to recognize the GUID partition scheme that your MacBook will be in if formatted with "Disk Utility" (used by default in a normal OS X installation). In that case, it might be best to not use the installer to partition your disk and instead use a GPT-capable partitioner such as parted.<br />
<br />
Furthermore, there are a few caveats discussed below that you should be familiar with in order to avoid any unpleasant outcomes:<br />
* ''Note'': The points discussed below do not apply if you choose to keep a small partition containing OS X and a small EFI System Partition on the same GPT-scheme hard disk you will be installing Arch Linux to. The section that follows assumes you do not want any trace of OS X on your MacBook.<br />
* '''Firmware Updates''' - You will not be able to update the firmware on your MacBook without a hard disk layed out with the GUID Partition Table (GPT) containing an OS X installation and a separate EFI System Partition. If you do not have access to an external OS X environment, it may be best to include a small partition containing OS X as well as an EFI System Partition on the hard drive Arch Linux will be installed onto. With this method, you have the choice of booting Arch Linux through a boot menu, such as rEFIt, or via the firmware default isolated in your MacBook's PRAM (discussed in the second caveat below).<br />
* '''Delayed Boot''' - The mechanism the MacBook uses to boot an operating system does not have the ability to quickly recognize a disk laid out solely with the MBR scheme. Instead, it searches for a familiar GUID partition table that holds an EFI System Partition to transfer its rights to. This scanning can take anywhere between twenty and thirty seconds, in contrast to the process normally taking around ten seconds when the default operating system is selected through Apple's "Startup Disk." Since the "Startup Disk" application on both the OS X Install Disk and the default OS X installation cannot locate an operating system installed within the MBR scheme, there are a few alternative solutions that solve this problem:<br />
:1. Modify the code held in your MacBook's PRAM to skip checking for the GUID Partition Table and boot straight from the MBR. Following this method, you will have a system that boots normally, just like any other would, with an estimated time of around ten seconds from power-on to GRUB. This is actually what Apple's "Startup Disk" does, which is the graphical front-end for the application about to be described.<br />
<br />
'''''Warning:''''' ''If you have adjusted the startup sound on your MacBook to something other than the default it came with, then the startup sound may be reset back to its factory default after the following modifications are made to your system's PRAM. You may have to boot into an external OS X environment in order to change the startup sound back to what you had before.''<br />
<br />
First, boot from an OS X Install Disk (this procedure may not work from an external OS X installation) and open up "Terminal." Use "diskutil list" to obtain the identifier of the disk Arch Linux will be installed onto.<br />
diskutil list<br />
The top part of the output should look something like this:<br />
/dev/disk0<br />
#: type name size identifier<br />
0: FDisk_partition_scheme *111.8 GB disk0<br />
The following command will install the code to your MacBook's PRAM that allows it to boot from the MBR. Replace "[disk identifier]" with the identifier obtained from the above command:<br />
bless --device /dev/[disk identifier] --setBoot -legacy<br />
Using the previous example the command would be:<br />
bless --device /dev/disk0 --setBoot -legacy<br />
Note: The device /dev/disk0 does not actually represent the MBR, even though that is what we type in for the command. The device echoed with the below command, "bless --getBoot", should not be /dev/disk0 but another main block device nomination, such as /dev/disk2. To insure you have correctly set the proper pointer that can boot the MBR, such as /dev/disk2, type the following command:<br />
bless --getBoot<br />
:2. Another option you have is to partition your hard disk with the GPT scheme and keep rEFIt installed on a small partition. This method does not result in as fast of a boot as the above does, but it gives you a boot menu that shows up on startup, allowing you to choose a valid operating system to boot from. This can be achieved by booting your MacBook into Target Disk Mode (Firewire); connecting to another disk with OS X installed, and partitioning your drive with the GPT scheme while creating a small HFS+ partition to hold rEFIt; installing rEFIt onto that partition; and finally typing "cd /efi/refit; ./enable-always.sh". It may be wise to set up '''''all''''' your partitions during this process, so as to avoid having to choose from a very select few partitioners that support the GPT scheme your disk will be laid out in. Furthermore, if you set up your partitions with "Disk Utility" or its back-end diskutil, there is no need to use gptsync to synchronize your partition tables. You can continue the installation process like you normally would (starting with the install step dedicated to filesystem creation), but be sure at the very end to install GRUB onto your boot partition or, if you do not want a separate boot slice, the root partition. You do not want to install onto /dev/sda or else this might prevent rEFIt from acting the way it was designed to.<br />
:3. A third option to counter the delayed boot is to hold the "Option" key on boot to bring up a menu that can transfer control to the MBR (the menu item will be titled "Windows"). Your MacBook will then boot to the MBR as fast as it physically can with the total time it takes to boot dependent upon how fast you confirm your selection at the menu. Holding the "Menu" button on a compatible Apple Remote during boot will also perform this same function.<br />
* '''Startup Sound''' - There is no available method for changing the startup sound on your MacBook without the presence of OS X. If you would like the startup sound on boot to be muted or at a specific volume output when single-booting Arch Linux, then an easy way is to adjust or mute the volume in OS X before Arch is installed. If the startup sound has returned after a firmware upgrade or PRAM modification, or you have already erased OS X and installed Arch Linux and would like to make adjustments now, boot from an external OS X drive (select it from the startup menu by holding "Option" on boot), and make arrangements from there.<br />
<br />
===Dual Boot===<br />
This portion of the article makes the assumption that one wants to install Arch Linux on top of an already-existing OS X configured MacBook. A higher success rate and smoother installation may be achieved by installing OS X from scratch and then following these steps. If this is the preferred option, then you may also decide to setup your partitions through "Disk Utility" before OS X is installed. In the case of a layout incorporating a shared partition, make sure to choose a filesystem that is writable from both OS X and Linux, for example: HFS+ (non-journaled) or FAT32 (more about dual boots with a shared partition [[MacBook#With Shared Partition|below]]). In any case, you always have the option of disabling journaling on the default HFS+ filesystem in OS X in order to allow read/writes from Arch Linux.<br />
====No Shared Partition====<br />
* Optional Step: Install rEFIt. This will give you a boot menu to choose between OS X and Arch Linux on every boot. Download the ".dmg" from the [http://refit.sourceforge.net/ Refit Homepage] and install it. Make sure to install your Linux boot loader (i.e. GRUB or LILO) on your /boot partition or on your root partition if you are not going to have separate partitions for both. Be careful about installing a boot loader to /dev/sda as this can lead to unexpected results with rEFIt.<br />
* Note: You can either partition your hard disk with the command-line application, diskutil, or its GUI front-end, "Boot Camp." Diskutil comes embedded into OS X, while "Non-Leopard" users may find themselves having to download and pay for the latest "Boot Camp" release.<br />
'''1. Partitioning with diskutil:'''<br />
* Note: diskutil partitions a disk differently than most other applications. It creates new partitions by resizing an exisiting partition and creating new ones out of the remaining free space (in the case below the partition to be split is the second one located on /dev/disk0s2). Furthermore, your chances of success will almost always be guaranteed when performing the following operations after a clean OS X installation.<br />
* To partition using diskutil, open the "Terminal" application found in the /Applications/Utilities folder. The following steps can be performed while your OS X volume is mounted.<br />
* Disable journaling on your about-to-be-resized OS X partition. You can do this with "Disk Utility" in OS X or with diskutil through the following command. (Type "ls /Volumes/" to obtain the label of your OS X partition.)<br />
sudo diskutil disableJournal /Volumes/[LABEL]<br />
* Next, type "diskutil list" and you should see something like this:<br />
/dev/disk0<br />
#: type name size identifier<br />
0: GUID_partition_scheme *111.8 GB disk0<br />
1: EFI 200.0 MB disk0s1<br />
2: Apple_HFS Macintosh HD 111.5 GB disk0s2<br />
* Below is the command usage for resizing a partition and reclaiming the remaining free space by creating a new partition. Note the disk identifier from the "diskutil list" command you typed (in the example above it would be disk0s2), and replace [disk identifier] with that identifier. Replace "[disk size]" with the new size of your OS X partition and "[partition size]" with the remaining space calculated via the total amount of space your original OS X partition takes up. Last, replace ["Partition label"] with a name for your new Arch Linux partition.<br />
sudo diskutil resizeVolume [disk identifier] [disk size] "Linux" ["Partition label"] [partition size]<br />
* The example command below resizes the initial OS X partition (disk0s2) to 55.5 gigabytes and then creates the partition assigned to Arch Linux with the free space that was left over. The amount of free space that was left over after the resizing was calculated with the "diskutil list" command used above. "Linux" is the GPT recognized name for any of the possible filesystems most attributed to Linux.<br />
sudo diskutil resizeVolume disk0s2 55.5G "Linux" "Phrakture" 56G<br />
* Reboot.<br />
* Verify your disk was formatted correctly.<br />
diskutil list<br />
'''2. Partitioning with "Boot Camp":'''<br />
The "Boot Camp" application released by Apple is considered by some to be more user-friendly due to its graphical interface and simple procedure.<br />
* ''Note'': Apple no longer officially hosts the "Boot Camp" beta software; you can still obtain the last publicly released version, "Boot Camp 1.4b," from an unofficial mirror site. If you have 10.5 "Leopard," the "Boot Camp" final release comes bundled with the default installation and can be found in /Applications/Utilities. The software can also be extracted from the 10.5 Install Disk and installed onto any supported version of OS X.<br />
* Install "Boot Camp" if it is not already installed, and run the "Boot Camp Assistant" from the /Applications/Utilities folder.<br />
* Partition your hard drive however you like.<br />
<br />
====With Shared Partition====<br />
The easiest way to go about dual booting Arch Linux and OS X with a shared partition is by using Apple's diskutil application, the CLI back-end for "Boot Camp." Partitioning with diskutil keeps you from having to install Arch Linux through the FTP disk in order to use parted to partition and gptsync to sync the GPT and MBR partition tables (diskutil recognizes both the new GPT scheme and the old MBR and creates and syncs them for you upon write). In addition to using diskutil to partition, you will also have a choice of whether or not you want the shared partition to be a "shared" /home folder for both operating systems or a smaller partition while allowing both Arch Linux and OS X to have their own /home folders. You will also have to decide what filesystem to format your shared partition with. The non-journaled HFS+ and FAT32 filesystems are popular for sharing files between Linux and OS X due to both operating systems being able to read/write to them well. In the case of a shared /home, the Case-sensitive HFS+ (Non-Journaled) filesystem is a good way to go considering read/write support for non-journaled HFS+ filesystems is good in Linux, and the "case-sensitive" aspect of the HFS+ filesystem permits good interoperability between Arch Linux and OS X. '''Also, do not forget to synchronize your Arch and OS X UIDs, otherwise you will not have write access to your /home directory from both Arch and OS X;''' the [[MacBook#Home Sharing|Home Sharing]] section of this article describes how to do this.<br />
* Optional Step: Install rEFIt. This will give you a boot menu to choose between OS X and Arch Linux on every boot. Download the ".dmg" from the [http://refit.sourceforge.net/ Refit Homepage] and install it. Make sure to install your Linux boot loader (i.e. GRUB or LILO) on your /boot partition or on your root partition if you are not going to have separate partitions for both. Be careful about installing a boot loader to /dev/sda as this can lead to unexpected results with rEFIt.<br />
* Note: You can either partition your hard disk with the command-line application, diskutil, or its GUI front-end, "Boot Camp." Diskutil comes embedded into OS X while "Non-Leopard" users may find themselves having to download and pay for the latest "Boot Camp" release.<br />
* ''Further note'': diskutil partitions a disk differently than most other applications. It creates new partitions by resizing an exisiting partition and creating new ones out of the remaining free space (in the case below the partition to be split is the second one located on /dev/disk0s2). Furthermore, your chance of success will almost always be guaranteed when performing the following operations after a clean OS X installation.<br />
* Open the "Terminal" application found in the /Applications/Utilities folder. The following steps can be performed while your OS X volume is mounted.<br />
* Disable journaling on your about-to-be-resized OS X partition. You can do this with "Disk Utility" in OS X or with diskutil through the following command. (Type "ls /Volumes/" to obtain the label of your OS X partition.) <br />
sudo diskutil disableJournal /Volumes/[LABEL]<br />
* Type "diskutil list" and you should see something like this:<br />
/dev/disk0<br />
#: type name size identifier<br />
0: GUID_partition_scheme *111.8 GB disk0<br />
1: EFI 200.0 MB disk0s1<br />
2: Apple_HFS Macintosh HD 111.5 GB disk0s2<br />
* Below is the command usage for resizing a partition and reclaiming the remaining free space by creating a new partition(s). Note the disk identifier from the "diskutil list" command you typed (in the example above it would be disk0s2) and replace [disk identifier] with that identifier. Replace "[disk size]" with the new size of your OS X partition and "[partition size]" with the remaining space you want each individual partition to take up, calculated via the total amount of space your original OS X partition takes up. Last, fill in the ["Partition label"] fields with names for your new partitions.<br />
sudo diskutil resizeVolume [disk identifier] [disk size] [partition type] ["Partition label"] [partition size] [partition type] ["Partition label"] [partition size]<br />
* The following example resizes the original OS X partition (disk0s2) to 30GB and sets up a 71.5GB shared, non-journaled HFS+ (Case Sensitive) /home partition and a 10GB Arch Linux root partition:<br />
sudo diskutil resizeVolume disk0s2 30G "Case-sensitive HFS+" "Shared" 71.5G "Linux" "Arch" 10G<br />
* If you would rather use the FAT filesystem on a small shared partition and keep separate /home folders on the Arch Linux and OS X partitions, then you could use something like:<br />
sudo diskutil resizeVolume disk0s2 50G "MS-DOS FAT32" "Shared" 11.5G "Linux" "Arch" 50G<br />
* The commands above do not actually format the partitions. They only store the proper information that the GUID Partition Table needs so it can be read from by applications and the native EFI bootloader. You will now have to format any partitions that can not be formatted in Linux with the desired filesystem. If you chose the Non-Journaled Case-sensitive HFS+ filesystem for your shared partition then you will need to format it with the below command after you reboot. You will then have to run "diskutil list" again to get the identifier for the new shared partition (following the example above it would be disk0s3).<br />
* Reboot<br />
diskutil list<br />
diskutil eraseVolume "Case-sensitive HFS+" "Shared" [disk identifier]<br />
* If you chose the FAT filesystem for your shared partition you can also choose to format it from OS X, but you may end up doing it over again in the Arch Linux installer when it comes time to mount and format your filesystems. To format from OS X type:<br />
newfs_msdos -F 32 -v "Shared" /dev/[disk identifier]<br />
* If throughout this procedure you get a "chosen size is invalid..." error try expressing the size of the partitions in megabytes instead of gigabytes. The original command for a FAT32 formatted shared partition would then look like:<br />
sudo diskutil resizeVolume disk0s2 50000M "MS-DOS FAT32" "Shared" 11500M "Linux" "Arch" 50000M<br />
* If you get a "Resizing encountered error No space left on device (28) on disk" error even though you have verified the total size of the partition you are splitting with "diskutil list", then first resize only the soon-to-be-split partition:<br />
sudo diskutil resizeVolume disk0s2 30G<br />
* Reboot, and then create the rest of the partitions:<br />
sudo diskutil resizeVolume disk0s2 30G "Case-sensitive HFS+" "Shared" 71.5G "Linux" "Arch" 10G<br />
* After using any of the above commands to repartition your MacBook, you can reboot and verify your partitions have been created with "diskutil list".<br />
* ''Note'': It may be best at this point to synchronize the UID of your main account in OS X with the default in Arch Linux. Skip down to the [[MacBook#Home Sharing|Home Sharing]] section of this article for directions on how to do this.<br />
<br />
==Partitioning in Arch==<br />
If you prefer to partition in Linux, there are two tools available to Arch end-users that faciliate this process on the MacBook: parted and refit. GNU Parted will allow the repartitioning of your disk even if it is laid out in GPT format, while the refit package, available in the Arch community repository, allows the synchronization of the MBR table that is created by parted and the GUID Partition Table that is originally on a default OS X installation. If your hard disk is not layed out with the GPT scheme, then you can use the partitioner available through the Arch installer, cfdisk, and you need not follow the rest of the details covered in this section. You can find the scheme your drive is laid out in with Apple's "Disk Utility" or by trying to use cfdisk (the default application run from the Arch installer): if the drive is laid out GPT-style, you will be informed by cfdisk and possibly denied readable and/or writable access to the table.<br />
<br />
''Note'': If you are going to resize the HFS+ partition used by default in OS X, it may be wise to disable journaling prior to the task. You can do this with "Disk Utility" in OS X or with diskutil through the following command:<br />
sudo diskutil disableJournal /Volumes/[LABEL]<br />
Type "ls /Volumes/" to obtain the label of your OS X partition.<br />
<br />
'''Prepare the Arch environment for partitioning:'''<br />
<br />
* Get the latest [http://www.archlinux.org/download/ Arch Linux FTP Install CD] and burn it.<br />
* Reboot, and hold down "C" during startup, so it will boot from the CD, or hold "Option" to select it from the firmware menu. If you installed rEFIt, you can select the Install CD from the boot menu that automatically comes up.<br />
* Type "arch" at the boot prompt or "arch vga=773" if you prefer a higher resolution.<br />
boot: arch vga=773<br />
* Note: Due to a bug in the Apple firmware ([http://refit.sourceforge.net/doc/c4s3_keyboard.html Note from rEFIt FAQ]), some MacBook Pro Core 2 Duo users have reported that the keyboard often does not work at the Arch Linux boot prompt. The only options are to either get a USB keyboard, which should work all the time, or keep rebooting until it works.<br />
* Note: Some MacBook (Pro) Core Duo users report strange keyboard output such as long delays and character doubling. If this is your situation, entering the following at the boot prompt should alleviate any such symptoms:<br />
boot: arch noapic irqpoll acpi=force<br />
* [[Configuring network|Configure your network]] through bash or through the normal Arch install procedure that follows:<br />
/arch/setup<br />
* Select "FTP/HTTP" as the installation source when asked.<br />
* Select "Configure Network" from the "Main Menu."<br />
* Probe and/or select your network interface and either confirm the usage of DHCP or set up your interface statically.<br />
* Exit by selecting "Exit Install" at the "Main Menu."<br />
* Open /etc/pacman.conf in your favorite editor and uncomment the "[community]" header and its "Include" path to enable the repository:<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/community<br />
* Since "ftp://ftp.archlinux.org/" is throttled, configure /etc/pacman.d/core, /etc/pacman.d/community, and /etc/pacman.d/extra for a less slow download by moving a fast mirror to the top in those files. If you do not know which mirrors are the quick ones for you, then any mirror other than "ftp://ftp.archlinux.org/" will do for now.<br />
* Bring the available list of packages up to date, and install the latest versions of refit and parted along with their dependencies. This can be done with one command:<br />
pacman -Sy refit parted<br />
* Continue with the instructions below that are relevant to your particular table layout, either a single boot or dual boot. If you do not have rEFIt installed '''''and''''' you do not plan on dual booting Arch and OS X, feel free to partition how you normally would, possibly ignoring the rest of this section.<br />
<br />
===Single Boot===<br />
<br />
This section '''only''' describes how to prepare your hard disk with parted if you are '''single booting Arch, while keeping rEFIt installed on a small partition.''' If you do not have rEFIt installed on a HFS+ partition and your drive is not layed out in the GPT format, there are no special modifications to consider during the single boot process. If your whole drive is configured with the MBR scheme, then you are advised to use whatever partitioner you feel most comfortable with, as there are no usual restrictions upon how you may partition your drive.<br />
* Note: If you had decided to partition your disk back when you installed rEFIt onto a small partition, these instructions are not relevant; you may move on to the actual installation process described in the [[MacBook#Installation|Installation]] section of this article and select the "Partition Hard Drives" step in the "Prepare Hard Drive" menu on the installer, in order to format your assigned partitions.<br />
* Run the parted application on your hard drive:<br />
parted /dev/sda<br />
* Type "p" to view the current partition table.<br />
(parted) p<br />
* If you installed rEFIt onto a small partition but did not create the other partitions you want, you can now create all the other partitions you desire. If you installed rEFIt on a partition taking up the whole drive, you will have to resize the partition with the following command. ''Note'': The command is based upon the assumption that rEFIt is installed on the '''first''' partition of the hard drive. If rEFIt is installed on any other partition, simply change the number "1" to whichever one it is on.<br />
(parted) resize 1 <START> <END><br />
* For <START> and <END>, use the count in MBs of where you want your partition to start and end.<br />
* To create a swap partition type:<br />
(parted) mkpart primary linux-swap <START> <END><br />
* The same goes for any other regular partition:<br />
(parted) mkpart primary ext2 <START> <END><br />
* ''Note'': Parted only has the ability to format via the ext2, FAT16, FAT32, and linux-swap filesystems. It has the ability to create reiserfs partitions if libreiserfs is installed (not available through the Arch repositories). If you desire to use a filesystem such as ext3, reiserfs, xfs, or jfs, partition your hard drives in the parted application and format them as ext2. Then, during the actual Arch installation process, you will be given the opportunity to perform any other necessary filesystem creation over the original ext2 partition.<br />
* ''Further note'': If you are single booting Arch on a MacBook layed out with the MBR scheme, you will be able to create a logical partition like you would be able to during any other typical pre-installation process. If your hard disk is not layed out MBR-style and instead layed out with the GPT scheme, you cannot create a logical partition as the GPT standard does not support the implementation needed to do so. You can find the scheme your drive is laid out in with Apple's "Disk Utility" or by trying to use cfdisk (the default application run from the Arch installer): if the drive is laid out GPT-style, you will be informed by cfdisk and possibly denied readable and/or writable access to the table.<br />
* Quit parted.<br />
(parted) quit<br />
* Since you are using rEFIt on a small partition without OS X, synchronize your GUID Partition Table with the newly created MBR partition table.<br />
gptsync /dev/sda<br />
* Jump to the [[MacBook#Installation|Installation]] section of this article, and start the installation (/arch/setup).<br />
<br />
===Dual Boot===<br />
<br />
* Run the parted application to partition your hard disk for a dual boot.<br />
parted /dev/sda<br />
* Type "p" to view the current partition table.<br />
(parted) p<br />
* If repartitioning from an OS X configured MacBook that holds an EFI System Partition, resize the current OS X partition first in order to free up space for your new partitions. ''Note'': If you do not have an EFI System Partition and only have an OS X partition, change the number "2" in the following command to whichever partition OS X is on (probably "1").<br />
(parted) resize 2 <START> <END><br />
* For <START> and <END>, use the count in MBs of where you want your partition to start and end.<br />
* If you have any partitions on your disk other than the EFI System Partition and the partition that holds OS X, then remove them with the "rm" command:<br />
(parted) rm <NUMBER><br />
* Replace <NUMBER> with the position the partition rests on your drive. For example, to remove the third partition that comes after the OS X and EFI System Partition, according to your partition table shown with "p", type:<br />
(parted) rm 3<br />
* ''Note'': Be sure not to accidently remove the first or second partitions if that is where OS X and your EFI System Partition reside. Review your work carefully. <br />
* You may now, if you choose, make a partition for swap.<br />
(parted) mkpart primary linux-swap <START> <END><br />
* For <START> and <END>, use the count in MBs of where you want your partition to start and end.<br />
* The same goes for any other regular partition:<br />
(parted) mkpart primary ext2 <START> <END><br />
* ''Note'': Parted only has the ability to format via the ext2, FAT16, FAT32, and linux-swap filesystems. It has the ability to create reiserfs partitions if libreiserfs is installed (not available through the Arch repositories). If you desire to use a filesystem such as ext3, reiserfs, xfs, or jfs, partition your hard drives in the parted application and format them as ext2. Then, during the actual Arch installation process, you will be given the opportunity to perform any other necessary filesystem creation over the original ext2 partition. '''Parted does not have the ability to ''create'' HFS+ filesystems, as may be the case if you desire a shared /home; you need to perform this type of creation in OS X.'''<br />
* ''Further note'': If your hard disk is not layed out MBR-style and layed out with the GPT scheme (the default standard on a typical OS X installation), you cannot create a logical partition as the GPT standard does not support the implementation needed to do so. You can find the scheme your drive is laid out in with Apple's "Disk Utility" or by trying to use cfdisk (the default application run from the Arch installer): if the drive is laid out GPT-style, you will be informed by cfdisk and possibly denied readable and/or writable access to the table.<br />
* Quit parted.<br />
(parted) quit<br />
* Synchronize your GUID Partition Table with your newly created MBR partition table.<br />
gptsync /dev/sda<br />
* Jump to the [[MacBook#Installation|Installation]] section of this article, and start the installation (/arch/setup).<br />
<br />
==rEFIt==<br />
* You can now install the optional rEFIt if you have not done so already. ''Note'': This is not a requirement. It only gives you a menu to choose between OS X and Arch Linux upon every boot.<br />
* In OS X, download the ".dmg" from -> [http://refit.sourceforge.net/ Refit Homepage] and install it.<br />
* If you have already partitioned your hard disk in preparation for the Arch installation, rEFIt may not be enabled by default. You will have to run the "enable.sh" script installed in /efi/refit/.<br />
* Open up "Terminal" and enter:<br />
cd /efi/refit; ./enable.sh<br />
<br />
==Installation==<br />
This section assumes you have already finished partitioning your MacBook in preparation for an Arch installation. If you are single booting Arch Linux '''''and''''' you are not using rEFIt, you may follow the [[Official Arch Linux Install Guide#Common Installation Procedure|Official Arch Linux Install Guide]] with no special modifications, ignoring the rest of this section. '''If you are using rEFIt either in a single boot or dual boot setup, you will need to install your boot loader of choice onto your /boot partition or on your root partition if you are not opting for separation.''' The procedure for doing so is what follows.<br />
* Type "arch" at the boot prompt or "arch vga=773" if you prefer a higher console resolution.<br />
boot: arch vga=773<br />
* Note: Due to a bug in the Apple firmware ([http://refit.sourceforge.net/doc/c4s3_keyboard.html Note from rEFIt FAQ]), some MacBook Pro Core 2 Duo users have reported that the keyboard often does not work at the Arch Linux boot prompt. The only options are to either get a USB keyboard, which should work all the time, or keep rebooting until it works.<br />
* Note: Some MacBook (Pro) Core Duo users report strange keyboard output such as long delays and character doubling. If this is your situation, entering the following at the boot prompt should alleviate any such symptoms:<br />
boot: arch noapic irqpoll acpi=force<br />
* Run the Arch installer:<br />
/arch/setup<br />
* Be sure to work your way down through the menu, and do not forget to select the "Partition Hard Drives" step under the "Prepare Hard Drive" menu to format your partitions and mount them so Arch can be installed onto them. For the rest of the installation, you can follow the [[Official Arch Linux Install Guide#Common Installation Procedure|Official Arch Linux Install Guide]] and install everything normally '''''until you make it to the menu item titled "Install Bootloader."'''''<br />
* ''Note'': The following procedure is unique to GRUB. The GRUB boot loader now has the complete ability to boot your Arch Linux system, is considered stable, and is now recommended more often for Linux installation on a MacBook then LILO. If you wish to use the LILO boot loader, you will have to consult further documentation as the article's contributors have not yet attempted to boot Arch on the MacBook with LILO.<br />
* Select "Install Bootloader" from the "Main Menu" of the installer.<br />
* Choose the option "Use the GRUB bootloader" when asked.<br />
* When you review your GRUB configuration file, make sure that both "root" fields point to the correct partitions and the kernel and initrd paths are correct for your partition setup. If you plan on using a separate boot partition, do not have "/boot" in front of "/vmlinuz26" and "/kernel26.img" on the "kernel" and "initrd" fields respectively. The following example boots Arch Linux from the fourth partition on the hard drive devoted to the root file system. This could pertain to those dual booting OS X with Arch while having an EFI System Partition and a shared home.<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,3)<br />
kernel /boot/vmlinuz26 root=/dev/sda4 ro vga=773<br />
initrd /boot/kernel26.img<br />
* The example below boots Arch from the second partition on the hard drive assigned to /boot, while the third partition is assigned to root (/). This could be an example for those having only rEFIt installed on a small partition and no OS X.<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,1)<br />
kernel /vmlinuz26 root=/dev/sda3 ro vga=773<br />
initrd /kernel26.img<br />
* '''If you are using rEFIt, make sure you install GRUB onto ''a partition'', either your /boot or your /root (i.e. /dev/sda4) if you are not using separate partitions for both.'''<br />
* '''Do not install GRUB onto /dev/sda! Doing so is likely to lead to an unstable post-environment.'''<br />
* If GRUB was successfully installed, choose "Exit Install" from the "Main Menu."<br />
* If you did not partition your disk from OS X using diskutil or "Disk Utility" and instead partitioned with another third-party program or from Linux, sync your partition tables one more time for good measure.<br />
gptsync /dev/sda<br />
* ''NOTE'': If you get an error that GRUB was not installed successfully, it sometimes works if you go through the same steps a second time. If you receive an error message again stating that GRUB was not successfully installed, run the following commands, and then attempt to install GRUB again:<br />
! Replace the "3" with whatever your root partition is (i.e. sda4 -> 4)<br />
! 83 is for ext2/3. If you have something else, type "sfdisk -T" for a list of supported partition types. <br />
# sfdisk -c /dev/sda 3 83<br />
# gptsync /dev/sda<br />
* If you still get an error message when installing GRUB, keep trying those commands. It should work eventually.<br />
* You may now reboot your system. If rEFIt is setup correctly, you will be able to choose the correct icon in the boot menu on startup. If you do not have rEFIt installed, you will have to either hold the "Option" key during startup (or the "Menu" button on a compatable Apple Remote), or follow the instructions below to allow your MacBook to transfer its pre-control rights directly to GRUB (this will save the maximum time possible during a normal boot).<br />
reboot<br />
* If you are single booting without rEFIt and need to save a new instruction set in the PRAM to boot straight from the MBR instead of spending time searching for the GUID Partition Table, hold the "Option" key during startup or the "Menu" button on a compatable Apple Remote and boot into your new Arch Linux setup.<br />
* Then, synchronize your local package database with the one on the FTP/HTTP server you chose as your default during the install process, and install the "eject" package via pacman to eject your Arch installation media. This can all be done with one command:<br />
pacman -Sy eject<br />
* Eject the disk.<br />
eject<br />
* Insert an OS X Install Disk, and reboot while holding either the "C" or "Option" keys to initiate the loading of the DVD.<br />
* Follow the instructions in this article titled "Delayed Boot" under the [[MacBook#Single Boot|Single Boot (Partitioning from OS X)]] section to reconfigure your firmware's default boot device.<br />
* ''Note'': If you are sharing your Arch /home folder with OS X, skip down to the [[MacBook#Home Sharing|Home Sharing]] section of this article before you create your first user account.<br />
* Enjoy your new Arch MacBook!<br />
<br />
==Post Install==<br />
<br />
===Wifi===<br />
====Ndiswrapper====<br />
* First, install the ndiswrapper package like so:<br />
$ pacman -Sy ndiswrapper<br />
* The Lenovo Thinkpad 802.11abgn driver works well with the MacBook. The driver can be obtained through the manufacturer's [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-66449 own page], or directly with the following command:<br />
$ wget -c ftp://ftp.software.ibm.com/pc/pccbbs/mobiles/7iwc28ww.exe<br />
* You need cabextract to extract the file. Get it with pacman.<br />
pacman -S cabextract<br />
* Create a new directory for the soon-to-be extracted files, change the cwd to it, and extract the main file.<br />
mkdir 7iwc28ww; cd 7iwc28ww/; cabextract 7iwc28ww.exe<br />
* Install the driver where <path/to/driver> is the .inf file from the extracted .exe. If you are using the Lenovo Thinkpad 802.11abgn driver, replace <path/to/driver> with ''WINXP_2K/NET5416.INF''.<br />
ndiswrapper -i <path/to/driver><br />
* The below command may have already been executed during installation of the ndiswrapper application, but run it anyway just to be sure the correct alias for wlan0 is written to /etc/modprobe.conf.<br />
ndiswrapper -m<br />
* Verify your driver has been installed properly:<br />
ndiswrapper -l<br />
* Now, you can add "ndiswrapper" to your MODULES array in /etc/rc.conf, and load the module manually:<br />
modprobe ndiswrapper<br />
<br />
====Madwifi====<br />
'''Primary installation through the Arch repositories:'''<br />
* First, install the madwifi driver and madwifi-utils:<br />
pacman -Sy madwifi madwifi-utils<br />
* Then, load the "ath_pci" module. You can also add it to the MODULES list in /etc/rc.conf if you want it to load on a normal boot.<br />
modprobe ath_pci<br />
* And if everything is ok, you should see something like this:<br />
ifconfig <br />
ath0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX <br />
inet6 addr: fe80::219:e3ff:fed4:be51/64 Scope:Link<br />
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br />
RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:0 <br />
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)<br />
* Some MacBook users have reported more success when downloading and installing from SVN. There is a madwifi-svn package in the [[AUR]], which can be found [http://aur.archlinux.org/packages.php?do_Details=1&ID=10492&O=0&L=0&C=0&K=madwifi&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
<br />
===Fan Speed===<br />
* The fan doesn't seem to change speeds with the temperature. We can (somewhat) fix this<br />
* Add 'applesmc' to your MODULES array in /etc/rc.conf<br />
** Modprobe it too<br />
* This creates a bunch of magic files in /sys/devices/platform/applesmc.768<br />
* As root type 'echo 1 > /sys/devices/platform/applesmc.768/fan1_manual'<br />
* As root type 'echo 3500 > /sys/devices/platform/applesmc.768/fan1_output'<br />
** You may want to add this to your /etc/rc.local<br />
** The number can be anywhere from 1800 to 6200.<br />
** I find that for normal use, 3500-4000 is good.<br />
** When it gets really hot, 4500-5000 is good.<br />
** (after you add 'applesmc' to your modules, running 'sensors' will give you a lot more output)<br />
** I'm going to try and write a script to deal with this better. <br />
::''(I've wrote a [http://phpfi.com/246225 simple app in C] to keep my MacBook cold. It's written for xfce4-genmon-plugin, but you can also use it with conky, cron or anything else.) -- [[User:Husio|Husio]] 16:38, 30 June 2007 (EDT)''<br />
<br />
===Temperature Sensors===<br />
* To go along with this, we should be able to read from the temperature sensors.<br />
* Type 'pacman -S lm_sensors'<br />
* To autodetect sensors type 'sensors-detect'<br />
* In /etc/modprobe.conf add:<br />
alias char-major-89 i2c-dev<br />
* In /etc/rc.local add:<br />
modprobe i2c-i801<br />
modprobe eeprom<br />
modprobe coretemp<br />
sensors -s<br />
* Now you can type 'sensors' to see your core temperatures.<br />
<br />
===Suspend===<br />
====Suspend to Ram====<br />
If you want to get your macbook suspend to ram on closing it and you're using acpi, just add to ''/etc/acpi/actions/lm_lid.sh'':<br />
<pre><br />
# Suspend<br />
if [[ `cat /proc/acpi/button/lid/LID0/state | tr -s " " | cut -d" " -f2` = "closed" ]]<br />
then<br />
pm-suspend<br />
fi<br />
</pre><br />
There's some problem with mpd if you suspend when mpd is playing. It can't connect to localhost after waking up.<br />
<br />
===Backlight Control===<br />
====pommed====<br />
* Install the 'pommed' program from community<br />
* Put 'pommed' in your DAEMONS array in /etc/rc.conf<br />
* Start it manually with '/etc/rc.d/pommed start'<br />
You may also want to install gpomme which is GUI for pommed daemon. Edit then ~/.gpommerc and add gpomme to startup (it's not a daemon).<br />
<br />
By default the F1, F2 ... FX keys are disabled and act like Fn+F1, Fn+F2 ... To enable the keys and make use of Fn+FX, modify /etc/pommed.conf.mactel or /etc/pommed.conf.pmac by changing fnmode = 1 to fnmode = 2. Save it as pommed.conf and restart pommed with /etc/rc.d/pommed restart.<br />
<br />
To enable the sound keys (Fn+F3, Fn+F4 and Fn+F5), you have to modify /etc/pommed.conf : change init = -1 to init = 80 and (at least on Macbook 2) change volume = "PCM" to volume = "Front" and after that restart pommed with /etc/rc.d/pommed restart. (Thanks to the [http://wiki.debian.org/MacBook#head-7adc5d72650afca10f8983c100c25ca6a73df7fd Debian Wiki])<br />
<br />
====macbook-backlight====<br />
If you want to control your backlight from console, install macbook-backlight (it's in [[AUR]]). <br />
If you're using acpi, you may also want your ''/etc/acpi/actions/lm_battery.sh'' to look like this:<br />
<pre>if [[ -z $(acpi | grep discharging) ]]<br />
then<br />
/usr/bin/macbook-backlight +80<br />
else<br />
/usr/bin/macbook-backlight -80<br />
fi</pre><br />
<br />
Now you can also set it in pommed.<br />
<br />
===Frequency Scaling===<br />
* Run 'pacman -S cpufrequtils'<br />
* Add speedstep-centrino (be careful, since a recent update it seems to be "acpi_cpufreq"), cpufreq_conservative to your MODULES array in /etc/rc.conf<br />
** Modprobe them manually too.<br />
* Run 'cpufreq-set -c 0 -g conservative' and 'cpufreq-set -c 1 -g conservative'<br />
** Put them in /etc/rc.local to set them on boot<br />
<br />
===X11===<br />
* Type 'pacman -S xorg xf86-video-i810 915resolution<br />
* Type 'X -configure'<br />
* Open /etc/conf.d/915resolution in your editor, uncomment the 'MODE' and 'RESOLUTION'.<br />
* Set the RESOLUTION to '1280 800'<br />
* Add 915resolution to your DAEMONS array in /etc/rc.conf<br />
** Start it manually with /etc/rc.d/915resolution start<br />
<br />
====Touchpad====<br />
With 7.3 version of x.org and kernel 2.6.22 or later, it should work out of the box. If it doesn't follow these instructions for loading the kernel modules:<br />
<br />
* First you must add, appletouch, usbhid, and tsdev modules to the MOD_BLACKLIST array in rc.conf. (This is because udev loads the modules in random order)<br />
* Then add appletouch, usbhid to MODULES array IN THAT ORDER.<br />
<br />
By default the touchpad operates in compatibility mode by emulating a standard mouse. Many users though will find these default settings problematic as the touchpad is too sensitive and will cause accidental cursor jumping and clicking. However, by using a dedicated driver, more advanced features and fine tuning of the touchpad become available.<br />
<br />
* Type 'pacman -S synaptics' to install the driver<br />
* Load the synaptics driver by adding the following line to the Module section of your xorg.conf:<br />
Load "synaptics"<br />
* Add the touchpad to the ServerLayout section:<br />
InputDevice "Synaptics Touchpad" "CorePointer"<br />
* Add this section to your xorg.conf. I will enable horizontal two-finger-scrolling and a right click by tapping the top right hand corner of the touchpad. It switches off mouse clicks for tapping the touchpad, like OSX does.<br />
Section "InputDevice"<br />
Identifier "Synaptics Touchpad"<br />
Driver "synaptics"<br />
Option "CorePointer" <br />
Option "Device" "/dev/input/mice"<br />
Option "Protocol" "auto-dev"<br />
Option "LeftEdge" "100"<br />
Option "RightEdge" "1100"<br />
Option "TopEdge" "50"<br />
Option "BottomEdge" "300"<br />
Option "FingerLow" "20"<br />
Option "FingerHigh" "30"<br />
#We don't want the palm to trigger a tap, therefore a tap has to be quite fast<br />
Option "MaxTapTime" "100"<br />
Option "MaxTapMove" "100"<br />
Option "MaxDoubleTapTime" "200"<br />
Option "VertScrollDelta" "25"<br />
Option "HorizScrollDelta" "60"<br />
Option "VertTwoFingerScroll" "true"<br />
Option "HorizTwoFingerScroll" "0"<br />
Option "FastTaps" "true"<br />
#Tapping the top right-hand corner will trigger a right click<br />
Option "RTCornerButton" "3" <br />
#An ordinary tap will not trigger a click <br />
Option "TapButton1" "0"<br />
Option "TapButton2" "0"<br />
Option "TapButton3" "0"<br />
Option "MinSpeed" "0.5"<br />
Option "MaxSpeed" "3.5"<br />
Option "AccelFactor" "0.05"<br />
EndSection<br />
<br />
* Finally, restart your X server.<br />
<br />
* The [http://wiki.debian.org/MacBook#head-b5e4b425668a24b46ead13b652f997f38318678b Debian Wiki] has also a few suggestions on how to configure right-clicking and scrolling.<br />
* Also, see [[Touchpad_Synaptics|Touchpad Synaptics]] or the synaptics manpages for many more options.<br />
<br />
===Sound===<br />
If you follow the arch wiki on ALSA it pretty much covers the instructions and specifics. However, there is a noticeable crackling sound from the left channel. I fixed this with the following: (as root/sudo)<br />
#mkdir /etc/modprobe.d/<br />
#nano /etc/modprobe.d/options<br />
<br />
<br />
===iSight===<br />
There is linux-uvc-isight in the AUR. Some people for whom the normal release didn't work had success with linux-uvc-isight-svn, but if you use that, install linux-uvc-utils-svn as well. Follow the instructions printed in the post-install:<br />
You *must* install and load the firmware to /lib/firmware, e.g:<br />
# mkdir -p /lib/firmware<br />
# cp /\${OSX_MOUNT}/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport /lib/firmware"<br />
# isight-firmware-tool /lib/firmware/AppleUSBVideoSupport<br />
<br />
Load the 'uvcvideo' module and add it to your ''/etc/rc.conf'' if you want it to load at boot. You can find the driver [http://aur.archlinux.org/packages/linux-uvc-isight/ here].<br />
<br />
===Apple Remote===<br />
====lirc====<br />
TODO<br />
<br />
<br />
====appleir [old]====<br />
This patch is only for kernel < 2.6.22. <br />
Load the ''appleir'' module (or add it to the MODULES array in ''/etc/rc.conf''). Then run xev to check the signals, or copy this to ~/.Xmodmap:<br />
keycode 153 = XF86AudioNext<br />
keycode 144 = XF86AudioPrev<br />
keycode 176 = XF86AudioRaiseVolume<br />
keycode 174 = XF86AudioLowerVolume<br />
keycode 162 = XF86AudioPlay<br />
keycode 158 = XF86Favorites<br />
and run xmodmap ~/.Xmodmap.<br />
<br />
===Home Sharing===<br />
<br />
====UID Synchronization====<br />
<br />
'''In OS X:'''<br />
<br />
''Note'': It is recommended that UID/GID manipulation be done immediately after a new user account is created, in OS X as well as in Arch Linux. If you installed OS X from scratch, then this operation is guaranteed to work after logging into your account for the first time.<br />
<br />
'''''Step 1: Change UID and GID(s)'''''<br />
<br />
Pre-Leopard:<br />
<br />
# Open NetInfo Manager located in the /Applications/Utilities folder.<br />
# If not done for you already, enable access to user account transactions by clicking on the closed lock at the bottom of the window, and entering your account password, or root password if you have created a root account.<br />
# Navigate to /users/<new user name> where <new user name> is the name of the account that will have read/write access to the folder that will be shared with the primary user in Arch.<br />
# Change the UID value to 1000 (the value used by default for first user created in Arch).<br />
# Change the GID value to 1000 also.<br />
# Navigate to /groups/<new user name>, automatically saving the changes you have made so far, where <new user name> is, again, the name of the account that will have read/write access to the folder that will be shared with the primary user in Arch. ''Note'': If you get an error message that the transaction is not allowed, log out and log back in.<br />
# Change the GID value to 1000 (the value used by default for user account creation in Arch).<br />
<br />
Leopard:<br />
<br />
In Leopard, the NetInfo Application is not present. A different set of steps is required for UID synchronization:<br />
# Open System Preferences.<br />
# Click on Accounts.<br />
# Unlock the pane if not already done so.<br />
# Right-click on the desired user and select "Advanced Options."<br />
# Change both the UID and GID to match the UID and GID of the account wished to be shared with in Arch (1000 by default for the first user created in Arch).<br />
<br />
'''''Step 2: Change "home" permissions'''''<br />
<br />
# Open up "Terminal" in the /Applications/Utilities folder.<br />
# Enter the following command to reclaim the permission settings of your home folder, replacing <your user name> and <your user group> with the user name whose UID and GID values you just changed and the group name whose GID value you just changed, respectively.<br />
chown -R <your user name>:<your user group> /Users/<your user name><br />
<br />
'''In Arch:'''<br />
<br />
To synchronize your UID in Arch Linux, you are advised to perform this operation ''while creating a new user account.'' It is therefore recommended that you do this as soon as you install Arch Linux, but if you have already set up a normal .... ''(Will finish the rest later--burned out)''<br />
<br />
====fstab Line====</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=Mac&diff=33929Mac2007-12-21T03:00:58Z<p>Anthonyclark: /* Fan Speed */</p>
<hr />
<div>[[Category:Laptops (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
=Second Gen MacBook (Core2Duo)=<br />
Here is what I did to get a dual boot (MacOSX & Arch 0.8b2) running on my MacBook.<br />
<br />
==Partitioning in OS X==<br />
This section attempts to cover the most practical paths one can take in creating an ideal partition layout in OS X for the MacBook. If one prefers a Linux environment for setting up his or her partitions, the section, [[MacBook#Partitioning in Arch|Partitioning in Arch]], below will cover the specific points that need to be taken into consideration when implementing a partitioning layout on the MacBook. References to more user-friendly applications, such as Apple's "Boot Camp," will be mentioned here, but the depth will not be as great as that knowledge has already been documented extensively elsewhere.<br />
<br />
Before attempting any of the following pre-installation procedures, it is advisable to upgrade your firmware to the latest state released by Apple. You can achieve this either through the "Software Update" application bundled with OS X, or through the downloads on the support section of Apple's [http://www.apple.com/support/downloads/ home page]. ''Note'': The "Software Update" in OS X may not pick up all the firmware updates available for your computer. Therefore, it is possible your chance of having the most update firmware code will be increased by searching through Apple's official download page.<br />
===Single Boot===<br />
Dedicating your MacBook to Arch Linux permits you to follow the [[Official Arch Linux Install Guide]] as in a typical installation. If using rEFIt on a small partition without OS X, be sure not to install your boot loader of choice in the MBR (/dev/sda), but instead to the /boot partition or root partition if you are not going to reserve a separate partition for /boot.<br />
<br />
Also note that the "Auto-Prepare" feature available on the Installation CD will allow you to erase and format your hard drive just fine, but the manual installer uses cfdisk to partition your drive, and it does not have the capability to recognize the GUID partition scheme that your MacBook will be in if formatted with "Disk Utility" (used by default in a normal OS X installation). In that case, it might be best to not use the installer to partition your disk and instead use a GPT-capable partitioner such as parted.<br />
<br />
Furthermore, there are a few caveats discussed below that you should be familiar with in order to avoid any unpleasant outcomes:<br />
* ''Note'': The points discussed below do not apply if you choose to keep a small partition containing OS X and a small EFI System Partition on the same GPT-scheme hard disk you will be installing Arch Linux to. The section that follows assumes you do not want any trace of OS X on your MacBook.<br />
* '''Firmware Updates''' - You will not be able to update the firmware on your MacBook without a hard disk layed out with the GUID Partition Table (GPT) containing an OS X installation and a separate EFI System Partition. If you do not have access to an external OS X environment, it may be best to include a small partition containing OS X as well as an EFI System Partition on the hard drive Arch Linux will be installed onto. With this method, you have the choice of booting Arch Linux through a boot menu, such as rEFIt, or via the firmware default isolated in your MacBook's PRAM (discussed in the second caveat below).<br />
* '''Delayed Boot''' - The mechanism the MacBook uses to boot an operating system does not have the ability to quickly recognize a disk laid out solely with the MBR scheme. Instead, it searches for a familiar GUID partition table that holds an EFI System Partition to transfer its rights to. This scanning can take anywhere between twenty and thirty seconds, in contrast to the process normally taking around ten seconds when the default operating system is selected through Apple's "Startup Disk." Since the "Startup Disk" application on both the OS X Install Disk and the default OS X installation cannot locate an operating system installed within the MBR scheme, there are two alternative solutions that solve this problem:<br />
:1. Modify the code held in your MacBook's PRAM to skip checking for the GUID Partition Table and boot straight from the MBR. Following this method, you will have a system that boots normally, just like any other would, with an estimated time of around ten seconds from power-on to GRUB. This is actually what Apple's "Startup Disk" does, which is the graphical front-end for the application about to be described. To accomplish this, boot from an OS X Install Disk (this procedure may not work from an external OS X installation) and open up "Terminal." Use "diskutil list" to obtain the identifier of the disk Arch Linux will be installed onto.<br />
diskutil list<br />
The top part of the output should look something like this:<br />
/dev/disk0<br />
#: type name size identifier<br />
0: FDisk_partition_scheme *111.8 GB disk0<br />
The following command will install the code to your MacBook's PRAM that allows it to boot from the MBR. Replace "[disk identifier]" with the identifier obtained from the above command:<br />
bless --device [disk identifier] --setBoot --legacy<br />
Using the previous example the command would be:<br />
bless --device disk0 --setBoot --legacy<br />
Note: The device /dev/disk0 does not actually represent the MBR, even though that is what we type in for the command. The device echoed with the below command, "bless --getBoot", should not be /dev/disk0 but another main block device nomination, such as /dev/disk2. To insure you have correctly set the proper pointer that can boot the MBR, such as disk2, type the following command:<br />
bless --getBoot<br />
:2. Another option you have is to partition your hard disk with the GPT scheme and keep rEFIt installed on a small partition. This method does not result in as fast of a boot as the above does, but it gives you a boot menu that shows up on startup, allowing you to choose a valid operating system to boot from. This can be achieved by booting your MacBook into Target Disk Mode (Firewire); connecting to another disk with OS X installed, and partitioning your drive with the GPT scheme while creating a small HFS+ partition to hold rEFIt; installing rEFIt onto that partition; and finally typing "cd /efi/refit; ./enable-always.sh". It may be wise to set up '''''all''''' your partitions during this process, so as to avoid having to choose from a very select few partitioners that support the GPT scheme your disk will be laid out in. Furthermore, if you set up your partitions with "Disk Utility" or its back-end diskutil, there is no need to use gptsync to synchronize your partition tables. You can continue the installation process like you normally would (starting with the install step dedicated to filesystem creation), but be sure at the very end to install GRUB onto your boot partition or, if you do not want a separate boot slice, the root partition. You do not want to install onto /dev/sda or else this might prevent rEFIt from acting the way it was designed to.<br />
:3. A third option to counter the delayed boot is to hold the "Option" key on boot to bring up a menu that can transfer control to the MBR (the menu item will be titled "Windows"). Your MacBook will then boot from the MBR as fast as it physically can with the total time it takes to boot dependent upon how fast you confirm your selection at the menu. Holding the "Menu" button on a compatible Apple Remote during boot will also perform this same function.<br />
* '''Startup Sound''' - There is no available method for changing the startup sound on your MacBook without the presence of OS X. If you would like the startup sound on boot to be muted or at a specific volume output when single-booting Arch Linux, then an easy way is to adjust or mute the volume in OS X before Arch is installed. If the startup sound has returned after a firmware upgrade or PRAM modification, or you have already erased OS X and installed Arch Linux and would like to make adjustments now, boot from an external OS X drive (select it from the startup menu by holding "Option" on boot), and make arrangements from there.<br />
<br />
===Dual Boot===<br />
This portion of the article makes the assumption that one wants to install Arch Linux on top of an existing OS X configured MacBook. A higher success rate and smoother installation may be achieved by installing OS X from scratch and then following these steps. If this is the preferred option, then you may also decide to setup your partitions through "Disk Utility" before OS X is installed. In the case of a layout incorporating a shared partition, make sure to choose a filesystem that is writable from both OS X and Linux, for example: HFS+ (non-journaled) or FAT32. More about dual boots with a shared partition [[MacBook#With Shared Partition|below]]. In any case, you always have the option of disabling journaling on the default HFS+ filesystem in OS X in order to allow read/writes from Arch Linux.<br />
====No Shared Partition====<br />
* Optional Step: Install rEFIt. This will give you a boot menu to choose between OS X and Arch Linux on every boot. Download the ".dmg" from the [http://refit.sourceforge.net/ Refit Homepage] and install it. Make sure to install your Linux boot loader (i.e. GRUB or LILO) on your /boot partition or on your root partition if you are not going to have separate partitions for both. Be careful about installing a boot loader to /dev/sda as this can lead to unexpected results with rEFIt.<br />
* Note: You can either partition your hard disk with the command-line application, diskutil, or its GUI front-end, "Boot Camp." Diskutil comes embedded into OS X, while "Non-Leopard" users may find themselves having to download and pay for the latest "Boot Camp" release.<br />
'''1. Partitioning with diskutil:'''<br />
* Note: diskutil partitions a disk differently than most other applications. It creates new partitions by resizing an exisiting partition and creating new ones out of the remaining free space (in the case below the partition to be split is the second one located on /dev/disk0s2). Furthermore, your chances of success will almost always be guaranteed when performing the following operations after a clean OS X installation.<br />
* To partition using diskutil, open the "Terminal" application found in the /Applications/Utilities folder. The following steps can be performed while your OS X volume is mounted.<br />
* Disable journaling on your about-to-be-resized OS X partition. You can do this with "Disk Utility" in OS X or with diskutil through the following command. (Type "ls /Volumes/" to obtain the label of your OS X partition.)<br />
sudo diskutil disableJournal /Volumes/[LABEL]<br />
* Next, type "diskutil list" and you should see something like this:<br />
/dev/disk0<br />
#: type name size identifier<br />
0: GUID_partition_scheme *111.8 GB disk0<br />
1: EFI 200.0 MB disk0s1<br />
2: Apple_HFS Macintosh HD 111.5 GB disk0s2<br />
* Below is the command usage for resizing a partition and reclaiming the remaining free space by creating a new partition. Note the disk identifier from the "diskutil list" command you typed (in the example above it would be disk0s2), and replace [disk identifier] with that identifier. Replace "[disk size]" with the new size of your OS X partition and "[partition size]" with the remaining space calculated via the total amount of space your original OS X partition takes up. Last, replace ["Partition label"] with a name for your new Arch Linux partition.<br />
sudo diskutil resizeVolume [disk identifier] [disk size] "Linux" ["Partition label"] [partition size]<br />
* The example command below resizes the initial OS X partition (disk0s2) to 55.5 gigabytes and then creates the partition assigned to Arch Linux with the free space that was left over. The amount of free space that was left over after the resizing was calculated with the "diskutil list" command used above. "Linux" is the GPT recognized name for any of the possible filesystems most attributed to Linux.<br />
sudo diskutil resizeVolume disk0s2 55.5G "Linux" "Phrakture" 56G<br />
* Reboot.<br />
* Verify your disk was formatted correctly.<br />
diskutil list<br />
'''2. Partitioning with "Boot Camp":'''<br />
The "Boot Camp" application released by Apple is considered by some to be more user-friendly due to its graphical interface and simple procedure.<br />
* ''Note'': Apple no longer officially hosts the "Boot Camp" beta software; you can still obtain the last publicly released version, "Boot Camp 1.4b," from an unofficial mirror site. If you have 10.5 "Leopard," the "Boot Camp" final release comes bundled with the default installation and can be found in /Applications/Utilities. The software can also be extracted from the 10.5 Install Disk and installed onto any supported version of OS X.<br />
* Install "Boot Camp" if it is not already installed, and run the "Boot Camp Assistant" from the /Applications/Utilities folder.<br />
* Partition your hard drive however you like.<br />
<br />
====With Shared Partition====<br />
The easiest way to go about dual booting Arch Linux and OS X with a shared partition is by using Apple's diskutil application, the CLI back-end for "Boot Camp." Partitioning with diskutil keeps you from having to install Arch Linux through the FTP disk in order to use parted to partition and gptsync to sync the GPT and MBR partition tables (diskutil recognizes both the new GPT scheme and the old MBR and creates and syncs them for you upon write). In addition to using diskutil to partition, you will also have a choice of whether or not you want the shared partition to be a "shared" /home folder for both operating systems or a smaller partition while allowing both Arch Linux and OS X to have their own /home folders. You will also have to decide what filesystem to format your shared partition with. The non-journaled HFS+ and FAT32 filesystems are popular for sharing files between Linux and OS X due to both operating systems being able to read/write to them well. In the case of a shared /home, the Case-sensitive HFS+ (Non-Journaled) filesystem is a good way to go considering read/write support for non-journaled HFS+ filesystems is good in Linux, and the "case-sensitive" aspect of the HFS+ filesystem permits good interoperability between Arch Linux and OS X. '''Also, do not forget to synchronize your Arch and OS X UIDs, otherwise you will not have write access to your /home directory from both Arch and OS X;''' the [[MacBook#Home Sharing|Home Sharing]] section of this article describes how to do this.<br />
* Optional Step: Install rEFIt. This will give you a boot menu to choose between OS X and Arch Linux on every boot. Download the ".dmg" from the [http://refit.sourceforge.net/ Refit Homepage] and install it. Make sure to install your Linux boot loader (i.e. GRUB or LILO) on your /boot partition or on your root partition if you are not going to have separate partitions for both. Be careful about installing a boot loader to /dev/sda as this can lead to unexpected results with rEFIt.<br />
* Note: You can either partition your hard disk with the command-line application, diskutil, or its GUI front-end, "Boot Camp." Diskutil comes embedded into OS X while "Non-Leopard" users may find themselves having to download and pay for the latest "Boot Camp" release.<br />
* ''Further note'': diskutil partitions a disk differently than most other applications. It creates new partitions by resizing an exisiting partition and creating new ones out of the remaining free space (in the case below the partition to be split is the second one located on /dev/disk0s2). Furthermore, your chances of success will almost always be guaranteed when performing the following operations after a clean OS X installation.<br />
* Open the "Terminal" application found in the /Applications/Utilities folder. The following steps can be performed while your OS X volume is mounted.<br />
* Disable journaling on your about-to-be-resized OS X partition. You can do this with "Disk Utility" in OS X or with diskutil through the following command. (Type "ls /Volumes/" to obtain the label of your OS X partition.) <br />
sudo diskutil disableJournal /Volumes/[LABEL]<br />
* Type "diskutil list" and you should see something like this:<br />
/dev/disk0<br />
#: type name size identifier<br />
0: GUID_partition_scheme *111.8 GB disk0<br />
1: EFI 200.0 MB disk0s1<br />
2: Apple_HFS Macintosh HD 111.5 GB disk0s2<br />
* Below is the command usage for resizing a partition and reclaiming the remaining free space by creating a new partition(s). Note the disk identifier from the "diskutil list" command you typed (in the example above it would be disk0s2) and replace [disk identifier] with that identifier. Replace "[disk size]" with the new size of your OS X partition and "[partition size]" with the remaining space you want each individual partition to take up, calculated via the total amount of space your original OS X partition takes up. Last, fill in the ["Partition label"] fields with names for your new partitions.<br />
sudo diskutil resizeVolume [disk identifier] [disk size] [partition type] ["Partition label"] [partition size] [partition type] ["Partition label"] [partition size]<br />
* The following example resizes the original OS X partition (disk0s2) to 30GB and sets up a 71.5GB shared, non-journaled HFS+ (Case Sensitive) /home partition and a 10GB Arch Linux root partition:<br />
sudo diskutil resizeVolume disk0s2 30G "Case-sensitive HFS+" "Shared" 71.5G "Linux" "Arch" 10G<br />
* If you would rather use the FAT filesystem on a small shared partition and keep separate /home folders on the Arch Linux and OS X partitions, then you could use something like:<br />
sudo diskutil resizeVolume disk0s2 50G "MS-DOS FAT32" "Shared" 11.5G "Linux" "Arch" 50G<br />
* The commands above do not actually format the partitions. They only store the proper information that the GUID Partition Table needs so it can be read from by applications and the native EFI bootloader. You will now have to format any partitions that can not be formatted in Linux with the desired filesystem. If you chose the Non-Journaled Case-sensitive HFS+ filesystem for your shared partition then you will need to format it with the below command after you reboot. You will then have to run "diskutil list" again to get the identifier for the new shared partition (following the example above it would be disk0s3).<br />
* Reboot<br />
diskutil list<br />
diskutil eraseVolume "Case-sensitive HFS+" "Shared" [disk identifier]<br />
* If you chose the FAT filesystem for your shared partition you can also choose to format it from OS X, but you may end up doing it over again in the Arch Linux installer when it comes time to mount and format your filesystems. To format from OS X type:<br />
newfs_msdos -F 32 -v "Shared" /dev/[disk identifier]<br />
* If throughout this procedure you get a "chosen size is invalid..." error try expressing the size of the partitions in megabytes instead of gigabytes. The original command for a FAT32 formatted shared partition would then look like:<br />
sudo diskutil resizeVolume disk0s2 50000M "MS-DOS FAT32" "Shared" 11500M "Linux" "Arch" 50000M<br />
* If you get a "Resizing encountered error No space left on device (28) on disk" error even though you have verified the total size of the partition you are splitting with "diskutil list", then first resize only the soon-to-be-split partition:<br />
sudo diskutil resizeVolume disk0s2 30G<br />
* Reboot, and then create the rest of the partitions:<br />
sudo diskutil resizeVolume disk0s2 30G "Case-sensitive HFS+" "Shared" 71.5G "Linux" "Arch" 10G<br />
* After using any of the above commands to repartition your MacBook, you can reboot and verify your partitions have been created with "diskutil list".<br />
* ''Note'': It may be best at this point to synchronize the UID of your main account in OS X with the default in Arch Linux. Skip down to the [[MacBook#Home Sharing|Home Sharing]] section of this article for directions on how to do this.<br />
<br />
==Partitioning in Arch==<br />
If you prefer to partition in Linux, there are two tools available to Arch end-users that faciliate this process on the MacBook: parted and refit. GNU Parted will allow the repartitioning of your disk even if it is laid out in GPT format, while the refit package, available in the Arch community repository, allows the synchronization of the MBR table that is created by parted and the GUID Partition Table that is originally on a default OS X installation. If your hard disk is not layed out with the GPT scheme, then you can use the partitioner available through the Arch installer, cfdisk, and you need not follow the rest of the details covered in this section. You can find the scheme your drive is laid out in with Apple's "Disk Utility" or by trying to use cfdisk (the default application run from the Arch installer): if the drive is laid out GPT-style, you will be informed by cfdisk and possibly denied readable and/or writable access to the table.<br />
<br />
''Note'': If you are going to resize the HFS+ partition used by default in OS X, it may be wise to disable journaling prior to the task. You can do this with "Disk Utility" in OS X or with diskutil through the following command:<br />
sudo diskutil disableJournal /Volumes/[LABEL]<br />
Type "ls /Volumes/" to obtain the label of your OS X partition.<br />
<br />
'''Prepare the Arch environment for partitioning:'''<br />
<br />
* Get the latest [http://www.archlinux.org/download/ Arch Linux FTP Install CD] and burn it.<br />
* Reboot, and hold down "C" during startup, so it will boot from the CD, or hold "Option" to select it from the firmware menu. If you installed rEFIt, you can select the Install CD from the boot menu that automatically comes up.<br />
* Type "arch" at the boot prompt or "arch vga=773" if you prefer a higher resolution.<br />
boot: arch vga=773<br />
* Note: Due to a bug in the Apple firmware ([http://refit.sourceforge.net/doc/c4s3_keyboard.html Note from rEFIt FAQ]), some MacBook Pro Core 2 Duo users have reported that the keyboard often does not work at the Arch Linux boot prompt. The only options are to either get a USB keyboard, which should work all the time, or keep rebooting until it works.<br />
* Note: Some MacBook (Pro) Core Duo users report strange keyboard output such as long delays and character doubling. If this is your situation, entering the following at the boot prompt should alleviate any such symptoms:<br />
boot: arch noapic irqpoll acpi=force<br />
* [[Configuring network|Configure your network]] through bash or through the normal Arch install procedure that follows:<br />
/arch/setup<br />
* Select "FTP/HTTP" as the installation source when asked.<br />
* Select "Configure Network" from the "Main Menu."<br />
* Probe and/or select your network interface and either confirm the usage of DHCP or set up your interface statically.<br />
* Exit by selecting "Exit Install" at the "Main Menu."<br />
* Open /etc/pacman.conf in your favorite editor and uncomment the "[community]" header and its "Include" path to enable the repository:<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/community<br />
* Since "ftp://ftp.archlinux.org/" is throttled, configure /etc/pacman.d/core, /etc/pacman.d/community, and /etc/pacman.d/extra for a less slow download by moving a fast mirror to the top in those files. If you do not know which mirrors are the quick ones for you, then any mirror other than "ftp://ftp.archlinux.org/" will do for now.<br />
* Bring the available list of packages up to date, and install the latest versions of refit and parted along with their dependencies. This can be done with one command:<br />
pacman -Sy refit parted<br />
* Continue with the instructions below that are relevant to your particular table layout, either a single boot or dual boot. If you do not have rEFIt installed '''''and''''' you do not plan on dual booting Arch and OS X, feel free to partition how you normally would, possibly ignoring the rest of this section.<br />
<br />
===Single Boot===<br />
<br />
This section '''only''' describes how to prepare your hard disk with parted if you are '''single booting Arch, while keeping rEFIt installed on a small partition.''' If you do not have rEFIt installed on a HFS+ partition and your drive is not layed out in the GPT format, there are no special modifications to consider during the single boot process. If your whole drive is configured with the MBR scheme, then you are advised to use whatever partitioner you feel most comfortable with, as there are no usual restrictions upon how you may partition your drive.<br />
* Note: If you had decided to partition your disk back when you installed rEFIt onto a small partition, these instructions are not relevant; you may move on to the actual installation process described in the [[MacBook#Installation|Installation]] section of this article and select the "Partition Hard Drives" step in the "Prepare Hard Drive" menu on the installer, in order to format your assigned partitions.<br />
* Run the parted application on your hard drive:<br />
parted /dev/sda<br />
* Type "p" to view the current partition table.<br />
(parted) p<br />
* If you installed rEFIt onto a small partition but did not create the other partitions you want, you can now create all the other partitions you desire. If you installed rEFIt on a partition taking up the whole drive, you will have to resize the partition with the following command. ''Note'': The command is based upon the assumption that rEFIt is installed on the '''first''' partition of the hard drive. If rEFIt is installed on any other partition, simply change the number "1" to whichever one it is on.<br />
(parted) resize 1 <START> <END><br />
* For <START> and <END>, use the count in MBs of where you want your partition to start and end.<br />
* To create a swap partition type:<br />
(parted) mkpart primary linux-swap <START> <END><br />
* The same goes for any other regular partition:<br />
(parted) mkpart primary ext2 <START> <END><br />
* ''Note'': Parted only has the ability to format via the ext2, FAT16, FAT32, and linux-swap filesystems. It has the ability to create reiserfs partitions if libreiserfs is installed (not available through the Arch repositories). If you desire to use a filesystem such as ext3, reiserfs, xfs, or jfs, partition your hard drives in the parted application and format them as ext2. Then, during the actual Arch installation process, you will be given the opportunity to perform any other necessary filesystem creation over the original ext2 partition.<br />
* ''Further note'': If you are single booting Arch on a MacBook layed out with the MBR scheme, you will be able to create a logical partition like you would be able to during any other typical pre-installation process. If your hard disk is not layed out MBR-style and instead layed out with the GPT scheme, you cannot create a logical partition as the GPT standard does not support the implementation needed to do so. You can find the scheme your drive is laid out in with Apple's "Disk Utility" or by trying to use cfdisk (the default application run from the Arch installer): if the drive is laid out GPT-style, you will be informed by cfdisk and possibly denied readable and/or writable access to the table.<br />
* Quit parted.<br />
(parted) quit<br />
* Since you are using rEFIt on a small partition without OS X, synchronize your GUID Partition Table with the newly created MBR partition table.<br />
gptsync /dev/sda<br />
* Jump to the [[MacBook#Installation|Installation]] section of this article, and start the installation (/arch/setup).<br />
<br />
===Dual Boot===<br />
<br />
* Run the parted application to partition your hard disk for a dual boot.<br />
parted /dev/sda<br />
* Type "p" to view the current partition table.<br />
(parted) p<br />
* If repartitioning from an OS X configured MacBook that holds an EFI System Partition, resize the current OS X partition first in order to free up space for your new partitions. ''Note'': If you do not have an EFI System Partition and only have an OS X partition, change the number "2" in the following command to whichever partition OS X is on (probably "1").<br />
(parted) resize 2 <START> <END><br />
* For <START> and <END>, use the count in MBs of where you want your partition to start and end.<br />
* If you have any partitions on your disk other than the EFI System Partition and the partition that holds OS X, then remove them with the "rm" command:<br />
(parted) rm <NUMBER><br />
* Replace <NUMBER> with the position the partition rests on your drive. For example, to remove the third partition that comes after the OS X and EFI System Partition, according to your partition table shown with "p", type:<br />
(parted) rm 3<br />
* ''Note'': Be sure not to accidently remove the first or second partitions if that is where OS X and your EFI System Partition reside. Review your work carefully. <br />
* You may now, if you choose, make a partition for swap.<br />
(parted) mkpart primary linux-swap <START> <END><br />
* For <START> and <END>, use the count in MBs of where you want your partition to start and end.<br />
* The same goes for any other regular partition:<br />
(parted) mkpart primary ext2 <START> <END><br />
* ''Note'': Parted only has the ability to format via the ext2, FAT16, FAT32, and linux-swap filesystems. It has the ability to create reiserfs partitions if libreiserfs is installed (not available through the Arch repositories). If you desire to use a filesystem such as ext3, reiserfs, xfs, or jfs, partition your hard drives in the parted application and format them as ext2. Then, during the actual Arch installation process, you will be given the opportunity to perform any other necessary filesystem creation over the original ext2 partition. '''Parted does not have the ability to ''create'' HFS+ filesystems, as may be the case if you desire a shared /home; you need to perform this type of creation in OS X.'''<br />
* ''Further note'': If your hard disk is not layed out MBR-style and layed out with the GPT scheme (the default standard on a typical OS X installation), you cannot create a logical partition as the GPT standard does not support the implementation needed to do so. You can find the scheme your drive is laid out in with Apple's "Disk Utility" or by trying to use cfdisk (the default application run from the Arch installer): if the drive is laid out GPT-style, you will be informed by cfdisk and possibly denied readable and/or writable access to the table.<br />
* Quit parted.<br />
(parted) quit<br />
* Synchronize your GUID Partition Table with your newly created MBR partition table.<br />
gptsync /dev/sda<br />
* Jump to the [[MacBook#Installation|Installation]] section of this article, and start the installation (/arch/setup).<br />
<br />
==rEFIt==<br />
* You can now install the optional rEFIt if you have not done so already. This is not a mandatory requirement. It only gives you a menu to choose between OS X and Arch Linux upon boot.<br />
* In OS X, download the ".dmg" from -> [http://refit.sourceforge.net/ Refit Homepage] and install it.<br />
* If you have already partitioned your hard disk in preparation for the Arch installation, rEFIt may not be enabled by default. You will have to run the "enable.sh" script installed in /efi/refit/.<br />
* Open up "Terminal" and enter:<br />
cd /efi/refit; ./enable.sh<br />
<br />
==Installation==<br />
This section assumes you have already finished partitioning your MacBook in preparation for an Arch installation. If you are single booting Arch Linux '''''and''''' you are not using rEFIt, you may follow the [[Official Arch Linux Install Guide#Common Installation Procedure|Official Arch Linux Install Guide]] with no special modifications, ignoring the rest of this section. '''If you are using rEFIt either in a single boot or dual boot setup, you will need to install your boot loader of choice onto your /boot partition or on your root partition if you are not opting for separation.''' The procedure for doing so is what follows.<br />
* Type "arch" at the boot prompt or "arch vga=773" if you prefer a higher console resolution.<br />
boot: arch vga=773<br />
* Note: Due to a bug in the Apple firmware ([http://refit.sourceforge.net/doc/c4s3_keyboard.html Note from rEFIt FAQ]), some MacBook Pro Core 2 Duo users have reported that the keyboard often does not work at the Arch Linux boot prompt. The only options are to either get a USB keyboard, which should work all the time, or keep rebooting until it works.<br />
* Note: Some MacBook (Pro) Core Duo users report strange keyboard output such as long delays and character doubling. If this is your situation, entering the following at the boot prompt should alleviate any such symptoms:<br />
boot: arch noapic irqpoll acpi=force<br />
* Run the Arch installer:<br />
/arch/setup<br />
* Be sure to work your way down through the menu, and do not forget to select the "Partition Hard Drives" step under the "Prepare Hard Drive" menu to format your partitions and mount them so Arch can be installed onto them. For the rest of the installation, you can follow the [[Official Arch Linux Install Guide#Common Installation Procedure|Official Arch Linux Install Guide]] and install everything normally '''''until you make it to the menu item titled "Install Bootloader."'''''<br />
* ''Note'': The following procedure is unique to GRUB. The GRUB boot loader now has the complete ability to boot your Arch Linux system, is considered stable, and is now recommended more often for Linux installation on a MacBook then LILO. If you wish to use the LILO boot loader, you will have to consult further documentation as the article's contributors have not yet attempted to boot Arch on the MacBook with LILO.<br />
* Select "Install Bootloader" from the "Main Menu" of the installer.<br />
* Choose the option "Use the GRUB bootloader" when asked.<br />
* When you review your GRUB configuration file, make sure that both "root" fields point to the correct partitions and the kernel and initrd paths are correct for your partition setup. If you plan on using a separate boot partition, do not have "/boot" in front of "/vmlinuz26" and "/kernel26.img" on the "kernel" and "initrd" fields respectively. The following example boots Arch Linux from the fourth partition on the hard drive devoted to the root file system. This could pertain to those dual booting OS X with Arch while having an EFI System Partition and a shared home.<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,3)<br />
kernel /boot/vmlinuz26 root=/dev/sda4 ro vga=773<br />
initrd /boot/kernel26.img<br />
* The example below boots Arch from the second partition on the hard drive assigned to /boot, while the third partition is assigned to root (/). This could be an example for those having only rEFIt installed on a small partition and no OS X.<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,1)<br />
kernel /vmlinuz26 root=/dev/sda3 ro vga=773<br />
initrd /kernel26.img<br />
* '''If you are using rEFIt, make sure you install GRUB onto ''a partition'', either your /boot or your /root (i.e. /dev/sda4) if you are not using separate partitions for both.'''<br />
* '''Do not install GRUB onto /dev/sda! Doing so is likely to lead to an unstable post-environment.'''<br />
* If GRUB was successfully installed, choose "Exit Install" from the "Main Menu."<br />
* If you did not partition your disk from OS X using diskutil or "Disk Utility" and instead partitioned with another third-party program or from Linux, sync your partition tables one more time for good measure.<br />
gptsync /dev/sda<br />
* ''NOTE'': If you get an error that GRUB was not installed successfully, it sometimes works if you go through the same steps a second time. If you receive an error message again stating that GRUB was not successfully installed, run the following commands, and then attempt to install GRUB again:<br />
! Replace the "3" with whatever your root partition is (i.e. sda4 -> 4)<br />
! 83 is for ext2/3. If you have something else, type "sfdisk -T" for a list of supported partition types. <br />
# sfdisk -c /dev/sda 3 83<br />
# gptsync /dev/sda<br />
* If you still get an error message when installing GRUB, keep trying those commands. It should work eventually.<br />
* You may now reboot your system. If rEFIt is setup correctly, you will be able to choose the correct icon in the boot menu on startup. If you do not have rEFIt installed, you will have to either hold the "Option" key during startup (or the "Menu" button on a compatable Apple Remote), or follow the instructions below to allow your MacBook to transfer its pre-control rights directly to GRUB (this will save the maximum time possible during a normal boot).<br />
reboot<br />
* If you are single booting without rEFIt and need to save a new instruction set in the PRAM to boot straight from the MBR instead of spending time searching for the GUID Partition Table, hold the "Option" key during startup or the "Menu" button on a compatable Apple Remote and boot into your new Arch Linux setup.<br />
* Then, synchronize your local package database with the one on the FTP/HTTP server you chose as your default during the install process, and install the "eject" package via pacman to eject your Arch installation media. This can all be done with one command:<br />
pacman -Sy eject<br />
* Eject the disk.<br />
eject<br />
* Insert an OS X Install Disk, and reboot while holding either the "C" or "Option" keys to initiate the loading of the DVD.<br />
* Follow the instructions in this article titled "Delayed Boot" under the [[MacBook#Single Boot|Single Boot (Partitioning from OS X)]] section to reconfigure your firmware's default boot device.<br />
* ''Note'': If you are sharing your Arch /home folder with OS X, skip down to the [[MacBook#Home Sharing|Home Sharing]] section of this article before you create your first user account.<br />
* Enjoy your new Arch MacBook!<br />
<br />
==Post Install==<br />
<br />
===Wifi===<br />
====Ndiswrapper====<br />
* First, install the ndiswrapper package like so:<br />
$ pacman -Sy ndiswrapper<br />
* The Lenovo Thinkpad 802.11abgn driver works well with the MacBook. The driver can be obtained through the manufacturer's [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-66449 own page], or directly with the following command:<br />
$ wget -c ftp://ftp.software.ibm.com/pc/pccbbs/mobiles/7iwc28ww.exe<br />
* You need cabextract to extract the file. Get it with pacman.<br />
pacman -S cabextract<br />
* Create a new directory for the soon-to-be extracted files, change the cwd to it, and extract the main file.<br />
mkdir 7iwc28ww; cd 7iwc28ww/; cabextract 7iwc28ww.exe<br />
* Install the driver where <path/to/driver> is the .inf file from the extracted .exe. If you are using the Lenovo Thinkpad 802.11abgn driver, replace <path/to/driver> with ''WINXP_2K/NET5416.INF''.<br />
ndiswrapper -i <path/to/driver><br />
* The below command may have already been executed during installation of the ndiswrapper application, but run it anyway just to be sure the correct alias for wlan0 is written to /etc/modprobe.conf.<br />
ndiswrapper -m<br />
* Verify your driver has been installed properly:<br />
ndiswrapper -l<br />
* Now, you can add "ndiswrapper" to your MODULES array in /etc/rc.conf, and load the module manually:<br />
modprobe ndiswrapper<br />
<br />
====Madwifi====<br />
'''Primary installation through the Arch repositories:'''<br />
* First, install the madwifi driver and madwifi-utils:<br />
pacman -Sy madwifi madwifi-utils<br />
* Then, load the "ath_pci" module. You can also add it to the MODULES list in /etc/rc.conf if you want it to load on a normal boot.<br />
modprobe ath_pci<br />
* And if everything is ok, you should see something like this:<br />
ifconfig <br />
ath0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX <br />
inet6 addr: fe80::219:e3ff:fed4:be51/64 Scope:Link<br />
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br />
RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:0 <br />
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)<br />
* Some MacBook users have reported more success when downloading and installing from SVN. There is a madwifi-svn package in the [[AUR]], which can be found [http://aur.archlinux.org/packages.php?do_Details=1&ID=10492&O=0&L=0&C=0&K=madwifi&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
<br />
===Fan Speed===<br />
* The fan doesn't seem to change speeds with the temperature. We can (somewhat) fix this<br />
* Add 'applesmc' to your MODULES array in /etc/rc.conf<br />
** Modprobe it too<br />
* This creates a bunch of magic files in /sys/devices/platform/applesmc.768<br />
* As root type 'echo 1 > /sys/devices/platform/applesmc.768/fan1_manual'<br />
* As root type 'echo 3500 > /sys/devices/platform/applesmc.768/fan1_output'<br />
** You may want to add this to your /etc/rc.local<br />
** The number can be anywhere from 1800 to 6200.<br />
** I find that for normal use, 3500-4000 is good.<br />
** When it gets really hot, 4500-5000 is good.<br />
** (after you add 'applesmc' to your modules, running 'sensors' will give you a lot more output)<br />
** I'm going to try and write a script to deal with this better. <br />
::''(I've wrote a [http://phpfi.com/246225 simple app in C] to keep my MacBook cold. It's written for xfce4-genmon-plugin, but you can also use it with conky, cron or anything else.) -- [[User:Husio|Husio]] 16:38, 30 June 2007 (EDT)''<br />
<br />
===Temperature Sensors===<br />
* To go along with this, we should be able to read from the temperature sensors.<br />
* Type 'pacman -S lm_sensors'<br />
* To autodetect sensors type 'sensors-detect'<br />
* In /etc/modprobe.conf add:<br />
alias char-major-89 i2c-dev<br />
* In /etc/rc.local add:<br />
modprobe i2c-i801<br />
modprobe eeprom<br />
modprobe coretemp<br />
sensors -s<br />
* Now you can type 'sensors' to see your core temperatures.<br />
<br />
===Suspend===<br />
====Suspend to Ram====<br />
If you want to get your macbook suspend to ram on closing it and you're using acpi, just add to ''/etc/acpi/actions/lm_lid.sh'':<br />
<pre><br />
# Suspend<br />
if [[ `cat /proc/acpi/button/lid/LID0/state | tr -s " " | cut -d" " -f2` = "closed" ]]<br />
then<br />
pm-suspend<br />
fi<br />
</pre><br />
There's some problem with mpd if you suspend when mpd is playing. It can't connect to localhost after waking up.<br />
<br />
===Backlight Control===<br />
====pommed====<br />
* Install the 'pommed' program from community<br />
* Put 'pommed' in your DAEMONS array in /etc/rc.conf<br />
* Start it manually with '/etc/rc.d/pommed start'<br />
You may also want to install gpomme which is GUI for pommed daemon. Edit then ~/.gpommerc and add gpomme to startup (it's not a daemon).<br />
<br />
By default the F1, F2 ... FX keys are disabled and act like Fn+F1, Fn+F2 ... To enable the keys and make use of Fn+FX, modify /etc/pommed.conf.mactel or /etc/pommed.conf.pmac by changing fnmode = 1 to fnmode = 2. Save it as pommed.conf and restart pommed with /etc/rc.d/pommed restart.<br />
<br />
To enable the sound keys (Fn+F3, Fn+F4 and Fn+F5), you have to modify /etc/pommed.conf : change init = -1 to init = 80 and (at least on Macbook 2) change volume = "PCM" to volume = "Front" and after that restart pommed with /etc/rc.d/pommed restart. (Thanks to the [http://wiki.debian.org/MacBook#head-7adc5d72650afca10f8983c100c25ca6a73df7fd Debian Wiki])<br />
<br />
====macbook-backlight====<br />
If you want to control your backlight from console, install macbook-backlight (it's in [[AUR]]). <br />
If you're using acpi, you may also want your ''/etc/acpi/actions/lm_battery.sh'' to look like this:<br />
<pre>if [[ -z $(acpi | grep discharging) ]]<br />
then<br />
/usr/bin/macbook-backlight +80<br />
else<br />
/usr/bin/macbook-backlight -80<br />
fi</pre><br />
<br />
Now you can also set it in pommed.<br />
<br />
===Frequency Scaling===<br />
* Run 'pacman -S cpufrequtils'<br />
* Add speedstep-centrino (be careful, since a recent update it seems to be "acpi_cpufreq"), cpufreq_conservative to your MODULES array in /etc/rc.conf<br />
** Modprobe them manually too.<br />
* Run 'cpufreq-set -c 0 -g conservative' and 'cpufreq-set -c 1 -g conservative'<br />
** Put them in /etc/rc.local to set them on boot<br />
<br />
===X11===<br />
* Type 'pacman -S xorg xf86-video-i810 915resolution<br />
* Type 'X -configure'<br />
* Open /etc/conf.d/915resolution in your editor, uncomment the 'MODE' and 'RESOLUTION'.<br />
* Set the RESOLUTION to '1280 800'<br />
* Add 915resolution to your DAEMONS array in /etc/rc.conf<br />
** Start it manually with /etc/rc.d/915resolution start<br />
<br />
====Touchpad====<br />
With 7.3 version of x.org and kernel 2.6.22 or later, it should work out of the box. However, if it doesn't for some reason, try these steps:<br />
<br />
* First you must add, appletouch, usbhid, and tsdev modules to the MOD_BLACKLIST array in rc.conf. (This is because udev loads the modules in random order)<br />
* Then add appletouch, usbhid to MODULES array IN THAT ORDER.<br />
* Type 'pacman -S synaptics'<br />
* Add this to your xorg.conf:<br />
Section "InputDevice"<br />
Identifier "Synaptics Touchpad"<br />
Driver "synaptics"<br />
Option "CorePointer"<br />
Option "Device" "/dev/input/mouse1"<br />
Option "Protocol" "auto-dev"<br />
Option "LeftEdge" "100"<br />
Option "RightEdge" "1100"<br />
Option "TopEdge" "50"<br />
Option "BottomEdge" "300"<br />
Option "FingerLow" "20"<br />
Option "FingerHigh" "30"<br />
Option "MaxTapTime" "150"<br />
Option "MaxTapMove" "90"<br />
Option "MaxDoubleTapTime" "180"<br />
Option "VertScrollDelta" "25"<br />
Option "HorizScrollDelta" "30"<br />
Option "VertTwoFingerScroll" "true"<br />
Option "HorizTwoFingerScroll" "true"<br />
Option "FastTaps" "true"<br />
Option "TapButton2" "3"<br />
Option "TapButton3" "2"<br />
Option "MinSpeed" "0.5"<br />
Option "MaxSpeed" "3.5"<br />
Option "AccelFactor" "0.15"<br />
EndSection<br />
* Add the mouse to the "ServerLayout" also.<br />
* NOTE: The two fingered scrolling with the synaptics driver is not very good right now, so if you set ''VertTwoFingerScroll'' and ''HorizTwoFingerScroll'' to "false" then the left and bottom edges of the touchpad will scroll horizontally and vertically.<br />
<br />
The [http://wiki.debian.org/MacBook#head-b5e4b425668a24b46ead13b652f997f38318678b Debian Wiki] has also a few suggestions on how to configure right-clicking and scrolling.<br />
<br />
===iSight===<br />
There is linux-uvc-isight in the AUR. Some people for whom the normal release didn't work had success with linux-uvc-isight-svn, but if you use that, install linux-uvc-utils-svn as well. Follow the instructions printed in the post-install:<br />
You *must* install and load the firmware to /lib/firmware, e.g:<br />
# mkdir -p /lib/firmware<br />
# cp /\${OSX_MOUNT}/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport /lib/firmware"<br />
# isight-firmware-tool /lib/firmware/AppleUSBVideoSupport<br />
<br />
Load the 'uvcvideo' module and add it to your ''/etc/rc.conf'' if you want it to load at boot. You can find the driver [http://aur.archlinux.org/packages/linux-uvc-isight/ here].<br />
<br />
===Apple Remote===<br />
==lirc==<br />
TODO<br />
<br />
<br />
==appleir [old]==<br />
This patch is only for kernel < 2.6.22. <br />
Load the ''appleir'' module (or add it to the MODULES array in ''/etc/rc.conf''). Then run xev to check the signals, or copy this to ~/.Xmodmap:<br />
keycode 153 = XF86AudioNext<br />
keycode 144 = XF86AudioPrev<br />
keycode 176 = XF86AudioRaiseVolume<br />
keycode 174 = XF86AudioLowerVolume<br />
keycode 162 = XF86AudioPlay<br />
keycode 158 = XF86Favorites<br />
and run xmodmap ~/.Xmodmap.<br />
<br />
===Home Sharing===<br />
<br />
====UID Synchronization====<br />
<br />
To synchronize your UID in Arch Linux, you are advised to perform this operation ''while creating a new user account.'' It is therefore recommended that you do this as soon as you install Arch Linux, but if you have already set up a normal .... ''(Will finish the rest later--burned out)''<br />
<br />
====fstab Line====<br />
<br />
=First Gen MacBook=<br />
<br />
==Overview==<br />
<br />
I (hackmiester) own a [http://www.apple.com/macbook/macbook.html MacBook] from Apple. Actually, that link is inaccurate - I own a first generation MacBook, while Apple now sells a second generation. In any case, I ran into a few pitfalls as I installed Arch on my MacBook and I'm going to share here how I got Arch running smoothly. Even if you DO have a second gen MacBook, trying these instructions probably won't hurt anything. (If it does, it's not my fault, though!) You might even find these helpful if you have any other kind of Intel Mac.<br />
<br />
==Setting the scene==<br />
<br />
Before I started this process, I'd partitioned my MacBook in two using [http://www.apple.com/macosx/bootcamp/ Boot Camp] for Mac OS X. This gave me a 10G Windows partition and the rest as a Mac OS X partition.<br />
<br />
==Step 1 - Partition the disk==<br />
<br />
Later, when I decided to install Arch, I resized the Windows partition to make room. I used [http://www.terabyteunlimited.com/bootitng.html BootIt NG] from Terabyte Unlimited. If closed source software makes you uneasy, use parted. Whatever works.<br />
<br />
If you use BootIt NG, this process is drop dead easy. If you use parted, you're on your own. :-P<br />
<br />
==Step 2 - Wonder if your keyboard is broken==<br />
<br />
After you boot the Arch installation CD-ROM, you will probably find that every letter you type has a long delay, and then comes out double!!! After much Googling, I found [http://wiki.debian.org/MacBook this excellent page on the Debian wiki] about the MacBook. As that page says, what you want to do is provide the kernel with the "noapic irqpoll acpi=force" options. At the boot prompt, you'd do this:<br />
<br />
boot: arch noapic irqpoll acpi=force<br />
<br />
Yay, now you can actually run the installer. That's certainly an improvement.<br />
<br />
==Step 3 - The usual installation... or is it?==<br />
<br />
Okay, so just when you think everything's going your way, your ethernet adapter isn't detected. Neither my wireless or wired were detected. There was an eth0 interface, however. Dmesg revealed that to be an IP over 1394 device that takes advantage of Apple's FireWire in the MacBook.<br />
<br />
I found it odd that the FireWire works but the Ethernet doesn't.<br />
<br />
You might be thinking, "But hackmiester! A network connection isn't required for the installation!" However, it IS required if you are like me and have the crappiest Internet link ever, and just want to get a base system going using the FTP install disc.<br />
<br />
Anyway, I wasn't sure how to fix the problem, so I decided to do it the hard way. Here's what I did on another laptop with FireWire:<br />
<br />
<pre><br />
[hackmiester@99-AFZ00 ~]$ dmesg | grep 1394<br />
ieee1394: Initialized config rom entry `ip1394'<br />
ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[11] MMIO=[c0215000-c02157ff] Max Packet=[2048] IR/IT contexts=[4/8]<br />
ieee1394: Host added: ID:BUS[0-00:1023] GUID[00061b032400b0b4]<br />
eth1394: eth2: IEEE-1394 IPv4 over 1394 Ethernet (fw-host0)<br />
</pre><br />
<br />
Hey, looks like I already have eth1394 loaded! (If you don't, just sudo modprobe eth1394 .) According to that line, it's on eth2. So, let's get the configuration for eth2.<br />
<br />
<pre><br />
[hackmiester@99-AFZ00 ~]$ ifconfig eth2<br />
eth2 Link encap:UNSPEC HWaddr 00-06-1B-03-24-00-B0-B4-00-00-00-00-00-00-00-00 <br />
BROADCAST MULTICAST MTU:1500 Metric:1<br />
RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000 <br />
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)<br />
</pre><br />
<br />
It doesn't have an IP or anything. Good. Now we can give it the one we want. I'm gonna use 192.168.10.1 because you probably don't already have that on your network. I didn't.<br />
<br />
<pre><br />
[hackmiester@99-AFZ00 ~]$ sudo ifconfig eth2 192.168.10.1 netmask 255.255.255.0 broadcast 192.168.10.255<br />
[hackmiester@99-AFZ00 ~]$ ifconfig eth2<br />
eth2 Link encap:UNSPEC HWaddr 00-06-1B-03-24-00-B0-B4-00-00-00-00-00-00-00-00 <br />
inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0<br />
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br />
RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000 <br />
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)<br />
</pre><br />
<br />
OK, now our FireWire network interface has an IP. :D<br />
Now we have to tell that box to be an Internet gateway. My wireless Internet's on eth1. Adjust this if yours isn't.<br />
<br />
<pre><br />
[hackmiester@99-AFZ00 ~]$ sudo iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE<br />
sudo: iptables: command not found<br />
</pre><br />
<br />
Uh... whoopsy.<br />
<br />
<pre><br />
[hackmiester@99-AFZ00 ~]$ sudo pacman -Sy iptables<br />
:: Synchronizing package databases... <br />
current [#################################################################################################################################################] 100% 71K 19.6K/s 00:00:03<br />
:: extra is up to date<br />
:: unstable is up to date<br />
community [#################################################################################################################################################] 100% 151K 25.2K/s 00:00:05<br />
danimoth [#################################################################################################################################################] 100% 2K 14.0K/s 00:00:00<br />
<br />
Targets: iptables-1.3.7-1<br />
<br />
Total Package Size: 0.3 MB<br />
<br />
Proceed with upgrade? [Y/n] <br />
<br />
:: Retrieving packages from current...<br />
iptables-1.3.7-1 [#################################################################################################################################################] 100% 321K 26.6K/s 00:00:12<br />
<br />
checking package integrity... done.<br />
loading package data... done.<br />
checking for file conflicts... done.<br />
installing iptables... done.<br />
[hackmiester@99-AFZ00 ~]$ sudo /etc/rc.d/iptables start<br />
Cannot load iptables rules: /etc/iptables/iptables.rules is missing!<br />
</pre><br />
<br />
Dammit! More problems!<br />
<br />
<pre><br />
[hackmiester@99-AFZ00 ~]$ sudo cp /etc/iptables/empty.rules /etc/iptables/iptables.rules<br />
</pre><br />
<br />
THERE. Now we have a basic iptables configuration in place. So let's start up iptables and configure it to forward packets and stuff.<br />
<br />
<pre><br />
[hackmiester@99-AFZ00 ~]$ sudo modprobe ip_tables<br />
[hackmiester@99-AFZ00 ~]$ sudo modprobe iptable_filter<br />
[hackmiester@99-AFZ00 ~]$ sudo /etc/rc.d/iptables start<br />
:: Starting IP Tables [done]<br />
[hackmiester@99-AFZ00 ~]$ sudo iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE<br />
[hackmiester@99-AFZ00 ~]$ sudo iptables --append FORWARD --in-interface eth2 -j ACCEPT<br />
# (not finished yet)<br />
</pre><br />
<br />
We should now be forwarding packets. To test this, I plugged the MacBook into the FireWire cable and gave it an IP. Then I tried to connect to the Internet.<br />
<br />
(not finished yet)</div>Anthonyclarkhttps://wiki.archlinux.org/index.php?title=Mac&diff=33928Mac2007-12-21T02:59:47Z<p>Anthonyclark: /* Fan Speed */</p>
<hr />
<div>[[Category:Laptops (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
=Second Gen MacBook (Core2Duo)=<br />
Here is what I did to get a dual boot (MacOSX & Arch 0.8b2) running on my MacBook.<br />
<br />
==Partitioning in OS X==<br />
This section attempts to cover the most practical paths one can take in creating an ideal partition layout in OS X for the MacBook. If one prefers a Linux environment for setting up his or her partitions, the section, [[MacBook#Partitioning in Arch|Partitioning in Arch]], below will cover the specific points that need to be taken into consideration when implementing a partitioning layout on the MacBook. References to more user-friendly applications, such as Apple's "Boot Camp," will be mentioned here, but the depth will not be as great as that knowledge has already been documented extensively elsewhere.<br />
<br />
Before attempting any of the following pre-installation procedures, it is advisable to upgrade your firmware to the latest state released by Apple. You can achieve this either through the "Software Update" application bundled with OS X, or through the downloads on the support section of Apple's [http://www.apple.com/support/downloads/ home page]. ''Note'': The "Software Update" in OS X may not pick up all the firmware updates available for your computer. Therefore, it is possible your chance of having the most update firmware code will be increased by searching through Apple's official download page.<br />
===Single Boot===<br />
Dedicating your MacBook to Arch Linux permits you to follow the [[Official Arch Linux Install Guide]] as in a typical installation. If using rEFIt on a small partition without OS X, be sure not to install your boot loader of choice in the MBR (/dev/sda), but instead to the /boot partition or root partition if you are not going to reserve a separate partition for /boot.<br />
<br />
Also note that the "Auto-Prepare" feature available on the Installation CD will allow you to erase and format your hard drive just fine, but the manual installer uses cfdisk to partition your drive, and it does not have the capability to recognize the GUID partition scheme that your MacBook will be in if formatted with "Disk Utility" (used by default in a normal OS X installation). In that case, it might be best to not use the installer to partition your disk and instead use a GPT-capable partitioner such as parted.<br />
<br />
Furthermore, there are a few caveats discussed below that you should be familiar with in order to avoid any unpleasant outcomes:<br />
* ''Note'': The points discussed below do not apply if you choose to keep a small partition containing OS X and a small EFI System Partition on the same GPT-scheme hard disk you will be installing Arch Linux to. The section that follows assumes you do not want any trace of OS X on your MacBook.<br />
* '''Firmware Updates''' - You will not be able to update the firmware on your MacBook without a hard disk layed out with the GUID Partition Table (GPT) containing an OS X installation and a separate EFI System Partition. If you do not have access to an external OS X environment, it may be best to include a small partition containing OS X as well as an EFI System Partition on the hard drive Arch Linux will be installed onto. With this method, you have the choice of booting Arch Linux through a boot menu, such as rEFIt, or via the firmware default isolated in your MacBook's PRAM (discussed in the second caveat below).<br />
* '''Delayed Boot''' - The mechanism the MacBook uses to boot an operating system does not have the ability to quickly recognize a disk laid out solely with the MBR scheme. Instead, it searches for a familiar GUID partition table that holds an EFI System Partition to transfer its rights to. This scanning can take anywhere between twenty and thirty seconds, in contrast to the process normally taking around ten seconds when the default operating system is selected through Apple's "Startup Disk." Since the "Startup Disk" application on both the OS X Install Disk and the default OS X installation cannot locate an operating system installed within the MBR scheme, there are two alternative solutions that solve this problem:<br />
:1. Modify the code held in your MacBook's PRAM to skip checking for the GUID Partition Table and boot straight from the MBR. Following this method, you will have a system that boots normally, just like any other would, with an estimated time of around ten seconds from power-on to GRUB. This is actually what Apple's "Startup Disk" does, which is the graphical front-end for the application about to be described. To accomplish this, boot from an OS X Install Disk (this procedure may not work from an external OS X installation) and open up "Terminal." Use "diskutil list" to obtain the identifier of the disk Arch Linux will be installed onto.<br />
diskutil list<br />
The top part of the output should look something like this:<br />
/dev/disk0<br />
#: type name size identifier<br />
0: FDisk_partition_scheme *111.8 GB disk0<br />
The following command will install the code to your MacBook's PRAM that allows it to boot from the MBR. Replace "[disk identifier]" with the identifier obtained from the above command:<br />
bless --device [disk identifier] --setBoot --legacy<br />
Using the previous example the command would be:<br />
bless --device disk0 --setBoot --legacy<br />
Note: The device /dev/disk0 does not actually represent the MBR, even though that is what we type in for the command. The device echoed with the below command, "bless --getBoot", should not be /dev/disk0 but another main block device nomination, such as /dev/disk2. To insure you have correctly set the proper pointer that can boot the MBR, such as disk2, type the following command:<br />
bless --getBoot<br />
:2. Another option you have is to partition your hard disk with the GPT scheme and keep rEFIt installed on a small partition. This method does not result in as fast of a boot as the above does, but it gives you a boot menu that shows up on startup, allowing you to choose a valid operating system to boot from. This can be achieved by booting your MacBook into Target Disk Mode (Firewire); connecting to another disk with OS X installed, and partitioning your drive with the GPT scheme while creating a small HFS+ partition to hold rEFIt; installing rEFIt onto that partition; and finally typing "cd /efi/refit; ./enable-always.sh". It may be wise to set up '''''all''''' your partitions during this process, so as to avoid having to choose from a very select few partitioners that support the GPT scheme your disk will be laid out in. Furthermore, if you set up your partitions with "Disk Utility" or its back-end diskutil, there is no need to use gptsync to synchronize your partition tables. You can continue the installation process like you normally would (starting with the install step dedicated to filesystem creation), but be sure at the very end to install GRUB onto your boot partition or, if you do not want a separate boot slice, the root partition. You do not want to install onto /dev/sda or else this might prevent rEFIt from acting the way it was designed to.<br />
:3. A third option to counter the delayed boot is to hold the "Option" key on boot to bring up a menu that can transfer control to the MBR (the menu item will be titled "Windows"). Your MacBook will then boot from the MBR as fast as it physically can with the total time it takes to boot dependent upon how fast you confirm your selection at the menu. Holding the "Menu" button on a compatible Apple Remote during boot will also perform this same function.<br />
* '''Startup Sound''' - There is no available method for changing the startup sound on your MacBook without the presence of OS X. If you would like the startup sound on boot to be muted or at a specific volume output when single-booting Arch Linux, then an easy way is to adjust or mute the volume in OS X before Arch is installed. If the startup sound has returned after a firmware upgrade or PRAM modification, or you have already erased OS X and installed Arch Linux and would like to make adjustments now, boot from an external OS X drive (select it from the startup menu by holding "Option" on boot), and make arrangements from there.<br />
<br />
===Dual Boot===<br />
This portion of the article makes the assumption that one wants to install Arch Linux on top of an existing OS X configured MacBook. A higher success rate and smoother installation may be achieved by installing OS X from scratch and then following these steps. If this is the preferred option, then you may also decide to setup your partitions through "Disk Utility" before OS X is installed. In the case of a layout incorporating a shared partition, make sure to choose a filesystem that is writable from both OS X and Linux, for example: HFS+ (non-journaled) or FAT32. More about dual boots with a shared partition [[MacBook#With Shared Partition|below]]. In any case, you always have the option of disabling journaling on the default HFS+ filesystem in OS X in order to allow read/writes from Arch Linux.<br />
====No Shared Partition====<br />
* Optional Step: Install rEFIt. This will give you a boot menu to choose between OS X and Arch Linux on every boot. Download the ".dmg" from the [http://refit.sourceforge.net/ Refit Homepage] and install it. Make sure to install your Linux boot loader (i.e. GRUB or LILO) on your /boot partition or on your root partition if you are not going to have separate partitions for both. Be careful about installing a boot loader to /dev/sda as this can lead to unexpected results with rEFIt.<br />
* Note: You can either partition your hard disk with the command-line application, diskutil, or its GUI front-end, "Boot Camp." Diskutil comes embedded into OS X, while "Non-Leopard" users may find themselves having to download and pay for the latest "Boot Camp" release.<br />
'''1. Partitioning with diskutil:'''<br />
* Note: diskutil partitions a disk differently than most other applications. It creates new partitions by resizing an exisiting partition and creating new ones out of the remaining free space (in the case below the partition to be split is the second one located on /dev/disk0s2). Furthermore, your chances of success will almost always be guaranteed when performing the following operations after a clean OS X installation.<br />
* To partition using diskutil, open the "Terminal" application found in the /Applications/Utilities folder. The following steps can be performed while your OS X volume is mounted.<br />
* Disable journaling on your about-to-be-resized OS X partition. You can do this with "Disk Utility" in OS X or with diskutil through the following command. (Type "ls /Volumes/" to obtain the label of your OS X partition.)<br />
sudo diskutil disableJournal /Volumes/[LABEL]<br />
* Next, type "diskutil list" and you should see something like this:<br />
/dev/disk0<br />
#: type name size identifier<br />
0: GUID_partition_scheme *111.8 GB disk0<br />
1: EFI 200.0 MB disk0s1<br />
2: Apple_HFS Macintosh HD 111.5 GB disk0s2<br />
* Below is the command usage for resizing a partition and reclaiming the remaining free space by creating a new partition. Note the disk identifier from the "diskutil list" command you typed (in the example above it would be disk0s2), and replace [disk identifier] with that identifier. Replace "[disk size]" with the new size of your OS X partition and "[partition size]" with the remaining space calculated via the total amount of space your original OS X partition takes up. Last, replace ["Partition label"] with a name for your new Arch Linux partition.<br />
sudo diskutil resizeVolume [disk identifier] [disk size] "Linux" ["Partition label"] [partition size]<br />
* The example command below resizes the initial OS X partition (disk0s2) to 55.5 gigabytes and then creates the partition assigned to Arch Linux with the free space that was left over. The amount of free space that was left over after the resizing was calculated with the "diskutil list" command used above. "Linux" is the GPT recognized name for any of the possible filesystems most attributed to Linux.<br />
sudo diskutil resizeVolume disk0s2 55.5G "Linux" "Phrakture" 56G<br />
* Reboot.<br />
* Verify your disk was formatted correctly.<br />
diskutil list<br />
'''2. Partitioning with "Boot Camp":'''<br />
The "Boot Camp" application released by Apple is considered by some to be more user-friendly due to its graphical interface and simple procedure.<br />
* ''Note'': Apple no longer officially hosts the "Boot Camp" beta software; you can still obtain the last publicly released version, "Boot Camp 1.4b," from an unofficial mirror site. If you have 10.5 "Leopard," the "Boot Camp" final release comes bundled with the default installation and can be found in /Applications/Utilities. The software can also be extracted from the 10.5 Install Disk and installed onto any supported version of OS X.<br />
* Install "Boot Camp" if it is not already installed, and run the "Boot Camp Assistant" from the /Applications/Utilities folder.<br />
* Partition your hard drive however you like.<br />
<br />
====With Shared Partition====<br />
The easiest way to go about dual booting Arch Linux and OS X with a shared partition is by using Apple's diskutil application, the CLI back-end for "Boot Camp." Partitioning with diskutil keeps you from having to install Arch Linux through the FTP disk in order to use parted to partition and gptsync to sync the GPT and MBR partition tables (diskutil recognizes both the new GPT scheme and the old MBR and creates and syncs them for you upon write). In addition to using diskutil to partition, you will also have a choice of whether or not you want the shared partition to be a "shared" /home folder for both operating systems or a smaller partition while allowing both Arch Linux and OS X to have their own /home folders. You will also have to decide what filesystem to format your shared partition with. The non-journaled HFS+ and FAT32 filesystems are popular for sharing files between Linux and OS X due to both operating systems being able to read/write to them well. In the case of a shared /home, the Case-sensitive HFS+ (Non-Journaled) filesystem is a good way to go considering read/write support for non-journaled HFS+ filesystems is good in Linux, and the "case-sensitive" aspect of the HFS+ filesystem permits good interoperability between Arch Linux and OS X. '''Also, do not forget to synchronize your Arch and OS X UIDs, otherwise you will not have write access to your /home directory from both Arch and OS X;''' the [[MacBook#Home Sharing|Home Sharing]] section of this article describes how to do this.<br />
* Optional Step: Install rEFIt. This will give you a boot menu to choose between OS X and Arch Linux on every boot. Download the ".dmg" from the [http://refit.sourceforge.net/ Refit Homepage] and install it. Make sure to install your Linux boot loader (i.e. GRUB or LILO) on your /boot partition or on your root partition if you are not going to have separate partitions for both. Be careful about installing a boot loader to /dev/sda as this can lead to unexpected results with rEFIt.<br />
* Note: You can either partition your hard disk with the command-line application, diskutil, or its GUI front-end, "Boot Camp." Diskutil comes embedded into OS X while "Non-Leopard" users may find themselves having to download and pay for the latest "Boot Camp" release.<br />
* ''Further note'': diskutil partitions a disk differently than most other applications. It creates new partitions by resizing an exisiting partition and creating new ones out of the remaining free space (in the case below the partition to be split is the second one located on /dev/disk0s2). Furthermore, your chances of success will almost always be guaranteed when performing the following operations after a clean OS X installation.<br />
* Open the "Terminal" application found in the /Applications/Utilities folder. The following steps can be performed while your OS X volume is mounted.<br />
* Disable journaling on your about-to-be-resized OS X partition. You can do this with "Disk Utility" in OS X or with diskutil through the following command. (Type "ls /Volumes/" to obtain the label of your OS X partition.) <br />
sudo diskutil disableJournal /Volumes/[LABEL]<br />
* Type "diskutil list" and you should see something like this:<br />
/dev/disk0<br />
#: type name size identifier<br />
0: GUID_partition_scheme *111.8 GB disk0<br />
1: EFI 200.0 MB disk0s1<br />
2: Apple_HFS Macintosh HD 111.5 GB disk0s2<br />
* Below is the command usage for resizing a partition and reclaiming the remaining free space by creating a new partition(s). Note the disk identifier from the "diskutil list" command you typed (in the example above it would be disk0s2) and replace [disk identifier] with that identifier. Replace "[disk size]" with the new size of your OS X partition and "[partition size]" with the remaining space you want each individual partition to take up, calculated via the total amount of space your original OS X partition takes up. Last, fill in the ["Partition label"] fields with names for your new partitions.<br />
sudo diskutil resizeVolume [disk identifier] [disk size] [partition type] ["Partition label"] [partition size] [partition type] ["Partition label"] [partition size]<br />
* The following example resizes the original OS X partition (disk0s2) to 30GB and sets up a 71.5GB shared, non-journaled HFS+ (Case Sensitive) /home partition and a 10GB Arch Linux root partition:<br />
sudo diskutil resizeVolume disk0s2 30G "Case-sensitive HFS+" "Shared" 71.5G "Linux" "Arch" 10G<br />
* If you would rather use the FAT filesystem on a small shared partition and keep separate /home folders on the Arch Linux and OS X partitions, then you could use something like:<br />
sudo diskutil resizeVolume disk0s2 50G "MS-DOS FAT32" "Shared" 11.5G "Linux" "Arch" 50G<br />
* The commands above do not actually format the partitions. They only store the proper information that the GUID Partition Table needs so it can be read from by applications and the native EFI bootloader. You will now have to format any partitions that can not be formatted in Linux with the desired filesystem. If you chose the Non-Journaled Case-sensitive HFS+ filesystem for your shared partition then you will need to format it with the below command after you reboot. You will then have to run "diskutil list" again to get the identifier for the new shared partition (following the example above it would be disk0s3).<br />
* Reboot<br />
diskutil list<br />
diskutil eraseVolume "Case-sensitive HFS+" "Shared" [disk identifier]<br />
* If you chose the FAT filesystem for your shared partition you can also choose to format it from OS X, but you may end up doing it over again in the Arch Linux installer when it comes time to mount and format your filesystems. To format from OS X type:<br />
newfs_msdos -F 32 -v "Shared" /dev/[disk identifier]<br />
* If throughout this procedure you get a "chosen size is invalid..." error try expressing the size of the partitions in megabytes instead of gigabytes. The original command for a FAT32 formatted shared partition would then look like:<br />
sudo diskutil resizeVolume disk0s2 50000M "MS-DOS FAT32" "Shared" 11500M "Linux" "Arch" 50000M<br />
* If you get a "Resizing encountered error No space left on device (28) on disk" error even though you have verified the total size of the partition you are splitting with "diskutil list", then first resize only the soon-to-be-split partition:<br />
sudo diskutil resizeVolume disk0s2 30G<br />
* Reboot, and then create the rest of the partitions:<br />
sudo diskutil resizeVolume disk0s2 30G "Case-sensitive HFS+" "Shared" 71.5G "Linux" "Arch" 10G<br />
* After using any of the above commands to repartition your MacBook, you can reboot and verify your partitions have been created with "diskutil list".<br />
* ''Note'': It may be best at this point to synchronize the UID of your main account in OS X with the default in Arch Linux. Skip down to the [[MacBook#Home Sharing|Home Sharing]] section of this article for directions on how to do this.<br />
<br />
==Partitioning in Arch==<br />
If you prefer to partition in Linux, there are two tools available to Arch end-users that faciliate this process on the MacBook: parted and refit. GNU Parted will allow the repartitioning of your disk even if it is laid out in GPT format, while the refit package, available in the Arch community repository, allows the synchronization of the MBR table that is created by parted and the GUID Partition Table that is originally on a default OS X installation. If your hard disk is not layed out with the GPT scheme, then you can use the partitioner available through the Arch installer, cfdisk, and you need not follow the rest of the details covered in this section. You can find the scheme your drive is laid out in with Apple's "Disk Utility" or by trying to use cfdisk (the default application run from the Arch installer): if the drive is laid out GPT-style, you will be informed by cfdisk and possibly denied readable and/or writable access to the table.<br />
<br />
''Note'': If you are going to resize the HFS+ partition used by default in OS X, it may be wise to disable journaling prior to the task. You can do this with "Disk Utility" in OS X or with diskutil through the following command:<br />
sudo diskutil disableJournal /Volumes/[LABEL]<br />
Type "ls /Volumes/" to obtain the label of your OS X partition.<br />
<br />
'''Prepare the Arch environment for partitioning:'''<br />
<br />
* Get the latest [http://www.archlinux.org/download/ Arch Linux FTP Install CD] and burn it.<br />
* Reboot, and hold down "C" during startup, so it will boot from the CD, or hold "Option" to select it from the firmware menu. If you installed rEFIt, you can select the Install CD from the boot menu that automatically comes up.<br />
* Type "arch" at the boot prompt or "arch vga=773" if you prefer a higher resolution.<br />
boot: arch vga=773<br />
* Note: Due to a bug in the Apple firmware ([http://refit.sourceforge.net/doc/c4s3_keyboard.html Note from rEFIt FAQ]), some MacBook Pro Core 2 Duo users have reported that the keyboard often does not work at the Arch Linux boot prompt. The only options are to either get a USB keyboard, which should work all the time, or keep rebooting until it works.<br />
* Note: Some MacBook (Pro) Core Duo users report strange keyboard output such as long delays and character doubling. If this is your situation, entering the following at the boot prompt should alleviate any such symptoms:<br />
boot: arch noapic irqpoll acpi=force<br />
* [[Configuring network|Configure your network]] through bash or through the normal Arch install procedure that follows:<br />
/arch/setup<br />
* Select "FTP/HTTP" as the installation source when asked.<br />
* Select "Configure Network" from the "Main Menu."<br />
* Probe and/or select your network interface and either confirm the usage of DHCP or set up your interface statically.<br />
* Exit by selecting "Exit Install" at the "Main Menu."<br />
* Open /etc/pacman.conf in your favorite editor and uncomment the "[community]" header and its "Include" path to enable the repository:<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/community<br />
* Since "ftp://ftp.archlinux.org/" is throttled, configure /etc/pacman.d/core, /etc/pacman.d/community, and /etc/pacman.d/extra for a less slow download by moving a fast mirror to the top in those files. If you do not know which mirrors are the quick ones for you, then any mirror other than "ftp://ftp.archlinux.org/" will do for now.<br />
* Bring the available list of packages up to date, and install the latest versions of refit and parted along with their dependencies. This can be done with one command:<br />
pacman -Sy refit parted<br />
* Continue with the instructions below that are relevant to your particular table layout, either a single boot or dual boot. If you do not have rEFIt installed '''''and''''' you do not plan on dual booting Arch and OS X, feel free to partition how you normally would, possibly ignoring the rest of this section.<br />
<br />
===Single Boot===<br />
<br />
This section '''only''' describes how to prepare your hard disk with parted if you are '''single booting Arch, while keeping rEFIt installed on a small partition.''' If you do not have rEFIt installed on a HFS+ partition and your drive is not layed out in the GPT format, there are no special modifications to consider during the single boot process. If your whole drive is configured with the MBR scheme, then you are advised to use whatever partitioner you feel most comfortable with, as there are no usual restrictions upon how you may partition your drive.<br />
* Note: If you had decided to partition your disk back when you installed rEFIt onto a small partition, these instructions are not relevant; you may move on to the actual installation process described in the [[MacBook#Installation|Installation]] section of this article and select the "Partition Hard Drives" step in the "Prepare Hard Drive" menu on the installer, in order to format your assigned partitions.<br />
* Run the parted application on your hard drive:<br />
parted /dev/sda<br />
* Type "p" to view the current partition table.<br />
(parted) p<br />
* If you installed rEFIt onto a small partition but did not create the other partitions you want, you can now create all the other partitions you desire. If you installed rEFIt on a partition taking up the whole drive, you will have to resize the partition with the following command. ''Note'': The command is based upon the assumption that rEFIt is installed on the '''first''' partition of the hard drive. If rEFIt is installed on any other partition, simply change the number "1" to whichever one it is on.<br />
(parted) resize 1 <START> <END><br />
* For <START> and <END>, use the count in MBs of where you want your partition to start and end.<br />
* To create a swap partition type:<br />
(parted) mkpart primary linux-swap <START> <END><br />
* The same goes for any other regular partition:<br />
(parted) mkpart primary ext2 <START> <END><br />
* ''Note'': Parted only has the ability to format via the ext2, FAT16, FAT32, and linux-swap filesystems. It has the ability to create reiserfs partitions if libreiserfs is installed (not available through the Arch repositories). If you desire to use a filesystem such as ext3, reiserfs, xfs, or jfs, partition your hard drives in the parted application and format them as ext2. Then, during the actual Arch installation process, you will be given the opportunity to perform any other necessary filesystem creation over the original ext2 partition.<br />
* ''Further note'': If you are single booting Arch on a MacBook layed out with the MBR scheme, you will be able to create a logical partition like you would be able to during any other typical pre-installation process. If your hard disk is not layed out MBR-style and instead layed out with the GPT scheme, you cannot create a logical partition as the GPT standard does not support the implementation needed to do so. You can find the scheme your drive is laid out in with Apple's "Disk Utility" or by trying to use cfdisk (the default application run from the Arch installer): if the drive is laid out GPT-style, you will be informed by cfdisk and possibly denied readable and/or writable access to the table.<br />
* Quit parted.<br />
(parted) quit<br />
* Since you are using rEFIt on a small partition without OS X, synchronize your GUID Partition Table with the newly created MBR partition table.<br />
gptsync /dev/sda<br />
* Jump to the [[MacBook#Installation|Installation]] section of this article, and start the installation (/arch/setup).<br />
<br />
===Dual Boot===<br />
<br />
* Run the parted application to partition your hard disk for a dual boot.<br />
parted /dev/sda<br />
* Type "p" to view the current partition table.<br />
(parted) p<br />
* If repartitioning from an OS X configured MacBook that holds an EFI System Partition, resize the current OS X partition first in order to free up space for your new partitions. ''Note'': If you do not have an EFI System Partition and only have an OS X partition, change the number "2" in the following command to whichever partition OS X is on (probably "1").<br />
(parted) resize 2 <START> <END><br />
* For <START> and <END>, use the count in MBs of where you want your partition to start and end.<br />
* If you have any partitions on your disk other than the EFI System Partition and the partition that holds OS X, then remove them with the "rm" command:<br />
(parted) rm <NUMBER><br />
* Replace <NUMBER> with the position the partition rests on your drive. For example, to remove the third partition that comes after the OS X and EFI System Partition, according to your partition table shown with "p", type:<br />
(parted) rm 3<br />
* ''Note'': Be sure not to accidently remove the first or second partitions if that is where OS X and your EFI System Partition reside. Review your work carefully. <br />
* You may now, if you choose, make a partition for swap.<br />
(parted) mkpart primary linux-swap <START> <END><br />
* For <START> and <END>, use the count in MBs of where you want your partition to start and end.<br />
* The same goes for any other regular partition:<br />
(parted) mkpart primary ext2 <START> <END><br />
* ''Note'': Parted only has the ability to format via the ext2, FAT16, FAT32, and linux-swap filesystems. It has the ability to create reiserfs partitions if libreiserfs is installed (not available through the Arch repositories). If you desire to use a filesystem such as ext3, reiserfs, xfs, or jfs, partition your hard drives in the parted application and format them as ext2. Then, during the actual Arch installation process, you will be given the opportunity to perform any other necessary filesystem creation over the original ext2 partition. '''Parted does not have the ability to ''create'' HFS+ filesystems, as may be the case if you desire a shared /home; you need to perform this type of creation in OS X.'''<br />
* ''Further note'': If your hard disk is not layed out MBR-style and layed out with the GPT scheme (the default standard on a typical OS X installation), you cannot create a logical partition as the GPT standard does not support the implementation needed to do so. You can find the scheme your drive is laid out in with Apple's "Disk Utility" or by trying to use cfdisk (the default application run from the Arch installer): if the drive is laid out GPT-style, you will be informed by cfdisk and possibly denied readable and/or writable access to the table.<br />
* Quit parted.<br />
(parted) quit<br />
* Synchronize your GUID Partition Table with your newly created MBR partition table.<br />
gptsync /dev/sda<br />
* Jump to the [[MacBook#Installation|Installation]] section of this article, and start the installation (/arch/setup).<br />
<br />
==rEFIt==<br />
* You can now install the optional rEFIt if you have not done so already. This is not a mandatory requirement. It only gives you a menu to choose between OS X and Arch Linux upon boot.<br />
* In OS X, download the ".dmg" from -> [http://refit.sourceforge.net/ Refit Homepage] and install it.<br />
* If you have already partitioned your hard disk in preparation for the Arch installation, rEFIt may not be enabled by default. You will have to run the "enable.sh" script installed in /efi/refit/.<br />
* Open up "Terminal" and enter:<br />
cd /efi/refit; ./enable.sh<br />
<br />
==Installation==<br />
This section assumes you have already finished partitioning your MacBook in preparation for an Arch installation. If you are single booting Arch Linux '''''and''''' you are not using rEFIt, you may follow the [[Official Arch Linux Install Guide#Common Installation Procedure|Official Arch Linux Install Guide]] with no special modifications, ignoring the rest of this section. '''If you are using rEFIt either in a single boot or dual boot setup, you will need to install your boot loader of choice onto your /boot partition or on your root partition if you are not opting for separation.''' The procedure for doing so is what follows.<br />
* Type "arch" at the boot prompt or "arch vga=773" if you prefer a higher console resolution.<br />
boot: arch vga=773<br />
* Note: Due to a bug in the Apple firmware ([http://refit.sourceforge.net/doc/c4s3_keyboard.html Note from rEFIt FAQ]), some MacBook Pro Core 2 Duo users have reported that the keyboard often does not work at the Arch Linux boot prompt. The only options are to either get a USB keyboard, which should work all the time, or keep rebooting until it works.<br />
* Note: Some MacBook (Pro) Core Duo users report strange keyboard output such as long delays and character doubling. If this is your situation, entering the following at the boot prompt should alleviate any such symptoms:<br />
boot: arch noapic irqpoll acpi=force<br />
* Run the Arch installer:<br />
/arch/setup<br />
* Be sure to work your way down through the menu, and do not forget to select the "Partition Hard Drives" step under the "Prepare Hard Drive" menu to format your partitions and mount them so Arch can be installed onto them. For the rest of the installation, you can follow the [[Official Arch Linux Install Guide#Common Installation Procedure|Official Arch Linux Install Guide]] and install everything normally '''''until you make it to the menu item titled "Install Bootloader."'''''<br />
* ''Note'': The following procedure is unique to GRUB. The GRUB boot loader now has the complete ability to boot your Arch Linux system, is considered stable, and is now recommended more often for Linux installation on a MacBook then LILO. If you wish to use the LILO boot loader, you will have to consult further documentation as the article's contributors have not yet attempted to boot Arch on the MacBook with LILO.<br />
* Select "Install Bootloader" from the "Main Menu" of the installer.<br />
* Choose the option "Use the GRUB bootloader" when asked.<br />
* When you review your GRUB configuration file, make sure that both "root" fields point to the correct partitions and the kernel and initrd paths are correct for your partition setup. If you plan on using a separate boot partition, do not have "/boot" in front of "/vmlinuz26" and "/kernel26.img" on the "kernel" and "initrd" fields respectively. The following example boots Arch Linux from the fourth partition on the hard drive devoted to the root file system. This could pertain to those dual booting OS X with Arch while having an EFI System Partition and a shared home.<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,3)<br />
kernel /boot/vmlinuz26 root=/dev/sda4 ro vga=773<br />
initrd /boot/kernel26.img<br />
* The example below boots Arch from the second partition on the hard drive assigned to /boot, while the third partition is assigned to root (/). This could be an example for those having only rEFIt installed on a small partition and no OS X.<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,1)<br />
kernel /vmlinuz26 root=/dev/sda3 ro vga=773<br />
initrd /kernel26.img<br />
* '''If you are using rEFIt, make sure you install GRUB onto ''a partition'', either your /boot or your /root (i.e. /dev/sda4) if you are not using separate partitions for both.'''<br />
* '''Do not install GRUB onto /dev/sda! Doing so is likely to lead to an unstable post-environment.'''<br />
* If GRUB was successfully installed, choose "Exit Install" from the "Main Menu."<br />
* If you did not partition your disk from OS X using diskutil or "Disk Utility" and instead partitioned with another third-party program or from Linux, sync your partition tables one more time for good measure.<br />
gptsync /dev/sda<br />
* ''NOTE'': If you get an error that GRUB was not installed successfully, it sometimes works if you go through the same steps a second time. If you receive an error message again stating that GRUB was not successfully installed, run the following commands, and then attempt to install GRUB again:<br />
! Replace the "3" with whatever your root partition is (i.e. sda4 -> 4)<br />
! 83 is for ext2/3. If you have something else, type "sfdisk -T" for a list of supported partition types. <br />
# sfdisk -c /dev/sda 3 83<br />
# gptsync /dev/sda<br />
* If you still get an error message when installing GRUB, keep trying those commands. It should work eventually.<br />
* You may now reboot your system. If rEFIt is setup correctly, you will be able to choose the correct icon in the boot menu on startup. If you do not have rEFIt installed, you will have to either hold the "Option" key during startup (or the "Menu" button on a compatable Apple Remote), or follow the instructions below to allow your MacBook to transfer its pre-control rights directly to GRUB (this will save the maximum time possible during a normal boot).<br />
reboot<br />
* If you are single booting without rEFIt and need to save a new instruction set in the PRAM to boot straight from the MBR instead of spending time searching for the GUID Partition Table, hold the "Option" key during startup or the "Menu" button on a compatable Apple Remote and boot into your new Arch Linux setup.<br />
* Then, synchronize your local package database with the one on the FTP/HTTP server you chose as your default during the install process, and install the "eject" package via pacman to eject your Arch installation media. This can all be done with one command:<br />
pacman -Sy eject<br />
* Eject the disk.<br />
eject<br />
* Insert an OS X Install Disk, and reboot while holding either the "C" or "Option" keys to initiate the loading of the DVD.<br />
* Follow the instructions in this article titled "Delayed Boot" under the [[MacBook#Single Boot|Single Boot (Partitioning from OS X)]] section to reconfigure your firmware's default boot device.<br />
* ''Note'': If you are sharing your Arch /home folder with OS X, skip down to the [[MacBook#Home Sharing|Home Sharing]] section of this article before you create your first user account.<br />
* Enjoy your new Arch MacBook!<br />
<br />
==Post Install==<br />
<br />
===Wifi===<br />
====Ndiswrapper====<br />
* First, install the ndiswrapper package like so:<br />
$ pacman -Sy ndiswrapper<br />
* The Lenovo Thinkpad 802.11abgn driver works well with the MacBook. The driver can be obtained through the manufacturer's [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-66449 own page], or directly with the following command:<br />
$ wget -c ftp://ftp.software.ibm.com/pc/pccbbs/mobiles/7iwc28ww.exe<br />
* You need cabextract to extract the file. Get it with pacman.<br />
pacman -S cabextract<br />
* Create a new directory for the soon-to-be extracted files, change the cwd to it, and extract the main file.<br />
mkdir 7iwc28ww; cd 7iwc28ww/; cabextract 7iwc28ww.exe<br />
* Install the driver where <path/to/driver> is the .inf file from the extracted .exe. If you are using the Lenovo Thinkpad 802.11abgn driver, replace <path/to/driver> with ''WINXP_2K/NET5416.INF''.<br />
ndiswrapper -i <path/to/driver><br />
* The below command may have already been executed during installation of the ndiswrapper application, but run it anyway just to be sure the correct alias for wlan0 is written to /etc/modprobe.conf.<br />
ndiswrapper -m<br />
* Verify your driver has been installed properly:<br />
ndiswrapper -l<br />
* Now, you can add "ndiswrapper" to your MODULES array in /etc/rc.conf, and load the module manually:<br />
modprobe ndiswrapper<br />
<br />
====Madwifi====<br />
'''Primary installation through the Arch repositories:'''<br />
* First, install the madwifi driver and madwifi-utils:<br />
pacman -Sy madwifi madwifi-utils<br />
* Then, load the "ath_pci" module. You can also add it to the MODULES list in /etc/rc.conf if you want it to load on a normal boot.<br />
modprobe ath_pci<br />
* And if everything is ok, you should see something like this:<br />
ifconfig <br />
ath0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX <br />
inet6 addr: fe80::219:e3ff:fed4:be51/64 Scope:Link<br />
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br />
RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:0 <br />
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)<br />
* Some MacBook users have reported more success when downloading and installing from SVN. There is a madwifi-svn package in the [[AUR]], which can be found [http://aur.archlinux.org/packages.php?do_Details=1&ID=10492&O=0&L=0&C=0&K=madwifi&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
<br />
===Fan Speed===<br />
* The fan doesn't seem to change speeds with the temperature. We can (somewhat) fix this<br />
* Add 'applesmc' to your MODULES array in /etc/rc.conf<br />
** Modprobe it too<br />
* This creates a bunch of magic files in /sys/devices/platform/applesmc.768<br />
* As root type 'echo 1 > /sys/devices/platform/applesmc.768/fan1_manual'<br />
* As root type 'echo 3500 > /sys/devices/platform/applesmc.768/fan1_output'<br />
** You may want to add this to your /etc/rc.local<br />
** The number can be anywhere from 1800 to 6200.<br />
** I find that for normal use, 3500-4000 is good.<br />
** When it gets really hot, 4500-5000 is good.<br />
** I'm going to try and write a script to deal with this better. <br />
::''(I've wrote a [http://phpfi.com/246225 simple app in C] to keep my MacBook cold. It's written for xfce4-genmon-plugin, but you can also use it with conky, cron or anything else.) -- [[User:Husio|Husio]] 16:38, 30 June 2007 (EDT)''<br />
<br />
===Temperature Sensors===<br />
* To go along with this, we should be able to read from the temperature sensors.<br />
* Type 'pacman -S lm_sensors'<br />
* To autodetect sensors type 'sensors-detect'<br />
* In /etc/modprobe.conf add:<br />
alias char-major-89 i2c-dev<br />
* In /etc/rc.local add:<br />
modprobe i2c-i801<br />
modprobe eeprom<br />
modprobe coretemp<br />
sensors -s<br />
* Now you can type 'sensors' to see your core temperatures.<br />
<br />
===Suspend===<br />
====Suspend to Ram====<br />
If you want to get your macbook suspend to ram on closing it and you're using acpi, just add to ''/etc/acpi/actions/lm_lid.sh'':<br />
<pre><br />
# Suspend<br />
if [[ `cat /proc/acpi/button/lid/LID0/state | tr -s " " | cut -d" " -f2` = "closed" ]]<br />
then<br />
pm-suspend<br />
fi<br />
</pre><br />
There's some problem with mpd if you suspend when mpd is playing. It can't connect to localhost after waking up.<br />
<br />
===Backlight Control===<br />
====pommed====<br />
* Install the 'pommed' program from community<br />
* Put 'pommed' in your DAEMONS array in /etc/rc.conf<br />
* Start it manually with '/etc/rc.d/pommed start'<br />
You may also want to install gpomme which is GUI for pommed daemon. Edit then ~/.gpommerc and add gpomme to startup (it's not a daemon).<br />
<br />
By default the F1, F2 ... FX keys are disabled and act like Fn+F1, Fn+F2 ... To enable the keys and make use of Fn+FX, modify /etc/pommed.conf.mactel or /etc/pommed.conf.pmac by changing fnmode = 1 to fnmode = 2. Save it as pommed.conf and restart pommed with /etc/rc.d/pommed restart.<br />
<br />
To enable the sound keys (Fn+F3, Fn+F4 and Fn+F5), you have to modify /etc/pommed.conf : change init = -1 to init = 80 and (at least on Macbook 2) change volume = "PCM" to volume = "Front" and after that restart pommed with /etc/rc.d/pommed restart. (Thanks to the [http://wiki.debian.org/MacBook#head-7adc5d72650afca10f8983c100c25ca6a73df7fd Debian Wiki])<br />
<br />
====macbook-backlight====<br />
If you want to control your backlight from console, install macbook-backlight (it's in [[AUR]]). <br />
If you're using acpi, you may also want your ''/etc/acpi/actions/lm_battery.sh'' to look like this:<br />
<pre>if [[ -z $(acpi | grep discharging) ]]<br />
then<br />
/usr/bin/macbook-backlight +80<br />
else<br />
/usr/bin/macbook-backlight -80<br />
fi</pre><br />
<br />
Now you can also set it in pommed.<br />
<br />
===Frequency Scaling===<br />
* Run 'pacman -S cpufrequtils'<br />
* Add speedstep-centrino (be careful, since a recent update it seems to be "acpi_cpufreq"), cpufreq_conservative to your MODULES array in /etc/rc.conf<br />
** Modprobe them manually too.<br />
* Run 'cpufreq-set -c 0 -g conservative' and 'cpufreq-set -c 1 -g conservative'<br />
** Put them in /etc/rc.local to set them on boot<br />
<br />
===X11===<br />
* Type 'pacman -S xorg xf86-video-i810 915resolution<br />
* Type 'X -configure'<br />
* Open /etc/conf.d/915resolution in your editor, uncomment the 'MODE' and 'RESOLUTION'.<br />
* Set the RESOLUTION to '1280 800'<br />
* Add 915resolution to your DAEMONS array in /etc/rc.conf<br />
** Start it manually with /etc/rc.d/915resolution start<br />
<br />
====Touchpad====<br />
With 7.3 version of x.org and kernel 2.6.22 or later, it should work out of the box. However, if it doesn't for some reason, try these steps:<br />
<br />
* First you must add, appletouch, usbhid, and tsdev modules to the MOD_BLACKLIST array in rc.conf. (This is because udev loads the modules in random order)<br />
* Then add appletouch, usbhid to MODULES array IN THAT ORDER.<br />
* Type 'pacman -S synaptics'<br />
* Add this to your xorg.conf:<br />
Section "InputDevice"<br />
Identifier "Synaptics Touchpad"<br />
Driver "synaptics"<br />
Option "CorePointer"<br />
Option "Device" "/dev/input/mouse1"<br />
Option "Protocol" "auto-dev"<br />
Option "LeftEdge" "100"<br />
Option "RightEdge" "1100"<br />
Option "TopEdge" "50"<br />
Option "BottomEdge" "300"<br />
Option "FingerLow" "20"<br />
Option "FingerHigh" "30"<br />
Option "MaxTapTime" "150"<br />
Option "MaxTapMove" "90"<br />
Option "MaxDoubleTapTime" "180"<br />
Option "VertScrollDelta" "25"<br />
Option "HorizScrollDelta" "30"<br />
Option "VertTwoFingerScroll" "true"<br />
Option "HorizTwoFingerScroll" "true"<br />
Option "FastTaps" "true"<br />
Option "TapButton2" "3"<br />
Option "TapButton3" "2"<br />
Option "MinSpeed" "0.5"<br />
Option "MaxSpeed" "3.5"<br />
Option "AccelFactor" "0.15"<br />
EndSection<br />
* Add the mouse to the "ServerLayout" also.<br />
* NOTE: The two fingered scrolling with the synaptics driver is not very good right now, so if you set ''VertTwoFingerScroll'' and ''HorizTwoFingerScroll'' to "false" then the left and bottom edges of the touchpad will scroll horizontally and vertically.<br />
<br />
The [http://wiki.debian.org/MacBook#head-b5e4b425668a24b46ead13b652f997f38318678b Debian Wiki] has also a few suggestions on how to configure right-clicking and scrolling.<br />
<br />
===iSight===<br />
There is linux-uvc-isight in the AUR. Some people for whom the normal release didn't work had success with linux-uvc-isight-svn, but if you use that, install linux-uvc-utils-svn as well. Follow the instructions printed in the post-install:<br />
You *must* install and load the firmware to /lib/firmware, e.g:<br />
# mkdir -p /lib/firmware<br />
# cp /\${OSX_MOUNT}/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport /lib/firmware"<br />
# isight-firmware-tool /lib/firmware/AppleUSBVideoSupport<br />
<br />
Load the 'uvcvideo' module and add it to your ''/etc/rc.conf'' if you want it to load at boot. You can find the driver [http://aur.archlinux.org/packages/linux-uvc-isight/ here].<br />
<br />
===Apple Remote===<br />
==lirc==<br />
TODO<br />
<br />
<br />
==appleir [old]==<br />
This patch is only for kernel < 2.6.22. <br />
Load the ''appleir'' module (or add it to the MODULES array in ''/etc/rc.conf''). Then run xev to check the signals, or copy this to ~/.Xmodmap:<br />
keycode 153 = XF86AudioNext<br />
keycode 144 = XF86AudioPrev<br />
keycode 176 = XF86AudioRaiseVolume<br />
keycode 174 = XF86AudioLowerVolume<br />
keycode 162 = XF86AudioPlay<br />
keycode 158 = XF86Favorites<br />
and run xmodmap ~/.Xmodmap.<br />
<br />
===Home Sharing===<br />
<br />
====UID Synchronization====<br />
<br />
To synchronize your UID in Arch Linux, you are advised to perform this operation ''while creating a new user account.'' It is therefore recommended that you do this as soon as you install Arch Linux, but if you have already set up a normal .... ''(Will finish the rest later--burned out)''<br />
<br />
====fstab Line====<br />
<br />
=First Gen MacBook=<br />
<br />
==Overview==<br />
<br />
I (hackmiester) own a [http://www.apple.com/macbook/macbook.html MacBook] from Apple. Actually, that link is inaccurate - I own a first generation MacBook, while Apple now sells a second generation. In any case, I ran into a few pitfalls as I installed Arch on my MacBook and I'm going to share here how I got Arch running smoothly. Even if you DO have a second gen MacBook, trying these instructions probably won't hurt anything. (If it does, it's not my fault, though!) You might even find these helpful if you have any other kind of Intel Mac.<br />
<br />
==Setting the scene==<br />
<br />
Before I started this process, I'd partitioned my MacBook in two using [http://www.apple.com/macosx/bootcamp/ Boot Camp] for Mac OS X. This gave me a 10G Windows partition and the rest as a Mac OS X partition.<br />
<br />
==Step 1 - Partition the disk==<br />
<br />
Later, when I decided to install Arch, I resized the Windows partition to make room. I used [http://www.terabyteunlimited.com/bootitng.html BootIt NG] from Terabyte Unlimited. If closed source software makes you uneasy, use parted. Whatever works.<br />
<br />
If you use BootIt NG, this process is drop dead easy. If you use parted, you're on your own. :-P<br />
<br />
==Step 2 - Wonder if your keyboard is broken==<br />
<br />
After you boot the Arch installation CD-ROM, you will probably find that every letter you type has a long delay, and then comes out double!!! After much Googling, I found [http://wiki.debian.org/MacBook this excellent page on the Debian wiki] about the MacBook. As that page says, what you want to do is provide the kernel with the "noapic irqpoll acpi=force" options. At the boot prompt, you'd do this:<br />
<br />
boot: arch noapic irqpoll acpi=force<br />
<br />
Yay, now you can actually run the installer. That's certainly an improvement.<br />
<br />
==Step 3 - The usual installation... or is it?==<br />
<br />
Okay, so just when you think everything's going your way, your ethernet adapter isn't detected. Neither my wireless or wired were detected. There was an eth0 interface, however. Dmesg revealed that to be an IP over 1394 device that takes advantage of Apple's FireWire in the MacBook.<br />
<br />
I found it odd that the FireWire works but the Ethernet doesn't.<br />
<br />
You might be thinking, "But hackmiester! A network connection isn't required for the installation!" However, it IS required if you are like me and have the crappiest Internet link ever, and just want to get a base system going using the FTP install disc.<br />
<br />
Anyway, I wasn't sure how to fix the problem, so I decided to do it the hard way. Here's what I did on another laptop with FireWire:<br />
<br />
<pre><br />
[hackmiester@99-AFZ00 ~]$ dmesg | grep 1394<br />
ieee1394: Initialized config rom entry `ip1394'<br />
ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[11] MMIO=[c0215000-c02157ff] Max Packet=[2048] IR/IT contexts=[4/8]<br />
ieee1394: Host added: ID:BUS[0-00:1023] GUID[00061b032400b0b4]<br />
eth1394: eth2: IEEE-1394 IPv4 over 1394 Ethernet (fw-host0)<br />
</pre><br />
<br />
Hey, looks like I already have eth1394 loaded! (If you don't, just sudo modprobe eth1394 .) According to that line, it's on eth2. So, let's get the configuration for eth2.<br />
<br />
<pre><br />
[hackmiester@99-AFZ00 ~]$ ifconfig eth2<br />
eth2 Link encap:UNSPEC HWaddr 00-06-1B-03-24-00-B0-B4-00-00-00-00-00-00-00-00 <br />
BROADCAST MULTICAST MTU:1500 Metric:1<br />
RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000 <br />
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)<br />
</pre><br />
<br />
It doesn't have an IP or anything. Good. Now we can give it the one we want. I'm gonna use 192.168.10.1 because you probably don't already have that on your network. I didn't.<br />
<br />
<pre><br />
[hackmiester@99-AFZ00 ~]$ sudo ifconfig eth2 192.168.10.1 netmask 255.255.255.0 broadcast 192.168.10.255<br />
[hackmiester@99-AFZ00 ~]$ ifconfig eth2<br />
eth2 Link encap:UNSPEC HWaddr 00-06-1B-03-24-00-B0-B4-00-00-00-00-00-00-00-00 <br />
inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0<br />
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br />
RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000 <br />
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)<br />
</pre><br />
<br />
OK, now our FireWire network interface has an IP. :D<br />
Now we have to tell that box to be an Internet gateway. My wireless Internet's on eth1. Adjust this if yours isn't.<br />
<br />
<pre><br />
[hackmiester@99-AFZ00 ~]$ sudo iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE<br />
sudo: iptables: command not found<br />
</pre><br />
<br />
Uh... whoopsy.<br />
<br />
<pre><br />
[hackmiester@99-AFZ00 ~]$ sudo pacman -Sy iptables<br />
:: Synchronizing package databases... <br />
current [#################################################################################################################################################] 100% 71K 19.6K/s 00:00:03<br />
:: extra is up to date<br />
:: unstable is up to date<br />
community [#################################################################################################################################################] 100% 151K 25.2K/s 00:00:05<br />
danimoth [#################################################################################################################################################] 100% 2K 14.0K/s 00:00:00<br />
<br />
Targets: iptables-1.3.7-1<br />
<br />
Total Package Size: 0.3 MB<br />
<br />
Proceed with upgrade? [Y/n] <br />
<br />
:: Retrieving packages from current...<br />
iptables-1.3.7-1 [#################################################################################################################################################] 100% 321K 26.6K/s 00:00:12<br />
<br />
checking package integrity... done.<br />
loading package data... done.<br />
checking for file conflicts... done.<br />
installing iptables... done.<br />
[hackmiester@99-AFZ00 ~]$ sudo /etc/rc.d/iptables start<br />
Cannot load iptables rules: /etc/iptables/iptables.rules is missing!<br />
</pre><br />
<br />
Dammit! More problems!<br />
<br />
<pre><br />
[hackmiester@99-AFZ00 ~]$ sudo cp /etc/iptables/empty.rules /etc/iptables/iptables.rules<br />
</pre><br />
<br />
THERE. Now we have a basic iptables configuration in place. So let's start up iptables and configure it to forward packets and stuff.<br />
<br />
<pre><br />
[hackmiester@99-AFZ00 ~]$ sudo modprobe ip_tables<br />
[hackmiester@99-AFZ00 ~]$ sudo modprobe iptable_filter<br />
[hackmiester@99-AFZ00 ~]$ sudo /etc/rc.d/iptables start<br />
:: Starting IP Tables [done]<br />
[hackmiester@99-AFZ00 ~]$ sudo iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE<br />
[hackmiester@99-AFZ00 ~]$ sudo iptables --append FORWARD --in-interface eth2 -j ACCEPT<br />
# (not finished yet)<br />
</pre><br />
<br />
We should now be forwarding packets. To test this, I plugged the MacBook into the FireWire cable and gave it an IP. Then I tried to connect to the Internet.<br />
<br />
(not finished yet)</div>Anthonyclark