Category Archives: General
FreeNAS as print server
I didn’t go to bed…
I worked through the instructions and realised that they were for an “embedded” FreeNAS, where I am running a FULL install. I worked out that all I needed to do was make the permanent changes that are outlined in the script. I also didn’t want to use a RAM disk so changed the printcap file to that suggested in the Instructable I found, and created the appropriate directory.
# @(#)printcap Canon i550
lp|deskjet:\
:sd=/var/spool/lpd/bare:\
:sh:\
:lp=/dev/ulpt0:
My devd.conf turned out like this (I don’t have a speaker on the fit-PC slim:
# devd.conf
# start action when USB printer ulpt0 is plugged in
# wait 3 seconds and then start the spooler daemon
#
attach 100 {
device-name “ulpt0”;
action “sleep 3; lpd;
checkpc -f;
chown 0:0 /dev/ulpt0;
chmod 666 /dev/ulpt0;”;
};
I did all the file linking as per the script, rebooted and…
Nothing happened when I tried to print.
So I went through the script.
First I found that I had not given the spooling script the right permissions (700) or ownership (1:1).
Next I ran checkpc and was reminded of this error:
“Shared object “libintl.so.8″ not found”
I got over this somehow last time using these threads and working out that the code was:
ln -s /usr/local/lib/libintl.so.9 /usr/local/lib/libintl.so.8
It still didn’t work. I looked at the /usr/bin and my symlinks had disappeared, so I copied over the files instead. It still didn’t work. I tried a manual print to lpr and got:
lpr /mnt/data/printtest.prn
Status Information, attempt 1 of 3:
sending job ‘root@minime+2078’ to lp@localhost
connecting to ‘localhost’, attempt 1
cannot open connection to localhost – No such file or directory
Make sure the remote host supports the LPD protocol
Waiting 10 seconds before retry
So I rebooted and tried again. Again.
Out popped the print job! Ubuntu suddenly showed the printer as alive and I was away.
I go to bed happy. Hope this helps someone. Please comment if it does.
Windows 7 on fit-PC Slim with no USB-DVD reader (close, but no cigar)
This was all new to me, so, somewhat excited I plugged the beautiful new USB boot disk in to the fit-PC slim and switched it on. And got the following message:
Windows failed to start. A recent hardware or software change might be the cause. To fix the problem:
<< blah blah repair your computer >>
File: \Boot\BCD
Status: 0xc000000e
Info: An error occured while attempting to read boot configuration data
This was somewhat disappointing! I put it down to the USB key being faulty so tried it on my Windows 7 PC. It worked perfectly first time. Googling up the error code was not super successful. Loads of people have the problem and I couldn’t easily find any solutions. Time to try something new.
Second effort: Booting from External USB Disk (fail)
My next cunning plan was to boot from the IDE disk, mounted in USB caddie. I’d already formatted this with fat32 and worked out that to make it an active boot partition I could use diskpart with the following commands
diskpart
select disk 1
select partition 1
active
I copied over Windows 7 once more whilst pondering what BIOS settings for the fit-PC. USB Hard Disk? IDE drive? If it worked the plan was to stop the installation when it reboots and whack the drive back in to the fit-PC. Selecting “IDE 0 Pri Master” or “IDE 1/ Pri Slave” in CMOS was a fail, as was “USB Hard disk”. I tried “PCMCIA” and “USB Floppy” too.
Later (see below) I realised that this was never going to work because the disk couldn’t boot by itself after all. And I should have just slapped it in to the fit-PC shouldn’t I!
Third effort: Installing on another machine and swapping disk at critical moment
I am lucky enough to have an IDE laptop that the kids use for Sims2 etc. Whilst the cat’s away… My next idea was to continue the plan of starting the installation on one machine and finishing it on another when it is in the middle of a reboot. I replaced the disk in the laptop and booted with my USB stick from effort 1. At this point I realised that I should have just stuck the disk I created in the previous step in the fit-PC and tried to boot from it. I tried doing that on the laptop and it didn’t boot! So maybe my diskpart commands were faulty.Oops. I am typing this as I go, so maybe that will be the next try.
I set up a 20GB partition and then watched the Windows 7 installation carefully. It expands the windows files and then starts installing, but I could not remember when it reboots and I wanted to catch that. I know it goes through a major detection of hardware at some point, but is was that before or after the reboot? It kept on going (Windows is so much better and quicker at installing nowadays) and after four green ticks it went down for reboot. I switched off and plugged back in to the fit-PC.
Bingo!
| Windows 7 attempting to start on fit-PC slim |
The disk light started flashing, up came the Windows 7 logo and then a long, long wait on:
Setup is updating registry settings
I put this down to low memory and Windows 7 detecting (re-detecting?) the machine it was installed on. After 10 minutes it rebooted. It took a long, long time to show anything other than the “Starting Windows” logo. After two minutes the disk light stopped flashing and my little fit-PC just sat there sadly. At this point I began to lose faith. Will I damage my main media server for ever with all this plugging in and out of disks? How long do I wait for any “Windows 7 action”? After 8 minutes there was depressing noise like the disk spinning down. With no action at all on the screen I decided to wait another 5 minutes before giving it up as an “epic fail” and getting back to trying to fix the issue with iTunes not starting under XP Pro.
At 9 minutes the disk light flickered feebly and there were more clicks from the disk. I wondered whether it needed a mouse to continue so plugged one in. The disk access light flashed enthusiastically (something was alive in there) but I was still stuck on the “Starting Windows” screen.
At 11 minutes I lost patience, pulled the plug and restarted, choosing the “Start Windows normally” option with some optimism. Next time “Safe Mode” I thought. Again, it didn’t work.
Safe Mode didn’t work either.
As a good scientist I need a conclusion, which is this: Windows 7 does not work on my fit-PC when I try to install it. Please let me know if you do better.
Making videos for the Wii Photo Channel (1.1) using ffmpeg
I have been struggling with this all day but here is the command line that finally made something that had audio and video that worked. The video is OK and the audio a bit hissy, so more work to be done there.
ffmpeg.exe -i california.mp4 -vcodec mjpeg -acodec pcm_s16le -ac 2 -ar 44100 california.avi
The video with this command line is terribly blocky and pixelated, so more needs to be done to get it totally right. My 3 minute video is 130MB with that setup. I can improved the quality by using -qscale 1 (see below) but the size balloons to over 400MB. Since the Wii can only take 2GB cards that is a slight problem. A trade off I guess. I will have a play*.
ffmpeg.exe -i california.mp4 -vcodec mjpeg -qscale 1 -acodec pcm_s16le -ac 2 -ar 44100 california.avi
Hopefully this will be indexed by google and can help others.
* results of the play – my movie is 3:47 long and as mp4 is 42MB
-qscale 1 and -qscale 2 give identical results at 474MB
-qscale 4 @ 330MB and pretty much the same as 1 and 2
-qscale 6 @ 271MB and still pretty good
-qscale 8 @ 233MB and quality has deteriorated slightly
http://www.kilobitspersecond.com/2007/05/24/ffmpeg-quality-comparison/ was interesting once I had found qscale as a search term.
Steve Jobs – Thoughts on Flash
http://www.apple.com/hotnews/thoughts-on-flash/
It is a bit rich that he talks about closed systems, but I actually support what he is saying. Moving towards open standards has to be the way forward.