June 2012 Archives

installing Debian on an iMac

| No Comments | No TrackBacks
After my success with installing Debian on my MacBook Air, I thought I'd keep going, and install Debian on the desktop iMac I have at work. It's a 21.5 inch iMac, apparently with model number A1311.

As per last time, I used the Alpha release of the Debian 7 installer, and was using a multi-arch net boot CD. So I had a choice of installing 32 bit Debian, or 64 bit Debian. I wisely choose 64 bit Debian, after the issues I had with 32 bit Debian on the Air.

The Debian Installer did it's thing. I didn't even get prompted for non-free firmware this time, and it got all the way through. I still had to muck around a little bit at the end, to mount /dev/sda1 as /boot/efi, and install grub-efi-amd64. I'm not sure what I'm missing, but I again had to run 'install-grub' manually, and this time I also had to run 'upgrade-grub' to. re-generate the grub.cfg file (which presumably got removed when I purged grub-pc, I must have done things in a slightly different order).

I choose to use btrfs for my root volume on this install, which lead me to the first of the two problems I had with this install. It seems Debian Wheezy (and probably unstable) has a problem in this environment, because there is no /sbin/fsck.btrfs. I've found two bug reports:
I worked around that by making /sbin/fsck.btrfs a symlink to /bin/true. It's not a great work around, but presumably it will do for now.

Then, after rebooting, I found I had a problem with the display. Fortunately there was a page on the debian wiki that suggested booting with the kernel option 'radeon.modeset=0', and then installing the firmware-linux-nonfree package. And that got me going. I haven't got the gui installed yet, but hopefully that won't be a problem either.

I did find that my package management was spending a bit of time downloading translations that I didn't need. The apt.conf(5) man page says you can configure 'Acquire::Languages { "environment"; "en"; "none"; };' to avoid that. There is a trick though, apt will continue to download translation files if it finds such files already in /var/lib/apt/lists. So I had to delete all the translation files under there as well.

installing Debian on Mac Book Air

| No Comments | No TrackBacks
My employeer has supplied me with a Mac Book Air for a while now, and I'd like to get Debian running on it. It's a MacBookAir4,1 as per the different models on wikipedia. I've downloaded the Debian 7.0 Alpha installer and burned it to a CD. I've downloaded the 2012-05-12 firmware and added that to a USB stick.

I've been reading about other peoples notes on installing Debian on this kind of hardware. I've already got a second partition on my hard drive (which is currently HFS+ formatted, but I was happy to reformat that in the installer).

I had also installed rEFIt, though I'm told it shouldn't be necessary. So I removed it. But not before trying several installs before then, and getting very confused about peoples notes on installing with the bios style partition table synced to the GPT one, and what not.

So I booted to the installer CD. I've downloaded the multi-arch CD. On my first go choosing the 64 bit option seemed to freeze the system. So I choose the normal install option. The installer behaved as expected. And then I rebooted, without worrying about installing grub-efi. So my new system didn't boot.

I rebooted to the CD again, and choose the rescue option.  After getting a shell with /dev/sda5 as the root system, and /dev/sda4 as the boot partition (I decided to have a separate boot, but I probably didn't need to do that) I mounted /dev/sda1 as /boot/efi. Then I installed the grub-efi-amd64 package. Strangely that didn't create the /boot/efi/EFI/debian/grubx64.efi file like I was expecting. But when I ran 'grub-install' again, it did. I'm sure the package install scripts would have called that, but perhaps I had something else not mounted correctly at that time or something. I copied /boot/efi/EFI/debian/grubx64.efi to  /boot/efi/EFI/boot/bootx64.efi, so the Mac EFI firmware would give me that as an option to boot.

At this point I can hold the 'Option' key down while booting, and choose the 'EFI boot' option, and see the grub menu. But when I select that I get a message saying:
Loading Linux 3.2.0-2-686-pae ...
Loading initial ramdisk ...
error: no suitable mode found.
Booting however
_

I didn't know what I'd done wrong. Reading a gentoo wiki page made me think that booting my 64 bit Mac system to a 32 bit kernel was causing an issue, as Macs EFI is running in 64 bit mode, and can't therefore boot to a 32 bit mode kernel.

So I re-installed. This time the installer didn't freeze on the 64 bit option, so I continued. This time, before the installer rebooted, I jumped to a shell and installed the grub-efi-amd64 package. Strangely the md5sum of the generated /boot/efi/EFI/debian/grubx64.efi file was different. So I re-copied it to /boot/efi/EFI/boot/bootx64.efi.

The grub was more than happy to boot the system, and now I'm typing this blog post in my new Debian install. Yay!

So far, I'm fairly happy. Sound works, without me trying anything. The camera works in the 'Cheese' application. Wireless works, and bluetooth looks like it will work. The screen seems a bit small, but it is running at 1366x768, which is the resolution available on this laptop, so I guess I'll just have to get used to it. Gnome 3.4 seems ok to use so far. It's going to take me awhile to get un-used to the Apple keyboard short cuts, and used to the gnome keyboard short cuts.

I'm installing xserver-xorg-input-multitouch, to see if that helps with click'n'drag. At the moment I can't move windows easily, because when I click on a windows title bar, I then can't move the mouse pointer, and I can only release the key on the minimize menu option that pops up.

Mac frustration

| No Comments | No TrackBacks
This is a rant.

I just want to get on with some django development. I'd like to have my web application display user upload images. So I need PIL. But to get it I've got to compile it from source and hence need XCode, or use pip (which needs llvm-gcc-4.2, and hence needs me to install XCode), or use random instructions from the web that might or might not work.

I don't want to write Mac software, why should I need XCode? I don't have to sign into some store to install software on a linux computer, I think it's bullshit to have to sign in to install something that is listed as being $0.
 
The sooner I get a decent operating system (like Debian) installed on this MacBook Air the happier I'll be.

Venus transit

| No Comments | No TrackBacks
You may have heard about the Venus transit occurring today, where the Earth and Venus orbits align, such that you can see Venus outline as it traverses between us and the sun. The next transit is in another 105 years.

Today I got to see it. The Melbourne Uni astrophysists group had setup a sun projection device on the oval behind Trinity College. So my trek to see the Venus transit was about a 3 minute walk. Much easier than the expeditions of Cook and Le Gentil for the 1761 and 1769 transits.

I took a photo of their light box, just to prove I was there. You can clearly see Venus in my photo.

IMG_0558.JPG

DjangoCon Europe 2012

| No Comments | No TrackBacks
DjangoCon Europe 2012 is on right now... and I'm on the other side of the planet. But I know some people who are there, and I'm kind of following along remotely. Some quick links:

vegetarian justification

| 2 Comments | No TrackBacks
Cliff Hooker says that a 'vegetarian who eats plants makes five to ten times less demand on agriculture'. Cliff is a professor at the University of Newcastle. This is pretty much the reason I'm vegetarian.