General NAS-Central Forums

Welcome to the NAS community
It is currently Tue Mar 28, 2017 12:33 am

All times are UTC




Post new topic Reply to topic  [ 37 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Sat Mar 19, 2011 3:33 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5973
I bought a second hand Belkin Home Base to play with, and here are some findings:
Attachment:
STD1_F5L049_01.jpg

Starting a telnet daemon on the Home Base:
Goto http://<ip-of-home-base>/en/private/mainte/xelis_main.htm, login, switch on telnet, and reboot. This will also enable logging in on the serial port. (It sets the DEBUG flag).
You can login as root, no password. The change is persistent.

Some other info:
The box has 16MiB flashrom. 13632 KiB are reserved for the rootfs, which is squashfs. Yet the rootfs is only 6784 KiB uncompressed, so I suppose at least 60% of the available space is not used. This means that Belkin
  • Planned to add *much* functionality in future firmware releases.
  • Had a complete other box in mind in the designing phase.
  • Wanted to be prepared for the future.
  • Gave a present to hackers.
  • Could buy a big pile of cheap 16MiB flash chips
You choose.

The box has two different nvram-like storage places. One can be accessed via /dev/sxeeprom.
cat /dev/sxeeprom gives
Code:
pictflickr.conf0000644000000000000000000000130700000000004012523 0ustar  rootroot
system.conf0000600000000000000000000000222311540735745011751 0ustar  rootroot
ROOT_PASSWORD=
HOST_NAME=HB_NNNNNN
TIMEZONE=+0:00
USE_DHCP0=ENABLE
IPADDR0=0.0.0.0
NETMASK0=0.0.0.0
GATEWAY=0.0.0.0
DNS_PRIMARY=0.0.0.0
DNS_SECONDARY=0.0.0.0
HTTP_PROXY_ADDR=
HTTP_PROXY_PORT=
NTP_SERVER=0.pool.ntp.org
NTP_SYNC=60
NAS_ACTRL=DISABLE
DRIVE_LETTERA=05221700CD558D09
DRIVE_LETTERB=
DRIVE_LETTERC=
DRIVE_LETTERD=
DRIVE_LETTERE=
DRIVE_LETTERF=
DRIVE_LETTERG=
DRIVE_LETTERH=
DRIVE_LETTERI=
DRIVE_LETTERJ=
DRIVE_LETTERK=
DRIVE_LETTERL=
DRIVE_LETTERM=
DRIVE_LETTERN=
DRIVE_LETTERO=
DRIVE_LETTERP=
DRIVE_LETTERQ=
DRIVE_LETTERR=
DRIVE_LETTERS=
DRIVE_LETTERT=
DRIVE_LETTERU=
DRIVE_LETTERV=
DRIVE_LETTERW=
DRIVE_LETTERX=
DRIVE_LETTERY=
DRIVE_LETTERZ=
SMB_WINS_PRIMARY=0.0.0.0
SMB_SERVER_STRING=HomeBase
SMB_WORK_GROUP=WORKGROUP
DLNA_STORAGE=ALL
DLNA_PORT_NUMBER=50000
DS_MODE1=NAS
DS_MODE2=NAS
DS_MODE3=NAS
DS_MODE4=NAS
WL_WEP_KEYLEN=64bit
WL_WEP_KEY0=
WL_WEP_KEY1=
WL_WEP_KEY2=
WL_WEP_KEY3=
WL_CHANNEL=1
WL_NETWORK_AUTH=WPA2
WL_WEP_KEY_ID=1
WL_MODE=Infrastructure
WL_WPA_ENCRIPT=AES
WL_WEP_ENABLE=ON
WL_SSID=MYSSID
WL_WPA_PSK=<XXX>
WL_WPS_ENABLE=DISABLE
WL_WPS_PIN=<000>
VARID_TELNET_FLAG=ON
(Skipped a lot of bogus data. The output is exactly 8192 bytes. We also have a /dev/sxapp, which gives 15532032 bytes of binary data, and /dev/sxart, which gives 65536 bytes of binary data.)
The other nvram-like storage can be access via sxromconf:
Code:
# sxromconf
Usage: sxromconf [-d device file] -c commands [-o option]
commands:
        FLUSHCACHE: Flush cache data in Flash ROM driver
        SETDEFAULT: Set default configuration Flash ROM
        SET_HWADDR: Set MAC Address from Flash ROM
        GET_HWADDR: Get MAC Address from Flash ROM
        SET_SERIES: Set products series name
        GET_SERIES: Get products series name
        SET_MACHINE: Set machine type
        GET_MACHINE: Get machine type
        SET_VERSION: Set firmware version
        GET_VERSION: Get firmware version
        SET_SERIALNUM: Set serial number
        GET_SERIALNUM: Get serial number
        GET_CONFLEN: Get available config length
        LOAD_CFG: Load config data from flash driver.
        STORE_CFG: Store config data to flash driver.
        SET_DEBUG: Set debug mode (off/on)
        GET_DEBUG: Get debug mode (off/on)
        SET_ARTDOMAIN: Set art domain (decimal number)
        GET_ARTDOMAIN: Get art domain
        SET_COUNTRY: Set country code to Calibration
        GET_COUNTRY: Get country code from Calibration
# sxromconf -c GET_HWADDR
00:22:75:6b:95:f3#


The GPL sources provided by Belkin are complete in the meaning that they compile to usable firmware. Unfortunately a lot of binaries without sources are included. There are a lot of sx___ tools, which are only binary available. Further there are some binary-only kernel modules.

The box has both wired and wireless network access. But only one of the two can be used. When there is a cable connected during boot eth0 will be the wired port, else eth0 is the wifi.

And some system data:
Code:
# cat /proc/cpuinfo
system type             : Atheros AR9100
processor               : 0
cpu model               : MIPS 24K V7.4
BogoMIPS                : 266.24
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes
ASEs implemented        : mips16
shadow register sets    : 1
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

# cat /proc/meminfo
MemTotal:        62648 kB
MemFree:         12340 kB
Buffers:          3376 kB
Cached:          12324 kB
SwapCached:          0 kB
Active:          13616 kB
Inactive:        11092 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:               0 kB
Writeback:           0 kB
AnonPages:        9048 kB
Mapped:           5368 kB
Slab:            23280 kB
SReclaimable:      728 kB
SUnreclaim:      22552 kB
PageTables:        440 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:     31324 kB
Committed_AS:    19556 kB
VmallocTotal:  1048404 kB
VmallocUsed:      1472 kB
VmallocChunk:  1046824 kB
# cat /proc/version
Linux version 2.6.25.17 (nishihara@mars) (gcc version 3.4.4) #38 Thu Jul 9 13:39:27 JST 2009
# cat /proc/filesystems
nodev   sysfs
nodev   rootfs
nodev   bdev
nodev   proc
nodev   sockfs
nodev   usbfs
nodev   pipefs
nodev   anon_inodefs
nodev   futexfs
nodev   tmpfs
nodev   inotifyfs
nodev   devpts
        squashfs
nodev   ramfs
        vfat
nodev   fuse
        fuseblk
nodev   fusectl
#


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Sun Mar 27, 2011 1:46 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5973
Top of PCB:
Attachment:
Top.jpg

Recognizable chips:
Atheros AR9130-BC1E SoC
hynix hy5du121622dtp DDR SDRAM 512Mibit (=64MiByte)
GL850G USB2.0 Hub
Atheros AR8012 10/100 Mbps PHY

Bottom of PCB:
Attachment:
bottom.jpg

Recognizable chip:
MX25L12805DMI 128Mibit CMOS Serial flash (=16MiByte)


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Serial port, bootlog
PostPosted: Thu Apr 07, 2011 6:06 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5973
The serial port can be found here:
Attachment:
Serial.jpg
It's a 3.3V TTL level port, so you can't connect it to a standard (12V) RS232 port. You'll need a level convertor. I used a FTDI TTL-232R-3V3. The port settings are 115200 8N1. The bootlog:
Code:
U
ÿLinux version 2.6.25.17 (nishihara@mars) (gcc version 3.4.4) #38 Thu Jul 9 13:39:27 JST 2009
flash_size passed from bootloader = -2145080288
CPU revision is: 00019374 (MIPS 24K)
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
User-defined physical RAM map:
 memory: 04000000 @ 00000000 (usable)
Zone PFN ranges:
  Normal          0 ->    16384
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0:        0 ->    16384
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: mem=64M console=ttyS0,115200 root=31:00 rootfstype=squashfs ro init=/sbin/init
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Synthesized clear page handler (25 instructions).
Synthesized copy page handler (44 instructions).
Cache parity protection disabled
PID hash table entries: 256 (order: 8, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 62456k/65536k available (1801k kernel code, 3004k reserved, 419k data, 116k init, 0k highmem)
Mount-cache hash table entries: 512
net_namespace: 152 bytes
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
AR7100 GPIOC major 0
SXFLASHFlash ROM driver v1.0.0
MX25l: Serial Flash ROM Driver init
SXFLASHEEPROM write count: sect0 2a sect1 2b
SXFLASH:eeprom bind size 524288Byte
SXFLASH:Success eeprom init
SXFLASH:app bind size 15532032Byte
SXFLASH:rootfs bind size 13959168Byte
Creating 1 MTD partitions on "sxflash":
0x00000000-0x00d50000 : "rootfs"
SXFLASH:art bind size 65536Byte
squashfs: version 3.4 (2008/08/26) Phillip Lougher
io scheduler noop registered
io scheduler anticipatory registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x0 (irq = 0) is a 16550A
console [ttyS0] enabled
Driver 'sd' needs updating - please use bus_type methods
ar7100-ehci ar7100-ehci.0: ATH EHCI
ar7100-ehci ar7100-ehci.0: new USB bus registered, assigned bus number 1
ar7100-ehci ar7100-ehci.0: irq 3, io mem 0x1b000000
ar7100-ehci ar7100-ehci.0: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
ar7100wdt_init: Registering WDT success
VFS: Mounted root (squashfs filesystem) readonly.
Freeing unused kernel memory: 116k freed
Algorithmics/MIPS FPU Emulator v1.5
usb 1-1: new high speed USB device using ar7100-ehci and address 2
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
Mounting proc filesystem
Mounting sysfs filesystem
Mounting usbfs filesystem
Mounting tmpfs filesystem
Mounting /etc/fstab
mount: cannot read /etc/fstab: No such file or directory
RANDOM init : Success
localtime +0:00
Thu Jan  1 00:00:00 GMT 2009
Starting sysklogd daemons:               /sbin/syslogd -l 5 -s 32
Starting klogd daemons:                  /sbin/klogd -c 5
Wait ethernet link...
Wait ethernet link...
Wait ethernet link...
Wait ethernet link...
Wait ethernet link...
Wireless start
atheros_install eth0, country=826
ath_hal: module license 'Proprietary' taints kernel.
init_ath_wmac: __ath_attach
atheros_setting_makevap: eth0, MODE=Infrastructure
atheros_wlanconfig: eth0, MODE=Infrastructure
eth0
eth0      get_countrycode:826 
eth0      get_countryie:0 
Channel   1 : 2412   Mhz 11b          Channel   7 : 2442   Mhz 11ng CU     
Channel   1 : 2412   Mhz 11g          Channel   7 : 2442   Mhz 11ng CL     
Channel   1 : 2412   Mhz 11ng C       Channel   8 : 2447   Mhz 11b         
Channel   1 : 2412   Mhz 11ng CU      Channel   8 : 2447   Mhz 11g         
Channel   2 : 2417   Mhz 11b          Channel   8 : 2447   Mhz 11ng C       
Channel   2 : 2417   Mhz 11g          Channel   8 : 2447   Mhz 11ng CU     
Channel   2 : 2417   Mhz 11ng C       Channel   8 : 2447   Mhz 11ng CL     
Channel   2 : 2417   Mhz 11ng CU      Channel   9 : 2452   Mhz 11b         
Channel   3 : 2422   Mhz 11b          Channel   9 : 2452   Mhz 11g         
Channel   3 : 2422   Mhz 11g          Channel   9 : 2452   Mhz 11ng C       
Channel   3 : 2422   Mhz 11ng C       Channel   9 : 2452   Mhz 11ng CU     
Channel   3 : 2422   Mhz 11ng CU      Channel   9 : 2452   Mhz 11ng CL     
Channel   4 : 2427   Mhz 11b          Channel  10 : 2457   Mhz 11b         
Channel   4 : 2427   Mhz 11g          Channel  10 : 2457   Mhz 11g         
Channel   4 : 2427   Mhz 11ng C       Channel  10 : 2457   Mhz 11ng C       
Channel   4 : 2427   Mhz 11ng CU      Channel  10 : 2457   Mhz 11ng CL     
Channel   5 : 2432   Mhz 11b          Channel  11 : 2462   Mhz 11b         
Channel   5 : 2432   Mhz 11g          Channel  11 : 2462   Mhz 11g         
Channel   5 : 2432   Mhz 11ng C       Channel  11 : 2462   Mhz 11ng C       
Channel   5 : 2432   Mhzwlan scan start
 11ng CU      Channel  11 : 2462   Mhz 11ng CL     
Channel   5 : 2432   Mhz 11ng CL      Channel  12 : 2467   Mhz 11b         
Channel   6 : 2437   Mhz 11b          Channel  12 : 2467   Mhz 11g         
Channel   6 : 2437   Mhz 11g          Channel  12 : 2467   Mhz 11ng C       
Channel   6 : 2437   Mhz 11ng C       Channel  12 : 2467   Mhz 11ng CL     
Channel   6 : 2437   Mhz 11ng CU      Channel  13 : 2472   Mhz 11b         
Channel   6 : 2437   Mhz 11ng CL      Channel  13 : 2472   Mhz 11g         
Channel   7 : 2442   Mhz 11b          Channel  13 : 2472   Mhz 11ng C       
Channel   7 : 2442   Mhz 11g          Channel  13 : 2472   Mhz 11ng CL     
Channel   7 : 2442   Mhz 11ng C       
atheros_ifdown eth0
atheros_setting: eth0
atheros_setting_wireless: eth0, MODE=Infrastructure, AUTH=WPA2, WEP=ON, ENC=AES
atheros_set_auth_mode eth0, AUTH=WPA2
iwpriv eth0 authmode 5
eth0      get_authmode:5 
atheros_set_ssid: eth0, SSID="MySSID"
atheros_setting_wireless:Disable back scan
atheros_set_wpa: eth0, auth=WPA2, encript=AES
atheros_wpa_makeconf : eth0, MODE=Infrastructure, PSK(ascii)="MySecretKey" (11)
---< /etc/wpa_supplicant.conf >---
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=root

network={
  mode=0
  scan_ssid=1
  ssid="MySSID"
  proto=WPA2
  key_mgmt=WPA-PSK
  pairwise=CCMP
  group=CCMP TKIP
  psk="MySecretKey"
}
---> /etc/wpa_supplicant.conf <---
sh: you need to specify whom to kill
wpa_supplicant -B -P/var/run/wpa_supplicant.pid -ieth0 -Dmadwifi -c/etc/wpa_supplicant.conf -f/var/log/wpa_supplicant.log --
/sbin/ifconfig lo 127.0.0.1
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
wlan scan end
wlan scan start
wlan scan end
/usr/sbin/avahi-autoipd -D eth0
/sbin/dhcpcd -d -o -h HomeBase -t 12 eth0
dhcpcd: MAC address = 00:22:75:6b:95:f3
dhcpcd: your IP address = 172.21.172.101
Starting SNTP Client daemon:            /usr/sbin/sntp -r -x 60 -P no -l /var/run/sntp.pid -f /var/cache/sntp/sntp.state 0.pool.ntp.org &
Starting HotPlug:                       /usr/sbin/hotplugd -D -w -f
Starting inetd daemon:                  /usr/sbin/inetd
Starting HTTP daemon:                   /usr/sbin/thttpd -C /etc/thttpd.conf
Starting mDNS daemon:                   /usr/sbin/avahi-daemon -D
Starting jcpd daemon:                   /usr/sbin/jcpd
Starting Samba:                         /usr/sbin/smbd -D
                                        /usr/sbin/nmbd -D
Starting vsftpd:                        /usr/sbin/vsftpd &
Starting sxuptpd
Initializing USB port mode:
 port1 = NAS
 port2 = NAS
 port3 = NAS
 port4 = DS
Starting usbjcpd
fuse init (API version 7.8)
fuse distribution version: 2.7.4
Starting picshare daemon               /usr/bin/pict_main.rb &
NIC link check daemon:                 /usr/sbin/nic_link_check.sh &
security led ctrl daemon:                 /usr/sbin/security_led.sh &


Welcome to Belkin Home Base

HomeBase login: root
#
This bootlog is made without networkcable attached, When a networkcable is attached, there is no sign of wireless.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Fri Apr 08, 2011 12:22 pm 
Offline

Joined: Fri Apr 08, 2011 12:19 pm
Posts: 1
Cool, another hacker discovered this device :) I wonder why it's so little known.

If you manage to brick it, I've written an ethernet based unbricker for the device that can always write new firmware (as long as the bootloader is intact).

https://bitbucket.org/wump/sxflash/overview


Top
 Profile  
 
 Post subject: Network interfaces
PostPosted: Thu Jun 09, 2011 6:18 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5973
When I wrote only one network interface can be used at a time, I was wrong.
  • When the wired interface is connected at boot, the wired interface will be eth0. The wireless interface will be ath0. The wireless interface can be started by executing
    Code:
    /etc/rc.d/rc.atheros ath0 start
    This will create a file /tmpfs/etc/wpa_supplicant.conf, and start wpa_supplicant. When you want to get an ip address by dhcp, execute
    Code:
    dhcpcd ath0
  • When the wired interface is not connected at boot, the wireless interface will be eth0. The wired interface is not available. You can enable it by loading a module:
    Code:
    insmod /lib/modules/ag7100_mod.ko
    The network interface will appear as eth1.
Both interfaces will be sharing the same MAC address. (Of course you can change one (or both) by executing
Code:
ifconfig <if> hw ether <mac-address>
)

@wladimir: I think this box is just too late. When the NSLU2 was launched, it was almost the only affordable little Linux box. Now we have lots of them (pogoplug, guruplug, iomega iconnect, ...) and most of them have more bang for the buck, are supported by the vanilla kernel, ...
BTW nice unbricker! How did you find the protocol?


Top
 Profile  
 
PostPosted: Mon Jun 13, 2011 9:27 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5973
The firmware is rather, well, limited. So I decided to run Debian on it. That can be done by flashing customized firmware. (Difficult, and you'll loose your warranty) or by chrooting Debian. I've build a package to chroot Debian on the box, from an USB stick or disk.
The cons
  • You'll have to start Debian manually at each boot.
  • You'll loose the 'remote usb' option. (Maybe not necessarily, but I don't have a Windows PC, so I couldn't test a way how to keep it. Can't use it anyway)
The pros
  • Debian is *far* more powerful than the firmware
  • If you don't like Debian, just reboot and you'll have your firmware back
Instructions
Take an USB stick or disk of at least 512MB. Partition it in two partitions.
First partition FAT, 8MB is far enough
Second partition (at least 500MB) ext2/3.
Download the tarballs here.
Extract fatpart-homebase.tar.gz to the fat partition, extract the other 2 tarballs (as root) to the ext2/3 partition.
Enable the telnet daemon on your Homebase.
Login, and execute
Code:
cd /mnt/shared/Disk\(A1\)
sh StartDebian.sh

(The A1 part can be different). Your shell will be closed, and after about a minute you should be able to login over ssh, username root, password root. (Next time it won't take a minute, the first time the host keys have to be made.)

Alas I didn't find a way to automate this without flashing. You'll have to start StartDebian.sh manually at each boot.

When executing ps -A, you can see (among other processes) a 'sh' running, and a rc.chroot. If you kill these, you will *not* be able to shutdown or reboot properly.
Rootfs
This is a 'normal' debootstrap Lenny rootfs, with a few adjustments:
  • Added dropbear and udev
  • Changed root password to 'root'
  • Modified /etc/init.d/dropbear to generate host keys, if they don't exist
  • Modified /etc/init.d/mountall.sh to not send a signal to PID 1 (will halt the box)
  • Added /etc/init.d/rc.chroot. This script will 'init 2´ inside the chroot, and pass on shutdown or reboot commands to the firmware.
  • Exchanged /sbin/reboot, /sbin/shutdown and /sbin/halt. These scripts send a signal to rc.chroot.
StartDebian.sh
This script kills all firmware processes except init, getty, wpa-supplicant and dhcpcd. The last two processes could be killed to, but then you'll have to setup the network in Debian first. More on Homebase network here.
It will mount the Debian rootfs, and chroot it, running /etc/init.d/rc.chroot
When /etc/init.d/rc.chroot exits in a controlled way, it will kill all Debian processes, unmount the Debian mounts, and shutdown or reboot the box.
Logging
By default a logfile is generated on the FAT partition.

/Edit: June 16
Errata
There are some bugs. /tmp doesn't have the right credentials. Solve it:
Code:
chmod a+w /tmp
chmod +s /tmp

/var/log/lastlog doesn't exist. Solve it:
Code:
touch /var/log/lastlog

When using wireless on my box dmesg (and some logfiles) are flooded with 'reset tx=0 rx=3' and 'bmiss'. I don't know what to do for dmesg, but the solution for the logfiles is: create a file in /etc/rsyslog.d/, with contents:
Code:

:msg, isequal, "reset tx=0 rx=3"         ~

:msg, isequal, "bmiss"                  ~
Restart rsyslogd.


Top
 Profile  
 
PostPosted: Fri Jul 22, 2011 8:10 am 
Offline

Joined: Fri Jul 22, 2011 8:07 am
Posts: 1
Very nice .. but what would be the practical use of this? Could I share my printer and USB drives with Samba now?

What I am currently missing is that I cannot share my printer on Linux. I guess I could solve this using CUPS for sharing my printer?


Top
 Profile  
 
PostPosted: Fri Jul 22, 2011 10:40 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5973
rolandow wrote:
what would be the practical use of this?
Excuse me? A fuzzy white box is turned into a full-blown Debian server, and you ask for the practical use? Have a look at this, about a fuzzy black box.

Quote:
Could I share my printer and USB drives with Samba now?
I think so. Maybe you'll need a kernel module to support USB printers, but I suppose it's in the modules tarball.


Top
 Profile  
 
PostPosted: Wed Feb 01, 2012 9:20 am 
Offline

Joined: Wed Jul 13, 2011 1:50 pm
Posts: 3
Hello,

I've trying your Debian in my Home Base, and it is fantastic, thank you very much.

But I have two problems:

* I can't run apache, it says (/var/log/apache/error.log):
[Wed Feb 01 09:04:57 2012] [warn] pid file /var/run/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Feb 01 09:04:57 2012] [notice] Apache/2.2.9 (Debian) configured -- resuming normal operations
[Wed Feb 01 09:04:57 2012] [emerg] (89)Function not implemented: Couldn't create pollset in thread; check system or user limits
[Wed Feb 01 09:04:57 2012] [emerg] (89)Function not implemented: Couldn't create pollset in thread; check system or user limits
[Wed Feb 01 09:04:59 2012] [alert] No active workers found... Apache is exiting!

* I can't run as daemon mediatomb. It says can't access to /etc/mediatomb/mediatomb.conf, and it exists and has right permissions

Do you know what happens?

Thanks for advance


Top
 Profile  
 
PostPosted: Wed Feb 01, 2012 4:05 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5973
About apache, I *think* it has something to with epoll support in the kernel. It might be insufficient, or even non-existing. BTW, don't you think apache is a bit heavy for the box? Lighttpd will perform much better.

About mediatomb, it will run in foreground? If not, you can use strace to find out what's going on. If it does, have a look if mediatomb dumps it's credentials, whewn daemonizing.


Top
 Profile  
 
PostPosted: Thu Feb 02, 2012 1:01 pm 
Offline

Joined: Wed Jul 13, 2011 1:50 pm
Posts: 3
Mijzelf wrote:
About apache, I *think* it has something to with epoll support in the kernel. It might be insufficient, or even non-existing. BTW, don't you think apache is a bit heavy for the box? Lighttpd will perform much better.

About mediatomb, it will run in foreground? If not, you can use strace to find out what's going on. If it does, have a look if mediatomb dumps it's credentials, whewn daemonizing.


Thank you for your fast answer.

Well, finally I have mediatomb running in foreground mode and sharing my hardisk (Ext3) with samba. After, I'll try to install lighttpd as you told me.

Thanks for share your great job


Top
 Profile  
 
PostPosted: Wed Mar 07, 2012 9:35 pm 
Offline

Joined: Wed Mar 07, 2012 9:13 pm
Posts: 2
Hello!!!

I just see the project of Debian on the Home Base, and i'd like know if is possible to flash the rootfs in the rom!

Is it possible to flash directly with serial cable? Can you explain how? What about squashfs? Wich version?
How to build a working image just to be flashed on the memory?

Excuse me for all the questions but i'm very interested to know if is possible to switch-on the Home Base and just use it, without use serial cables and usb key!

Thankyou very much,
xsiriox


Top
 Profile  
 
PostPosted: Fri Mar 09, 2012 10:51 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5973
xsiriox wrote:
I just see the project of Debian on the Home Base, and i'd like know if is possible to flash the rootfs in the rom!

The rootfs of Debian? No. That won't fit.

Building your own rootfs is perfectly possible. The GPL sources are complete, and you can build an own firmware with it. Only the squashfs version was a problem. From the top of my head it was version 3, so I had to compile my own mksquash, and change the makefile somewhere to use this version instead.
You can easily find which version to use, dump the flashrom, and use 'file' on it.

When you build your own kernel/rootfs you could exchange the init script to mount an USB disk, and switch_root, if you want a more 'native' Debian. However, there is an issue with the USB, it is initialized partly by init, so if you intercept init you'll have to do some initialization yourself.

I've been trying to use a part of the flashrom (which has almost 8MB free) as yaffs2 partition, but I couldn't get it stable. I think the supplied flash write routines do not keep good track of which blocks should still be erased. (Normally the flash on this box is only written sequentially)


Top
 Profile  
 
PostPosted: Mon Mar 12, 2012 4:35 pm 
Offline

Joined: Wed Mar 07, 2012 9:13 pm
Posts: 2
ThankYou very much for your fast answer! I'm very happy that you are still developing on this platform!

I'm still waithing for a serial cable.. so still I didn't start to do nothing, but i'd like to understand little things before start.

I don't wont keep all the firmware from belkin and add debian to that, i'd like just keep the minimum as the kernel and ramdisk, modify ramdisk, and to be clear, just i need to have usbip on this little white machine.. probably I dont need all the software on the tarball of lenny..

To have just a working usbip server, what I have to keep from your compiled tarball? And unsquashing the rom file?

I downloaded an compiled the sxflash utility, but I didn't understand wich file I have to flash: the file is the squashfs file that I build whit the right version of mksquashfs?

Thankyou very much for the attentions! :)

xsiriox


Top
 Profile  
 
PostPosted: Mon Mar 12, 2012 7:39 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5973
Quote:
I downloaded an compiled the sxflash utility, but I didn't understand wich file I have to flash: the file is the squashfs file that I build whit the right version of mksquashfs?
You only need sxflash when you bricked the box. The file it uses is the same one as the file you flash using the webinterface.
And that file contains the complete firmware, kernel+squashfs.

Quote:
I don't wont keep all the firmware from belkin and add debian to that, i'd like just keep the minimum as the kernel and ramdisk, modify ramdisk, and to be clear, just i need to have usbip on this little white machine..
You only want the USB server? Then why would you change anything at all?
Quote:
probably I dont need all the software on the tarball of lenny..
Yeah. The lenny tarball is 50MB compressed. You've got about 13MB space.
Quote:
To have just a working usbip server, what I have to keep from your compiled tarball? And unsquashing the rom file?
I don't know. The USB system is proprietary software, and Belkin only provided Windows drivers. As I don't have a Windows machine, I have never seen it working. I can only guess that the precompiled sx... modules in the GPL tarball are needed, but there must be some userspace stuff also.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group