Gentoo Linux Install Notes, Tips & Tricks on AMD64 ----------------------------------------------------------------------------- Paul Littlefield Last Updated: 2006-08-22 11:22:17 > Bug fix DVD writing with a newer kernel ----------------------------------------------------------------------------- * ASUS K8V SE Deluxe Motherboard * AMD Athlon(tm) 64 Processor 3200+ * 2 x 1Gb RAM * Dual SATA RAID 1 * nVidia GeForce FX 5700 256Mb RAM Follow instructions at official website documentation # http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?full=1 Boot the special AMD64 Live CD (used to use smp doataraid) # gentoo Load the correct keyboard mapping # loadkeys uk Change the password for root so you can log in to several consoles # passwd root Load the on-board LAN # modprobe sk98lin # net-setup eth0 Partition the hard disk drives (SATA is recognised as SCSI) # fdisk /dev/sda Apply the filesystem (ext3) # mke2fs -j /dev/sda1 # mke2fs -j /dev/sda3 # mke2fs -j /dev/sda4 Activate the swap partition # mkswap /dev/sda2 Mount the new hard disk drive partitions # mount /dev/sda4 /mnt/gentoo/ # mkdir /mnt/gentoo/boot # mount /dev/sda1 /mnt/gentoo/boot/ # mkdir /mnt/gentoo/home # mount /dev/sda3 /mnt/gentoo/home/ Create and mount the proc filesystem # mkdir /mnt/gentoo/proc # mount -t proc none /mnt/gentoo/proc/ Check the date # date # hwclock --set --date "14 Jul 2004 21:48" # hwclock --hctosys Install the stage3 tarball # ls /mnt/cdrom/stages/ # cd /mnt/gentoo/ # tar -xvjpf /mnt/cdrom/stages/stage3-amd64-20040411.tar.bz2 Install the portage snapshot (from the CD) # ls /mnt/cdrom/snapshots/ # tar -xvjf /mnt/cdrom/snapshots/portage-20040411.tar.bz2 -C /mnt/gentoo/usr/ Copy over the source code from the CD # mkdir /mnt/gentoo/usr/portage/distfiles # cp /mnt/cdrom/distfiles/* /mnt/gentoo/usr/portage/distfiles/ Configure the compile options # less /mnt/gentoo/etc/make.conf.example # less /mnt/gentoo/usr/portage/profiles/use.desc # nano -w /mnt/gentoo/etc/make.conf # These settings were set by the catalyst build script that automatically built this stage # Please consult /etc/make.conf.example for a more detailed example CFLAGS="-O2 -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CXXFLAGS="${CFLAGS}" MAKEOPTS="-j2" Select best mirrors for downloading software # mirrorselect -a -s4 -o |grep -ve '^Netselect' >>/mnt/gentoo/etc/make.conf Copy over DNS information # cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf Chroot into the new environment # chroot /mnt/gentoo/ /bin/bash # env-update # source /etc/profile Configure the USE variable # nano -w /etc/make.conf USE="qt kde cups alsa oss -gtk -gnome" Set the timezone # ls /usr/share/zoneinfo/ # ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime Install the kernel sources # emerge gentoo-dev-sources # ls -al /usr/src/linux Configure the kernel # cd /usr/src/linux # make clean # make mrproper # make menuconfig http://sub.gotdns.org/linux-tutorials/framebuffer.php (Framebuffer Tutorial) Processor type and features ---> [*] MTRR (Memory Type Range Register) support Loadable module support ---> [*] Enable loadable module support [*] Module unloading [*] Automatic Kernel module loading Graphics support ---> [*] Support for frame buffer devices [*] VESA VGA graphics support Device Drivers --> Console display driver support ---> --- VGA text console [*] Video mode selection support [*] Framebuffer Console support Device Drivers --> Scsi Device Support --> Scsi Low Level Drivers --> Serial ATA Support --> Promise SATA Support CONFIG_SCSI_SATA=y CONFIG_SCSI_SATA_PROMISE=y CONFIG_DEVFS_FS=y CONFIG_DEVFS_MOUNT=y Save the current kernel configuration? Compile the kernel # make && make modules_install Copy the kernel image to the boot directory # cp arch/x86_64/boot/bzImage /boot/kernel-2.6.5-gentoo Copy the config file to the boot directory # cp .config /boot/config-2.6.5-gentoo Configure the kernel modules # nano -w /etc/modules.autoload.d/kernel-2.6 # Load on-board LAN driver sk98lin # modules-update Warning: could not generate /etc/modprobe.conf Create filesystem information file # nano -w /etc/fstab /dev/sda1 /boot ext3 noauto,noatime 1 2 /dev/sda2 none swap sw 0 0 /dev/sda4 / ext3 noatime 0 1 /dev/sda3 /home ext3 noatime 0 1 #/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0 #/dev/fd0 /mnt/floppy auto noauto 0 0 # NOTE: The next line is critical for boot! none /proc proc defaults 0 0 # glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for # POSIX shared memory (shm_open, shm_unlink). # (tmpfs is a dynamically expandable/shrinkable ramdisk, and will # use almost no memory if not populated with files) # Adding the following line to /etc/fstab should take care of this: none /dev/shm tmpfs defaults 0 0 Set network name information # echo amd64 >/etc/hostname # echo littlefield.uk.com >/etc/dnsdomainname # echo amd64.littlefield.uk.com >/etc/nisdomainname Add network name information to bootup sequence # rc-update add domainname default Configure network # nano -w /etc/conf.d/net iface_eth0="192.168.0.114 broadcast 192.168.0.255 netmask 255.255.255.0" gateway="eth0/192.168.0.11" Add network to bootup sequence # rc-update add net.eth0 default Add extra network name information # nano -w /etc/hosts 127.0.0.1 amd64.littlefield.uk.com amd64 localhost.localdomain localhost 10.0.0.1 gateway.littlefield.uk.com gateway 192.168.0.11 bookpc.littlefield.uk.com bookpc 192.168.0.12 work.littlefield.uk.com work 192.168.0.103 laptop.littlefield.uk.com laptop 192.168.0.107 claire.littlefield.uk.com claire 192.168.0.109 emma.littlefield.uk.com emma Configure system information # nano -w /etc/rc.conf KEYMAP="uk" Configure the bootloader # emerge --usepkg grub-static # cp -Rpv /usr/share/grub/i386-pc/* /boot/grub # nano -w /boot/grub/grub.conf default=0 timeout=10 splashimage=(hd0,0)/grub/splash.xpm.gz title=Gentoo Linux 2.6.5 root=(hd0,0) kernel=/kernel-2.6.5-gentoo root=/dev/sda4 video=vesa:ywrap,mtrr vga=0x305 # grub grub> root (hd0,0) Filesystem type is ext2fs, partition type 0x83 grub> setup (hd0) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded. succeeded Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded Done. grub> quit Install the system logger # emerge sysklogd # nano -w /etc/syslog.conf auth,authpriv.* /var/log/auth.log *.*;auth,authpriv.none -/var/log/syslog cron.* /var/log/cron.log daemon.* -/var/log/daemon.log kern.* -/var/log/kern.log lpr.* -/var/log/lpr.log mail.* /var/log/mail.log user.* -/var/log/user.log uucp.* -/var/log/uucp.log local6.debug /var/log/imapd.log *.=debug;\ auth,authpriv.none;\ news.none;mail.none -/var/log/debug *.=info;*.=notice;*.=warn;\ auth,authpriv.none;\ cron,daemon.none;\ mail,news.none -/var/log/messages *.emerg * daemon,mail.*;\ news.=crit;news.=err;news.=notice;\ *.=debug;*.=info;\ *.=notice;*.=warn /dev/tty12 local2.* -/var/log/ppp.log # rc-update add sysklogd default Install the cron daemon # emerge vixie-cron # rc-update add vixie-cron default Set root's password! # passwd root New UNIX password: ******** Retype new UNIX password: ******** Add a normal user # adduser paully -m -G users,wheel,audio,tty -s /bin/bash # passwd paully New UNIX password: ******** Retype new UNIX password: ******** Reboot # exit # cd / # umount /mnt/gentoo/proc/ # umount /mnt/gentoo/home/ # umount /mnt/gentoo/boot/ # umount /mnt/gentoo/ # reboot ----------------------------------------------------------------------------- Update the system # emerge sync # emerge --deep --update system # emerge --deep --update world ----------------------------------------------------------------------------- ** This section deals with adding the RAID 1 feature ** At this stage of the Gentoo installation, only one hard disk is being used. In order to use RAID 1 (mirroring) you have to have an exact duplicate of the first disk with same partitions. 1. Hit to enter the Promise RAID BIOS 2. Delete the existing RAID 1 array (yes...) 3. Reboot 4. Hit to enter the Promise RAID BIOS 5. Add the same RAID 1 array by 'Auto Setup' 6. Optimize Array for 'Security' (Mode: Mirror) 7. Save 8. Do you want disk image duplicated? 9. (about an hour for 120Gb) 10. Reboot Now boot into Gentoo Linux as normal... Mount the /boot directory # mount /dev/sda1 /boot Add RAID support to the kernel (not as modules!) # cd /usr/src/linux # make clean # make mrproper # cp /boot/config-2.6.5-gentoo .config # make menuconfig Multi-Device Support (RAID and LVM) ---> <*> Multiple devices driver support (RAID and LVM) <*> RAID support <*> RAID-1 (mirroring) mode Save the current kernel configuration? Compile the kernel # make && make modules_install Copy the kernel image to the boot directory # cp arch/x86_64/boot/bzImage /boot/kernel-2.6.5-gentoo Copy the config file to the boot directory # cp .config /boot/config-2.6.5-gentoo Install the RAID tools software # emerge raidtools Unmount the /boot directory # umount /boot Reboot # reboot Convert the non-RAID System to run on Software RAID # http://www.tldp.org/HOWTO/Software-RAID-HOWTO-7.html#ss7.6 ...which involves... Boot into the Gentoo Linux 2004.1 (AMD64) Live CD # gentoo Load the UK keyboard # loadkeys uk Set root's password # passwd root Mount the existing partitions # mount /dev/sda4 /mnt/gentoo/ # mount /dev/sda1 /mnt/gentoo/boot/ # mount /dev/sda3 /mnt/gentoo/home/ Create a /etc/raidtab file # nano -w /mnt/gentoo/etc/raidtab raiddev /dev/md0 raid-level 1 nr-raid-disks 2 nr-spare-disks 0 chunk-size 4 persistent-superblock 1 device /dev/sda1 raid-disk 0 device /dev/sdb1 raid-disk 1 raiddev /dev/md1 raid-level 1 nr-raid-disks 2 nr-spare-disks 0 chunk-size 4 persistent-superblock 1 device /dev/sda4 raid-disk 0 device /dev/sdb4 raid-disk 1 raiddev /dev/md2 raid-level 1 nr-raid-disks 2 nr-spare-disks 0 chunk-size 4 persistent-superblock 1 device /dev/sda3 raid-disk 0 device /dev/sdb3 raid-disk 1 Copy the file to the Live CD system for use now # cp /mnt/gentoo/etc/raidtab /etc/raidtab Unmount the existing partitions # umount /mnt/gentoo/home/ # umount /mnt/gentoo/boot/ # umount /mnt/gentoo/ Start the RAID synchronisation # mkraid --really-force /dev/md0 # mkraid --really-force /dev/md1 # mkraid --really-force /dev/md2 Mount the new RAID devices # mount /dev/md1 /mnt/gentoo/ # mount /dev/md0 /mnt/gentoo/boot/ # mount /dev/md2 /mnt/gentoo/home/ Change into the new RAID mounted environment # chroot /mnt/gentoo/ Edit the filesystem information file to use the new RAID devices # nano -w /etc/fstab /dev/md0 /boot ext3 noauto,noatime 1 2 /dev/sda2 none swap sw 0 0 /dev/md1 / ext3 noatime 0 1 /dev/md2 /home ext3 noatime 0 1 #/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0 #/dev/fd0 /mnt/floppy auto noauto 0 0 # NOTE: The next line is critical for boot! none /proc proc defaults 0 0 # glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for # POSIX shared memory (shm_open, shm_unlink). # (tmpfs is a dynamically expandable/shrinkable ramdisk, and will # use almost no memory if not populated with files) # Adding the following line to /etc/fstab should take care of this: none /dev/shm tmpfs defaults 0 0 Configure the bootloader to use the new RAID devices # nano -w /boot/grub/grub.conf default=0 timeout=10 splashimage=(hd0,0)/grub/splash.xpm.gz title=Gentoo Linux 2.6.7-gentoo-r11 root=(hd0,0) kernel=/kernel-2.6.5-gentoo root=/dev/md1 video=vesa:ywrap,mtrr vga=0x305 Change the partition types for BOTH drives (leaving swap as it is) # fdisk /dev/sda t > 1 > fd t > 3 > fd t > 4 > fd w # fdisk /dev/sdb t > 1 > fd t > 3 > fd t > 4 > fd w Leave the RAID environment # exit Unmount the existing partitions # umount /mnt/gentoo/home/ # umount /mnt/gentoo/boot/ # umount /mnt/gentoo/ Force a check on each new RAID device filesystem # e2fsck -f /dev/md0 # e2fsck -f /dev/md1 # e2fsck -f /dev/md2 Resize the new RAID device filesystems # resize2fs /dev/md0 # resize2fs /dev/md1 # resize2fs /dev/md2 Reboot and keep your fingers crossed! # reboot Output of boot message showing automatic RAID startup md: Autodetecting RAID arrays. md: autorun ... md: considering sdb4 ... md: adding sdb4 ... md: sdb3 has different UUID to sdb4 md: sdb1 has different UUID to sdb4 md: adding sda4 ... md: sda3 has different UUID to sdb4 md: sda1 has different UUID to sdb4 md: created md1 md: bind md: bind md: running: raid1: raid set md1 active with 2 out of 2 mirrors md: considering sdb3 ... md: adding sdb3 ... md: sdb1 has different UUID to sdb3 md: adding sda3 ... md: sda1 has different UUID to sdb3 md: created md2 md: bind md: bind md: running: raid1: raid set md2 active with 2 out of 2 mirrors md: considering sdb1 ... md: adding sdb1 ... md: adding sda1 ... md: created md0 md: bind md: bind md: running: raid1: raid set md0 active with 2 out of 2 mirrors md: ... autorun DONE. Check for correct mounted devices / filesystems # mount /dev/md1 on / type ext3 (rw,noatime) none on /dev type devfs (rw) none on /proc type proc (rw) none on /sys type sysfs (rw) none on /dev/pts type devpts (rw) /dev/md2 on /home type ext3 (rw,noatime) none on /dev/shm type tmpfs (rw) Check the status of the md (RAID) devices # cat /proc/mdstat Personalities : [raid1] md2 : active raid1 sdb3[1] sda3[0] 9775488 blocks [2/2] [UU] md1 : active raid1 sdb4[1] sda4[0] 106888384 blocks [2/2] [UU] md0 : active raid1 sdb1[1] sda1[0] 48064 blocks [2/2] [UU] unused devices: Hurrah! :-) ----------------------------------------------------------------------------- Install ALSA (Advanced Linux Sound Architecture) Add ALSA support to the kernel as modules # cd /usr/src/linux # make clean # make mrproper # cp /boot/config-2.6.7-gentoo-r11 .config # make menuconfig Sound Support ---> <*> Sound Support Advanced Linux Sound Architecture ---> Sound Card Drivers ---> VIA VT82xx Series Save the current kernel configuration? Compile the kernel # make && make modules_install Copy the kernel image to the boot directory # cp arch/x86_64/boot/bzImage /boot/kernel-2.6.7-gentoo-r11 Copy the config file to the boot directory # cp .config /boot/config-2.6.7-gentoo-r11 Unmount the /boot directory # umount /boot Reboot # reboot Read the online manuals # http://www.gentoo.org/doc/en/alsa-guide.xml # http://www.alsa-project.org/alsa-doc/doc-php/template.php?company=VIA&card=&chip=via82c686a&module=via82xx Install the ALSA Utils Package # emerge alsa-utils # nano -w /etc/modules.d/alsa # ALSA portion alias char-major-116 snd alias snd-card-0 snd-via82xx options snd-via82xx index=0 dxs_support=4 ac97_quirk=0 ## OSS/Free portion alias char-major-14 soundcore alias sound-slot-0 snd-card-0 # OSS/Free portion : card #1 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss ## OSS/Free portion : all cards alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss # Set this to the correct number of cards. options snd cards_limit=1 Configure the system to start ALSA sound at boot time # rc-update add alsasound boot # /etc/init.d/alsasound start Set the sound levels # amixer # alsamixer 100 100 100 100 100 100 100 100 100 100 Test the sound # aplay /usr/kde/3.2/share/sounds/pop.wav ----------------------------------------------------------------------------- Install Xorg Server # http://www.gentoo.org/doc/en/xorg-config.xml # emerge xorg-x11 # env-update # source /etc/profile Install the latest nVidia driver # emerge nvidia-glx Configure the Xorg Server # man 5 xorg.conf # xorgconfig > Save as /root/xorg.conf Configure and Start the X Font Server # rc-update add xfs default # /etc/init.d/xfs start Start the X Server (1st Time - no xterm) # Xorg -config /root/xorg.conf CTRL+ALT+DEL to exit Start the X Server (2nd Time) # startx CTRL+ALT+DEL to exit You may experience a weird BLACK screen after quitting the X server. This is due to the VESA FrameBuffer being used for the high-res console. So, we will have to temporarily disable the setting in the GRUB config: # nano -w /boot/grub/grub.conf default=0 timeout=10 splashimage=(hd0,0)/grub/splash.xpm.gz title=Gentoo Linux 2.6.5 root=(hd0,0) kernel=/kernel-2.6.5-gentoo root=/dev/md1 Reboot (to disable the hi-res VESA framebuffer console # reboot ----------------------------------------------------------------------------- Install the KDE Window Manager Edit the compiler configuration file # nano -w /etc/make.conf USE="qt kde cups -gnome -gtk" Install the packages # emerge kde (This took just 5 hours and installed 65 packages) Check for KDE version installed # ls /etc/X11/Sessions/ kde-3.2.3 Edit the run-control configuartion file to match above # nano -w /etc/rc.conf XSESSION="kde-3.2.3" Fire up KDE # startx ----------------------------------------------------------------------------- Tweak the GeTTY login prompt This will clear the screen and show the terminal number # clear >/etc/issue # nano -w /etc/issue ^[[H^[[J <-- this is the weird 'clear' line) This is \n.\O (\s \m \r) \l ----------------------------------------------------------------------------- Add Keyboard Number Lock to boot # rc-update add numlock default # /etc/init.d/numlock start ----------------------------------------------------------------------------- Reduce the number of consoles (for security and RAM) # nano -w /etc/inittab c1:12345:respawn:/sbin/agetty 38400 tty1 linux c2:12345:respawn:/sbin/agetty 38400 tty2 linux # c3:12345:respawn:/sbin/agetty 38400 tty3 linux # c4:12345:respawn:/sbin/agetty 38400 tty4 linux # c5:12345:respawn:/sbin/agetty 38400 tty5 linux # c6:12345:respawn:/sbin/agetty 38400 tty6 linux ----------------------------------------------------------------------------- Install Firefix Web Browser # emerge mozilla-firefox-bin ----------------------------------------------------------------------------- Install OpenOffice # ACCEPT_KEYWORDS="~amd64" FEATURES="-sandbox" emerge app-office/openoffice-bin ----------------------------------------------------------------------------- How many packages are installed? qpkg is GenToolKit's "query package" tool, using it, you can find packages owning files on your filesystem, check the integrity of installed packages, and do other queries against installed or uninstalled packages. examples: # qpkg Show all packages # qpkg -I, --installed Include only installed packages # qpkg -v Show version numbers # qpkg -I |wc -l Show the number of installed packages ----------------------------------------------------------------------------- Installing gFTP # USE="gtk" emerge gftp ----------------------------------------------------------------------------- ACPI Power Management (Part I) HOWTO Automatically turn off your monitor http://gentoo-wiki.com/HOWTO_Automatically_turn_off_your_monitor ** unsuccessful :-( ** ----------------------------------------------------------------------------- Getting K3b to automatically burn audio CDs from mp3 files The default install of K3b did not include the MAD libraries, which are required to decode MPEG123 files, so we have to pass the extra USE flag to the emerge command in order to install the libraries, then recompile K3b to use them. This will then include the MAD plugin which the software needs! # USE="mad" emerge --verbose k3b ----------------------------------------------------------------------------- USB Scanner: Epson Perfection 1200U USB Scanners are handled very differently in kernel 2.6, and you will be using the 'libusb' method, rather then the old 'scanner.o' module. http://forums.gentoo.org/viewtopic.php?t=138862 http://linuxusbguide.sourceforge.net/USB-guide-1.0.9/c122.html http://www.tldp.org/HOWTO/Scanner-HOWTO/ http://www.freecolormanagement.com/sane/index.html Add appropriate USB support to the kernel # mount /dev/md0 /boot/ # cd /usr/src/linux # make clean # make mrproper # cp /boot/config-2.6.7-gentoo-r14 .config # make menuconfig General setup ---> [*] Support for hot-pluggable devices Device Drivers ---> USB support ---> [*] USB device filesystem UHCI HCD (most Intel and VIA) support USB Mass Storage support Save the current kernel configuration? Compile the kernel # make && make modules_install Copy the kernel image to the boot directory # cp arch/x86_64/boot/bzImage /boot/kernel-2.6.7-gentoo-r14 Copy the config file to the boot directory # cp .config /boot/config-2.6.7-gentoo-r14 Unmount the /boot directory # umount /boot Reboot # reboot Install the 'libusb' package # emerge --verbose libusb Install the 'sane-backend' package with USB support # USE="usb" emerge --verbose sane-backends Run the 'sane-find-scanner' software to check it can be found # sane-find-scanner found USB scanner (vendor=0x04b8 [EPSON], product=0x0104 [Perfection1200]) at libusb:002:002 Run the 'scanimage' software to perform another check # scanimage -L device `epson:libusb:002:002' is a Epson Perfection1200 flatbed scanner Edit the config file for sane using the values from above # nano -w /etc/sane.d/epson.conf # USB scanner - only enable this if you have an EPSON scanner. It could # otherwise block your non-EPSON scanner from being # recognized. # Depending on your distribution, you may need either the # first or the second entry. # usb /dev/usbscanner0 # usb /dev/usb/scanner0 usb libusb:002:002 Change the permissions on the device files # chmod 660 /proc/bus/usb/002/* # chgrp users /proc/bus/usb/002/* Test the 'xsane' front-end in KDE... # xsane ...great, it works! Now we need to set this up permanently. Firstly, edit the fstab file to sort out automounting and permissions # nano -w /ets/fstab # support for the USB filesystem, needed for my scanner none /proc/bus/usb usbfs defaults,devmode=0666 0 0 Then, install the 'hotplug' package # emerge --verbose hotplug Edit the hotplus usb.usermap file # nano -w /etc/hotplug/usb.usermap epson_scanner 0x0003 0x04b8 0x0104 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 Create the 'epson_scanner' hotplug file # nano -w /etc/hotplug/usb/epson_scanner #!/bin/bash if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ] then chmod 660 "${DEVICE}" chgrp users "${DEVICE}" fi That's it! (phew) ----------------------------------------------------------------------------- Installing VMware Workstation www.vmware.com/support/ws4/doc/ Remove the '~amd64' mask # nano -w /etc/portage/package.keywords app-emulation/vmware-workstation ~amd64 Install the VMware package # emerge --verbose vmware-workstation Run the config tool # /opt/vmware/bin/vmware-config.pl Add it to the default run level # rc-update add vmware default Run vmware as a NORMAL user # vmware & Setup a new Virtual machine File --> New Virtual machine --> Windows --> Windows Me --> etc Boot from the Windows Me floppy disk, partition and format the 2Gb drive # fdisk, format c: Install the Windows Operating System # cd e: # setup.exe Change the settings of the CD-ROM drive (to install Tools!) VM --> Removeable Devices --> IDE 1:1 --> Edit --> Connection --> [*] Legacy Emulation Install VMware Tools VM --> Install VMware Tools Install TweakUI for Windows http://ftp.pcworld.com/pub/new/utilities/system_resources_tune_up/tweakui133.exe Enjoy! -------------------------------------------------------- Per Package Automatic USE Flags Read the documentation # man portage If not already there, create the config files # find /etc/portage /etc/portage/ /etc/portage/package.use /etc/portage/package.mask /etc/portage/package.unmask /etc/portage/package.keywords /etc/portage/sets For example #1 # nano /etc/portage/package.keywords app-office/openoffice-bin ~amd64 app-emulation/vmware-workstation ~amd64 For example #2 # nano /etc/portage/package.use media-gfx/sane-backends usb ----------------------------------------------------------------------------- Installing DooM 3 Install the ebuild # emerge games-fps/doom3 Copy the main data files from the 3 CDs! # cp /mnt/cdrom/Setup/Data/base/pak002.pk4 /opt/doom3/base/ # cp /mnt/cdrom/Setup/Data/base/pak00* /opt/doom3/base/ # cp /mnt/cdrom/Setup/Data/base/pak00* /opt/doom3/base/ Start the game # /usr/games/bin/doom3 :-) ----------------------------------------------------------------------------- Fixing K3b burn CD error with kernel >= 2.6.8 (non-root user) Remove the SUID bit from the cdrecord binary # chmod u-s /usr/bin/cdrecord Start K3b and choose 'cancel' to the root priveledges recommendation # /usr/bin/k3b ----------------------------------------------------------------------------- Fixing USB Multi-Card Reader 'bad superblock' error If you receive the following error, when trying to mount a USB2.0 Multi-Card Reader... "mount: wrong fs type, bad option, bad superblock on /dev/sdc1,        or too many mounted file systems" ...it will probably be that the wrong or missing codepage has been compiled into the kernel: # make menuconfig File systems ---> DOS/FAT/NT Filesystems ---> (437) Default codepage for FAT (iso8859-1) Default iocharset for FAT Native Language Support ---> (iso8859-1) Default NLS Option <*> Codepage 437 (United States, Canada) <*> NLS ISO 8859-1 (Latin 1; Western European Languages) # reboot ----------------------------------------------------------------------------- Installing an Epson Stylus C46 Printer Configure the kernel to compile the USB Printing module # make menuconfig Device Drivers ---> USB support ---> [*] USB device filesystem UHCI HCD (most Intel and VIA) support USB Mass Storage support USB Printing support # reboot Load the kernel modules # modprobe uhci-hcd # modprobe usblp usb 2-1: new full speed USB device using address 3 drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x04B8 pid 0x0005 # lsusb Bus 002 Device 003: ID 04b8:0005 Seiko Epson Corp. Stylus Printer Add the following global USE variables # nano -w /etc/make.conf USE="... cups ppds usb" Install the relevant Gentoo packages # emerge --verbose cups psutils ghostscript gimp-print Restart the CUPS Server # /etc/init.d/cupsd restart Load the CUPS web interface # http://127.0.0.1:631 [Add Printer] Name: C46 Location: amd64 Description: Epson Stylus C46 [Continue] Device: USB Printer #1 (EPSON Stylus C46) [Continue] Make: EPSON [Continue] EPSON Stylus C44UX - CUPS+Gimp-Print v4.2.6 (en) [Finish] [Print Test Page] This will be added as the URI - usb://EPSON/Stylus%20C46 ----------------------------------------------------------------------------- Tweaking the 'screen' software to ALWAYS display the status information in your titlebar Konsole > Settings > Configure Konsole > Session [tab] > (Select your saved Session Name) Properties > $TERM : xterm ----------------------------------------------------------------------------- Tweaking the 'screen' software to NOT display the status information in your titlebar Konsole > Settings > Configure Konsole > Session [tab] > (Select your saved Session Name) Properties > $TERM : linux ----------------------------------------------------------------------------- Fixing ALSA bug For some reason, when I updated my system and recompiled a newer kernel with all modules changed to 'built-in' and my ALSA settings reconfigured, I lost my sound! To cut a long story short, (after 2 kernel recompiles and several re-emerges) I managed to find a remarkable fix on the Gentoo Forums.... gpm. Yes, the console mouse driver fixed the ALSA bug. It's bizarre, but you have to have the 'gpm' service started for 'alsaconf' to work properly. So, if you... 1. Recompile your kernel source with all the sound options as odules 2. Add your sound card driver to /etc/modules.autoload/kernel-2.6 (eg snd-via82xx) 3. Make sure 'gpm' is added as a boot service with "rc-update add gpm boot" 4. Make sure 'alsasound' is added as a sevice with "rc-update add alsasound default" 5. Reboot (watching that your sound module loads OK and that gpm starts) 6. Run 'alsaconf' and keep pressing OK to set up /etc/modules.d/alsa 7. Run 'modules-update' to reread all the above settings 8. Run '/etc/init.d/alsasound restart' 9. Run 'alsamixer' and set everything to about 75% ...you will be fine! Here are my files for reference:- paully@amd64 ~ $ cat /etc/modules.d/alsa # Alsa 0.9.X kernel modules' configuration file. # $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.conf-rc,v 1.4 2004/11/16 01:31:22 eradicator Exp $ # # IMPORTANT: # You need to customise this section for your specific sound card(s) # and then run `update-modules' command. # Read alsa-driver's INSTALL file in /usr/share/doc for more info. # # ALSA portion # OSS/Free portion # OSS/Free portion - card #1 # OSS/Free portion - all cards alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss # Set this to the correct number of cards. # --- BEGIN: Generated by ALSACONF, do not edit. --- # --- ALSACONF version 1.0.10 --- options snd-via82xx index=0 dxs_support=4 ac97_quirk=0 alias snd-card-0 snd-via82xx alias sound-slot-0 snd-via82xx # --- END: Generated by ALSACONF, do not edit. --- paully@amd64 ~ $ alsamixer View: [Playback] 77 77 77 MM 77 77
77 77 77 MM 77 77 MM 77 77 MM OO 77 77 77 77 paully@amd64 ~ $ aplay /usr/kde/3.4/share/sounds/pop.wav ----------------------------------------------------------------------------- Converting WMA audio files to MP3 # rip with Mplayer and then encode with LAME for i in *.wma ; do mplayer -vc dummy -vo null -ao pcm:waveheader $i && sleep 1 && lame -m s audiodump.wav -o $i; done # convert file names to .mp3 for i in *.wma; do mv "$i" "`basename "$i" .wma`.mp3"; done ----------------------------------------------------------------------------- Converting AAC audio files to MP3 # This command will convert an AAC audio file to an mp3 audio file: ffmpeg -i input.m4a -acodec mp3 -ac 2 -ab 128 output.mp3 # Batch conversion can be done with: for i in *.m4a; do ffmpeg -i "$i" -acodec mp3 -ac 2 -ab 128 "${i%m4a}mp3"; done ----------------------------------------------------------------------------- Synchronising a Palm TX Handheld PDA with Linux http://www.pilot-link.org Install the 'pilot-link' package # emerge -av pilot-link Read the manuals # /usr/share/doc/pilot-link-0.11.8-r1/README.gz # /usr/share/doc/pilot-link-0.11.8-r1/README.usb.gz Recompile the kernel with correct USB modules Device Drivers ---> USB support ---> <*> Support for Host-side USB USB Serial Converter support ---> <*> USB Serial Converter support <*> USB Handspring Visor / Palm m50x / Sony Clie Driver Reboot and plug in the cable and PDA. You should see the following kernel messages usb 4-1: new full speed USB device using uhci_hcd and address 11 visor 4-1:1.0: Handspring Visor / Palm OS converter detected usb 4-1: Handspring Visor / Palm OS converter now attached to ttyUSB0 usb 4-1: Handspring Visor / Palm OS converter now attached to ttyUSB1 If it hasn't already, create the character device nodes # mknod /dev/ttyUSB0 c 188 0 # mknod /dev/ttyUSB1 c 188 1 Change ownership and permissions for a regular user # chown paully:tty /dev/ttyUSB* # chmod 0777 /dev/ttyUSB* Tap the sync button on your PDA, then run the 'pilot-xfer' program as example below # /usr/bin/pilot-xfer --port /dev/ttyUSB1 --exclude .pilot/TX/sync_exclusions.txt --sync .pilot/TX/Backup ----------------------------------------------------------------------------- Bug-fixing the nVidia Linux Display Driver 1.0-8756 When I upgraded to the latest display drivers from nVidia, my screen savers stopped working. Digging around in the X server log file, it seemed that the 'nvidia-glx' module was broken, which meant that no OpenGL applications would work. Re-installing it didn't fix the issue, so after a lot more digging around the web forums, I eventually found a solution... ...apparently, the library paths are broken in this particular release / ebuild. This will fix them: # su - root # nano -w /etc/env.d/03opengl LDPATH="//usr/lib/opengl/nvidia/lib://usr/lib32/opengl/nvidia/lib" OPENGL_PROFILE="nvidia" # env-update Just to be sure, log out, then in again as root and run the command 'Xorg' not 'startx'. Press CTRL+ALT+DEL to stop the X server and check the screen for errors. There should be none. Now run 'startx' and check your GL library with the commands 'glxinfo' and 'glxgears' which should work as normal again. ----------------------------------------------------------------------------- Bug fix DVD writing with a newer kernel If you have upgraded your software recently to the latest 2.6.17 series kernel AND the latest dvd+rw-tools with K3B, then you may find a bug trying to write a DVD. The error message reads something like "unable to anonymously mmap 33554432: Resource temporarily unavailable". Just add the '-use-the-force-luke' parameter to the command line or in the K3B setup to fix it... e.g. # growisofs -use-the-force-luke=bufsize:16m -Z /dev/hdc -R -J /backup/paully/cdrw/ -----------------------------------------------------------------------------