Saturday, May 7, 2011

Hard Drive Images

We use ntfsclone in our Loader project.  I tend to use it to make backups of computers, or copy NT filesystems around between partitions etc.

The command "ntfsclone" has switches "-s" and "-r" to tell ntfsclone to save and restore in a special format.  The special format leaves out all the holes in the file system -- who would want those?  And actually, why would you use ntfsclone if you weren't using those switches?  You could just use "dd" and bit copy the whole partition.  From my point of view, there seems to be little reason to use ntfsclone if you aren't using the special format switches.

Sometimes I'd like to mount an NTFS under Linux.  Ahhh, if the NTFS is in the special format and compressed with gzip, that *IS* a problem.

ntfsclone -r -O - myfs.ntfsclone.gz | gunzip -c > myfs
sudo mount -o loop myfs /mnt

The problem here is that this takes a while and in the end you better have enough free disk space available.

I've been thinking.  If you'd like to hand someone exactly what their (XP) computer had on it before and let them browse it to pull out any important files, how would you do that?  Being on Linux, I have "mount -loop" at my disposal, but Windows users are out of luck, right?

Open source to the rescue again, even on Windows: (their homepage isn't as nice as the wikipedia page)

I tried ImDisk out, seems to work fine.  It might be a little bit hard to use for someone that only knows about their "My Documents" but who knows.  So, you could do something like this:

ntfsresize -s 50G /dev/sda1
ntfsclone -O - /dev/sda1 | \
gunzip -c | ssh bigserver "cat > myfs"
# re-image / re-install victim
rsync bigserver:myfs /mnt/windows/myoldfs
# boot windows, install ImDisk
# mount your oldfs as disk G: for retrieving stuff

 The only trick here is resizing the original ntfs down so it's pretty much full (of files).  This ensures you aren't wasting a bunch of dead space in your image file.

Monday, May 2, 2011

Aleratec Roboracer Duplex Codes

From the two sources I mentioned last week, here's the codes laid out:

CR+LF  #clear input buffer
!BNKLF8E #both LEDs off
!BNKFG89 #both LEDs flashing
!BNKLG8F #both LEDs on
!BNKSTA3 #attention/no-op

!BNKDP90 #release one disc from the top disc loader

!BNKRG95 #top handle turns a small angle
!BNKRB90 #top handle turns a big angle
!BNKRH96 #top handle turns back to origin

!BNKPG93 #bottom handle turns small angle
!BNKPB8E #bottom handle turns a big angle
!BNKPH94 #bottom handle turns back to origin

BNKR*, the "R" seems to be Reader/Writer
BNKP*, the "P" seems to be for Printer (lightscribe)

Notice that the 2 hex digits on the end of "P" commands are 2 less than the "R" commands. It makes me wonder if those 2 digits are analog.

Thursday, April 28, 2011

Straight Forward Aleratec Roboracer CD/DVD Duplex Duplicator under Linux

Rico found cool ways to talk to the Roboracer Duplex Duplicator:

Not having the unit yet... I didn't understand the typical flow of commands, so here it seems to be.



# clear top and load from hopper
  eject $top
  echo -n "!BNKRG95" > $tty # top_hand_small
  echo -n "!BNKRH96" > $tty # top_hand_back
  echo -n "!BNKDP90" > $tty # top_tray_load_disc
  eject -t $top

# write disc

# clear bottom and load bottom from top
  eject $bottom
  echo -n "!BNKPG93" > $tty # bottom_hand_small
  echo -n "!BNKPH94" > $tty # bottom_hand_back
  echo -n "!BNKRB90" > $tty # top_hand_big
  eject $top
  eject -t $bottom
  echo -n "!BNKRH96" > $tty # top_hand_back
  eject -t $top

# label disc

# drop disc
  echo -n "!BNKPH94" > $tty # bottom_hand_back
  eject $bottom
  echo -n "!BNKPG93" > $tty # bottom_hand_small
  echo -n "!BNKPH94" > $tty # bottom_hand_back
  eject -t $bottom

I've also found some notes on the non-Duplex version here:

Saturday, November 6, 2010

Antec case fixed

Everything seems so disposable these days.  I'm trying to fight that and bought a case a few years ago...  the Antec P180.  It is quirky, it is huge, and very expensive.  But, it is the best case I've ever had and very close to silent.

I'm not really happy with it being on the floor, but it's been there for about 1/2 of it's life.  My dog walked past it a while back while a USB flash was sticking out.  I walked in a few minutes later... flash broken on the carpet... USB ports busted up.

Frustration...  I used back ports for months with an extension.

Then, I got this great idea... Antec might sell those ports.  I searched, hey people have been getting replacements under warranty.

WOW!  They actually sent me a replacement port module!

It works great.  I'm lovin' Antec even though I had 2 of their power supplies die on me in the past.

Monday, October 18, 2010

BIOS upgrades on modern hardware - with Linux

Back in the mid-90s, upgrading your BIOS meant create a boot floppy, copy your BIOS util and image to it, boot from it, run the BIOS util. 

Now days no one uses floppies.  Well almost no one.  I see no legitimate use for them on modern hardware (and OS) except for weird/scary boot and BIOS issues.

I recently tried to boot my 3 year old Gigabyte P35-S3L motherboard off of a USB flash containing Ubuntu 10.10.  Unfortunately, the BIOS is not booting from USB Flash.  This got me thinking, have I ever upgraded the BIOS?  My version is F2, the newest is F8.  So I went down that route...

First, you download some XXXX.exe file from Gigabyte's website.  Great if you no what to do with such a thing.  My Gigabyte motherboard has a Q-Flash utility built into the current BIOS, so I can flash it without booting off any media.

On my notebook:
sudo apt-get install p7zip-full
mkdir bios
cd bios
mv ../motherboard_bios_ga-p35-s3l_f8.exe .
7z x motherboard_bios_ga-p35-s3l_f8.exels -l
total 1600
-rw-r--r-- 1 scott scott      18 2009-06-21 20:13 autoexec.bat
-rw-r--r-- 1 scott scott   26351 2008-08-28 01:16 FLASHSPI.EXE
-rw-r--r-- 1 scott scott  554366 2010-10-18 13:00 motherboard_bios_ga-p35-s3l_f8.exe
-rw-r--r-- 1 scott scott 1048576 2009-06-19 04:00 P35S3L.F8

At this point, I had the image file P35S3L.F8.  It needs to get to my workstation and have Q-Flash work on it.  Looking at Q-Flash (hit the End key during boot), it will read floppies and hard drives. (I'm sure only formated FAT)  I have no Floppy drive in my workstation, so I found my USB Floppy drive.  You are probably thinking, but... it's USB, will the HW do the proper rerouting?  I had confidence from prior recovery of BIOS using a USB Floppy.

A little wierd but:
sudo ln -s /dev/sdb /dev/fd0
mformat a:
mcopy P35S3L.F8 a:
(I checked to make sure I could read it and did a diff of the original)

Booted into Q-Flash, and now it showed a Floppy B where it only showed Floppy A before. Selected it, chose my image file..  and Click click click...  away we go.

I still can't boot off USB Flash, but I do have a new BIOS.

Thursday, June 17, 2010

screen sharing on Linux

Seems like not many choices...  But who needs many choices if it works well?  In the Windows world the choices seem to never end.

VNC is the old tried and true.  It is great over LAN, ok over fast WAN connections, but seems to leave something to be desired over typical internet connections.  The speed just isn't stellar.  Worse, if you want to share YOUR existing desktop on Linux, it affects your video performance.  It is universal though, I can connect to my mum (secure over ssh tunneling of course) and fix things on her XP machine.

NX... what great promise it has and has had and had and had.  It does what people thought was impossible - it speeds up remote X sessions to almost local speed.  The commercial server starts at $800.  But no fear, there are open source servers that use the NX libraries.

The problem is the free NX client (nxclient) is pretty much the only offering out there to view a remote session.  It comes in Windows, Mac, Linux, and other flavors.  It works quite well in many cases except this one:  attach to a shared local desktop (or shadow session) with the client on a modern Linux distribution.  If you do this - the keyboard is all messed up.  An up-arrow causes a PrintScreen button to be pushed and so on.

So... if you are ok with mouse / keyboard input turned off - I guess it will work ok.  Our options are slim, so that's the way we will be using it.  Sure would be nice though if a Linux user could see my Linux desktop and interact with it as well as a Windows or Mac user could!

If we were "real men", we'd take the open source NX libraries and put our own working NX Client together ourselves.  Which, if we have slow times, I'm sure that will be discussed.

Saturday, June 12, 2010

big week

A very busy week that has so far turned out very good.
In addition to the normal life stuff, I did a ton of zipping around trying to grow our little business. I'm trying to get more use of our Loader product, save XP machines from landfills, and get another software developer.

Demo "Loader" to local computer shop.
This went really well despite more poor preparedness. I managed to lose my flash drive (boot media) in the last 10 minutes before I went out the door. I searched frantically, then built up a new usb flash drive. When I got to the computer (repair) store, they had DHCP so I demoed an XP install on my Dell Mini 9. They were interested in trying it on a computer on the bench. When it worked flawlessly except for missing one driver they were impressed; basically, "we've got to have it!" Not alot of money involved, but we have to start somewhere and they are willing to work through bugs.

Hiring a third.
We've been wanting to do this far a long time. I've had my eyes set on an unnamed person and we finally have enough stability that I feel comfortable asking this person to join us. Crossing fingers.

XBMC Demo.

I went to the ISLUG meeting this week. It got off to a slow start. I was 10 minutes late and there was one other person. I expected them to already be ooowing and aaahing over XBMC, but it took at least another 1/2 hour for that to happen. Joshua Clark has posted a bit on the ISLUG site. It will likely replace my Freevo setup that I have had for 7 years.

Demo "Loader" to ERGS.
My family and I went to Salt Lake City today (Saturday). Our plan was to go to the Zoo, then Electroregeneration Society, then the Discovery Museum, then somewhere fun for dinner - The Maya . It ended up very different. We arrived at the Zoo quite late with wind and rain following us there - so we skipped that. We took care of some family wardrobe malfunctions at Walmart. Then what... We decided to go to the Gateway mall, ate at Applebee's, and my mom and I walked to ERGS while my wife and kids checked out build-a-bear etc and went to the Discovery Museum without us.
ERGS, was great! I had a good time talking with Jerry. Learning about their operation. I really hope we can get something like it fired up in Pocatello and Idaho Falls. I'll post more on this later.
Showing off the Loader was fun and worked great on a random box we grabbed. I'm very close to all the details with it so I enjoy explaining and answering questions. Jerry liked it, we will talk more about how they can implement it there. We will donate use of it to them -- to get things rolling.