IMac Aluminum

From ArchWiki
Revision as of 01:27, 21 May 2008 by Handy (Talk | contribs) (New page: Category:HOWTOs ''' I have written the following in the hope that it may help those investigating the installation of Arch on their iMac. Parts of this guide are specifically for the...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

I have written the following in the hope that it may help those investigating the installation of Arch on their iMac. Parts of this guide are specifically for the Alu' 24" iMac, though some of the following can also be used as a helpful guide for an initial Arch install on any computer.

I have an aluminium 24" iMac, on which I have just installed Arch 64bit, twice! I had a serious problem logging into Gnome & anything that required the root password failed. I worked around these problems but was never happy with the setup. I think that the iMac aluminium keyboard may have caused the problem, due to it not having a num-lock key, or an LED to indicate num-lock on/off; my passwords were numerical. Of course I may be wrong. My second install was done with an MS Digital Media keyboard & I don't have the above problem, also my ctrl-alt-Fkeys work now.


Deleting OS X?

Some people seriously consider dropping OS X altogether. I personally think that there is a good reason to keep a small OS X partition, as it allows you to be able to do firmware updates. Some people use an external USB or Firewire drive with which to boot OS X for the firmware updates, & I have heard that people have been able to do it via optical drive, from experience I do not know about these other methods. In the future I will find info' on those topics & supply links here.


rEFIt First

In preparation of an Arch (or any other Linux/BSD based OS for that matter) install, the first thing to do is install [b]rEFIt[/b] [b][u][url]http://refit.sourceforge.net/[/url][/u][/b] on your OS X partition. It is also possible to edit the [b]refit.conf[/b] file so that Arch will be the default boot OS, see here: [b][u][url]http://refit.sourceforge.net/doc/c3s3_config.html[/url][/u][/b] it's the very last section of the refit.conf, basically you just uncomment [i][b]legacyfirst[/b][/i]. The only other option in refit.conf that most users will want to configure is the [i][b]timeout[/b][/i] number, (which is located quite close to the start of the refit.conf file) by default it is 20 seconds, I set it to 5 seconds.


Partitioning & Filesystems

There are multiple ways to repartition the iMac drive, my favourite (probably because it is the easiest & being graphical it is most likely the safest) is to boot the Ubuntu 7.10 (or later) LiveCD & run GParted from the desktop menu. I have shrunk the OS X, HFS+ partition, created Ext3, JFS & Linux Swap partition, deleted & moved partitions on the iMac using GParted & the Ubuntu LiveCD. Great stuff! The only present limitation that GParted has with the HFS+ file system, is that it can only shrink the HFS+ file system & can not enlarge it. I'm sure it won't be too long & this limitation won't exist either.

[i]Just a note on using GParted, or any other GUI type of partition management tool, it is generally accepted to be good safe practice to only [b]Apply [u]ONE[/u] process at a time[/b]. What that means for those unfamiliar with GParted (& the other applications of it's ilk) is you can give it multiple instructions which it stores up until you hit the [b]Apply[/b] button, after which it goes through the instructions one after the other. If this doesn't make sense now, it very quickly will on using GParted. [/i]


My iMac partition scheme is as follows:

Partition...Filesystem......Size.........Mountpoint

sda1 ........ *FAT32* ....... 200Mb .... EFI system partition - While the ESP looks like a FAT32 volume, it is actually an EFI file system, which you want to know how to replace before you delete it. This means don't delete it unless you are sure that you know what you are doing, as it may become essential to Apple firmware updates in the future. Currently the ESP is empty & the firmware boots OS X directly!? At least it is only 200Mb's wasted drive space, though more importantly it counts as one of the four partitions that can be seen by Apple's newly adopted GPT partitioning scheme. More on GPT in the following paragraph. sda2 ......... HFS+ ........... 50Gb ..... OS X - After thinning out OS X some & keeping tools I use plus iWork, CrossOver Games & Guild Wars, I have about 25Gb of free space to play with here, & for the odd game that may arrive in the future (Guild Wars 2). :D sda3 ......... Ext3 ............ 15Gb ...... / - Arch - there is currently 12Gb free, it is a new install though. sda4 ......... JFS .............. 30Gb ...... /home - that should be more than enough space for me there, & I can always resize with GParted. sda5 ......... Linux Swap .... 2Gb ..... swap - rarely if ever used, but I have the space. It is questionable as to whether this partition needs to exist at all. sda6 ......... JFS ............ 200Gb ...... /thevoid - storage for video's music, unsafe backup, whatever...

The GPT partitioning scheme that Apple uses [u][i][b][url]http://developer.apple.com/technotes/tn2006/tn2166.html[/url][/b][/i][/u] allows OS X to only see 4 partitions, so be sure to install your boot loader i.e. GRUB/Lilo, & any other partition that you may want OS X to see (like a shared FAT32 data drive) on sda3 & sda4, Windows must also be on sda3 or sda4. Partitions beyond Apple's imposed limit of 4 can still be created & used, e.g. Linux Swap, & other partitions, but they won't be accessible by OS X or directly bootable, though I see no reason why a boot loader like GRUB positioned on sda3 or sda4 could not boot other OS's on partitions numbered greater than sda4. This certainly does place limitations on what we can do. If you require more than this scheme will allow you, you could do away with OS X, & set up the drive on MBR only, using an external drive with OS X on it to update the firmware. [i]The details of setting up the MBR system I'll include a link to at a later date.[/i]

So just to sum up on all of this partitioning stuff, if you have need to use sda3 & sda4, be sure to put any [i]swap[/i] partitions on a partition number greater than sda4.

When partitioning is finished you must restart the iMac & re-sync your partitions with rEFIt, which is quick & easy: You choose to [b]start the partitioning tool[/b] in the rEFIt boot-menu & follow the very simple instructions there.

[i]rEFIt may prefer to have partitions in numerical order on the drive, i.e. sda1, sda2, sda3, sda4, sda5, sda6 ... & not shuffled. This is unconfirmed, any feedback on the subject will be appreciated. [/i]

Then reboot & hold down the [b]C[/b] key, or wait as I do for the rEFIt boot-menu to appear & choose to boot the Arch install CD.


[b][u]Install Arch[/u][/b]

I used both the[b] Arch Beginners Guide[/b] [b][u][url]http://wiki.archlinux.org/index.php/Beginners_Guide[/url][/u][/b] & the [b]Official Install Guide[/b] [b][u][url]http://wiki.archlinux.org/index.php/Official_Arch_Linux_Install_Guide[/url][/u][/b] I used the Core install from the CD & updated later, so I don't know how easy the FTP install sets up, the CD install & network setup went perfectly for me. The Beginners Guide has all that was necessary for my install, though I used the Official Guide to further my understanding, as well as other pages in the Arch wiki & elsewhere, many of which are linked to in this guide.


[b][u]Installing & Configuring X[/u][/b]

When installing the Xserver, [b][i][u][url]http://wiki.archlinux.org/index.php/Xorg[/url][/u][/i][/b] I installed as though I was not going to use the proprietary ATi drivers (now called [i]Catalyst[/i]), this allowed me to use both the [i]vesa[/i] & the [i]xf86-video-ati[/i] open source drivers. I only did this out of what turned out to be a false sense of fear of the approaching fight to get ATi's Catalyst drivers to work. I think if I were installing a third time I would go with vesa first & then install the Catalyst drivers. I did find that there were some problems with both the vesa & the xf86-video-ati drivers, that may have been able to be fixed by someone who knows how to configure the xorg.conf file better than I. According to [i]/var/logs/Xorg.0.log[/i] the size of the screen was a problem for the xf86-video-ati driver, I didn't look too hard for what was upsetting the vesa driver's colours when in an X session.

Prior to the installation of the ATi Catalyst driver I installed [i]hwd[/i] ( [i]pacman -S hwd[/i] ) & then used hwd to create my first xorg.conf, which worked well enough for me in both installs (see above) to progress to the installation of the ATi Catalyst drivers; you must use the aticonfig file (provided in the Catalyst installation) to install the drivers & create the new ATi xorg.conf. The command that most users would use is the following:

[b]aticonfig --initial --input=/etc/X11/xorg.conf[/b]

I must say that my first installation of the ATi Catalyst drivers on Arch was faultless, on the second install I needed to edit the xorg.conf screen resolution from 1600x1200 to the correct 1920x1200. The refresh rate for the monitor is set at 60Hz, hopefully this is correct, I can find no information on the refresh rates of the iMac's 24" screen? If anyone knows these specification for any of the iMacs (any of the intel Macs actually) could you post them, or a link please?

Even though the aticonfig generated xorg.conf needed an easy tidy up due to internal duplication of some sections both times I installed Arch, it worked, & booted Gnome, from where I did my xorg.conf editing to clean it up.

Finally, the Arch install of the ATi Catalyst drivers for the iMac works very well indeed, which certainly was an unexpected surprise to me!


[b][u]Installation of Valuable Tools[/u][/b]

   [b][i][u]Sudo[/u][/i][/b]

The sudo command is used to easily executing root commands: [b][u][url]http://wiki.archlinux.org/index.php/Sudo[/url][/u][/b]

By entering visudo at the terminal you automatically open the sudoers file for editing.

The following is all you will need to know to use visudo (though it is a specific use of the vi(m) text editor an incredibly powerful & complex tool used by many programmers). Visudo is the default way to edit your /etc/sudoers file, (there is a command that allows safe use of other editors which I won't go into here):

[i]After you start visudo (vim), you're in command mode.

   * Switch between modes 

1. From command mode to insert mode, press i

Enter some text.

2. from insert mode to command mode, press ESC

You are now in command mode. Vim is waiting for your commands. Notice if you try typing, you get weird and unexpected results, because, well, you need to learn some commands, and Vim is not in insert mode.

3. Press ESC again to make sure you are truly in command mode and press : (colon)

Now you are in ex, which will allow us to save your first file. Type:

wq

for write and quit.

Your file is written and vim will exit.[/i]

If you search sudo you will find a variety of things that can be done to configure the /etc/sudoers file to suit your needs.

[b]To install:[/b] [i]pacman -S sudo[/i]


   [b][i][u]AUR & Yaourt[/u][/i][/b]

If you followed the [b]Beginners Guide[/b], you have probably already installed [i]yaourt[/i]. If not & you want access to the AUR repositories: [b][i][u][url]http://aur.archlinux.org/index.php[/url][/u][/i][/b] then you should install it.

[b]To install:[/b] [i]pacman -S yaourt[/i]


   [b][i][u]Aurvote[/u][/i][/b]

Aurvote is how you vote for packages in the AUR, so it is quite helpful to the community if you use aurvote.

[b]To install:[/b] [i]yaourt -S aurvote[/i]


   [b][i][u]Tupac & Qupac[/u][/i][/b]

Read about tupac & qupac on the AUR forums & here: [b][i][u][url]http://aur.archlinux.org/packages.php?O=0&L=0&C=0&K=tupac&SeB=nd&PP=25&do_Search=Go[/url][/u][/i][/b]

[b]To install:[/b] [i]yaourt -S tupac qupac[/i] if you choose to install both the packages.


[b][u]Gnome Installation[/u][/b]

The [b]Arch Beginners Guide[/b] gives very good instructions for the installation & basic setup of Gnome, searching for Gnome in the Arch wiki will bring up more useful information regarding Gnome, & the following site [b][u][url]http://archux.com/page/installing-and-setting-gnome[/url][/u][/b] I found extremely helpful in vetting the available files supplied in the installation of Gnome via the [i]pacman -S gnome[/i] & the [i]pacman -S gnome-extra[/i] commands, if you are not a Gnome expert this site makes it so easy & safe to customize your Gnome install making sure that you know what is essential for Gnome to run; you can always add any of the packages that you left out at a later date by simply running [i]pacman -S (whatever you want?)[/i].


[b][u]Gnome Configuration Tips[/u][/b]

Once Gnome is installed there are a few essentials that I like to use, the majority of which require installation; knowing about these can certainly save a new user a great deal of time:


   [b][i][u]GDM Setup[/u][/i][/b]

If you prefer an automatic login to Gnome then the easiest way is to use gdmsetup: run it, [i]$ sudo gdmsetup[/i] go to the [i]Security[/i] tab, & tick [i]Enable Automatic Login[/i], add the user name to the [i]User:[/i] field. If you want to be able to Log Out of your normal user account & Login to Gnome as Root, then you need to go further down gdmsetup's [i]Security[/i] panel & tick[i] Allow Local System Administrator Login[/i]. Be very careful about any further editing of gdmsetup, it is possible to make things very difficult for yourself if you don't know what you are doing.

[b]To install:[/b] [i]pacman -S gdmsetup[/i]


   [b][i][u]gconf-editor[/u][/i][/b]

A powerful Gnome configuration editor which I use to bring back the directory column in Nautilus, as I don't like to use Nautilus without it (personal taste I know). To do this you can enter [i]$ gdonf-editor[/i] in the terminal, or use the [u]Gnome menu[/u][i]- Applications - System Tools - Configuration Editor:[/i] When running, expand the [i]apps[/i] directory, then scroll down to [i]nautilus[/i] & expand that directory, scroll down to [i]preferences[/i] & select it, then in the right hand window find [i]always_use_browser[/i] & place a tick in the box to select this type of nautilus display then close the dialog.

[b]To install:[/b] no need to install.


   [b][i][u]Alacarte Main Menu Editor[/u][/i][/b]

Is vastly superior to the default Gnome menu editor.

[b]To install:[/b] [i]pacman -S alacarte[/i]


[b][i][u]Installation Of The (My) Essentials[/u][/i][/b]

Following are my personal essentials that must be installed before I consider my installation somewhere near complete. We all have our own favorite's I know, though hopefully someone may find the following helpful?

   [b][i][u]Vidalia[/u][/i][/b]

[b][i][u][url]http://www.vidalia-project.net/[/url][/u][/i][/b] Sets up & manages Tor - The Onion Router - [b][i][u][url]https://www.torproject.org/[/url][/u][/i][/b] beautifully & easily, I have been using vidalia on Linux & OS X for some time, it is worth researching Tor regarding your online anonymity.

[b]To install:[/b] [i]yaourt -S vidalia[/i]


   [b][i][u]Firefox[/u][/i][/b]

The popular web browser.

[b]To install:[/b] [i]pacman -S firefox[/i]


   [b][i][u]VLC[/u][/i][/b]

The popular & powerful media player: [b][i][u][url]http://www.videolan.org/vlc/[/url][/u][/i][/b].

[b]To install:[/b] [i]pacman -S vlc[/i]


   [b][i][u]libdvdcss[/u][/i][/b]

This library is required to play CSS protected DVD's (99% of commercial DVD's). It is illegal in the U.S. & possibly a few other countries, so check out the legalities if you think you must?

[b]To install:[/b] [i]pacman -S libdvdcss[/i]


   [b][i][u]bin32-wine[/u][/i][/b]

Wine: [b][i][u][url]http://www.winehq.org/[/url][/u][/i][/b], I use Wine to run DVDShrink 3.2, as it is still the most reliable solution for ripping DVD's on my hardware. K9Copy is getting better all of the time, & it is only a matter of time before it is better than DVDShrink (on my system), I do look forward to that day. I also run Smartripper under Wine, as there are rare occasions that I need to use it to rip something that DVDShrink could not handle.

[b]To install:[/b] [i]yaourt -S bin32-wine[/i]


   [b][i][u]NeroLinux[/u][/i][/b]

I use this commercial software for the same reason I use DVDShrink; from experience, on my hardware it is the most reliable solution. As K3B continues quickly developing the day is coming when NeroLinux will be superseded on my machine by a great OSS alternative.

[b]To install:[/b] [i]yaourt -S nerolinux[/i]


[b][u]Controlling the screen brightness:[/u][/b].

This at first looked to be quite a problem for the iMac which normally has keyboard screen brightness control under OS X. As it turns out it is as easy as using the [i]ATI Catalyst Control Center[/i]'s - [i]Color[/i] dialog, selecting [i]Link Color Sliders[/i] & sliding them to suit your personal screen brightness preference. For those not using the ATI proprietary drivers the [i]xgamma[/i] command also works like so:

[b]$ xgamma -gamma 0.5 [/b]

Play around in the range of 0.1 to 1.0.

For those using a Mac with an nVidia GPU, a similar option is available in the nVidia proprietary driver package.

(The above solutions courtesy of mips1)


[b][u]Getting sound to work in Arch for the Alu' iMac 20" & 24" models:[/u][/b]

Add the following to [b]/etc/modprobe.conf[/b]

[b]alias snd-card-0 snd-hda-intel[/b]

[b]options snd-hda-intel model=mbp3[/b]

Restart computer or the sound system.

Using the above gives a very workable alsamixer, the sound quality is still 2nd rate (as ALSA still has a way to go) so using VLC & its mixer is very helpful when watching DVD's. I have not tested the line out or mic. Perhaps someone will post regarding them?