Gentoo Archives: gentoo-user

From: cremes.devlist@×××.com
To: gentoo-user@l.g.o, arch@×××××××××.org
Subject: [gentoo-user] Success! Xen 3.0.4 on MacBook Pro running Gentoo dom0 and ArchLinux domU
Date: Thu, 26 Apr 2007 04:16:25
Message-Id: F8D18F55-381D-4D8D-8321-D66F3ED21249@mac.com
1 [Posted earlier to xen-users mailing list; cross-posted between
2 Gentoo and ArchLinux lists. Be careful about where your replies go if
3 you make any.]
4
5 In case anyone else is trying to get Xen working on a MacBook Pro, I
6 thought I would drop this note out here. The configuration is as
7 follows...
8
9 Hardware Overview (from System Profiler under OSX):
10
11 Machine Model: MacBookPro2,2
12 Processor Name: Intel Core 2 Duo
13 Process Speed: 2.16 GHz
14 Number Of Processors: 1
15 Total Number of Cores:2
16 L2 Cache (per CPU): 4 MB
17 Memory: 3 GB
18 Bus Speed: 667 MHz
19 Boot ROM Version: MBP22.00A5.B00
20 SMC Version: 1.12f5
21
22 Software:
23 rEFIt 0.9 boot manager
24 GRUB 0.97-r3
25 Gentoo 2006.1 x86_64 no-multilib profile (updated to latest
26 packages from community portage repository as of 20070420.
27 ArchLinux 0.8 Voodoo release
28
29 I followed the installation directions posted for the MacBook here
30 [1]. It wasn't perfect, so I made a few revisions to that page. For
31 example, the biggest stumbling block was creating multiple kernel
32 images to boot via GRUB. The MacBook Pro has a bug where the keyboard
33 ceases to work on the GRUB page [2]. The workaround is to hot-plug an
34 external USB keyboard and use it to choose other boot profiles.
35
36 Also, the current Xen release in Gentoo portage is 3.0.2. I could not
37 get this to work. I used the marineam-xem overlay which uses Xen
38 3.0.4 along with a modified 2.6.16.46 kernel source. There are no
39 mactel-linux [3] patches for this kernel release so I haven't tried
40 to run X and use the touchpad or other laptop-specific components
41 that are patched.
42
43 I then followed the directions given here [4] to build a working dom0
44 kernel. Again, the directions were hazy/ambiguous in places so I have
45 updated them to highlight certain tricky aspects. I may throw my
46 kernel .config file up somewhere for others to snatch if anyone is
47 interested.
48
49 After getting dom0 working, I copied that kernel tree to make a
50 separate domU kernel build. The only differences between the two are
51 the dom0 contains all the backend drivers (no frontend drivers) and
52 the domU config contains all the frontend drivers (and no backend
53 drivers).
54
55 I then followed the instructions here [5] to install ArchLinux from a
56 running host. The tricky part here was first creating the sparse
57 loopback file images which I had never done before. The Xen user
58 manual gave good directions on how to perform this operation. The
59 second tricky part was synchronizing the disk device referenced in
60 the domU /etc/fstab to the device created in the dom0 Xen
61 configuration file. Yes, this was my first time installing Xen and
62 that part tripped me up.
63
64 I set the ArchLinux file partition to boot using the domU created
65 from Gentoo sources. So far it has worked fine. I imagine I'll have
66 some trouble since the linux-headers package is revved for a 2.6.20
67 kernel and I'm running a 2.6.16 kernel. Correcting this shouldn't be
68 too onerous.
69
70 So, those are my notes. It took me 5 days from a standing start to
71 get this working. I haven't touched Linux since 1994 and I have never
72 touched Xen before. This is a testament to excellent guides,
73 tutorials, and a misspent youth hacking SunOS 4.1. :-)
74
75 Most of these notes have already been added the appropriate wikis
76 (still need to update the ArchLinux wiki).
77
78 cr
79
80 [1] http://gentoo-wiki.com/HARDWARE_Apple_MacBook
81 [2] http://refit.sourceforge.net/doc/c4s3_keyboard.html
82 [3] http://mactel-linux.org/
83 [4] http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo
84 [5] http://wiki.archlinux.org/index.php/
85 Install_Arch_from_within_another_distro
86
87 --
88 gentoo-user@g.o mailing list