X in Solaris 10 on a MacBook

Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
RgbPath "/usr/X11/lib/X11/rgb"
ModulePath "/usr/X11/lib/modules"
FontPath "/usr/X11/lib/X11/fonts/TrueType/"
FontPath "/usr/X11/lib/X11/fonts/Type1/"
FontPath "/usr/X11/lib/X11/fonts/Type1/sun/"
FontPath "/usr/X11/lib/X11/fonts/F3bitmaps/"
FontPath "/usr/X11/lib/X11/fonts/misc/"
FontPath "/usr/X11/lib/X11/fonts/100dpi/"
FontPath "/usr/X11/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
Load "IA"
Load "Xst"
Load "dbe"
Load "extmod"
Load "record"
Load "xtrap"
Load "glx"
Load "bitstream"
Load "type1"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/mouse"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
ModeLine "MacBook13" 172.73 1280 1336 1616 1728 800 802 814 840
EndSection

Section "Device"
### Available Driver options are:-
### Values: : integer, : float, : "True"/"False",
### : "String", : " Hz/kHz/MHz"
### [arg]: arg optional
#Option "ShadowFB" # []
#Option "DefaultRefresh" # []
Identifier "Card0"
Driver "vesa"
VendorName "Unknown Vendor"
BoardName "Unknown Board"
BusID "PCI:0:2:0"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Depth 1
Modes "1280x800"
# Modes "MacBook13"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Depth 4
Modes "1280x800"
# Modes "MacBook13"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Depth 8
Modes "1280x800"
# Modes "MacBook13"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Depth 15
Modes "1280x800"
# Modes "MacBook13"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Depth 16
Modes "1280x800"
# Modes "MacBook13"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Depth 24
Modes "1280x800"
# Modes "MacBook13"
EndSubSection
EndSection


# Option "dpms"
#EndSection
#
#Section "Device"
# Identifier "Videocard0"
# Driver "vesa"
# VendorName "Videocard vendor"
# BoardName "VESA driver (generic)"
#EndSection
#
#Section "Screen"
# Identifier "Screen0"
# Device "Videocard0"
# Monitor "Monitor0"
# DefaultDepth 24
# SubSection "Display"
# Viewport 0 0
# Virtual 1280 800
# Depth 8
# Modes "MacBook13"
# EndSubSection
# SubSection "Display"
# Viewport 0 0
# Virtual 1280 800
# Depth 16
# Modes "MacBook13"
# EndSubSection
# SubSection "Display"
# Viewport 0 0
# Virtual 1280 800
# Depth 24
# Modes "MacBook13"
# EndSubSection
#EndSection
#
#Section "DRI"
# Group 0
# Mode 0666
#EndSection

Comments

Windows 2008 Hyper-V and Solaris 10

Update 8 April 2008 --- Microsoft broke the legacy network adapter in Hyper-V RC. Apparently Sun and Microsoft are working together to make Solaris work as a guest operating system, so hopefully this will be fixed in a future update.

This documents my experiments with OpenSolaris 10 (Solaris Express), Jan 2008 edition, getting it to run under Hyper-V (release candidate) on Windows Server 2008 (public product release).

The current (2008 Q1) release of Solaris 10 does not work on the release candidate of Hyper-V due to bugs in the Hyper-V BIOS (according to Sun). The 2008 Q2 release, which is otherwise known as Solaris 10 Update 5, will apparently work with Hyper-V, according to Sun. So at the moment I am limited to OpenSolaris 10 (January 2008 release) which is why I chose it and not the official Sun Solaris 10 product.

Creating The Virtual Machine
When creating the virtual machine,
don’t skimp the RAM allocated. It requires a minimum of about 900Mb and it will install significantly quicker with more than that, as otherwise it will swap, which is very slow. I gave it 1300 Mbytes and it did not appear to swap.
In the BIOS settings, set it to boot off IDE then CD, which will prevent it repeating the installation should you forget to eject the DVD image at the end of the installation process.
Remove the network adapter and add a ‘Legacy Network Adapter’ connected to your virtual network in Hyper-V that connects to the external physical network adapter.

Fetching the ISO
You can download the ISO image of OpenSolaris from http://www.opensolaris.org/os/project/indiana/resources/getit/, which will link through to www.sun.com to do the actual download. You will need to register on www.sun.com if you haven’t already done so.

Installation Choices
When you start it up, it will present a text menu of different installation choices. For the easiest and most reliable way to install, choose option 4 (interactive console session). Do not press Return!

Your network adapter should appear as device dnet0. When partitioning the hard disk, I would advise editing the default layout. Remove the /export/home slice altogether, and increase the size of the / slice to fill all available space left on the disk. By default, Solaris always gives you a tiny / partition, which causes endless trouble later when lots of space is needed to install patches and their back-out information. You really do want a / as big as possible.

Set it to manually eject the CD/DVD and manually reboot.

Install all the software. The OEM support is not necessary, but install everything else. The total installation should take around 2½ to 3 hours including all the time taken for you to setup the networking and disk layout, before the software installation process begins.

Note from Russ Blaine at Sun:
Just beware of one thing: Solaris doesn't work in 64-bit mode due to
Hyper-V bug #336932. After you install OpenSolaris, configure it to
boot 32-bit by removing $ISADIR from all paths in the grub entry.

Unfortunately I have set it to auto-reboot at the end of the installation process, so I’m going to have to try to boot single-user to change this, or modify the boot command-line at boot time to remove whatever $ISADIR might look like in reality, then edit it in multi-user mode if it gets that far.

Only Works in 32-bit Mode, not 64-bit Mode
So when it reboots, I choose “Failsafe” from the boot menu, and get into single-user mode. The new system it just built is available in /a, so I
At the end of the installation, before it reboots
TERM=vt100
export TERM
and then edit the /a/boot/grub/menu.lst file in the new installed system. Remove all mention is “$ISADIR/” from the boot entries in this file. If you don’t, it will crash as soon as it tries to boot. OpenSolaris only works in 32-bit mode, and the $ISADIR stuff will boot it in 64-bit mode.

Once you’ve fixed this, “reboot” and let it boot the default choice in the boot menu. Booting the first time will take several minutes.

Disabling Graphical Login Prompt
If you find it boots into graphical mode, and you are using it remotely via a Remote Desktop connection, you’re a bit screwed at this point as you have no mouse to do anything with. Let the machine settle, then reset it. Choose the “Failsafe” boot option which will eventually take you to a single-user prompt. You can’t edit the services database now, but you can edit the script that actually tries to start up the graphical login Happy So edit /a/lib/svc/method/svc-kdmconfig and change the file to do “exit $SMF_EXIT_OK” just before it sets the “TERM” variable. Then reboot and boot normally.

Once you have rebooted and logged in as root, you can stop it trying to do the graphical login at all:
svcadm disable /application/graphical-login/gdm
svcadm disable /application/graphical-login/cde-login

Verbose Reconfiguraion Boot
A verbose reconfiguration boot can be triggered by:
reboot -- -rv -m verbose
This works on Intel hardware by adding a temporary menu entry to the GRUB configuration. This extra entry will of course have the “$ISADIR/” strings in it, and so will fail to boot. So as soon as the GRUB menu appears on the screen, choose the “Failsafe” boot option. Say “y” when it asks you about mounting the real Solaris installation on “/a”. Once it has booted single-user,
TERM=vt100
export TERM
cd /a/boot/grub
vi menu.lst
and remove the strings “$ISADIR/” from the new section it added to the bottom of the list. Save and exit, then “reboot”. Then it will successfully boot in a very verbose mode, showing you exactly what it is starting and when. It will remove the extra GRUB menu entry automatically.

Outstanding Problems
I have still not managed to get any life out of the virtual legacy network adapter. Solaris is seeing and configuring the device, but not actually getting any packets in or out of it. Sad
Comments