Using an HP scanner on the command line

I don’t use Gnome, KDE, etc.
My window manager is WMX with some patches.

Without all those fancy window environments, you get rid of all magic auto configurations, and wizards at the same time, and you can configure your system like real man do: using the command line. ;-)

I bought a HP OfficeJet Pro 8500 A910 last week.
Here’s how I set up and use the scanner of this device using the command line:

SETUP the scanner:

> hp-mkuri -i <ip_of_your_printer>
….
hpaio:/net/Officejet_Pro_8500_A910?ip=<ip_of_your_printer>

(hp-mkuri works also for devices on routed networks: no broadcast magic needed)
Store this “hpaio:…” string in the environment variable SANE_DEFAULT_DEVICE (.bashrc)

USE the scanner:

> scanimage -y 297 -x 210 –resolution 300 | pnmtopng  > scan.png

Scans an A4 page with 300dpi.

Package used for this:
hplip         3.10.6-2    HP Linux Printing and Imaging System
sane-utils  1.0.21-9    API library for scanners — utilities

Restore data from a single disk of an HP/Compaq SmartArray raid1

If you look into a harddisk from an HP server with smart array configured for raid1, you will recognize that the partition table of this disk has only one partition:

Device Boot      Start         End      Blocks   Id  System
<device>p3               1           1        8001   12  Compaq diagnostics

The real partitions are invisible? No. I found the start of the real data and the real partition table at block 1088 (*512Byte). 1088 = 17 * 63 ?? Where does this number come from ?

You can get the real disk start with:

dd if=disk bs=512 skip=1088 count=100 of=/tmp/head

If you want to mount a partition from this disk directly, you can do this with losetup:

losetup -f -o $(( ( 1088 + <partition_start_block_from_fdisk> ) * 512 )) disk
mount /dev/loop0 /mnt/target

I don’t know if this number 1088 is correct for all disks but it was correct for all I checked.