Jul 262011
 

Hi All,

I just bought my daughter a digital camera for her to take photos with since she loves taking them.
It’s one of these, which we bought at Toys ‘R’ Us for $25, which was a pretty good deal.

Look like this :
Kidz Camera

Once we got home, she exhausted the tiny internal memory fairly quickly, so I had to download the photos off the camera.

Only problem, the bundled software only supports Windows. I don’t have a Windows machine anymore though, so off to the internet I trundle to find out how to get the photos off the camera.

After lots of trawling, I come across a snippet from a post a while back mentioning gphoto2.
So off I go to install gphoto2, and what do you know, I can now download all the photos off the camera in ppm format.

To do it, I plugged the camera in via USB, after I plugged it in, the camera was detected by my eeePC.
The lsusb command spat out

Bus 003 Device 003: ID 0979:0227 Jeilin Technology Corp., Ltd

that as the camera, which was a bit cryptic but that’s ok, as long as it was picking it up.

After I plugged it in, I used gphoto2 to check out the camera to see what was on it.

I ran –

gphoto2 -L

to see what was on it, and it spat out –


There are 39 files in folder '/'.
#1 jl_001.ppm image/x-portable-pixmap
#2 jl_002.ppm image/x-portable-pixmap
#3 jl_003.ppm image/x-portable-pixmap
#4 jl_004.ppm image/x-portable-pixmap

So gphoto2 can definitely read the camera. Next step – to download all the photos.

I ran –

gphoto2 -P

to download all the photos to the current directory.
After running it, I got this –

Downloading 'jl_001.ppm' from folder '/'...
Saving file as jl_001.ppm
Downloading 'jl_002.ppm' from folder '/'...
Saving file as jl_002.ppm
Downloading 'jl_003.ppm' from folder '/'...
Saving file as jl_003.ppm

And all the photos were saved to the current directory.
So that’s how I downloaded all the photos off the Sakar Kidz Cam.

Hope this helps someone in need !.

Share
Jul 192011
 

Hi All, just a quick update today.

I was trying to get NFS working today but kept running into errors.
Whenever I tried to start imapd, I would keep getting this error –

rpc.idmapd[12599]: main: fcntl(/var/lib/nfs/rpc_pipefs/nfs): Invalid argument

Turns out, I didn’t have dnotify support enabled in the kernel.
Enabling this now, and will be testing very soon.

Just a quick tip for anyone coming across this issue !

Cheers all.

Share
Jun 082011
 

A continuation of this post.

You can also create machine specific configuration files by naming the file the same as the mac address but replacing the colons ( : ) with dashes ( – ) and adding a 01 to the front to signify that this is an ethernet address..
So 00:15:af:69:31:79 becomes 01-00-15-af-69-31-79.

This is also the “BOOTIF” that you see on the previous screenshot.

Share
May 192011
 

Hi All,

I’m in the process of setting up PXE for some computers of mine, but I wanted them to have a separate configuration file as they do not have the power to run some of the other options, so I don’t want them to show up. I didn’t want to define specific IP addresses for the computers either or use IP specific configuration files as IP address may change.

So, what I did is to make a configuration file with the SYSUUID as the filename, since the SYSUUID is based off the mac address of the computer.
Then when it loads, the computer will boot off the SYSUUID configuration file instead of the default one.
You can find the SYSUUID on the boot page when a computer is booting from the network.

The SYSUUID is outlined in red, and quite long, but if a file is named that then the computer will boot off it, as that one is currently doing.

Share
May 172011
 

Hi All,

In my previous post regarding booting Tiny Core Linux over PXE, we were booting a premade image that did not have much installed by default.
In this post, we will remaster the image into something usable that we can boot off by extracting all the files that we need and merging the directories then repacking it all into one. One of the advantages of doing it this way is that it lets you modify all the files in the root file system before you repack it all up.

What we will need to do is to get the tcz files for the applications we want to install, and merge them into the default tinycore.gz image. This will result in a larger tinycore.gz file but when the image is booted, applications will be pre-installed. This can be useful for diskless workstations in an office or netcafe for example.

So, onto the hard parts.


Step 1 – Getting the TCZ files

Ok, so once we’ve decided what software we want, we will need the TCZ files for the software we want.
This Site has a list of all the software we need and their dependencies, though it’s a bit tedious to download every single file as I haven’t found any other way to download what we need.

So, I took a shortcut.
Boot up Tiny Core Linux either using a virtual machine or real machine using PXE or some other boot media.
Install all the software you want via the app manager, and then all the files you need are in /tmp/tce/optional/.
To do this, you will need an internet connection on the computer that you’re booting Tiny Core on.

For me, I will install Firefox, OpenSSH (SSH Client and server), conky, pci-utils, and util-linux-ng, but you can choose what you want to install.
After I have installed the software, all the tcz files I need will be in /tmp/tce/optional/ and should look something like this :

After all the files are there, we will need to transfer them to a different computer to do the remastering.
In this case, I will be transferring them to my PXE server which will be doing the remastering.

Step 2 – Uncompressing Everything

Once we have all the tcz files where we need them, we will need to uncompress them as they are all compressed using squashfs.
We will need to install some additional tools to do that, namely squashfs-tools.

apt-get install squashfs-tools

Once that is installed, we can unsquash all the files so that we can access them like a normal filesystem.
I’ve written up a little script to do it all for me in this case :


#!/bin/bash
for i in $( ls ); do
if [ ! $i == "unsquashall.sh" ] && [ -f $i ]; then
unsquashfs -f $i
fi
done

I’ve named this unsquashall.sh, and have put this into the directory where all the tcz files are.
If you copy and paste this into a .sh file, don’t forget to make it an executable file by running :

chmod +x unsquashall.sh

After you run unsquashall.sh, you will have a directory called squashfs-root which will contain the contents of all the tcz files.

What you will also need, is the core of Tiny Core, the tinycore.gz file. This is a gzipped cpio file which contains the main file system of Tiny Core Linux.
You will want tinycore.gz in it’s own directory when you extract it to make things easier, I have used /tftpboot/tc/temp for that.
To extract tinycore.gz, you will need to run this command as root, or alternatively use sudo before this command.


zcat tinycore.gz | cpio -i -H newc -d

Step 3 – The Merge

Once you’ve extracted the contents, you should see something similar to this :

Looks just like the root file system of a Linux distribution doesn’t it ?
Now, we need to copy the contents of that squashfs-root directory that we created before into this directory.
I have the squashfs-root directory in the /tftpboot/tc/tcz directory, so the command I will be running is :


cp -Rp /tftpboot/tc/tcz/squashfs-root/usr/ /tftpboot/tc/temp/

Step 4 – Repacking Everything

After doing that, we need to repack everything up.
I have made another script for that –


#!/bin/bash
find | cpio -o -H newc | gzip -2 > /tftpboot/tc/tc.gz

Once again, you will need to make the file executable and it should be placed in /tftpboot/tc/temp/.
Once run, this script will create the tc.gz file in /tftpboot/tc which will replace the tinycore.gz file.
I have also copied the kernel bzImage from the iso file into the /tftpboot/tc directory also.

Step 5 – Configuring PXE

Once all that is done, we now need to reconfigure pxe to boot the new Tiny Core initrd file.


LABEL tinycorerm
MENU LABEL Tiny Core 3.6 Remaster
kernel tc/bzImage
append initrd=tc/tc.gz

Should look something like :


So when you boot up the remastered Tiny Core, you should see Firefox in the dock – that’s if you chose to install it.

Share