Do Not Use This Tutorial To Install Zenwalk 6.2
I recently purchased one of Acer’s netbooks. The Aspire One ZG5. It’s blue, has 120GB hard drive, 1GB RAM and it had WinXP Home Edition on it. Now I can use Windows but I just don’t like to, I prefer Zenwalk Linux. Not Ubuntu, Debian, Fedora, Suse, Mandriva or any of their offspring. I figured if Acer could put Linpus on the AAO I should be able to install Zenwalk on it. There is more than enough information out there now to accomplish this.
Prep Work:
You need to upgrade your AAO’s bios to 3309. A simple Google will give you the answer.
Steps
1) I was planning on keeping WindowsXP so I was going to have to set this up for dual booting. So defragment the hard drive. I’m going to resize the Windows drive and don’t really want a bunch of files scattered all over.
2) Resize the drive. My AAO came with a 120GB drive so I left the recovery service partion intact (PQSERVICE 4.88GB). Resized the WindowsXP (ACER) down to half @ 53.45GB.
3) Create a Linux partition. My linux partion is 52.45GB and formatted with Ext3.
4) Create a Linux Swap partition of 1GB.
Now all I really had to do was reboot and make sure Windows was still there and worked. Yup
Shopping List:
UNetbootin – A small utility that will download and install several different linux distros to a USB key and make it bootable.
USB key large enough for the Zenwalk ISO. I had a 1GB key laying around.
Zenwalk 6.0 iso
Beer
Install:
1) Go ahead and use UNetbootin to install the Zenwalk 6.0 iso to the usb key. Fairly simple task so I won’t explain it.
2) Reboot the AAO. Upon reboot hit F12 to select a boot device. Select your usb key. Then hit enter when the boot menu comes up. You should now be in the Zenwalk setup. You should just be able to hit enter again to start the installation process. You should now be confronted with a dialog screen with several options such as autopartition,partition and exit. We are going to exit the installer, so select exit and hit enter and then you should now be in a command line. We did this because Zenwalk 5.2 and newer does not like to be installed from a usb, it will eventually error out towards the end complaining it can’t find the packages to install. So now we are going to mount the usb key for us to use later. This is what I used.
mkdir /usb1
mount /dev/sdb1 /usb1
setup
Now we should be back in the installer.
3) Now that we are back to the installer, it is as simple as just answering questions. First select your keymap, then go straight to install. The install dialog will find your linux swap partition and your ext2 partition. It will ask you what filesystem you wish to use and format it. I chose xfs. It will find your Windows partion and the Acer recovery partion. It will ask you where you wish to mount these. I chose /mnt/Acer and /mnt/Win_XP. Now it should be ready to install the Zenwalk packages. You are going to choose the premounted directoy option. Just enter where you mounted the usb key: /usb1 . Hit enter.
4) While it is installing go have a beer. Come back in about 20 minutes and when it’s done have it install lilo. Select the simple, and a resolution of 800×600, no extra options, mbr. Reboot.
5) Now just finish up with the postinstall. You’ll have a functioning Zenwalk 6.0 install minus your SD card readers, and your Fn keys.
Card Readers:
To get your card readers to work is pretty simple.
1) Open xkernelconf. This can be found in System >> Control Panel.
Scroll down the right side of xkernelconf and doubleclick mmc_block and pciehp. Now apply changes.
2) As root create /etc/modprobe.d/pciehp and add options pciehp pciehp_force=1 to it.
3) Reboot and insert card in either slot and the will be seen in Thunar.
Xorg.conf:
The Intel graphics run a little slow with the stock Xorg.conf. Simply add
Option "AccelMethod" "exa"
Option "MigrationHeuristic" "greedy"
to the driver section of xorg.conf and
export INTEL_BATCH=1
to /etc/profile.
Fn Keys:
The Fn keys seem to take the longest to setup. While I could get most working with just one program, I was not able to get them all working properly. I ended up combining several techniques.
First we need to add some lines to /etc/rc.d/rc.local
As root add the following to rc.local
/usr/bin/setkeycodes e025 130
/usr/bin/setkeycodes e026 131
/usr/bin/setkeycodes e027 132
/usr/bin/setkeycodes e029 122
/usr/bin/setkeycodes e071 134
/usr/bin/setkeycodes e072 135
Now as your user create .Xmodmap with the following contents.
keycode 160 = XF86AudioMute
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 223 = XF86Standby
keycode 239 = XF86KbdBrightnessDown
keycode 123 = XF86KbdBrightnessUp
keycode 210 = XF86Display
Now open ~/.xinitrc in mousepad and add to it.
xmodmap ~/.Xmodmap
Now go into the XFCE Keyboard setttings and add these commands to the appropriate Fn keys.
amixer set Master 2dB+ unmute >>> FN + UpArrow
amixer set Master 2dB+ unmute >>> FN + DownArrow
amixer set Master toggle >>> FN + F8
sudo /usr/sbin/standby >>> FN + F4
As of now the Fn keys F4,F6,F7,F8, Brightness Up, Brightness Down, Volume Up and Volume Down will work at your next login
If Fn+F4 does not put your AAO into standby you might have to correct it.
Open terminal and if
your_username[~]$ sudo /usr/sbin/standby
returns
sudo: can't stat /etc/sudoers: No such file or directory
Segmentation fault
then
su
mv /etc/sudoers.new /etc/sudoers
Now Fn keys F1,F2,F3 and F5 require a little more work.
First we need a small package called xbindkeys, so open a terminal and
su
netpkg mirror
netpkg xbindkeys
Now as your_username open terminal and
xbindkeys --defaults > ~/.xbindkeysrc
mousepad ~/.xbinkeysrc
Remove everything after
# Examples of commands:
then add
# F1 XFCE4 Help
"iceweasel /usr/share/xfce4/doc/C/index.html"
m:0x0 + c:134
# F2 Zen Panel
"gksu zenpanel"
m:0x0 + c:135
# F3 powersave
"xfce4-power-manager -c"
m:0x0 + c:140
# F5 External Display
"/usr/bin/externaldisplay"
m:0x0 + c:210
Now we need to add xbindkeys to XFCE’s startup.
Which is in Settings Manager >> Sessions and Start Up >> Application Autostart. Click the ‘Add’ button and fill in the name as xbindkeys and the command as xbindkeys.
You’ll notice how I use Fn+F5 to call /usr/bin/externaldisplay. Basically externaldisplay is a simple xdialog script that changes the resolution on an external monitor. My script is:
#!/bin/sh
DIALOG=Xdialog
$DIALOG --title "External VGA Display" \
--menu "Choose a Resolution" 13 50 6 \
"1" "Laptop Only" \
"2" "Ext.Monitor Only 1024x600" \
"3" "Ext.Monitor Only 1024x768" \
"4" "Ext. Monitor Auto" 2> /tmp/menu.tmp.$$
retval=$?
choice=`cat /tmp/menu.tmp.$$`
rm -f /tmp/menu.tmp.$$
case $retval in
0)
if [ "$choice" = "1" ]; then
xrandr --output LVDS --mode 1024x600
xrandr --output VGA --off
fi
if [ "$choice" = "2" ]; then
xrandr --output VGA --mode 1024x600_60.000
xrandr --output LVDS --off
fi
if [ "$choice" = "3" ]; then
xrandr --output VGA --mode 1024x768
xrandr --output LVDS --off
fi
if [ "$choice" = "4" ]; then
xrandr --output VGA --auto
fi
;;
1)
echo "Cancel pressed.";;
255)
echo "Box closed.";;
esac
If you wish to use this for your needs you’ll have to find out the resolutions your external monitor is capable of. You can do that by first connecting your monitor and then in a terminal issue
xrandr -q
Recent Comments