First impressions of Archlinux on a MacBook Pro 5,1
I like Ubuntu well enough, but rather than upgrading to the current version I thought I'd try something interesting. I had already tried Debian, but never liked it. So here are my first impressions of Archlinux, which so far looks like what I want. I had to install it from my existing Ubuntu, since I found out to my chagrin that
Code:
<flame intensity="110%"> I had to manually edit grub.cfg to say hd1 instead of hd0, but this was kept on subsequent runs of mkinitcpio and grub-install. The mkinitcpio.conf hooks I use are "base udev block filesystems shutdown" And genfstab blows; I soon gave up on it. My (handmade and modelled on Ubuntu) fstab looks like this (true geeks would use reiserfs for /var, but I don't want to experiment with unfamiliar and unmaintained filesystems. Also I am not sure that MacFUSE could handle it). Code:
# To enable fast user switching from the mate-panel logout menu (I am using kdm), I created a script that says Code:
#!/bin/sh Code:
gui () Code:
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{UDISKS_FILESYSTEM_SHARED}="1" In the beginning I had to use pacman -S --force quite a lot to install software. Probably a residue from my early trouble with the separate /var partition, which did not work correctly until I added the "shutdown" hook. With pulseaudio at first I had no sound in the headphones. I solved it, as in the good old Ubuntu Jaunty days, by creating a file /etc/modprobe.d/alsa-base that says Code:
options snd-hda-intel model=3stack The nouveau driver does not work in Arch any more than in Ubuntu. I had to install the proprietary nvidia driver (in the chroot) to be able to boot from the MacBook Pro. Kernel and nvidia updates seem to work perfectly though - I have already survived two kernel updates an an nvidia update (doing pacman -Syu from the console). /etc/default/grub needs to be modified: GRUB_CMDLINE_LINUX_DEFAULT="nomodeset nouveau.blacklist=1" (The nvidia driver blacklists nouveau automatically, but with the nouveau.blacklist option one might get an emergency login without a working driver - haven't needed that *yet*). The nomodeset option may not be necessary, but I seem to have trouble switching users without it. The overall display colour of the nvidia driver is a little too blue by default, which I solved by adjusting the blue gamma in xorg.conf (gksu nvidia-settings should also work). Here's the relevant part of xorg.conf (edited manually after nvidia-xconfig): Code:
To remap my keyboard (not only to swap the traditional § and ` keys, but also moving ISO_Level3_Shift to the Ctrl key which is freed by mapping Ctrl to the Command keys) I use the following .Xmodmap: Code:
keycode 49 = section plusminus section plusminus notsign notsign Keyboard: "English (US) English (Macintosh)" (which has umlauts and ß accessible with ISO_Level3_Shift. I don't like the German keyboard because it is inconvenient for using the shell) Alt/Win key behavior: "Control is mapped to Win keys (and the usual Ctrl keys)" Key to choose 3rd level: "Right Alt key never chooses 3rd level" and "Right Ctrl" (But see the Xmodmap file: It's actually mod5, not mod3, and there is no right Ctrl. All this sucks majorly and should be easier) This frees the right Alt key for Caja's window commands (for which I'd otherwise need both hands) while retaining the mode shift capability (using the left and only Ctrl key, with the actual Ctrl being remapped to the Command keys). WIBNI Caja's shortcuts could be remapped *persistently*? Moving selected files to the trash works with fn_BackSpace; deleting permanently works with Shift_fn_BackSpace. Once you have a keymap that works you should create an xkb dump (xmodmap .Xmodmap; xkbcomp $DISPLAY current.xkb), so you can load the whole thing into your display in a lump at startup (xkbcomp current.xkb $DISPLAY). The command cannot be entered directly in System>Preferences>Startup Applications because MATE's startup applications cannot handle variables, but a script /usr/local/bin/load-keymap that calls /usr/bin/xkbcomp /path/to/current.xkb $DISPLAY will work. The command to be entered in "Startup Applications" is Code:
/usr/bin/sh -c "/usr/bin/sleep 1; exec /usr/local/bin/load-keymap" Code:
#!/bin/bash ***** Want a shortcut to empty the trash? Create a script /usr/local/bin/trash and assign a shortcut to it: Code:
#!/bin/bash ***** Installing grub-EFI on a MacBook Pro 5,1: To install grub-EFI on a backup volume on /dev/sdb (which I hope will give me an emergency boot in case I mess up grub2 again), I did the following as root while booted from the backup volume (there is no grub-efi-x86_64 package, the standard grub2 is efi-enabled by default): Add EFI to /etc/fstab: Code:
/dev/sdb1 /boot/efi vfat defaults 0 0 Code:
GRUB_CMDLINE_LINUX_DEFAULT="nomodeset nouveau.blacklist=1 console=tty0 console=ttyS0,38400n8" Code:
menuentry 'Arch Linux EFI boot on /dev/sdb6' { Code:
#we are still root Commands to run after a kernel update: #mount -t vfat /dev/sdb1 /boot/efi; grub-mkconfig -o /boot/grub/grub.cfg #if you are in arch-chroot cp /boot/efi/EFI/arch/grubx64.efi /boot/efi/EFI/BOOT/BOOTX64.EFI User switching with EFI and without a login manager will work after installing xorg-xhost: Code:
xhost +localhost # this needs more investigation; probably just xhost Code:
#!/bin/sh |
You should make a wiki-howto on archlinux's site for other people trying to achieve the same.
And, FWIW I have installed Arch plenty of times and not had a problem with their documentation. It's updated quite frequently. |
Thank you, szboardstretcher. I never considered myself wiki author material, but I might do that. And the flame.xml was a joke.
Re: EFI boot on iMac7.1 (ATIRadeonHD2400) As of kernel 3.9 there is a "freeze" suspend state, which will work on the iMac with EFI boot. Paste the following in /etc/systemd/sleep.conf: Code:
[Sleep] ***** Edit: It is possible to implement EFI booting on the Mac without an EFI partition (that is, with mbr-formatted disks). You need to create an OS X file structure in /boot (which needs to be formatted as hfsplus): Code:
sudo mkdir -p /boot/System/Library/CoreServices I tried this with Ubuntu 12.04 64bit (which I kept on an external disk), but with the grub-2.00 from gnu.org because it will work without installing efibootmgr (which is for UEFI anyway, not for the Mac). On the iMac7,1 suspend will only work with the "freeze" suspend state (interestingly, the iMac7,1 has 64bit firmware, that's why EFI will not work with 32bit Ubuntu). The procedure for Ubuntu 12.04 (from memory; didn't keep notes): Code:
sudo apt-get purge grub-pc grub2 |
All times are GMT -5. The time now is 08:35 PM. |