When I initially built the server using a Dell Dimension 4200, I added 1GB of RAM on top of the 512MB that was factory installed. The board can support up to 2GB, but 1.5GB seems sufficient for what I am doing. One of the first steps is to run MEMTEST by booting off of a Linux CD that I had laying around. This test ran overnight (15+ hours) with no problems, it’s always a good idea to run MEMTEST with any memory changes.
Second Hard Drive
I removed the floppy drive and added a second 120GB hard drive. I also replaced one of the CD drives with a DVD reader. Ubuntu Server 12.04 gets burned onto a DVD so I needed to boot off of the DVD. The other option would be to boot from a USB drive. I swapped the IDE connector off of one of the CD drives and used it for the secondary hard drive mounted in the floppy drive bay.
Swap 120GB hard drive for 500GB
I soon was well on my way to filling up the primary 200GB drive so it was time to consider putting in a bigger secondary hard drive in preparation for the future.
I have installed the 500gb drive in the server and formatted for use with Linux. Linux can use a drive formatted as NTFS but I formatted it as EXT4 for Linux so the disk checks and fixes can be more precise. EXT4 can handle extremely large drives 1EB partition size, an amount of data I cannot even imagine! EXT3 is good up to 32TB partitions, which is still very big! The new extra drive will give me much more space as the main 200gb drive is almost full. I will move some files onto it, mostly the backups from the other computers at home. This is primarily the goal with second drive. There is a software manger in Linux that can manage the drive, so called “Logical Volume Management” (LVM), the primary drive is managed using this feature. In theory I can create a “snapshot” of the drive and copy the image onto a backup external or the second drive, but I have not considered doing this yet. The primary drive contains the OS, whatever software I have loaded, which doesn’t take up much space. The files that I have loaded onto OwnCloud take up a good deal of space, but 200GB will be plenty of space for the primary drive for a while.
To LVM or not?
At first I was going to connect the first and second drive into one large “logical” drive using LVM. But, there is a risk if the system treats the 500gb+200gb = 700gb logical drive. If one drive fails it can ruin the entire “logical” drive composed of both drives. One disk failing out of two might be a bad risk, so I might leave the drives connected normally, mounted separately and not as a big logical drive.
I do a lot of baking of fresh home made bread and I play around with time lapse photography from time to time. It seemed natural to put together a time lapse video of bread dough rising.
How it was done
I have used the Fire Storm fswebcam program for Linux to trigger web-cams to take periodic frames to monitor my house when I was away last winter. By being able to take periodic frames, fswebcam also makes it easy to do time lapse photography.
Basically for this GIF animation, the camera is triggered 10 times per hour. I run it under Linux using a Bash shell script that time and date stamps the images when they are saved and creates folders based on the date. Then I open up the GIMP graphics editor and use File-> Open as Layers to bring all the images in, 140 in this case. Then Filters-> Animation->Optimize (for GIF) creates the animation. I then save it as a GIF with 100ms delay between frames and allow looping. I did find another way to create videos found under the section How To Make a movie, under the section that talks about doing it via SSH on the Raspberry Pi, on the site, How To Capture Time-Lapse Photography With Your Raspberry Pi and DSLR or USB Webcam
The bread dough is a standard type of dough that I use often. It starts with 100g water and 100g white unbleached flour with a pinch f yeast as a poolish. This is left in a container overnight. Then 2 cups of flour, approximately 10 grams of salt and another pinch of yeast are added and thoroughly mixed. Water is added to the poolish, I start with about 1/2 cup. It is all mixed together adding more water if needed. It forms a dough ball that is worked for 1-2 minutes. Then I let it sit for 15 minutes. Water is contained in the starch bonds, this water is released during the working of the dough, it has a bit of a time delay and it will release even more water for a while after it has been worked. Allowing it to rest for 15-30 minutes allows the water to come out of the bonds and at that point you can judge whether or not the proper amount of water/flour ratio exists by the feel. Then I let the dough rise in a bowl that was coated with olive oil. My standard practice would not dictate letting it rise in open air overnight, effectively this dough has over proofed, but to take the pictures, I decide to just let it go and do it’s thing. Normally, it would be punched down a few times and if I am not ready to make it, it might go in the fridge overnight.
How did it come out by just letting it go and rise on it’s own? Surprisingly the end product was OK, I actually baked it as in the Pyrex bowl and it was a fairly good bread after all. Baked at 400 F for about 40 minutes. I preheated the oven with small bowls of water in it to add moisture as well, leaving them in while the bread baked. This enhances the crust of the bread.
Technical details on capturing the frames
I used Fswebcam to capture the images. It has to be compiled from the source code. Below are my notes related to fswebcam. I had a bit of a hard time getting it to run last year, but the essence of what I had to do is captured below.
fswebcam – Small and simple webcam software for *nix.
This is the program used to generate images for a webcam. It captures a number
of frames from any V4L or V4L2 compatible device, averages them to reduce noise
and draws the details on it using the GD Graphics Library which also handles
compressing the image to PNG or JPEG.
sudo apt-get install fswebcam
Alternatively install via the DEB packages below if you want a newer version that apt can install, especially if it installs the 2009 version, which it will do if you are using an older version of Ubuntu Linux. Try the latest one that will work, I was able to get a new version that did not complain about missing packages.
I first ran fswebcam on Ubuntu 10.04 and ran into issue with an old webcam (Using palette SGRBG8 was not supported and I got an unsupported palette error), plus all of the features advertised for the fswebcam such as labeling the photos and printing a time stamp on them was not working. It was probably in the works and didn’t make it into the release, or something on my installation was not supporting the label adding feature. But I was able to get the 20101118 installed via a DEB package above.
If using dpkg to install one of the deb packages fails. Or in the case you want to work through compiling this code, follow the guidelines below, which do not cover all cases.
I did compile from scratch years ago to get a newer version of fswebcam installed, beyond what the package manager would install. I have found out that dpkg will install version 20101118 on Ubuntu 10.04 without complaint. Beyond that version, dpkg will complain about missing dependencies. I was able to compile the version labelled 20110707 and that ran on 10.04. If you need to find the version of fswebcam use….
The versions currently run to 20140113, trusty release, as of 11/26/2014.
Installing GD Library, do this before installing fswebcam
This part gave a bit of a hard time as my notes below state that there was a few failed attempts to get fswebcam up and running.
sudo apt-get install libgd2-xpm-dev
sudo make install
NOT SURE IF THIS IS NEEDED
But I actually tried this first, instead of the command sequence above…
cd to the libgd-2.1.0 directory
sudo make install
Then tried to compile fswebcam again and it complained about missing JPEG GD package, so did the compile again for GD with this command sequence instead…
./configure --with-jpeg --with-png --with-freetype
sudo make install
So I think the first method of config,make,install of libgd2-xpm-dev is the one to try, first!
I only put the failed stuff here because I am not sure if doing the failed stuff first put in JPG, freetype or something that made things work once ibgd2-xpm-dev was loaded in.
Best to use sudo make install so that the files wind up being able to be put where they need to be.
Run the following commands in the source folder to build and install fswebcam:
It’s only requirements are that the GD library be installed with JPEG, PNG
and FreeType support.
Checking to see if the webcam is being read by the PC
Command to see what devices are hooked up to the USB for video…
There is also a porgram called Cheese that can be installed via the package installer for Ubuntu. This lets you see the video live from the web cam. It makes it easy to adjust distance, angles, lighting and focus the cam while setting up the shot.
I created autocam.sh to be called by watch periodically in order to snap a photo, name it the yr,month,day:time.jpg and put it in a created folder label for the date. Then I used to copy to Wuala mirrored path, which would automatically load it onto a Wuala cloud drive. The script below has the Wuala stuff ripped out. At the bottom of this post there is an explanation on how to use Wuala as an NFS drive.
For example, call bash script every 10 seconds…
watch -n 10 bash autocam.sh
Remember to chmod u+x autocam.sh so that it can be made into an executable script.
# this is the command to run this with watch -n 3579 bash autocam.sh for hourly rate at 255 frames to image
# this is the command to run this with watch -n 350 bash autocam.sh for 10x hourly rate
#now is the filename for the date stamped jpg file
#dir is the directory that is dated as the date of the picture. I need an IF statement around this so it doesn't keep creating the same dir.
#pathnow, I don't think is needed anymore.
# example filename: my_program.2012-01-23-47.log
Below is a link to a great post that is dead on. I used to think about the fact that software engineering doesn’t follow the same work pattern as engineering physical things when I worked in industry. People get the idea that you can schedule software projects when it is more like forecasting. I liken it to the tides versus the weather, you can schedule plans around the tides, years in advance, as there are actual schedules of the tides, a.k.a. Tide Tables, not so with regard to the weather.
You don’t always know where things will be at a certain point in the future. Predicting things a few days out OK, trying to plan a software project grandiose style 6 months ahead and know where it is going to land, is like trying to make plans around a sunny and 72 degree July 4h BBQ, but trying to figure out that probability in January!
Chris Aitchison, says what I was thinking for years, but much better than I could have put it….
I’ve been interested in a way to burn right from the command line, with a possibility of using one of my Linux computers with a mode as a burn station, ideally I could throw in a CD, it would detect it and start the copy process and eject when done. This post is about a small step in that direction.
I researched it a bit and tried the example given by this page….
But, I modded the $HOME/.cdrdao file a bit to include a list of cddb servers that I pulled off of,http://roozster.info/eac/06.html, plus added a timeout for the cddb set to 10 seconds.
The .cdrdao file goes in your home directory and it acts like a configuration file for the cdrdao program. The help site above goes into details. But, briefly the write buffer at 128, which is 128 seconds, at an 8x burn gives 16 seconds of under-run protection. The device has to be set correctly. My CD burner is at /dev/sr0. According to the help.ubuntu site above, running sudo cdrdao scanbus, will produce an output that yields the device name. For me it didn’t yield a /dev type of connection but rather a 1,0,0 bus attachment type of readout. But I hovered over the CD in the file manager and found out the device mount point from there which was /dev/sr0.
Output from running sudo cdrdao scanbus
Cdrdao version 1.2.2 - (C) Andreas Mueller <firstname.lastname@example.org>
SCSI interface library - (C) Joerg Schilling
Paranoia DAE library - (C) Monty
Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.
Using libscg version 'ubuntu-0.8ubuntu1'
1,0,0 : QSI , CDRW/DVD SBW-242, UD22
Sets the correction mode for digital audio extraction.
0: No checking, data is copied directly from the drive.
1: Perform overlapped reading to avoid jitter.
2: Like 1 but with addi-tional checks of the read audio data. 3: Like 2 but with addi-tional scratch detection and repair.
The extraction speed reduces from 0 to 3.
Below is the code that I pull from the site and modded by adding the cddb_servers and cddb_timeout this code is used to create the $HOME/.cdrdao file…
Breaking Bad is for me the #1 drama show that I have seen to date. So, for Halloween, I decided to go with a Breaking bad theme. So I dressed up like a Los Pollos Hermanos worker.
Made a nice prop, hacked a Hallmark recordable greeting card, 10 seconds of record time and it plays the Breaking Bad theme song, just about fits in the 10 secs. I had to do about 10 takes to hit the timing and audio level. But when the “Los Pollos” takeout box is opened, it plays, works great.
Made some Blue Sky “meth” candy to put in the takeout box!
I looked online, the blue stuff was like $12 a pound. I know how to cook for real, don’t bake much but, I should be able to make hard candy! I even found Sky Blue food coloring at a real food supply store.
I have a video that I learned from at the bottom of this post, it is dead on, except I used more flavoring. After 2 batches, I wanted more flavor, so I threw in a tbsp of almond extract. Seriously, it is easy, it is a heat, stir wait kind of process. First put water, sugar and corn syrup in the pot, heat slowly until dissolved. Turn up heat raise until approximately 290 F. Kill the heat and add flavor and food coloring, just before the pour occurs. Pour on wax paper and tilt the pan to spread, beat it to pieces!
The Box Cover
Edited a logo I found on line and tweaked it in the GIMP editor, click on it for full size, feel free to use it…
Breaking Bad Blue Sky Crystal Meth Candy
I followed the following cool and descriptive video to make the goods…