Sometimes i find myself in the need of getting some OS up and running quickly, just to try some stuff out. Like Live CD images of various sorts. Lately i've found myself playing around with
SLAX, a live Linux Slackware, with a file system that can exist on a USB flash stick on FAT32. That way the stick still is useful for other things (ie. using it as a normal stick from other operating systems that can mount FAT32 partitions).
Incidentally
BT3 (an security auditing tool) is these days also is based on SLAX.
I have yet to find a way to make
VMWare player (the free version of VMWare Inc's popular virtualization software) boot from the USB device.
There are several sources on the world wide web explaining how to customize the VMWare player, but i'll just recap my base configuration file, and other hint's that might be useful for customization.
Here is what to put in the VMware .vmx file:
## Valid entires are 7 and 8. We will use 8.
config.version = "8"
## This seems to indicate the version of the VMware hardware. Valid values
## are from 0 to 4. But to set value 4 you need to make the configuration
## file not writable because VMware Player will change it automaticaly to 3.
virtualHW.version = "3"
## This will specify how much ram will be used by VMware Player.
memsize = "256"
## This variables are used to configure the primary master ide channel.
## You must assign to ide0:0.fileName the name of the hard disk image created
## with qemu-img. ide0:0.present = "TRUE" means that the device shoul be
## connected on system startup.
ide0:0.present = "TRUE"
ide0:0.fileName = "hda.vmdk"
ide0:0.deviceType = "disk"
ide0:0.redo = ""
## No configuration for the primary slave ide channel.
## ide0:1.present = "TRUE"
## Configure the secondary master ide channel.
## This time you want to configure a cdrom.
## This configuration uses the cdrom.iso file as cdrom drive.
## If you want to use your phisical cdrom drive set
## ide1:0.filename = "auto detect"
## ide1:0.deviceType = "cdrom-raw"
ide1:0.present = "TRUE"
ide1:0.fileName = "slax.iso"
ide1:0.deviceType = "cdrom-image"
ide1:0.autodetect = "TRUE"
## No configuration for the secondary slave ide channel
## ide1:1.present = "TRUE"
## This section configures the floppy drive.
## change "/dev/fd0" to "A:" if you run VMware Player on Windows.
## You could also use an image of a floppy disk.
floppy0.present = "FALSE"
floppy0.fileName = "A:"
## Ethernet configuration.
## Activate on startup and set a nat connection.
# ethernet0.virtualDev = "e1000"
ethernet0.present = "TRUE"
ethernet0.connectionType = "nat"
ethernet0.addressType = "generated"
## Usb configuration.
## Activate usb on system startup.
usb.present = "TRUE"
## This configuration makes VMware Player emulate an es1371 sound card.
sound.present = "TRUE"
sound.virtualDev = "es1371"
## This is just to set tile of the VMware Player window.
displayName = "SLAX"
## Here you need to specify the guest os, that is the os that
## VMware Player will run. Possible choices are:
# guestOS = "winVista" # Windows Vista (experimental)
# guestOS = "longhorn" # Windows Longhorn (experimental)
# guestOS = "winNetBusiness" # Windows 2003 Small Business Server
# guestOS = "winNetEnterprise" # Windows 2003 Enterprise Server
# guestOS = "winNetStandard" # Windows 2003 Server
# guestOS = "winNetWeb" # Windows 2003 Web Server Edition
# guestOS = "winXPPro" # Windows XP Professional Edition
# guestOS = "winXPHome" # Windows XP Home Edition
# guestOS = "win2000AdvServ" # Windows 2000 Advanced Server
# guestOS = "win2000Serv" # Windows 2000 Server
# guestOS = "win2000Pro" # Windows 2000 Professional
# guestOS = "winNT" # Windows NT
# guestOS = "winMe" # Windows Me
# guestOS = "win98" # Windows 98
# guestOS = "win95" # Windows 95
# guestOS = "win31" # Windows 3.1 / Windows 3.11
# guestOS = "windows" # Other Windows
# guestOS = "winVista-64" # Windows Vista x64 Edition (experimental)
# guestOS = "longhorn-64" # Windows Longhorn x64 Edition (experimental)
# guestOS = "winNetEnterprise-64" # Windows 2003 Enterprise Server x64 Edition
# guestOS = "winNetStandard-64" # Windows 2003 Server x64 Edition
# guestOS = "winXPPro-64" # Windows XP Professional x64 Edition
# guestOS = "ubuntu" # Ubuntu Linux
# guestOS = "redhat" # Red Hat Linux
# guestOS = "rhel4" # Red Hat Enterprise Linux 4
# guestOS = "rhel3" # Red Hat Enterprise Linux 3
# guestOS = "rhel2" # Red Hat Enterprise Linux 2
# guestOS = "suse" # SuSE Linux
# guestOS = "sles" # SuSE Linux Enterprise Server
# guestOS = "mandrake" # Mandrake Linux
# guestOS = "nld9" # Novell Linux Desktop 9
# guestOS = "sjds" # Sun Java Desktop System
# guestOS = "turbolinux" # Turbo Linux
# guestOS = "other26xlinux" # Other Linux on a 2.6.x kernel
# guestOS = "other24xlinux" # Other Linux on a 2.4.x kernel
# guestOS = "linux" # Other Linux
# guestOS = "ubuntu-64" # Ubuntu Linux 64-bit
# guestOS = "rhel4-64" # Red Hat Enterprise Linux 4 64-bit
# guestOS = "rhel3-64" # Red Hat Enterprise Linux 3 64-bit
# guestOS = "sles-64" # SuSE Linux Enterprise Server 64-bit
# guestOS = "suse-64" # SuSE Linux 64-bit
# guestOS = "other26xlinux-64" # Other Linux 2.6.x 64-bit
# guestOS = "other24xlinux-64" # Other Linux 2.4.x 64-bit
# guestOS = "otherlinux-64" # Other Linux 64-bit
# guestOS = "solaris10-64" # Solaris 10 64-bit
# guestOS = "solaris10" # Solaris 10
# guestOS = "solaris9" # Solaris 9
# guestOS = "solaris8" # Solaris 8
# guestOS = "solaris7" # Solaris 7
# guestOS = "solaris6" # Solaris 6
# guestOS = "solaris" # Other Solaris
# guestOS = "netware6" # Netware 6.x
# guestOS = "netware5" # Netware 5.x
# guestOS = "netware4" # Netware 4.x
# guestOS = "netware" # Other Netware
# guestOS = "freeBSD-64" # FreeBSD 64-bit
# guestOS = "freeBSD" # FreeBSD
# guestOS = "darwin" # Apple Darwin (unsupported)
# guestOS = "other" # Other OS
# guestOS = "other-64" # Other 64-bit OS
guestOS = "linux"
## Set the Non Volatile Random Access Memory file which contains information
## about BIOS settings.
nvram = "bios.nvram"
In this sample file the ISO CD named
slax.iso will be booted.
The VMWare player will display
SLAX as its main window. And we will be attaching a hard harddrive image called
hda.vmdk to the virtual machine.
Note: You can tweak most settings to adjust them to your purposes. I've also found that i like the Intel NIC emulation preferable, but it's a matter of taste or choice. To enable it:
ethernet0.virtualDev = "e1000"
Save the above file in an empty directory, and in this case we could name it
slax.vmx.
Now we need to create an harddrive image, for which we will use a tool from the
QEMU to create the vmdk file. It exists for different operating systems, so pick your weapon. It's just a file and can be copied. Here we will use the windows program
qemu-img.exe to create a 2GB disk:
d:\vmware\qemu-img.exe create -f vmdk hda.vmdk 2GB
Cave eat: If you are running your vmdk disk from FAT32 partitions, VMWare player refuses to use larger than 4GB vmdk files. And by larger is meant, you can't create a
4GB image with the aforementioned method, but you can create a
4095M sized disk image.
Copy the created file to the same directory where you placed the .vmx file, and run it.
With the .vmx and .vmdk file, you now have a running customized VMware player configuration.
In some instantiations of xorg one might need to configure the X11/xorg.conf Monitor so we can use higher resolutions:
Section "Monitor"
Identifier "Monitor0"
VendorName "VMWare"
ModelName "VMX"
HorizSync 1.0 - 10000.0
VertRefresh 1.0 - 10000.0
EndSection
Information obtained from:
HowTo create VMX configuration files and VMDK disks with qemu-img
VMWare player Monitor, X11 resolution