My Installation:

openwrt :

telnet 192.168.1.1

passwd

set password ..

ssh @ 192.168.1.1 (Putty)

get uuid with >> blkid

UUID="b21648f5-d0f6-4985-a076-bab94afb398c" TYPE="ext4"
UUID="ea0e891e-6261-4e33-904b-923ab9b3abf8" TYPE="swap"

root@OpenWrt:~# vi /etc/config/fstab
config global automount
        option from_fstab 1
        option anon_mount 1

config global autoswap
        option from_fstab 1
        option anon_swap 0

config mount
        option target   /
        option uuid     b21648f5-d0f6-4985-a076-bab94afb398c
        option fstype   ext3
        option options  rw,sync
        option enabled  0
        option enabled_fsck 0

config swap
        option uuid     ea0e891e-6261-4e33-904b-923ab9b3abf8
        option enabled  1

root@OpenWrt:~# mkdir /mnt/sda1
root@OpenWrt:~# mount /dev/sda1 /mnt/sda1

mkdir -p /tmp/cproot
mount --bind / /tmp/cproot
tar -C /tmp/cproot -cvf - . | tar -C /mnt/sda1 -xf -
umount /tmp/cproot


root@OpenWrt:/mnt/sda1# reboot


root@OpenWrt:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 2432      2432         0 100% /rom
tmpfs                    14788        44     14744   0% /tmp
tmpfs                      512         0       512   0% /dev
/dev/sda1              3676708     82740   3407196   2% /

opkg update
opkg install luci samba3 luci-app-samba

/etc/init.d/uhttpd enable
/etc/init.d/uhttpd start
netstat -a
iptables -I INPUT -j ACCEPT -i eth0.1 -p tcp --dport 80
iptables -I INPUT -j ACCEPT -i eth0.1 -p tcp --dport 443




root@OpenWrt:/etc/samba# rm smb.conf.template
root@OpenWrt:/etc/samba# vi smb.conf.template

[global]
syslog = 0
syslog only = yes
workgroup = LAN
server string = OpenWrtServer
security = share
encrypt passwords = yes
guest account = nobody
local master = yes
name resolve order = lmhosts hosts bcast
unix charset = UTF-8
[UsbStorage]
comment = UsbStorage
path = /mnt/
browseable = yes
public = yes
writeable = yes

[2]+  Stopped                    vi smb.conf.template
root@OpenWrt:/etc/samba# vi smb.conf.template
[global]
syslog = 0
syslog only = yes
workgroup = LAN
server string = OpenWrtServer
security = share
encrypt passwords = yes
guest account = nobody
local master = yes
name resolve order = lmhosts hosts bcast
unix charset = UTF-8
[UsbStorage]
comment = UsbStorage
path = /mnt/
browseable = yes
public = yes
writeable = yes

[3]+  Stopped                    vi smb.conf.template
root@OpenWrt:/etc/samba# cp smb.conf.template smb.conf
root@OpenWrt:/etc/samba# /etc/init.d/samba start

opkg install ntfs-3g
vi /etc/hotplug.d/block/10-mount
#!/bin/sh # Copyright (C) 2011 OpenWrt.org blkdev=`dirname $DEVPATH` if [ `basename $blkdev` != “block” ]; then device=`basename $DEVPATH` case “$ACTION” in add) mkdir -p /mnt/$device # vfat & ntfs-3g check if [ `which fdisk` ]; then isntfs=`fdisk -l | grep $device | grep NTFS` isvfat=`fdisk -l | grep $device | grep FAT` isfuse=`lsmod | grep fuse` isntfs3g=`which ntfs-3g` else isntfs=“” isvfat=“” fi # mount with ntfs-3g if possible, else with default mount if [ “$isntfs” -a “$isfuse” -a “$isntfs3g” ]; then ntfs-3g -o nls=utf8 /dev/$device /mnt/$device elif [ “$isvfat” ]; then mount -o iocharset=utf8 /dev/$device /mnt/$device else mount /dev/$device /mnt/$device fi ;; remove) umount /dev/$device ;; esac fi

opkg install p910nd luci-app-p910nd
/etc/init.d/uhttpd restart

Under luci Services->p910nd
set enable

Windows add TCP/IP Printer ip 192.168.1.1 Port 9100 Driver >> HP Photosmart D5100 serie (choose your specific driver)


opkg install sane-frontends sane-backends
root@OpenWrt:/etc/samba# scanimage
[gt68xx] Couldn't open firmware file (`/usr/share/sane/gt68xx/ccd569.fw'): No such file or directory
scanimage: open of device gt68xx:libusb:001:006 failed: Invalid argument
root@OpenWrt:/etc/samba#
root@OpenWrt:/etc/samba#
root@OpenWrt:/etc/samba# mkdir /usr/share/sane
root@OpenWrt:/etc/samba# mkdir /usr/share/sane/gt68xx

Search for the web for this file and download


root@OpenWrt:/etc/samba# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 2432      2432         0 100% /rom
tmpfs                    14788      1944     12844  13% /tmp
tmpfs                      512         0       512   0% /dev
/dev/sda1              3676708     96076   3393860   3% /
/dev/sdb1            1465135100 426012780 1039122320  29% /mnt/sdb1
root@OpenWrt:/etc/samba# cp /mnt/sdb1/router/ccd569.fw /usr/share/sane/gt68xx/

My saned service works only in debug mode so i write this script

vi /usr/scan.sh
#!/bin/bash
while [ true ]; do

saned -d

done


chmod +x /usr/scan.sh

autostart
cat /etc/rc.local

/etc/init.d/samba start
sh /usr/scan.sh &
exit 0


autostart this script in background mode (&)
and start samba

allow hosts in /etc/sane.d/saned.conf