GentooLight Minimal Desktop
IntroductionThis is a lightweight Gentoo/Funtoo installation based on Funtoo unstable. It's very flexible: run it as a VMware guest or burn an ISO image and boot it from CD. Many drivers are already installed - some are not. You have the ability to change the installation quite easily.
You can run this system even as a Live Linux from a CD, USB disk or from hard disk where the base system is stored in a read-only compressed file (SquashFS). This allows you a very interesting workflow: create and test your environment in a virtual machine and then copy the compressed image file over to the productive PC wich may be a embedded or a desktop PC or whatever. Note that such a system boots very quickly - not more than 10 seconds for bringing up a lightweight desktop!
If you run it as a Live Linux you may be interested in saving the modifications (= persistent root session). This great feature has been introduced by the help of Michael Towers with his larch project.
Status: This version can be used for productive environment and works stable as far as I know.
Is this a normal VMware Virtual Machine? Yes, it is. There are some scripts in /root and /etc/conf.d wich are not needed for the work inside a VM and cost very few space on the vmdk. The only thing you might consider is to reduce the kernel configuration to the VM drivers only.
DownloadsNew from 2011-04: the VM and the ISOs are completly autogenerated with Andrew Gaffney's quickstart!
|Type ||Link ||Description|
|VMware Virtual Machine||gentoolight-vm-2012-12-26.7z|
|This is the virtual machine wich can be run on Windows and Linux Host systems.|
Use it for Gentoo tests, as server or anything else. It's also the base for the other downloads below.
|Bootable ISO Image||gentoolight-2012-12-26.iso|
|Live CD with the portage tree. Boot it directly or load it to the VMware machine and boot the ISO. You can burn this image on a CD or extract the squashed FS for an USB disk.|
Set 'vmwareguest' and 'res=...' in the boot options.
|Bootable ISO Image||gentoolight-nop-2012-12-26.iso|
|Live CD without the portage tree. Boot it directly or load it to the VMware machine and boot the LiveCD as a VM. You can burn this image on a CD or extract the squashed FS for an USB disk.|
Set 'vmwareguest' and 'res=...' in the boot options.
Also take a look at the download archive for older versions.
Note: VMware Player and Server are for free for non-commercial use!
|Feature||Version / Description|
Note: the source is "ready to use" in /usr/src/linux
|Architecture||i686 (32 bit)|
|Hardware||Most modules are compiled into the kernel and they are not auto-detected by genkernel or whatever. Only some well known hardware is compiled into the kernel - if you're missing something, take the VM and compile the kernel with your hardware in it.|
|Some packages||gcc 4.6, grub-1.98-r2, boot-update-1.6 (Funtoo specific)|
baselayout 2.2, openrc 0.10, dhcpcd 5.5
dbus-1.6.8, consolekit-0.4.5, polkit-0.109, gvfs-1.12.3, udisks-2.0.0, polkit-gnome-0.105
xorg-x11 7.4, xorg-server 1.13
gtk+ 3.4, gtk+ 2.24, lxde-meta 0.5.5, pcmanfm 1.1.0
|Desktop||LXDE (few Gnome, no KDE dependencies, pure GTK+!)|
|Login||auto-login as 'user' with login-manager "lighdm" (manages policy kit)|
See access data below.
|VM hardware||a bridged networking is preset|
User and admin access:
Name: user / Pass: gentoo
Name: root / Pass: gentoo
Note about the keymap: if the boot kernel command line contains "keymap=XY", the init script /etc/conf.d/local will overwrite the keymap layout in /etc/X11/xorg.conf.d/10-generic_keyboard.conf . This feature is handy for a CD/USB boot, but not in VMs. If you're running just a VM, change the keymap layout once in these files:
/etc/X11/xorg.conf.d/10-generic_keyboard.conf (for X11)
/etc/conf.d/keymaps (for console)
The virtual harddisk (.vmdk file) may grow to 25GB max. If you use more, create a new HD with VMware Workstation or an online tool an copy the contents to the bigger HD.
Use cases and some notesRW = read/write = system may be modified
RO = read only = system partition is mounted read-only with temporary RW layer in RAM wich will be lost after shutdown
Note: see also the "Boot options" chapter below!
1. Run VMware Virtual Machine RW
- extract the 7z-archive and just run it
- use it for tests or whatever; you may want to "emerge -avutD world" for the latest stuff
- there are 3 partitions:
|Virtual HD partition ||File system ||Usage|
- the Open VM Tools will be started and other options will be set if you specify vmwareguest as boot option:
- vmware-tools service (root init script)
- vmware-user (copy-paste support and others)
- mouse driver: hal/vmmouse
- see /etc/conf.d/local and /etc/conf.d/local.start
- select the screen resolution from boot line: res=1024x768 or any other you want (this will prepare an xorg.conf before running the xorg server)
- this VM is tested under Windows XP+7 and Gentoo Linux with Player 2.5 and 3.1
2. Run VMware Virtual Machine RO
- extract the 7z-archive, run it and select "read-only" in the Grub boot menu
- the root file system / is RO
- Use this to generate the LiveCD ISO and the squash image. The script writes it to an external drive (USB (pen) drive). See section "Other hacks" for this.
- use the vmware specific boot options (vmwareguest as in use case 1)
- boot option 'ro_root' is used here
3. Boot the ISO image
- Take the ISO image wich fits on a CD without the portage tree
- or the other one wich doesn't fit on a CD with the portage tree
- Burn ISO image to a CD or DVD (I have to append the option -dvd-compat to 'growisofs' if I want to burn a DVD)
- Boot the PC from DVD or CD by using ISOLINUX (with the squashed image from the ISO)
- hope that your harware is found by the kernel ;-)
- Note that the graphic driver and the screen resolution will be autodetected by xorg-server
4. Boot the ISO image as VMware guest
- in VMware Workstation: "Use ISO image file:" -> select the gentoo image
- you can download and use the "empty" VM above for test
- run the VM
- boots with ISOLINUX with the squashed image from the ISO
- Use the important boot options: vmwareguest and res=
5. Install to harddisk (file-by-file)
- you will have normal Gentoo installation with full write access to the root
- boot directly from ISO (see Use Case 3)
- mount your new root partition to /mnt/work
- mkdir /mnt/work/boot
- mount your new boot partition to /mnt/work/boot
- copy all files to the new root: cp -aR /mnt/static/* /mnt/work
- edit /mnt/work/boot/grub/grub.cfg (or use boot-update with /etc/boot.conf)
- edit /mnt/work/etc/fstab
- note: you don't need any init ram disk; just call the kernel
- good luck!
6. Install to harddisk as SquashFS image with persistent sessions
- This is the most exciting feature!
- Usage examples:
- Very fast boot speed (about 15 s on my old AMD64 3000+)!
- You have specific release cycles for your PCs or embedded system.
- After installation, you have very few changes (IP address, run a service...)
- It is solved with a 3 layer system mount (aufs file system):
- base layer generated by the VM (squash image file)
- persistent overlay wich can be changed and updated (squash image file)
- RW layer in RAM wich will be lost after shutdown
- If you have changed something in your system you may call /root/generatelayer.sh wich merges the last changes with previous persistent session.
- copy the squash image to the harddrive, for example /dev/sda2
- copy the initial ram disk to /boot
- specify the drive and the directory, where you want to save the persistent session
- See the boot options example below
- important options: sysdisk= sysfile= modsdisk= modsdir=
Boot optionsUse Case 1 RW: Typical boot kernel line for VMware guest boot - no initramfs is used:
kernel /boot/gentoo-2.6.30-a root=/dev/sda2 vmwareguest res=1280x1024
Use Case 2 RO: Typical boot kernel line for VMware guest boot - initramfs is used:
kernel /boot/gentoo-2.6.30-a ro_root=/dev/sda2 vmwareguest res=1280x1024
Use Case 3 RO: Typical boot kernel line for CD boot (SYSLINUX) - initramfs is used:
append sysdisk=/dev/sr0 sysfile=/sqsimage
Use Case 4 RO: Typical boot kernel line for CD boot in VMware session (SYSLINUX) - initramfs is used:
append imgpart=/dev/sr0 imgfile=/sqsimage vmwareguest res=1680x1050 res=1280x1024
Use Case 5 RW: Install to hd - nothing special is needed; example keymap=us:
kernel /gentoo-2.6.30-a root=/dev/sda2 keymap=us
Use Case 6 RO/RW: Squash image installed on hd with persistent sessions:
kernel /gentoo-2.6.30-a sysdisk=/dev/sda2 sysfile=/gentoolight-2010-03-07.sqs modsdisk=/dev/sda2 modsdir=/gentoolive
Various boot options:
|keymap=[keymap code]||This configuration will be written to /etc/hal/fdi/policies/10-keymap.fdi|
Use for example "us", "ch" or whatever.
|noX||do not start a X session; console only|
|bootshell||Stop the booting process at the end of the initial ram disk. Everything would be ready to switch to the "standard" system. Very useful for debugging the LiveCD or the aufs mounting process.|
How to build your own initamfs
- log in as root
- cd ~/initramfs
- edit init
- edit mkinitramfs.sh
This mounts /boot and copies the new initramfs to /boot
How to build a CD/DVD image:
- Very important! Run the VM as READ-ONLY (see use case 2)!
- log in as root
- cd ~/installer
- Edit mkusb.sh because it depends where you want to save your image! This is very personal!
Note: you're in a RO session and your changes will be lost
- insert an USB stick/drive
- Kernel configuration for gentoo-sources-2.6.32-r7: .config / for 2.6.36-r8: .config
- Union file system: Aufs
- Squash image file system: Squashfs
- Boot init script used in GentooLight
- Root session saving script generatelayer.sh
- Create a SquashFS and a bootable ISO image: mkusb.sh
- Any help and patches will be welcome!
- Please note that my time for this project is very limited, so don't expect very much support for it...
Get in contact with Claudio Nold (by e-mail)
03 Oct : 22:23
Reply to this
the "vmware-toolbox" isnt there anymore, only the "vmware-toolsbox-cmd", therefore the clean-vm.sh script doesnt in a very heroic way when calling for the shrink disk.