https://wiki.archlinux.org/api.php?action=feedcontributions&user=Nephyrin&feedformat=atomArchWiki - User contributions [en]2024-03-28T18:24:44ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=MacBookPro11,x&diff=354266MacBookPro11,x2014-12-29T18:25:09Z<p>Nephyrin: Add workaround for sd card reader vanishing after suspend</p>
<hr />
<div>[[Category:Apple]]<br />
{{Related articles start}}<br />
{{Related|Installation guide}}<br />
{{Related|Beginners' guide}}<br />
{{Related|General Recommendations}}<br />
{{Related|MacBookPro10,x}}<br />
{{Related|MacBook}}<br />
{{Related articles end}}<br />
<br />
This wiki page should help you in getting your MacBook Pro (Late 2013) to work with Arch Linux.<br />
== Preparing for the Installation ==<br />
<br />
=== Preparing the hard drive ===<br />
<br />
Assuming you want to dual boot with OS X, so you can update firmware, you have to shrink its partition with Disk Utility. You can either create a HFS+ partition now to override later, or leave it empty.<br />
<br />
== Installation ==<br />
<br />
=== Booting the live image ===<br />
<br />
Now, download the latest [[Archboot]] ISO, write it to USB, and boot from it by selecting it in the Apple boot loader by holding {{ic|Alt}} on boot (use rEFIt if you cannot manage to select it). If you are using a kernel before 3.13 when it comes to the syslinux boot loader, press {{ic|Tab}} to edit the entry and append {{ic|nomodeset}} to fix screen corruption, do not use nomodeset for kernel 3.13 and above, it is not needed anymore (and it will break vaapi).<br />
<br />
=== Console ===<br />
<br />
Unless you are blessed with extraordinary eyesight, the console font on a retina display will be too tiny to comfortably use. For a more legible version, do:<br />
<br />
$ setfont sun12x22<br />
<br />
=== Internet ===<br />
<br />
{{Note|You can skip this if you use the Thunderbolt or USB-to-Ethernet adapter for the installation.}}<br />
<br />
==== Wireless ====<br />
<br />
As mentioned below, {{ic|broadcom-wl}} is sufficient if you are using the Linux mainline kernel. For custom kernels, you need to use {{ic|broadcom-wl-dkms}}. Both are available from the [[AUR]]. The easiest way to get Wi-Fi connectivity during install is to build the package driver on a separate system. Note that it does have to be built against the exact same kernel version as used by the installer, and this may differ from the latest version. If built against the wrong kernel you may encounter an error ''(ERROR: could not insert 'wl': Invalid argument)'' upon modprobe. Build the package as follows:<br />
$ curl -O https://aur.archlinux.org/packages/br/broadcom-wl-dkms/broadcom-wl-dkms.tar.gz<br />
$ tar -zxvf broadcom-wl-dkms.tar.gz<br />
$ cd broadcom-wl-dkms<br />
$ makepkg -s<br />
This will give you a package ({{ic|broadcom-wl-*.pkg.tar.xz}}) which can be installed using [[pacman]]. Put this package on a USB drive, mount it, and install the package using:<br />
# pacman -U broadcom-wl-*.pkg.tar.xz<br />
# modprobe wl<br />
during install.<br />
You may now use {{ic|wifi-menu}} to connect to your network of choice. <br />
<br />
{{Note|You need to repeat this process when you have finished your installation and booting into the system for the first time. If kernel versions differ, you may want to ensure to install a number of essential packages while you have connectivity and before you boot into your system , <br />
these alow you to build the broadcom driver again and connect (provided you put the AUR tarball for the driver on USB drive too):<br />
{{Pkg|dkms}},{{Pkg|wpa_supplicant}}, {{Pkg|dhcpcd}} ({{Pkg|dialog}} and {{Pkg|netctl}} are needed if you want to use {{ic|wifi-menu}} again after you boot)}}<br />
<br />
=== The installation ===<br />
<br />
<br />
Run the installation wizard. Just kidding. You might want to take a look at the [[Beginner's guide]] and become a wizard at standard Arch installs first.<br />
<br />
=== Bootloader ===<br />
<br />
{{Note|Refer to the [[MacBook]] page if you do not want to have a separate partition for GRUB but rather prefer to use [http://www.rodsbooks.com/refind/ rEFInd] (or [[MacBook#rEFIt|rEFIt]]).}}<br />
<br />
{{Tip|If you want to use the native MacBook bootloader, you need an extra partition of at least 128 MiB.}}<br />
<br />
==== Using the MacBook's native EFI bootloader (recommended) ====<br />
<br />
===== Method 1: creating an extra apple-format bootable partition with GRUB =====<br />
<br />
This method uses the MacBook's native EFI bootloader, i.e. the one the can be reached when holding the alt-key during boot. For additional info, see [[GRUB EFI Examples#Apple Mac EFI systems]].<br />
<br />
{{Note|For this method you need an extra partition of at least 128 MiB. This partition will be used by the MacBook's native bootloader to launch Arch. It also assumes that you are dual-booting OS X and Arch.}}<br />
{{Note|It's possible to avoid the HFS+ partition by using FAT32, this way you can do all the bootloader stuff right from the LiveCD.}}<br />
<br />
At the end of the Arch Linux install process we would normally install GRUB (or a variation) to a partition on the drive. For this method we will place a {{ic|boot.efi}} file on an extra partition used by the MacBook's native bootloader.<br />
<br />
First, [[pacman|install]] the {{Pkg|grub}} package from the [[official repositories]]. Make sure to follow the steps for setting up grub on a partition using the {{ic|grub-install}} and {{ic|grub-mkconfig}} commands, like normal. We will use the config file that {{ic|grub-mkconfig}} creates to generate a standalone {{ic|boot.efi}} file using the {{ic|grub-mkstandalone}} command, then we will wipe your just-created grub partition and set it up for Mac's native bootloader (or you can simply create a new partition and leave the grub partition alone, it's up to you). Now, let's do it.<br />
<br />
When generating a grub config file, GRUB looks to {{ic|/etc/default/grub}} for its configuration. Edit the parameter {{ic|GRUB_CMDLINE_LINUX_DEFAULT}} to look something like this:<br />
{{bc|<br />
<nowiki><br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet rootflags=data=writeback libata.force=noncq"<br />
</nowiki><br />
}}<br />
<br />
The {{ic|1=libata.force=noncq}} parameter will prevent SSD lockups and the {{ic|rootflags}} option is used for SSD-performance.<br />
<br />
{{Note|Do not use the {{ic|rootflags}} option on Btrfs. It is not supported.}}<br />
<br />
Now we generate the {{ic|boot.efi}} file (in our current working directory):<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
# grub-mkstandalone -o boot.efi -d /usr/lib/grub/x86_64-efi -O x86_64-efi /boot/grub/grub.cfg<br />
<br />
Put this file on a USB (or other OS X accessible media) and reboot into OS X.<br />
<br />
Launch {{ic|DiskUtility.app}} and reformat the extra partition (or just make a new one) as HFS+ (in the "Erase" tab of Disk Utility), mount it, then create the following directory structure and file:<br />
$ mount -t hfs /dev/diskXsY <Path to root of extra partition><br />
$ mkdir -p <Path to root of extra partition>/System/Library/CoreServices<br />
$ touch <Path to root of extra partition>/mach_kernel<br />
<br />
where {{ic|diskXsy}} is the disk your partition is on (e.g. disk0s1). You can use {{ic|diskutil list}} to list your disks and partitions.<br />
<br />
Copy the {{ic|boot.efi}} file to the {{ic|<Path to extra partition>/System/Library/CoreServices/}} directory. Using your editor of choice, create a {{ic|SystemVersion.plist}} file in the CoreServices directory, which is located here:<br />
''<path to extra partition>''/System/Library/CoreServices/SystemVersion.plist<br />
<br />
Edit that file to look like this:<br />
{{bc|<br />
<nowiki><br />
<?xml version="1.0" encoding="utf-8"?><br />
<plist version="1.0"><br />
<dict><br />
<key>ProductBuildVersion</key><br />
<string></string><br />
<key>ProductName</key><br />
<string>Linux</string><br />
<key>ProductVersion</key><br />
<string>Arch Linux</string><br />
</dict><br />
</plist><br />
</nowiki><br />
}}<br />
<br />
{{Note|It's possible to do the above modifications to/on the extra partition from within Linux (if you've installed the proper HFS tools), but the following bless commands have to be executed from within OS X.}}<br />
<br />
The last step is then to bless (make bootable) the extra partition (as root):<br />
# bless --folder=<Path to root of extra partition> --file=<Path to root of extra partition>/System/Library/CoreServices/boot.efi --setBoot<br />
# bless --mount=<Path to root of extra partition> --file=<Path to root of extra partition>/System/Library/CoreServices/boot.efi --setBoot<br />
<br />
{{Note|It might not be necessary to execute both commands, but to be sure it worked it won't do any harm to execute both.}}<br />
<br />
{{Note|In order to change grub settings both {{ic|grub.cfg}} and {{ic|boot.efi}} will have to be generated. This can be done from in Linux, without booting OS X.}}<br />
<br />
Generate {{ic|grub.cfg}} and {{ic|boot.efi}} from Arch Linux:<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
# mount -t hfsplus -o force,rw /dev/sdXY /mnt # mount the HFS+ partition<br />
# grub-mkstandalone -o /mnt/System/Library/CoreServices/boot.efi -d /usr/lib/grub/x86_64-efi -O x86_64-efi /boot/grub/grub.cfg<br />
<br />
===== Method 2: Using the default EFI System Partition with Grub =====<br />
{{Stub|Coming this weekend...}}<br />
<br />
==== Direct EFI booting (rEFInd) ====<br />
<br />
''See: [[UEFI_Bootloaders]]''<br />
<br />
As of August 2013, refind can automatically detect the Arch kernel, removing the need for copying the kernel into the EFI partition. Simply install refind without the EFI file system drivers [http://forums.gentoo.org/viewtopic-t-967024-start-0.html] using the {{ic|--nodrivers}} option [https://bbs.archlinux.org/viewtopic.php?pid=1348145#p1348145], and enable the {{ic|scan_all_linux_kernels}} and {{ic|also_scan_dirs}} options in {{ic|refind.conf}} (see link above for instructions.).<br />
<br />
An alternative way is to omit all the scans and put the following bootentry at the end of your "refind.conf":<br />
menuentry "Arch" {<br />
icon EFI/refind/icons/os_arch.icns <br />
volume <Volume label><br />
ostype Linux<br />
loader /boot/vmlinuz-linux<br />
initrd /boot/initramfs-linux.img<br />
options "rw root=/dev/<arch partition> rootfstype=<filesystem type> libata.force=noncq"<br />
}<br />
Don't forget to replace the angle brackets with your data.<br />
<br />
==== GRUB (with OS X) ====<br />
<br />
Another solution is to install [[GRUB]]. Edit {{ic|/tmp/install/boot/grub/grub.cfg}} and edit the boot entry to load Linux mainline instead of the normal one.<br />
<br />
{{Note|{{ic|1=libata.force=noncq}} helps with hangs due to SSD speed.}}<br />
<br />
Now cd into {{ic|/tmp/install/}} and create the GRUB image by running:<br />
grub-mkstandalone -o bootx64.efi -d usr/lib/grub/x86_64-efi -O x86_64-efi -C xz boot/grub/grub.cfg<br />
This will create file called {{ic|boot64.efi}} which contains GRUB and the configuration file incorporated inside. It is important to {{ic|cd}} into the right directory to make it pick up the configuration file and put it into the right place within the image.<br />
<br />
Copy this file to the MacBook's EFI partition. The downside of this method is that you need to repeat this step whenever you want to change the GRUB config. Reboot the machine and you should be able to select your installed Arch Linux by keeping the {{ic|Alt}} button pressed. It should appear as {{ic|EFI boot}}.<br />
<br />
To generate a nicer config use: {{ic|grub-mkconfig}}, remove {{ic|quiet}} if you like the text, then to update your GRUB post-installation, do this to make the GRUB EFI file and put it in the EFI partition:<br />
cd /<br />
grub-mkstandalone -o bootx64.efi -d usr/lib/grub/x86_64-efi -O x86_64-efi -C xz boot/grub/grub.cfg<br />
sudo mount /dev/sda1 /mnt<br />
sudo cp bootx64.efi /mnt/EFI/boot/bootx64.efi<br />
<br />
{{note|You'll need {{ic|hfsprogs}} to run the above commands}}<br />
<br />
== Post installation ==<br />
<br />
=== Console ===<br />
<br />
Largest console font (although ugly) achieved by adding {{ic|1=FONT=sun12x22}} to {{ic|/etc/vconsole.conf}}<br />
It is still tiny but is at least readable.<br />
<br />
=== Graphics ===<br />
<br />
MacBook Pro 11,1<br />
* Intel works on 3.12 with nomodeset<br />
* Intel works from 3.13.4-1-ARCH<br />
MacBook Pro 11,2<br />
* Intel works from 3.13.4-1-ARCH<br />
MacBook Pro 11,3<br />
* Nvidia works (both 319.60 and 331.17 drivers)<br />
** Follow http://cberner.com/2013/03/01/installing-ubuntu-13-04-on-macbook-pro-retina/<br />
* Intel works after patching grub, see below<br />
<br />
See [[HiDPI]] for information on how to tweak the system for a Retina screen.<br />
<br />
If you are using [[Xfce]], you will probably experience tearing in Firefox, VLC, etc. Until newer versions of xfwm support OpenGL rendering, use another compositing window manager like [[compton]] with {{ic|1=backend = "glx"}}.<br />
<br />
==== Getting the integrated intel card to work on 11,3 ====<br />
<br />
By default the integrated card is powered off. To fix this we need a grub function called "apple_set_os". This function hasn't oficially been merged yet, so we need to build grub ourselves. Download the {{AUR|grub-git}} package from the AUR. Using something like:<br />
<br />
$ packer -G grub-git<br />
$ cd grub-git<br />
<br />
Get the patch from here: http://lists.gnu.org/archive/html/grub-devel/2013-12/msg00442.html<br />
<br />
Put the patch contents into a file labeled something like "apple.patch"<br />
<br />
Add this patch to your PKGBUILD and run:<br />
<br />
$ makepkg -si<br />
<br />
Reboot into OS X and download gfxCardStatus v2.2.1 (newer versions do not work properly) run the app and specify the integrated card.<br />
<br />
Reboot and at the grub prompt typ 'c' to get into console, followed by "apple_set_os" at the prompt.<br />
<br />
You should now be able to install {{Pkg|xf86-video-intel}} and get your card running.<br />
<br />
Note that the HDMI port and MiniDP are soldered to the nvidia card meaning that to run external displays you need to use the dedicated card.<br />
<br />
=== Sound ===<br />
<br />
* Headphones work<br />
* Speakers work from kernel 3.13 and 3.12.2. 3.12.1 only with patch<br />
** Patch: https://bugzilla.kernel.org/attachment.cgi?id=114081.<br />
** See discussion here: https://bugzilla.kernel.org/show_bug.cgi?id=64401<br />
* Optical audio can be turned off and on with above sound patch.<br />
<br />
If you do not want to hear the annoying sound at system start-up, one way to get rid of it is to turn sound off while under Mac OS.<br />
<br />
Volume keys can be made to work with {{ic|xfce4-volumed}} (if you are using Xfce).<br />
<br />
Also, if you are using PulseAudio, sometimes it thinks HDMI is the default sound card; to solve this problem, install {{pkg|pavucontrol}} and set Analog Stereo as the fallback device.<br />
<br />
=== Touchpad ===<br />
<br />
One method is to install {{pkg|xf86-input-synaptics}} and configure to your liking in {{ic|/etc/X11/xorg.conf.d/50-synaptics.conf}}:<br />
Section "InputClass"<br />
MatchIsTouchpad "on"<br />
Identifier "touchpad catchall"<br />
Driver "synaptics"<br />
# 1 = left, 2 = right, 3 = middle<br />
Option "TapButton1" "1" <br />
Option "TapButton2" "3"<br />
Option "TapButton3" "2"<br />
# Palm detection<br />
Option "PalmDetect" "1"<br />
# Horizontal scrolling<br />
Option "HorizTwoFingerScroll" "1"<br />
# Natural Scrolling (and speed)<br />
Option "VertScrollDelta" "-100"<br />
Option "HorizScrollDelta" "-100"<br />
EndSection<br />
<br />
==== Ctrl-Click as Right-Click ====<br />
<br />
Using this SuperUser receipt [http://superuser.com/questions/217615/how-to-right-click-using-the-keyboard-from-ubuntu-on-a-mac] I got Ctrl-click working as right-click. I had to increase the sleep time to 0.1 though.<br />
<br />
=== Keyboard backlight ===<br />
<br />
* Works, see [[MacBook#Keyboard_Backlight]]<br />
* On KDE the backlight and the increse/decrese brightness keys work fine, but they need upower to start before the desktop. To do this create the file {{ic|/etc/systemd/system/kdm.service.d/kbd_backlight.conf}} with this content (you might need to create the directory as well)<br />
[Unit]<br />
Requires=upower.service<br />
After=upower.service<br />
<br />
=== Screen backlight ===<br />
<br />
* Intel, works on Linux 3.13<br />
* Framebuffer, works for MacBook Pro 11,1 and 11,3 via {{ic|/sys/class/backlight/gmux_backlight/brightness}}.<br />
* Nvidia, does not work using default settings. Try adding {{ic|1=setpci -v -H1 -s 00:01.00 BRIDGE_CONTROL=0}} to {{ic|/etc/rc.local}}.<br />
{{note|If the screen doesn't show the prompt or the login manager (i.e. a black screen), append {{ic|1=i915.invert_brightness=1}} to the kernel. }}<br />
<br />
=== Suspend ===<br />
<br />
* Works on MacBook Pro 11,2 with Linux 3.13<br />
* No backlight after suspend with Linux 3.12<br />
** Use hibernate instead<br />
<br />
=== SD Card Reader ===<br />
<br />
* Disappears sporadically after suspend as of Linux 3.18. Workaround is to create {{ic|/etc/modprobe.d/xhci-reset-on-suspend.conf}} with:<br />
# Reset XHCI USB devices on suspend/resume, fixes SD Card reader vanishing after suspend <br />
options xhci_hcd quirks=0x80<br />
<br />
== What does not work ==<br />
<br />
Updated 2013-12-07<br />
<br />
=== General ===<br />
<br />
=== Wi-Fi ===<br />
<br />
* {{AUR|broadcom-wl}} or {{AUR|broadcom-wl-dkms}} from the [[AUR]] works<br />
** Stability is an issue for some<br />
<br />
=== Web cam ===<br />
<br />
* Listed on PCI bus as: Multimedia controller: Broadcom Corporation Device 1570.<br />
* In OS X, the camera is listed as FaceTime HD camera 1570.<br />
* No known Linux driver. [https://bugzilla.kernel.org/show_bug.cgi?id=71131 Kernel.org Bug]<br />
<br />
== Discussions ==<br />
<br />
* https://bbs.archlinux.org/viewtopic.php?id=171883<br />
<br />
== See also ==<br />
<br />
* [[MacBookPro10,x]]<br />
* [[MacBook]]</div>Nephyrinhttps://wiki.archlinux.org/index.php?title=Prelink&diff=129328Prelink2011-01-29T11:20:55Z<p>Nephyrin: Add a warning about glibc-2.13. I just got done recovering a hosed install from 2.13 + prelink, see the mentioned link for more info</p>
<hr />
<div>{{Warning|On systems with glibc 2.13, prelink has been reported to prevent all dynamic executables from starting, rendering the system unbootable. Use prelink on glibc 2.13 with caution. See discussion at <nowiki>https://bbs.archlinux.org/viewtopic.php?pid=884465</nowiki> }}<br />
==Method==<br />
Most programs require libraries to function. Libraries can be integrated into a program once, by a linker, when it is compiled (static linking) or they can be integrated when the program is run by a loader, (dynamic linking). Dynamic linking has advantages in code size and management, but every time a program is run, the loader needs to find the relevant libraries. Because the libraries can move around in memory, this causes a performance penalty, and the more libraries that need to be resolved, the greater the penalty. prelink reduces this penalty by using the system's dynamic linker to reversibly perform this linking in advance ("prelinking" the executable file) by relocating. Afterward, the program only needs to spend time finding the relevant libraries on being run if, for some reason (perhaps an upgrade), the libraries have changed since being prelinked.<br />
==Installing==<br />
Prelink is available through pacman<br />
pacman -S prelink<br />
<br />
==Configuration==<br />
All settings are in /etc/prelink.conf<br />
<br />
==Usage==<br />
===Prelinking===<br />
On 32-bit setups:<br />
# prelink -amR<br />
<br />
On 64-bit setups:<br />
# prelink -aR<br />
<br />
===Removing prelink===<br />
# prelink -au</div>Nephyrinhttps://wiki.archlinux.org/index.php?title=Mirrors&diff=118340Mirrors2010-09-29T17:25:26Z<p>Nephyrin: Add the pointysoftware.net mirror to the unofficial list (see https://bugs.archlinux.org/task/20736)</p>
<hr />
<div>[[Category:About Arch (English)]] [[Category:Package management (English)]] [[Category:HOWTOs (English)]]<br />
{{i18n|Mirrors}}<br />
{{Article summary start|Summary}}<br />
{{Article summary text|Updating and managing package mirrors}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|pacman}}<br />
{{Article summary wiki|reflector}}<br />
{{Article summary end}}<br />
<br />
This page is a guide to selecting and configuring your mirrors, and a listing of current available mirrors.<br />
<br />
== Enabling a specific mirror ==<br />
<br />
To enable mirrors, open {{filename|/etc/pacman.d/mirrorlist}} and locate your geographic region. Uncomment mirrors you would like to use.<br />
{{Note | archlinux.org bandwidth is [http://www.archlinux.org/news/302/ capped at 50KB/s]}} Example:<br />
<br />
# Any<br />
# Server = <nowiki>ftp://mirrors.kernel.org/archlinux/$repo/os/i686</nowiki><br />
'''Server = <nowiki>http://mirrors.kernel.org/archlinux/$repo/os/i686</nowiki>'''<br />
<br />
See [[#Mirror status]] and [[#List by speed]] for tools that help choosing mirrors.<br />
<br />
{{Tip|Uncomment 5 favorite mirrors and place them at the top of the mirrorlist file. That way it's easy to find them and move them around if the first mirror on the list has problems. It also makes merging mirrorlist updates easier.}}<br />
<br />
It is also possible to specify mirrors in {{Filename|/etc/pacman.conf}}. For the ''[core]'' repository, the default setup is:<br />
[core]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
To use the ''HostEurope'' mirror as a default mirror, add it before the {{codeline|Include}} line:<br />
[core]<br />
'''Server = <nowiki>ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/i686</nowiki>'''<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
pacman will now try to connect to this mirror first. Proceed to do the same for ''[testing]'', ''[extra]'', and ''[community]'', if applicable.<br />
<br />
{{Note|If mirrors have been stated directly in {{filename|pacman.conf}}, remember to use the same mirror for all repositories. Otherwise packages that are incompatible to each other may be installed, like kernel26 from ''[core]'' and an older kernel module from ''[extra]''.}}<br />
<br />
==Mirror status==<br />
Check the status of the Arch mirrors and how updated they are by visiting http://www.archlinux.de/?page=MirrorStatus.<br />
<br />
Optionally install {{package Official|reflector}}, an utility that generates a mirrorlist using Mirrorcheck's list. reflector is available in the community repo.<br />
<br />
# pacman -S reflector<br />
<br />
Or manually check how up-to-date a mirror is by:<br />
#picking a server and browsing to "extra/os/";<br />
#accesing http://www.archlinux.org/ in another browser tab or window; and<br />
#comparing the last-modified date of the {{filename|i686}} directory on the mirror to the ''[extra]'' date on the homepage, in the ''Package Repositories'' box to the right.<br />
<br />
==Sorting mirrors==<br />
If not using reflector, which has the ability to sort mirrors by both how updated they are and their speed, follow this demonstration of manual mirror sorting.<br />
<br />
===List by speed===<br />
Don't forget to take full advantage of using the local fastest mirror, which can be determined via the included bash script, {{filename|/usr/bin/rankmirrors}}.<br />
<br />
Use {{codeline|cd}} to switch to the {{filename|/etc/pacman.d}} directory:<br />
# cd /etc/pacman.d<br />
<br />
Backup the existing {{Filename|/etc/pacman.d/mirrorlist}}:<br />
# cp mirrorlist mirrorlist.backup<br />
<br />
Edit {{filename|mirrorlist.backup}} and uncomment mirrors for testing with rankmirrors:<br />
# nano mirrorlist.backup<br />
<br />
Optionally run the following {{codeline|sed}} line to uncomment every mirror:<br />
# sed '/^#\S/ s|#||' -i mirrorlist.backup<br />
<br />
Finally, rank the mirrors. Operand {{codeline|-n 6}} means only output the 6 fastest mirrors: <br />
# rankmirrors -n 6 mirrorlist.backup > mirrorlist<br />
<br />
'''Force pacman to refresh the package lists'''<br><br />
After creating/editing {{Filename|/etc/pacman.d/mirrorlist}}, (manually or by using {{codeline|rankmirrors}}) issue the following command:<br />
# pacman -Syy<br />
<br />
{{Tip|Passing two {{codeline|--refresh}} or {{codeline|-y}} flags forces pacman to refresh all package lists even if they are considered to be up to date. Issuing {{codeline|pacman -Syy}} ''whenever changing to a new mirror'' is good practice and will avoid possible issues.}}<br />
<br />
===Combined listing by speed and status===<br />
It is not a good idea to just use the fastest mirrors, since the fastest mirrors might be out of date. The preferred way would be to use [[#List by speed]], then sorting those 6 fastest mirrors by their [[#Mirror status]]. <br />
<br />
Simply visit either one or both [[#Mirror status]] links and sort them by the ones that are more up to date. Move the more up to date mirrors to the top of {{Filename|/etc/pacman.d/mirrorlist}} and if the mirrors are way out of date simply don't use those; repeat the process leaving out the outdated mirrors. So this ends up with a total of 6 mirrors that are sorted by speed and status, leaving out outdated mirrors. <br />
<br />
When having mirror issues the above should be repeated. Or repeat once in a while even if not having mirror problems, to keep {{Filename|/etc/pacman.d/mirrorlist}} up to date.<br />
<br />
==== using reflector ====<br />
You can obtain reflector from the community repository:<br />
# pacman -S reflector<br />
<br />
It's recommended to have a backup of the mirrorlist:<br />
# mv /etc/pacman.d/mirrorlist{,backup}<br />
<br />
You can use reflector like this to retrieve the latest mirrorlist from the [https://www.archlinux.de/?page=MirrorStatus MirrorStatus] page, filter the 8 most up-to-date mirrors, sort them by speed and overwrite the file /etc/pacman.d/mirrorlist:<br />
# reflector -l 8 -r -o /etc/pacman.d/mirrorlist<br />
<br />
==Official mirrors==<br />
The official Arch Linux mirror list is available from the {{Package Official|pacman-mirrorlist}} package. To get an even more up-to-date list of mirrors, use the [http://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator] page on the main site.<br />
<br />
In the unlikely scenario that you are without any configured mirrors and <tt>pacman-mirrorlist</tt> is not installed:<br />
<br />
<pre># wget -O /etc/pacman.d/mirrorlist http://www.archlinux.org/mirrorlist/all/</pre><br />
<br />
Be sure to uncomment a preferred mirror as described above, then:<br />
<br />
# pacman -Syy<br />
# pacman -Sf pacman-mirrorlist<br />
<br />
If you want your mirror to be added to the official list, file a feature request. In the meantime, add it to the [[#Unofficial mirrors]] list at the end of this page.<br />
<br />
If you get an error stating that the $arch variable is used but not defined, add to your pacman.conf:<br />
<pre>Architecture = x86_64</pre><br />
<br />
==Unofficial mirrors==<br />
These mirrors are ''not'' listed in {{Filename|/etc/pacman.d/mirrorlist}}.<br />
<br />
===Global===<br />
*http://prdownloads.sourceforge.net/archlinux/ - ''Doesn't have recent ISO releases. Use it only if for getting older ISOs.''<br />
<br />
===Belarus===<br />
*ftp://mirror.datacenter.by/pub/archlinux/ <sub>[http://mirror.datacenter.by/pub/archlinux/ http]</sub> <sub>rsync://mirror.datacenter.by/arch/</sub><br />
*ftp://ftp.byfly.by/pub/archlinux/ <sub>[http://ftp.byfly.by/pub/archlinux/ http]</sub> <sub>rsync://ftp.byfly.by/ftp/pub/archlinux/</sub><br />
*http://linux.solo.by/archlinux/<br />
<br />
===Bulgaria===<br />
*http://mirror.telepoint.bg/archlinux/ <br />
*ftp://mirror.telepoint.bg/archlinux/<br />
*http://archlinux.igor.onlinedirect.bg/ - <sub>[http://archlinux.igor.onlinedirect.bg http]</sub><br />
*ftp://archlinux.igor.onlinedirect.bg/linux/archlinux/ - <sub>[http://archlinux.igor.onlinedirect.bg http]</sub><br />
<br />
===China===<br />
# CERNET<br />
*http://mirror.bjtu.edu.cn/archlinux/<br />
*http://ftp.sjtu.edu.cn/pub/mirror2/www.archlinux.org/<br />
*http://ftp.sjtu.edu.cn/pub/mirror3/www.archlinux.org/<br />
*http://ftp.sjtu.edu.cn/pub/mirror4/www.archlinux.org/<br />
<br />
# CHINA TELECOM<br />
*http://mirrors.163.com/archlinux/<br />
*http://mirror.lupaworld.com/archlinux/<br />
<br />
# CHINA UNICOM<br />
*http://mirrors.sohu.com/archlinux/<br />
*ftp://xde.gooth.cn/<br />
<br />
===Czech Republic===<br />
*ftp://ftp.sh.cvut.cz/MIRRORS/arch - <sub>[http://ftp.sh.cvut.cz/MIRRORS/arch/ http]</sub><br />
<br />
===Germany===<br />
*ftp://ftp.uni-erlangen.de/mirrors/archlinux/ - <sub>[http://ftp.uni-erlangen.de/mirrors/archlinux/ http]</sub><br />
*ftp://mirror.das-iro.de/archlinux/ - <sub>[http://mirror.das-iro.de/archlinux/ http]</sub><br />
<br />
===Great Britain===<br />
*ftp://mirror.lividpenguin.com/pub/archlinux/ - <sub>[http://mirror.lividpenguin.com/pub/archlinux/ http]</sub><br />
<br />
===Indonesia===<br />
*http://archlinux.idrepo.or.id/archlinux/ - <sub>[http://archlinux.idrepo.or.id/archlinux/ http]</sub><br />
*http://bali.idrepo.or.id/archlinux/ - <sub>[http://bali.idrepo.or.id/archlinux/ http]</sub><br />
*http://madura.idrepo.or.id/archlinux/ - <sub>[http://madura.idrepo.or.id/archlinux/ http]</sub><br />
*http://sulawesi.idrepo.or.id/archlinux/ - <sub>[http://sulawesi.idrepo.or.id/archlinux/ http]</sub><br />
*http://sumbawa.idrepo.or.id/archlinux/ - <sub>[http://sumbawa.idrepo.or.id/archlinux/ http]</sub><br />
*http://mirror.kavalinux.com/archlinux/ - <sub>[http://mirror.kavalinux.com/archlinux/ http]</sub> ''only from indonesia''<br />
*http://kambing.ui.ac.id/archlinux/ - <sub>[http://kambing.ui.ac.id/archlinux/ http]</sub><br />
<br />
===Malaysia===<br />
*http://mirror.oscc.org.my/archlinux/<br />
*http://mirrors.inetutils.net/archlinux/ - ''ISO and Core''<br />
<br />
===New Zealand===<br />
*http://mirror.ihug.co.nz/archlinux/<br />
*http://mirror.ece.auckland.ac.nz/archlinux/<br />
<br />
===Norway===<br />
*http://power.klette.us/mirror/<br />
<br />
===Poland===<br />
*ftp://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/archlinux/ - <sub>[http://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/archlinux/ http]</sub> - ''Up-to-date, but no [core] repository''<br />
<br />
===Russia===<br />
*http://hatred.homelinux.net/archlinux/ - ''Vladivostok, without iso, with <sub>[http://hatred.homelinux.net/wiki/proekty:3spy:start 3SPY]</sub> project repos and [http://hatred.homelinux.net/archlinux/mingw32/os/i686 '''mingw32'''] repo''<br />
*ftp://opgsff.info - ''Zelenograd''<br />
<br />
===South Africa===<br />
*http://archlinux.mirror.ac.za/ - ''TENET Mirror''<br />
*ftp://archlinux.mirror.ac.za/<br />
*http://ftp.sun.ac.za/ftp/pub/mirrors/archlinux/ - ''Stellenbosch University''<br />
*ftp://ftp.sun.ac.za/pub/mirrors/archlinux/<br />
*http://ftp.leg.uct.ac.za/pub/linux/arch/ - ''University of Cape Town''<br />
*ftp://ftp.leg.uct.ac.za/pub/linux/arch/<br />
<br />
===Spain===<br />
*ftp://ftp.udc.es/mirror/archlinux/ - <sub>[http://ftp.udc.es/mirror/archlinux/ http]</sub> <sub>rsync://ftp.udc.es/mirror/archlinux/</sub><br />
<br />
===United States===<br />
*http://archlinux.linuxfreedom.com - ''Contains all of the ISO images''<br />
*ftp://mirrors.acm.jhu.edu/arch/ - <sub>[http://mirrors.acm.jhu.edu/arch http]</sub> <sub>rsync://mirrors.acm.jhu.edu/arch/</sub><br />
*ftp://ftp.osuosl.org/pub/archlinux/ - <sub>[http://ftp.osuosl.org/pub/archlinux/ http]</sub> <sub>rsync://ftp.osuosl.org/archlinux/</sub><br />
*http://mirror.pointysoftware.net/archlinux/<br />
<br />
==IPv6-ready mirrors==<br />
*http://power.klette.us/mirror/ (Norway)<br />
*http://arch.iskrembilen.com/ (Norway, rsync available)<br />
*niue.belnet.be (Belgium)<br />
*ftp.estpak.ee (Estonia)<br />
*ftp.free.fr (France)<br />
*patroklos.noc.ntua.gr (Greece)<br />
*ftp.heanet.ie (Ireland)<br />
*ftp.nluug.nl (Netherlands)<br />
*ftp.surfnet.nl (Netherlands)<br />
*ftp.sixnix.net/ftp6.sixnix.net (Finland) - dead<br />
*http://mirror6.bjtu.edu.cn/archlinux (China)<br />
*http://mirrors.inetutils.net/archlinux/ (Malaysia)<br />
<br />
==Troubleshooting==<br />
<br />
===Out-of-sync mirrors: corrupted packages/file not found===<br />
<!-- Here or [[pacman]]? Seems like a mirror issue more than pacman... --><br />
Issues regarding out-of-sync mirrors pointed out in [http://www.archlinux.org/news/482/ this news post] may have already been sorted out for most users, but in the event that problems of this nature present themselves again, simply try to see if the packages are present in the [testing] repository.<br />
<br />
After having synced with {{Codeline|pacman -Sy}}, use this command:<br />
# pacman -Ud $(pacman -Sup | tail -n +2 | sed -e 's,/\(core\|extra\)/,/testing/,' \<br />
-e 's,/\(community\)/,/\1-testing/,')<br />
<br />
Doing so could help in any occasion were packages in the mirror haven't been synced to [core/extra], and are still residing in [testing]. It is perfectly safe to install from [testing] in this case since the packages are being matched by version and release numbers.<br />
<br />
In any event, it is best to switch mirrors and sync with {{Codeline|pacman -Syy}} than resorting to an alternate repository. However, all or some of the mirrors may at times be out-of-sync to some degree.<br />
<br />
====Using all mirrors====<br />
To emulate {{Codeline|pacman -Su'}}s behavior of going through the entire mirror list, use this script:<br />
{{File|name=~/bin/pacup|content=<br />
<nowiki><br />
#!/bin/bash<br />
<br />
# Pacman will not exit on the first error. Comment the line below to<br />
# try from [testing] directly.<br />
pacman -Su "$@" && exit<br />
<br />
while read -r pkg; do<br />
if pacman -Ud "$pkg"; then<br />
continue<br />
else<br />
while read -r mirror; do<br />
pacman -Ud $(sed "s,.*\(/\(community-\)*testing/os/\(i686\|x86_64\)/\),$mirror\1," <<<"$pkg") &&<br />
break<br />
done < <(sed -ne 's,^ *Server *= *\|/$repo/os/\(i686\|x86_64\).*,,gp' \<br />
</etc/pacman.d/mirrorlist | tail -n +2 )<br />
fi<br />
done < <(pacman -Sup | tail -n +2 | sed -e 's,/\(core\|extra\)/,/testing/,' \<br />
-e 's,/\(community\)/,/\1-testing/,')<br />
</nowiki><br />
}}</div>Nephyrinhttps://wiki.archlinux.org/index.php?title=Talk:VirtualBox&diff=116906Talk:VirtualBox2010-09-13T04:07:33Z<p>Nephyrin: /* Video Driver Install Bug */ new section</p>
<hr />
<div>The mount command under the guestadditions doesn't seem to work in all conditions, in my case it didn't work and I had to change the command.<br />
<br />
The command is listed as: "mount /media/cdrom" but I had to actually use "mount /dev/cdrom /mount/cdrom" (I used -r but that shouldn't matter).<br />
<br />
[[User:Serpardum|Serpardum]] (Thu, April 13, 2010)<br />
<br />
--<br />
<br />
I really think this article should be cleaned up and simplified. It is a little confusing- specifically the "Using host interface networking" section. I would atempt to do it myself, but I am not super knowlegable about this topic. Even Breaking this into sections with advice on which way would be best to use would be helpful. ~[[User:meskarune|meskarune]] (Fri, June 26, 2009)<br />
<br />
Anybody, any experience with how to use existing vmware virtual machine in virtualbox? I tried, but without success. I'll retry using: http://liquidat.wordpress.com/2007/11/23/howto-transform-a-qemu-image-to-a-virtualbox-image/ and post my findings.<br />
<br />
The main problem I find with this article is that it is not always clear which parts refer to an archlinux host and which to an archlinux guest. I think ideally the whole article should be re-structured to make this super-clear. [[User:maninalift|maninalift]]<br />
<br />
--<br />
<br />
Could someone please update the wiki with instructions on how to install Guest Additions on an Arch Linux virtual machine? I have been trying to figure this one out for a while now and I can't seem to get the proper daemons/modules to install. ~[[User:Thayer.w|Thayer]] (Thursday, 19 July 2007)<br />
:<strike>I'm bumping this again, because the current instructions don't seem to work.</strike> Nevermind, got it working =) ~[[User:Thayer.w|Thayer]] (Weds, Aug 6, 2008)<br />
<br />
--<br />
<br />
== Corrected USB-problem ==<br />
<br />
The fstab entry contains the group-id 85 which can vary on other PCs. I added a possible solution...<br />
=== More USB ===<br />
Can confirm that you can use mass storage USB passthrough with 3.0.4. But you must mount /proc/bus/usb as described in the article for any other types of USB devices such as mice & Blackberries<br />
<br />
For me an entry in the fstab was also necessary to use my USB flash drive in the WinXP guest. But instead of the line in the wiki article I had to use this one: <br />
none /sys/bus/usb/drivers usbfs devgid=108,devmode=664 0 0 (see this thread: http://bbs.archlinux.org/viewtopic.php?pid=640440)<br />
<br />
== Using host interface networking (the Arch way) & udev rules ==<br />
<br />
the wiki ask to set a file called 60-vboxdrv.rules under the directory /etc/udev/rules.d, but when I've tried, a file named 60-virtualbox.rules is already here, with the same setting. I don't know if the name matter, how from where the file come (virtualbox-ose via pacman ? guest addition ?)<br />
<br />
So I report this.<br />
--[[User:Gkrnours|Gkrnours]] 04:38, 13 May 2009 (EDT)<br />
<br />
== vboxdrv module ==<br />
Since Arch uses MODULES_AUTOLAD=yes by default in /etc/rc.conf, is it still mandatory to add vboxdrv in the MODULES array? I don't think so but I'm not totally sure.<br />
<br />
rent0n<br />
<br />
=== Rebuilding ===<br />
My mistake on an article edit, I was running an older virtualbox_bin from AUR. It is now /etc/rc.d/vboxdrv setup, this changed in 3.2.2.<br />
--[[User:VitaminJ|VitaminJ]] 19:09, 2 July 2010 (EDT)<br />
<br />
== vboxusers group ==<br />
It would be nice if someone explained why you might need to add your user to {{Codeline|vboxusers}} group. I did not add my user to this group and everything worked as expected. --[[User:Bhobbit|Bhobbit]] 19:11, 12 April 2010 (EDT)<br />
<br />
== Arch Host vs. Arch Guest ==<br />
<br />
I think the whole article is a bit unclear with regard to instructions for setting up ''VirtualBox on Arch Linux'' and ''Arch Linux in VirtualBox'' - particularly when it comes to obtaining Guest Additions etc. Unless there's really no difference, I think a great improvement would be adding this clarification wherever applicable.<br />
<br />
== Deleted kmod rebuild instructions for VBox pre-3.1.? ==<br />
<br />
I just deleted the instructions for rebuilding the VirtualBox kernel modules for VBox versions before 3.1.?, because they described obsolete versions of VBox and were poorly written. If anyone still wants those instructions around, please <strike>undo that edit ASAP (and then improve the instructions if possible)</strike> re-add them manually. <strike>[[User:Rransom|Rransom]] 15:04, 21 June 2010 (EDT)</strike> [[User:Rransom|Rransom]] 10:32, 22 June 2010 (EDT)<br />
<br />
== Video Driver Install Bug ==<br />
<br />
Hey, I just had this issue setting up an arch VM - it should probably be noted somewhere on this page.<br />
<br />
The installer installs /usr/lib/VBoxOGL.so, then attempts to symlink it to:<br />
/usr/lib/xorg/modules/dri/vboxvideo_dri.so<br />
and<br />
/usr/lib/xorg/modules/drivers/vboxvideo_drv.so<br />
<br />
However, the /drivers/ folder didn't exist for me as I had no other drivers installed, and the installer failed to create it. The guide should probably recommend running "sudo mkdir -pv /usr/lib/xorg/modules/{dri,drivers}" to avoid this</div>Nephyrin