Walltop: Difference between revisions
Brian Wilson (talk | contribs) |
Brian Wilson (talk | contribs) |
||
Line 56: | Line 56: | ||
lh_config | lh_config | ||
lh_bootstrap | lh_bootstrap | ||
# Prepare for a chroot system so you can do hacks | |||
lh_chroot | lh_chroot | ||
lh_chroot_hosts install | lh_chroot_hosts install | ||
Line 61: | Line 62: | ||
lh_chroot_proc install | lh_chroot_proc install | ||
chroot chroot | chroot chroot | ||
#do the hacks here, for example "apt-get install asterisk". | |||
exit | |||
# Now remove the changes make to do chroot | |||
lh_chroot_hosts remove | lh_chroot_hosts remove | ||
lh_chroot_resolv remove | lh_chroot_resolv remove | ||
lh_chroot_proc remove | lh_chroot_proc remove | ||
# I wonder what this does | |||
lh_binary | lh_binary | ||
# Build the image | |||
lh_build | lh_build | ||
Line 88: | Line 93: | ||
Starting X / fluxbox without a window manager | Starting X / fluxbox without a window manager | ||
http://www.debianadmin.com/how-to-auto-login-and-startx-without-a-display-manager-in-debian.html | http://www.debianadmin.com/how-to-auto-login-and-startx-without-a-display-manager-in-debian.html | ||
=== The basic principles === | === The basic principles === |
Revision as of 06:49, 18 February 2010
WallTop computers... recycle an old laptop by removing all the extraneous parts such as the cdrom drive, floppy drive, (dead) battery and then hanging it on the wall.
I am building one from an old Dell Inspiron 3700.
Operating system
I looked at using Debian, Damn Small Linux, Puppy Linux (which immediately panics on boot), and Movix. I decided I might as well stick with Ubuntu so I am building a custom Live CD. I will then transfer it to a Compact Flash card, which will be plugged into an IDE adapter and replace the incredibly noisy stock 4200 rpm hard drive.
See http://www.debuntu.org/how-to-customize-your-ubuntu-live-cd
Oh! This was a bad idea. Much stuff about Ubuntu live cd's has been deleted from this page!
Debian Live!
The way to do this is Debian Live!
Install the tools to build Debian Live! systems
apt-get install live-helper
Build an image.
lh_clean --binary lh_config -b usb-hdd -k 686 --bootstrap-flavour minimal\ --packages-lists "stripped" --binary-indices disabled\ --memtest "disabled"\ --packages "x-window-system-core fluxbox\ openssh-server vlc gnash portmap nfs-common\ autofs debconf-english"\ --bootappend-live "nolocales" --syslinux-timeout 50
I build on a 64 bit machine so I have to say -k 686 to get the 32 bit kernel
Add scripts to config/chroot_local-hooks
02-fix_inittab.sh - changes runlevel to 5 and adds the tty7 login line so I have only one login running instead of default 5
40-bash_profile.sh - append or create a .bash_profile script that will run a script from nfs and then do a 'startx'.
50-windowmanager.sh - configures fluxbox startup files
99-make-export.sh - make the directories needed for autofs
Add files to config/chroot_local-includes I add the autofs.* files that I use to mount nfs servers.
Doing customizations, do this (as root)
lh_clean --binary lh_config lh_bootstrap # Prepare for a chroot system so you can do hacks lh_chroot lh_chroot_hosts install lh_chroot_resolv install lh_chroot_proc install chroot chroot #do the hacks here, for example "apt-get install asterisk". exit # Now remove the changes make to do chroot lh_chroot_hosts remove lh_chroot_resolv remove lh_chroot_proc remove # I wonder what this does lh_binary # Build the image lh_build
Copy image to CF: dd if=binary.img of=${USBSTICK}
To test image, start in qemu or convert img file to a vmdk and use vmware
To use in walltop, transfer CF to laptop and boot it
Customization that I might want to do
other codecs??? emacs21-nox libcurl3 realplayer? firefox - use iceweasel, unless like me your laptop is puny, then forget it! flash - use gnash??
I need something to do a slide show of pictures, driven from command line. Image-magick supports this.
Starting X / fluxbox without a window manager http://www.debianadmin.com/how-to-auto-login-and-startx-without-a-display-manager-in-debian.html
The basic principles
To make (large) changes, you build a new, complete image from scratch. You copy the new image to CF, put it in the computer, and boot.
I add scripts to config/chroot_local-hooks. I keep backup copies of the scripts at the top level so that I can wipe the config/ directory and rebuild it from scratch. I keep copies of the files that will be included in MyConfigIncludes/
Create scripts to customize the images
nn-name.sh where 'nn' is a number to control execution order, and 'name' is a meaningful name, for example 01-password.sh would be used to install local user accounts and set user and root passwords.
WiFi Network
WiFi cards I am considering using:
D-Link DW650M
http://sourceforge.net/apps/mediawiki/ndiswrapper/index.php?title=D-Link_DWL-G650M
Microsoft MN-720
To use these I need to use the manufacturer's drivers + ndiswrapper.
Testing
To test the image in a virtual machine, you can either start it in qemu or convert the img file to a vmdk and use vmware.
Of course, you can also the virtual machine to boot from the USB stick but testing the img file first means you don't have to keep copying the image to the stick.)
"Qemu" is installed on 'dev' already. You need to set up an X11 connection back to your desktop to use it, if you are burdened with a Windows machine see the Cygwin page. When you have an xterm window open on your desktop, type 'qemu binary.img' and wonder at the marvels of modern technology.
Once the Qemu window captures your mouse you can escape with Ctl-Alt. Thought you might want to know that.
Testing image in Qemu
There are clever ways to set up Qemu networking. It requires setting up a TAP interface on the host. Not sure if I am up to that. I think this is the proper way to do it but I don't want to accidentally shut down Dev right now.
Here is the command to start the image in qemu. This MAC number is one digit off from the real thing. (24 vs 25) (qemu networking hints)
qemu -net nic,model=rtl8139,vlan=1,macaddr=00:e0:29:93:3a:25 binary.img
Deployment
Copy the image to a CF card, completely overwriting it: dd if=binary.img of=<devicename>. You can get the device name with dmesg, it will be buried in the last few messages after you insert the stick. Something like /dev/sda. Don't use the first partition (which would be /dev/sda1), use the whole drive, you have to overwrite everything there including the boot block and the partition table.
Note: If you select the wrong device name you can make the host system unbootable in about 250 mS. If you do this, don't come whining to me about it. Fix it.