Difference between revisions of "Category:2big Network 2"
(→Release Notes: added version 2.2.7 and 2.2.8) |
m (→Custom capsule) |
||
Line 668: | Line 668: | ||
This method should work in the following Lacie products/versions: | This method should work in the following Lacie products/versions: | ||
− | * Network Space 2 (up to version 2.2. | + | * Network Space 2 (up to version 2.2.5) |
* Network Space MAX (up to version 2.2.3) | * Network Space MAX (up to version 2.2.3) | ||
* d2 Network 2 (up to version 2.2.4) | * d2 Network 2 (up to version 2.2.4) | ||
− | * 2Big Network 2 (up to version 2.2. | + | * 2Big Network 2 (up to version 2.2.8) |
* 5Big Network 2 (up to version 2.2.3) | * 5Big Network 2 (up to version 2.2.3) | ||
Revision as of 10:58, 28 April 2012
2big Network 2 | |
CPU | MV88F6281 (1.2 GHz) |
RAM | 256 MB running at 400 MHz |
Flash ROM | |
Other | Marvell Development Board (LSP Version KW_LSP_4.2.7_patch2)-- net2big_v2 Soc: MV88F6281 Rev 3 LE |
NIC | Marvell Ethernet 1 Gb |
USB | 2 usb on back of unit; 1 usb for external use and 1 usb for printer or additional storage |
internal HDD | 2x 1 TB Hitachi or Samsung HD103SI |
SATA Controller | 2 ports |
Drive Capacity | 2, 3 or 4 TB depending on config |
Fan | Yes |
Kernel | 2.6.22.18 |
Contents
- 1 Product information
- 2 Hardware Information
- 3 Release Notes
- 4 Getting root SSH access (without disassembling your Lacie)
- 5 Enhancing the 2big Network 2
- 5.1 Modifying installed software
- 5.2 Installing software on 2big Network 2
- 5.3 Debian "Squeeze" (stable) Chroot Environment
- 5.4 Debian "Lenny" (old stable) Chroot Environment
- 5.5 Software for Squeeze and Lenny chroot environments
- 5.6 Ipkg binary packages (without Chroot Environment)
- 5.7 Ditch Lacie OS and Install Debian Sid
- 6 Backups
- 7 Updates
- 8 Factory Reset
Product information
- Lacie 2Big Network 2 Product page
Contains: Overview; Specifications; Documents; Suggested; Awards & Reviews.
- Lacie 2Big Network 2 Product Support page
Contains: Downloads; Documents; FAQs; Knowledge Base; Troubleshooting; Contact LaCie.
- Lacie 2Big Network 2 FTP
Contains: Lacie original firmware capsules
Link: ftp://update.lacie.com
Username: 2bignetwork2
Password: 2bignetwork2
Direct link: ftp://2bignetwork2:2bignetwork2@update.lacie.com
- Lacie GPL Source Code
Contains: Lacie GPL source code
Link: ftp://update.lacie.com
Username: gpl_source
Password: gpl_source
Direct link: ftp://gpl_source:gpl_source@update.lacie.com
Hardware Information
cat /proc/cpuinfo
Processor : ARM926EJ-S rev 1 (v5l) BogoMIPS : 1199.30 Features : swp half thumb fastmult edsp CPU implementer : 0x56 CPU architecture: 5TE CPU variant : 0x2 CPU part : 0x131 CPU revision : 1 Cache type : write-back Cache clean : cp15 c7 ops Cache lockdown : format C Cache format : Harvard I size : 16384 I assoc : 4 I line length : 32 I sets : 128 D size : 16384 D assoc : 4 D line length : 32 D sets : 128 Hardware : net2big_v2 Revision : 0000 Serial : 0000000000000000
cat /proc/meminfo
Note: I have a squeeze chroot, twonkeymedia server, secondary ssh server and svn server running
MemTotal: 256840 kB MemFree: 80132 kB Buffers: 5516 kB Cached: 80340 kB SwapCached: 0 kB Active: 81684 kB Inactive: 48340 kB SwapTotal: 256888 kB SwapFree: 256888 kB Dirty: 36 kB Writeback: 0 kB AnonPages: 44192 kB Mapped: 17732 kB Slab: 42348 kB SReclaimable: 30456 kB SUnreclaim: 11892 kB PageTables: 1056 kB NFS_Unstable: 0 kB Bounce: 0 kB CommitLimit: 385308 kB Committed_AS: 267024 kB VmallocTotal: 385024 kB VmallocUsed: 16780 kB VmallocChunk: 360444 kB
cat /proc/partitions
major minor #blocks name 8 0 976762584 sda 8 1 1 sda1 8 2 974751907 sda2 8 5 256977 sda5 8 6 8001 sda6 8 7 8001 sda7 8 8 851413 sda8 8 9 875511 sda9 8 10 8001 sda10 8 16 976762584 sdb 8 17 1 sdb1 8 18 974751907 sdb2 8 21 256977 sdb5 8 22 8001 sdb6 8 23 8001 sdb7 8 24 851413 sdb8 8 25 875511 sdb9 8 26 8001 sdb10 31 0 512 mtdblock0 9 0 7936 md0 9 1 851328 md1 9 2 875392 md2 9 3 256896 md3 9 4 974751808 md4
cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] md4 : active raid0 sda2[0] sdb2[1] 3903007616 blocks 64k chunks md3 : active raid1 sda5[0] sdb5[1] 256896 blocks [2/2] [UU] md2 : active raid1 sda9[0] sdb9[1] 875392 blocks [2/2] [UU] md1 : active raid1 sda8[0] sdb8[1] 851328 blocks [2/2] [UU] md0 : active raid1 sdb7[1] sda7[0] 7936 blocks [2/2] [UU] unused devices: <none>
cat /proc/mounts
rootfs / rootfs rw 0 0 /dev/md0 /oldroot ext3 ro,data=ordered 0 0 none /oldroot/proc proc rw 0 0 none /oldroot/sys sysfs rw 0 0 udev /oldroot/dev tmpfs rw 0 0 devpts /oldroot/dev/pts devpts rw 0 0 none /oldroot/dev/shm tmpfs rw 0 0 /dev/md1 /oldroot/var/original ext3 ro,data=ordered 0 0 /dev/md2 /oldroot/snapshots ext3 rw,data=ordered 0 0 unionfs / unionfs rw,dirs=/oldroot/snapshots/snaps/00=rw:/oldroot/var/original=ro 0 0 proc /proc proc rw 0 0 sys /sys sysfs rw 0 0 /dev/md2 /var ext3 rw,data=ordered 0 0 udev /dev tmpfs rw 0 0 /dev/md2 /tmp ext3 rw,data=ordered 0 0 usbfs /proc/bus/usb usbfs rw 0 0 /dev/md4 /media/internal_1 xfs rw,nosuid,nodev,usrquota,prjquota 0 0 /dev/md4 /lacie/tmp xfs rw,nosuid,nodev,usrquota,prjquota 0 0 /dev/md4 /lacie/var xfs rw,nosuid,nodev,usrquota,prjquota 0 0 /dev/md4 /lacie/torrent_dir xfs rw,nosuid,nodev,usrquota,prjquota 0 0 /dev/md4 /lacie/autoupdate xfs rw,nosuid,nodev,usrquota,prjquota 0 0 /dev/md4 /lacie/afp_db xfs rw,nosuid,nodev,usrquota,prjquota 0 0 /dev/md4 /shares/Share xfs rw,nosuid,nodev,usrquota,prjquota 0 0 /dev/md4 /shares/Public xfs rw,nosuid,nodev,usrquota,prjquota 0 0
cat /proc/filesystems
nodev sysfs nodev rootfs nodev bdev nodev proc nodev debugfs nodev sockfs nodev pipefs nodev anon_inodefs nodev futexfs nodev tmpfs nodev inotifyfs nodev devpts ext3 ext2 nodev ramfs nodev unionfs xfs nodev usbfs vfat
dmesg
Linux version 2.6.22.18 (sbs@node2.lacie.com) (gcc version 4.2.1) #1 Wed Mar 16 11:17:55 UTC 2011 CPU: ARM926EJ-S [56251311] revision 1 (ARMv5TE), cr=00053177 Machine: net2big_v2 Using UBoot passing parameters structure Memory policy: ECC disabled, Data cache writeback On node 0 totalpages: 65536 DMA zone: 512 pages used for memmap DMA zone: 0 pages reserved DMA zone: 65024 pages, LIFO batch:15 Normal zone: 0 pages used for memmap CPU0: D VIVT write-back cache CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets Built 1 zonelists. Total pages: 65024 Kernel command line: console=ttyS0,115200 root=/dev/sda7 ro reset=0 productType=PRO_KW PID hash table entries: 1024 (order: 10, 4096 bytes) Console: colour dummy device 80x30 Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) Memory: 256MB 0MB 0MB 0MB = 256MB total Memory: 256256KB available (2808K code, 204K data, 484K init) Calibrating delay loop... 1199.30 BogoMIPS (lpj=5996544) Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok NET: Registered protocol family 16 CPU Interface ------------- SDRAM_CS0 ....base 00000000, size 256MB SDRAM_CS1 ....disable SDRAM_CS2 ....disable SDRAM_CS3 ....disable PEX0_MEM ....base e8000000, size 128MB PEX0_IO ....base f2000000, size 1MB INTER_REGS ....base f1000000, size 1MB NFLASH_CS ....base fa000000, size 2MB SPI_CS ....base f4000000, size 16MB BOOT_ROM_CS ....no such DEV_BOOTCS ....no such CRYPT_ENG ....base f0000000, size 2MB Marvell Development Board (LSP Version KW_LSP_4.2.7_patch2)-- net2big_v2 Soc: MV88F6281 Rev 3 LE Detected Tclk 166666667 and SysClk 400000000 MV Buttons Device Load Register Marvell USB EHCI Host controller #0 PEX0 interface detected no Link. PCI: bus0: Fast back to back transfers enabled SCSI subsystem initialized NET: Registered protocol family 2 Time: kw_clocksource clocksource has been installed. IP route cache hash table entries: 2048 (order: 1, 8192 bytes) TCP established hash table entries: 8192 (order: 4, 65536 bytes) TCP bind hash table entries: 8192 (order: 3, 32768 bytes) TCP: Hash tables configured (established 8192 bind 8192) TCP reno registered Use the XOR engines (acceleration) for enhancing the following functions: o RAID 5 Xor calculation o kernel memcpy o kenrel memzero Number of XOR engines to use: 4 cesadev_init(c000ef80) MV Buttons Driver Load mv_rtc mv_rtc: rtc core: registered mv_rtc as rtc0 mv_rtc mv_rtc: Kirkwood SoC RTC added Init kirkwood cpufreq driver Registered led device: net2big:blue:front Registered led device: net2big:red:front Registered led device: net2big:blue:hd1 Registered led device: net2big:red:hd1 Registered led device: net2big:blue:hd2 Registered led device: net2big:red:hd2 gpio-fan gpio-fan: No fan power resource available gpio-fan gpio-fan: GPIO fan initialized gpio-hd-power gpio-hd-power: GPIO Hard Disk power device initialized gpio-usb gpio-usb: USB GPIO's initialized g762 0-003e: device successfully initialized VFS: Disk quotas dquot_6.5.1 Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) Registering unionfs 2.5.3 (for 2.6.22.19) io scheduler noop registered io scheduler anticipatory registered (default) io scheduler deadline registered io scheduler cfq registered Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A serial8250.0: ttyS1 at MMIO 0xf1012100 (irq = 34) is a 16550A INIT Marvell Ethernet Driver: mv_netdev Loading Marvell Ethernet Driver: o Cached descriptors in DRAM o DRAM SW cache-coherency o Multi RX Queue support - 4 RX queues o Multi TX Queue support - 2 TX Queues o TCP segmentation offload enabled o Receive checksum offload enabled o Transmit checksum offload enabled o Network Fast Processing (Routing) supported o Driver ERROR statistics enabled o Driver INFO statistics enabled o Proc tool API enabled o Rx descripors: q0=128 q1=128 q2=128 q3=128 o Tx descripors: q0=532 q1=532 o Loading network interface(s): o eth0, ifindex = 1, GbE port = 0 Warning: Giga 1 is Powered Off mvFpRuleDb (c077e000): 2048 entries, 8192 bytes Integrated Sata device found scsi0 : Marvell SCSI to SATA adapter scsi1 : Marvell SCSI to SATA adapter scsi 0:0:0:0: Direct-Access Hitachi HCS5C1010CLA382 JC4O PQ: 0 ANSI: 5 scsi 1:0:0:0: Direct-Access Hitachi HCS5C1010CLA382 JC4O PQ: 0 ANSI: 5 Disk topology: host_no=0 channel=0 id=0 sd 0:0:0:0: [sda] 1953525168 512-byte hardware sectors (1000205 MB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 23 00 10 00 sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA sd 0:0:0:0: [sda] 1953525168 512-byte hardware sectors (1000205 MB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 23 00 10 00 sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA sda: sda1 < sda5 sda6 sda7 sda8 sda9 sda10 > sda2 sd 0:0:0:0: [sda] Attached SCSI disk Disk topology: host_no=1 channel=0 id=0 sd 1:0:0:0: [sdb] 1953525168 512-byte hardware sectors (1000205 MB) sd 1:0:0:0: [sdb] Write Protect is off sd 1:0:0:0: [sdb] Mode Sense: 23 00 00 00 sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 1:0:0:0: [sdb] 1953525168 512-byte hardware sectors (1000205 MB) sd 1:0:0:0: [sdb] Write Protect is off sd 1:0:0:0: [sdb] Mode Sense: 23 00 00 00 sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sdb: sdb1 < sdb5 sdb6 sdb7 sdb8 sdb9 sdb10 > sdb2 sd 1:0:0:0: [sdb] Attached SCSI disk sd 0:0:0:0: Attached scsi generic sg0 type 0 sd 1:0:0:0: Attached scsi generic sg1 type 0 SPI Serial flash detected @ 0xf4000000, 512KB (128sec x 4KB) mice: PS/2 mouse device common for all mice input: gpio-keys as /class/input/input0 i2c /dev entries driver at24 0-0050: 512 byte 24c04 EEPROM (writable) md: linear personality registered for level -1 md: raid0 personality registered for level 0 md: raid1 personality registered for level 1 md: raid10 personality registered for level 10 raid6: int32x1 98 MB/s raid6: int32x2 114 MB/s raid6: int32x4 123 MB/s raid6: int32x8 111 MB/s raid6: using algorithm int32x4 (123 MB/s) md: raid6 personality registered for level 6 md: raid5 personality registered for level 5 md: raid4 personality registered for level 4 raid5: measuring checksumming speed arm4regs : 1077.200 MB/sec 8regs : 758.800 MB/sec 32regs : 904.400 MB/sec raid5: using function: arm4regs (1077.200 MB/sec) device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised: dm-devel@redhat.com TCP cubic registered NET: Registered protocol family 1 NET: Registered protocol family 17 Freeing init memory: 484K eth0: link down eth0: started md: md0 stopped. md: bind<sda7> raid1: raid set md0 active with 1 out of 2 mirrors kjournald starting. Commit interval 5 seconds EXT3-fs: mounted filesystem with ordered data mode. md: bind<sdb7> RAID1 conf printout: --- wd:1 rd:2 disk 0, wo:0, o:1, dev:sda7 disk 1, wo:1, o:1, dev:sdb7 md: recovery of RAID array md0 md: minimum _guaranteed_ speed: 1000 KB/sec/disk. md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for recovery. md: using 128k window, over a total of 7936 blocks. md: md0: recovery done. RAID1 conf printout: --- wd:2 rd:2 disk 0, wo:0, o:1, dev:sda7 disk 1, wo:0, o:1, dev:sdb7 md: md1 stopped. md: bind<sdb8> md: bind<sda8> raid1: raid set md1 active with 2 out of 2 mirrors eth0: link up, full duplex, speed 1 Gbps md: md2 stopped. md: bind<sdb9> md: bind<sda9> md: md2: raid array is not clean -- starting background reconstruction raid1: raid set md2 active with 2 out of 2 mirrors md: resync of RAID array md2 md: minimum _guaranteed_ speed: 1000 KB/sec/disk. md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for resync. md: using 128k window, over a total of 875392 blocks. md: md3 stopped. md: bind<sdb5> md: bind<sda5> raid1: raid set md3 active with 2 out of 2 mirrors kjournald starting. Commit interval 5 seconds EXT3-fs: mounted filesystem with ordered data mode. kjournald starting. Commit interval 5 seconds EXT3 FS on md2, internal journal EXT3-fs: mounted filesystem with ordered data mode. unionfs: unionfs: new generation number 2 unionfs: unionfs: new generation number 3 SGI XFS with ACLs, security attributes, realtime, large block numbers, no debug enabled SGI XFS Quota Management subsystem usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. Adding 256888k swap on /dev/md3. Priority:-1 extents:1 across:256888k md: md4 stopped. md: bind<sdb2> md: bind<sda2> raid1: raid set md4 active with 2 out of 2 mirrors loop: module loaded Filesystem "md4": Disabling barriers, not supported by the underlying device XFS mounting filesystem md4 Starting XFS recovery on filesystem: md4 (logdev: internal) Ending XFS recovery on filesystem: md4 (logdev: internal) ehci_marvell ehci_marvell.70059: Marvell Orion EHCI ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1 ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100 ehci_marvell ehci_marvell.70059: 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 usb 1-1: new high speed USB device using ehci_marvell and address 2 usb 1-1: configuration #1 chosen from 1 choice scsi2 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 2 usb-storage: waiting for device to settle before scanning md: md2: resync done. RAID1 conf printout: --- wd:2 rd:2 disk 0, wo:0, o:1, dev:sda9 disk 1, wo:0, o:1, dev:sdb9 scsi 2:0:0:0: Direct-Access WD 7500AAC External 1.05 PQ: 0 ANSI: 4 Disk topology: host_no=2 channel=0 id=0 sd 2:0:0:0: [sec] 1465149168 512-byte hardware sectors (750156 MB) sd 2:0:0:0: [sec] Write Protect is off sd 2:0:0:0: [sec] Mode Sense: 21 00 00 00 sd 2:0:0:0: [sec] Assuming drive cache: write through sd 2:0:0:0: [sec] 1465149168 512-byte hardware sectors (750156 MB) sd 2:0:0:0: [sec] Write Protect is off sd 2:0:0:0: [sec] Mode Sense: 21 00 00 00 sd 2:0:0:0: [sec] Assuming drive cache: write through sec: sec1 sd 2:0:0:0: [sec] Attached SCSI disk sd 2:0:0:0: Attached scsi generic sg2 type 0 usb-storage: device scan complete
Release Notes
Version 2.2.8
- Fix issue of casing swap
Version 2.2.7
- Improve power saving management
- Fix issues in File Browser
- Improve AutoUpdate behaviour
Version 2.2.3
- Support of Nas-to-Nas backup feature
- Improved Raid mode selection
Version 2.1.3
- Fix start issue after update
Version 2.1.2
- Support of LaCie Remote Access feature
- iTunes 10.5 compatibility
- Fix NT Server backup issue
Version 2.0.6
- Filebrowser security fix
- Disk start robustness enhancements
Version 2.0.5
- Fix issues with deep-sleep and eSATA drive
Version 2.0.4
- New features
- Support for SFTP, NFS
- Full or incremental backup to DAS
- Daily eco management settings
- Japanese support
- Time Machine compatibility for Mac OS Lion
- Dashboard usability improvements
- Product stability enhancements
Version 1.3.7
- IE9 compatibility
- Filebrowser security fix
- Performance improvements over Samba
Version 1.3.6
- Noisy fan management improvement
- Compatibility improvements for MAC OS
Version 1.3.5
- Improved copy widget with scheduled job capabilities
- Improved MAC OS compatibility with AFP enhancements
- Enhanced email address management for domain users
Version 1.3.4
- Added Japanese language
- iTunes 10 shared playlists compatibility
Version 1.3.3
- Raid robustness improvement
- Capital letters are now managed in passwords
- Correct eject management of device during use of the device
Version 1.3.2
- Translation issues
Version 1.3.1
- Improve samba management
- Enhance security of the web site
- Correction of translation messages
- Correct management of rights for files and folders
- Automatic email alert for disk failure or removal
- Capital letters are now managed in passwords
- Improve domain user management
- Improve raid management for shares
Version 1.2.6
- Fixes an issue with large multimedia libraries which required a product reset.
Getting root SSH access (without disassembling your Lacie)
For enhancing your Lacie, first you will need to get root access, this tutorials shows how to get root access using the vulnerability web interface.
Up to version 1.3.6
So, to get root access, you'll just need a web browser.
Copy the following lines in the code section to a text file, in this case, replace the string YOUR.2BIG2.IP.ADDRESS the IP address of your 2Big Network 2. Copy and change the line carefully, otherwise the result is not predictable.
Big thanks to ak97 (Source) for figuring this out on the Network Space 2 because it works for the 2big Network 2 as well!
Note: You can use this HTML page to easily generate the links below
DISCLAIMER: whatever you do, do it at your own risk.
STEP 1: Enabling SSH service at startup
You do this by replacing YOUR.2BIG2.IP.ADDRESS for your Lacie IP and putting the following URLs to your browser.
Note: You should ignore the following resulting errors on each URL:
Testing installation ERROR: Missing at least one of these files: class.sshDriver.php class.SSHOperations.php manifest.xml showPass.php sshActions.xml Testing file permission Required showPass.php is executable Testing ssh access from webserver's user ssh is accessible and runnable Checking if we can connect to destination SSH server ERROR: The server 2>/dev/null||cp /etc/initng/runlevel/default.runlevel /www/browser/plugins/access.ssh/default.runlevel.txt you are trying to contact doesn't have its host key installed Please install server host key in /etc/ssh/ssh_known_hosts file, as the webserver user can't store server's key You should type this command as root to add the key to the main host file: ssh -o StrictHostKeyChecking=ask -o UserKnownHostsFile=/etc/ssh/ssh_known_hosts 2>/dev/null||cp /etc/initng/runlevel/default.runlevel /www/browser/plugins/access.ssh/default.runlevel.txt
- Make a backup of "default.runlevel"
http://YOUR.2BIG2.IP.ADDRESS/browser/plugins/access.ssh/checkInstall.php?destServer=2%3E/dev/null%7C%7Ccp%20/etc/initng/runlevel/default.runlevel%20/www/browser/plugins/access.ssh/default.runlevel.txt&&echo%20%22--Host%22
Note: Command is "cp /etc/initng/runlevel/default.runlevel /www/browser/plugins/access.ssh/default.runlevel.txt"
- Copy first 19 strings from Lacie's original "default.runlevel" to your new "default.runlevel"
http://YOUR.2BIG2.IP.ADDRESS/browser/plugins/access.ssh/checkInstall.php?destServer=2%3E/dev/null%7C%7Chead%20-19%20/etc/initng/runlevel/default.runlevel%3Edefault.runlevel&&echo%20%22--Host%22
Note: Command is "head -19 /etc/initng/runlevel/default.runlevel>default.runlevel"
- Put "sshd" string in your new "default.runlevel"
http://YOUR.2BIG2.IP.ADDRESS/browser/plugins/access.ssh/checkInstall.php?destServer=2%3E/dev/null%7C%7Cecho%20-en%20sshd%5Cn%3E%3Edefault.runlevel&&echo%20%22--Host%22
Note: Command is "echo -en sshd\n>>default.runlevel"
- Finish copy lines to your new "default.runlevel"
http://YOUR.2BIG2.IP.ADDRESS/browser/plugins/access.ssh/checkInstall.php?destServer=2%3E/dev/null%7C%7Ctail%20-3%20/etc/initng/runlevel/default.runlevel%3E%3Edefault.runlevel&&echo%20%22--Host%22
Note: Command is "tail -3 /etc/initng/runlevel/default.runlevel>>default.runlevel"
- Make your new "default.runlevel" executable
http://YOUR.2BIG2.IP.ADDRESS/browser/plugins/access.ssh/checkInstall.php?destServer=2%3E/dev/null%7C%7Cchmod%20%2bx%20default.runlevel%3Etest.txt&&echo%20%22--Host%22
Note: Command is "chmod +x default.runlevel>test.txt"
- Copy your new "default.runlevel" file to "/etc/initng/runlevel"
http://YOUR.2BIG2.IP.ADDRESS/browser/plugins/access.ssh/checkInstall.php?destServer=2%3E/dev/null%7C%7Ccp%20/www/browser/plugins/access.ssh/default.runlevel%20/etc/initng/runlevel/default.runlevel&&echo%20%22--Host%22
Note: Command is "cp /www/browser/plugins/access.ssh/default.runlevel /etc/initng/runlevel/default.runlevel"
- Make sure that everything OK. Fulfill a request ...
http://YOUR.2BIG2.IP.ADDRESS/browser/plugins/access.ssh/checkInstall.php?destServer=2%3E/dev/null%7C%7Ccat%20/etc/initng/runlevel/default.runlevel%3Etest.txt&&echo%20%22--Host%22
Note: Command is "cat /etc/initng/runlevel/default.runlevel>test.txt"
- ... and see the result
http://YOUR.2BIG2.IP.ADDRESS/browser/plugins/access.ssh/test.txt
The result should look like this:
initial dbus udev hald clock dhcdbd logrotate syslogd klogd swap modules mountfs mountuserfs raid usb hostname NetworkManager http getty/1 sshd cron unicorn thumbd
- If everything went fine, SSH service will be enabled at startup in your Lacie forever!
STEP 2: Create and install the SSH RSA public key
Now that the SSH service will be enabled at startup we need to get the keys to access it. So now we need to create the RSA private/public keys.
Here you'll need to go to Linux. If you don't have Linux, download and install it in a 2GB+ USB pen drive so you can boot with Ubuntu.
Again, you will need to replace YOUR.2BIG2.IP.ADDRESS for your Lacie IP and ignore the errors on each URL.
- From Linux, open a terminal window
- Run the following command to generate the RSA private/public keys (replace YOUR.PASSWORD for the password you want to use). As a result you will have 2 files: Private key "lacie_2big2" and Public Key "lacie_2big2.pub"
ssh-keygen -b 1024 -t rsa -N YOUR.PASSWORD -f lacie_2big2
- Open in your browser the site http://www.string-functions.com/urlencode.aspx
- Enter the contents of file "lacie_2big2.pub" in the upper window
- Click "Encode!". In the lower window will appear the encoded RSA Public key content that will be necessary in these queries. Save it or don't close this browser tab.
- Create a folder for the RSA Public key in Lacie
http://YOUR.2BIG2.IP.ADDRESS/browser/plugins/access.ssh/checkInstall.php?destServer=2%3E/dev/null%7C%7Cmkdir%20-p%20/root/.ssh%3Etest.txt&&echo%20%22--Host%22
Note: Command is "mkdir -p /root/.ssh>test.txt" - Install the RSA Public key (replace ENCODED.RSA.PUBLIC.KEY for the encoded RSA Public key generated above)
http://YOUR.2BIG2.IP.ADDRESS/browser/plugins/access.ssh/checkInstall.php?destServer=2%3E/dev/null%7C%7Cecho%20ENCODED.RSA.PUBLIC.KEY%3E/root/.ssh/authorized_keys&&echo%20%22--Host%22
Note: Command is "echo ENCODED.RSA.PUBLIC.KEY>/root/.ssh/authorized_keys" - Restart your Lacie from the Dashboard.
- If everything went fine, now you can access SSH service from your computer using your RSA private key
STEP 3: Test access and change root password
Now, from your computer you should access the Lacie using your private key, so let's test it and change the root password so you can access from any other PC and without the need of a private key.
Again you'll need to go to Linux.
- From Linux, open a terminal window
- Run the following command to connect via SSH (replace YOUR.2BIG2.IP.ADDRESS for your Lacie IP)
ssh -i ./lacie_2big2 root@YOUR.2BIG2.IP.ADDRESS
- Note: You'll need to be in the same folder you generate the keys at step 2
- When it asks put the password you choose at step 2
- Run the following command to change root password for allow connect from another machine.
passwd
- If everything went fine, now you can connect from any PC using root username and the password you choose. See the rest of the tutorials if you want to enhance your Lacie.
Notes:
- Sometimes, after restart your Lacie you will loose the root password. If this happens, you will need to repeat step 2 and step 3
- If you use Windows, after the configuration, you can use PuTTY to SSH access your Lacie
- You can use WinSCP to SFTP access your Lacie to upload/download files
Up to version 2.0.5
Big thanks to Mijzelf (Source) for figuring this out on the Network Space 2 because it works for the 2big Network 2 as well!
STEP 1: Create a root symlink in a USB disk
- From Linux, open a terminal window
- Format an USB drive ext2/3
- Create the following symlink on it.
ln -s / theroot
- Plug the USB drive to Lacie
STEP 2: Use AjaXplorer to access lacie root filesystem
- Go to Lacie Dashboard and browse your files
- Select the USB drive, and select the symlink folder "theroot"
STEP 3: Get root and SSH access
- Edit "/usr/lib/python2.6/site-packages/unicorn/authentication/local/user.py" and "/etc/shadow"
- Replace the "root" hashed password in
root:$1$$1RDUuTsVHjre9juUvuICX.:12542:0:99999:7:::
- For "admin" hashed password, that you can see in "/etc/shadow"
admin:[YOUR_ADMIN_HASHED_PASSWORD]:12488:0:99999:7:::
- Download "/etc/initng/runlevel/default.runlevel", edit the file and replace
#sshd
- by
sshd
- Reboot. If everything went fine, now you can connect from any PC using root username and password. See the rest of the tutorials if you want to enhance your Lacie.
Notes:
- When editing, you'll have to use Linux/Unix line endings. If you're in Windows use PsPad
- Until firmware version 2.0.4 ssh port is 22, from firmware 2.0.5 is 2222
- If you use Windows, after the configuration, you can use PuTTY to SSH access your Lacie, and WinSCP to SFTP access your Lacie to upload/download files.
Custom capsule
«Standing on the shoulders of giants»
In this case the giants are bago, Jeroen and everyone who contributed for creating the first custom capsules for Lacie Network Space 2 (Source). Big thanks to them!
This method should work in the following Lacie products/versions:
- Network Space 2 (up to version 2.2.5)
- Network Space MAX (up to version 2.2.3)
- d2 Network 2 (up to version 2.2.4)
- 2Big Network 2 (up to version 2.2.8)
- 5Big Network 2 (up to version 2.2.3)
With the custom capsule you can "upgrade" to the same version. For instance, you can "upgrade" version 2.0.5 with a 2.0.5.1 custom capsule.
Create your own custom capsule
If you already download a custom capsule, you don't need to do this, just use it!
STEP 1: Choose your enviroment
- If you already have root in LacieOS (only tested in versions 2.0.x) you can use LacieOS
- If you don't have root use Linux. You will need at least tar, lzma, wget, curl and sha1sum.
STEP 2: Preparing
- Download custom capsule creator script
wget -O create_capsule.sh http://downloads.lacie.nas-central.org/Users/andreus/scripts/lacieos/create_capsule.sh_v7.txt
- Give execute permissions
chmod +x create_capsule.sh
- Add anything else you want in your custom biuld in Changing original capsule (custom capsule make) part
STEP 3: Creating the capsule
- Run the script, choose your options, see if there are no errors and wait
./create_capsule.sh
- You can test the integrity of the capsule file in Lacie Network Agent (just choose the file and see the information)
Use a custom capsule
- Update using method 2 (sometimes doesn't work) or method 3
- If everything went fine, now you can connect from any PC using your 'admin' user password for 'root' user. See the rest of the tutorials if you want to enhance your Lacie.
Note: If you change your 'admin' user password, reboot. After reboot, your 'root' password will be alse updated.
Notes:
- Until firmware version 2.0.4 ssh port is 22, from firmware 2.0.4+ the port is 2222
- If you use Windows, after the configuration, you can use PuTTY to SSH access your Lacie, and WinSCP to SFTP access your Lacie to upload/download files.
Enhancing the 2big Network 2
Modifying installed software
Please note that all of the following Hacks need root access.
Transmition: Use original web manager
By default Lacie 2Big Network 2 blocks the Transmition web manager, because it's integrated with the Lacie 2Big Dashboard (Dashboard -> Download).
The goal here is to activate the original web manager.
Props go to andreus.
Modifying Transmition
- If you have any, stop and delete all your torrents from the Dashboard (Dashboard -> Download)
- Stop service (wait until it fully stops)
ngc --stop transmission
- Duplicate "/lacie/torrent_dir/transmission/" folder
cp -R /lacie/torrent_dir/transmission/ /lacie/torrent_dir/transmission-new
- Change permissions of files and folder in the new folder
chmod -R 0777 /lacie/torrent_dir/transmission-new/blocklists chmod -R 0777 /lacie/torrent_dir/transmission-new/resume chmod -R 0777 /lacie/torrent_dir/transmission-new/torrents chmod 0666 /lacie/torrent_dir/transmission-new/dht.dat chmod 0666 /lacie/torrent_dir/transmission-new/stats.json chmod 0644 /lacie/torrent_dir/transmission-new/settings.json
- Edit "/lacie/torrent_dir/transmission-new/settings.json" file and change the "rpc-whitelist" parameter to also include your 2Big IP
Example:"rpc-whitelist": "127.0.0.*,192.168.*.*"
- Start service (wait until it fully starts)
ngc --start transmission
- Test access in your web browser! http://YOUR.2BIG2.IP.ADDRESS:9091/
Example: http://192.168.1.120:9091/ - Make the change permanent (even after restart), editing "/etc/initng/transmission.i" and changing
exec daemon = /usr/bin/transmission-daemon -f --config-dir /lacie/torrent_dir/transmission;
forexec daemon = /usr/bin/transmission-daemon -f --config-dir /lacie/torrent_dir/transmission-new;
Notes:
- After you gain web access don't use the Dashboard -> Download system anymore
- After you gain web access change the download folder to "/shares/YOUR.SHARE.NAME/" or other folder of your choice
- If you want to change more things like controlled access to the web manager edit the "/lacie/torrent_dir/transmission-new/settings.json" file and change the "rpc-*" parameters
- If you want remote access from a Desktop client download and configure it to suit your needs
More information
- Transmission Page
- Transmission Wiki
- Transmission Configuration Options
- Transmission Remote Client Download
TwonkyMedia Server
Update from 4.4.18 to 6.0.30 (up to LacieOS version 1.3.7)
Props go to ak97 (Source).
- Stop TwonkyMedia media server from LaCie web interface (Dashboard -> General Settings -> Multimedia service)
- Backup old twonkymedia server
mv /usr/local/twonkymedia /usr/local/twonkymedia_backup
- Download, extract and delete twonkymedia tarfile
mkdir /usr/local/twonkymedia cd /usr/local/twonkymedia //Get zipped file wget http://downloads.lacie.nas-central.org/Users/quicknick/twonkymedia/twonkymedia.tar //Extract zipped file tar -xvf twonkymedia.tar //Delete zipped file rm -rf twonkymedia.tar
- Set execute permission attribute for files/folders inside "/usr/local/twonkymedia"
chmod -R +x /usr/local/twonkymedia
- Edit file "/etc/initng/twonkymedia.i", and change line:
/usr/local/twonkymedia/twonkymedia -inifile /usr/local/twonkymedia/twonkymedia-server.ini -logfile /var/log/twonkymedia.log -v 1;
to/usr/local/twonkymedia/twonkymedia -inifile /usr/local/twonkymedia/twonkymedia-server2.ini -logfile /var/log/twonkymedia.log -v 1;
- Start media server with LaCie web interface (Dashboard -> General Settings -> Multimedia service)
- Go to http://YOUR.2BIG2.IP.ADDRESS:9000/config and configure mediaserver for correct OpenShare folders
Example: http://192.168.1.120:9000/config
Notes:
- If you have problems check settings in "/usr/local/twonkymedia/twonkymedia-server2.ini"
Access web config (LacieOS version 2.0.x)
In LacieOS version 2.0.x Twonky was updated to version 6.0.33, so there's no need to update it.
You can however change the config file to permit web configuration access.
- Duplicate file "/etc/twonkymedia-server.ini"
cp /etc/twonkymedia-server.ini /etc/twonkymedia-server2.ini
- Edit and change what you want in "/etc/twonkymedia-server2.ini", but don't forget to put this configurations:
enableweb=2 ... httpport=9000
- Edit file "/etc/initng/twonkymedia.i", and change line:
/usr/local/twonkymedia/twonkymedia -inifile /etc/twonkymedia-server.ini -logfile /var/log/twonkymedia.log -v 1;
to/usr/local/twonkymedia/twonkymedia -inifile /etc/twonkymedia-server2.ini -logfile /var/log/twonkymedia.log -v 1;
- Reboot your Lacie
- Go to http://YOUR.2BIG2.IP.ADDRESS:9000/config and configure mediaserver for correct OpenShare folders
Example: http://192.168.1.120:9000/config
More information
Installing software on 2big Network 2
That are 3 methods for installing software: Debian "Squeeze" (stable) chroot Environment, Debian "Lenny" (old stable) chroot Environment and Ipkg binary packages (without Chroot Environment).
The following table analyses the 3 methods regarding Available disk space, Available software, Risk,
Flexibility and Memory usage.
Please note that all of the following methods need root access.
Method | Available disk space | Available software | Risk | Flexibility | Memory usage |
---|---|---|---|---|---|
Debian "Squeeze" (stable) chroot Environment | Very High (because you'll mount a share only for this with the space you want - see Automount shares) |
Very High (you have a lot of new software) |
Very Low (you don't mess with Lacie OS, you're in a different environment) |
Low (since you're in a different environment you can't interact with Lacie OS) |
Medium-High (Depends on what you install, but typically higher since it is a different environment) |
Debian "Lenny" (old stable) chroot Environment | Very High (because you'll mount a share only for this with the space you want - see Automount shares) |
Medium (you have a lot of old software) |
Very Low (you don't mess with Lacie OS, you're in a different environment) |
Low (since you're in a different environment you can't interact with Lacie OS) |
Medium-High (Depends on what you install, but typically higher since it is a different environment) |
Ipkg binary packages (without Chroot Environment) | Very High (because you'll mount a share only for this with the space you want - see Automount shares) |
Low (you have some software in ipkg format, some new and some old) |
High (you are installing software directly on Lacie OS) |
Very high (since you're in Lacie OS you can interact with initng) |
Low-medium (memory usage will be less than a chroot environment) |
If you install additional software on the Lacie, it is best to make shares and bind to directories. For example have /media/internal_1/shares/18 bind to /opt at boot up for the ipkg install. It is preferable not to bind from /shares/"YOUR SHARE" because it is already bound from the real location which resides at /media/internal_1/shares/XX.
Please note, that you should only use this if you need to automount system and shares for Ipkg binary packages (without Chroot Environment), squeeze or lenny chroot environment.
For version 2.1.3+
- Make backup of /etc/initng/samba.i
mv /etc/initng/samba.i /etc/initng/samba.backup
- Download the new "samba.i" and "samba-bind.i" files (or create them yourself) to "/etc/initng/"
wget -O /etc/initng/samba.i http://downloads.lacie.nas-central.org/Users/andreus/scripts/lacieos-ipkg/samba.i.txt wget -O /etc/initng/samba-bind.i http://downloads.lacie.nas-central.org/Users/andreus/scripts/lacieos-ipkg/samba-bind.i.txt
Note: when using this tutorial for the Network Station 2 instead of 2big Network 2, replace /media/internal_1 by /media/internal_6 everywhere in samda-bind.i.txt: sed -i "s/\/media\/internal_1/\/media\/internal_6/g" samba-bind.i
Note: on firmware 2.2.4 of the Network Station 2, this causes If that happens, restore your /etc/initng/samba.backup to /etc/initng/samba.i, and add after 'daemon samba/smbd {' and 'need = samba/initial;' the line 'also_start = samba-bind;'.
- Reboot the Lacie
reboot
- Start/Restart the samba-bind service (not sure if this step is even necessary)
ngc -z samba-bind ngc --stop samba-bind ngc --start samba-bind
- Verify the service is running and verify if shares are mounted
ngc --status df -h
- If everything went fine, you now have a permenent mount for squeeze and/or lenny and/or svn.
Notes:
- If for some reason your shares did not show up please check /var/log/samba-bind.log
cat /var/log/samba-bind.log
- If you want to verify which shares are mounted
df -h
Debian "Squeeze" (stable) Chroot Environment
Please note that all of the following Hacks need root access.
Install Squeeze
Props go to quicknick.
STEP 1: Create a home for squeeze
- There are a number of places you can put your chroot environment. I chose to make a private share that way I have raid 1 redundancy and an easy way to add files to the environment without having to scp or ssh to it all the time. To do that, create a private share "debian-squeeze" in the dashboard (Dashboard -> Shares)
- Create squeeze and user shares on squeeze folders, then mount squeeze and user shares
//Create "/debian-squeeze" folder and mount it mkdir /debian-squeeze mount -o bind /shares/debian-squeeze /debian-squeeze //Create shares folder inside "debian-squeeze" directory and mount it (and its submounts) on squeeze mkdir /debian-squeeze/shares mount -o rslave,bind /shares /debian-squeeze/shares
- Add automount of "/debian-squeeze" by following the automount section
STEP 2: Installing Squeeze - Method 1. The Easy Way (Prebuild)
- Download, extract and delete zipped squeeze prebuild
cd /debian-squeeze //Download zipped squeeze prebuild wget -P /debian-squeeze http://downloads.lacie.nas-central.org/Users/quicknick/debian-squeeze/squeeze.tar.gz //Extract zipped file tar zxvf squeeze.tar.gz //Delete zipped file to save space rm squeeze.tar.gz
File Name: squeeze.tar.gz File Size: 69.025.948 (65,8MB) md5sum: 799b8700039df617e5888c82179d7164 sha1sum: c398a8b65b16a11ec8541dfd38ba8abdd9ee9426
- Copy "hosts" and "resolv.conf" files from Lacie OS to squeeze chroot environment
cp /etc/hosts /debian-squeeze/etc/ cp /etc/resolv.conf /debian-squeeze/etc/
- Done. Now go to STEP 3: Squeeze time
STEP 2: Installing Squeeze - Method 2. The Hard Way (build your own squeeze)
Prepare for squeeze
- From your desktop preferably ubuntu or debian based (for simplicity) run the following commands to setup:
sudo apt-get install cdebootstrap
- Create a directory in home or somewhere to build squeeze
mkdir ~/squeeze
- Build squeeze
cd ~/squeze
- The following command will fail with the following error when doing tar this is normal!
sudo cdebootstrap -aarmel squeeze squeeze ftp://ftp.debian.org/debian
- Note: You should pick a mirror for proper updating of squeeze. The one closest to you is usually the fastest.
- This is the error you will see ignore it and proceed
P: Extracting tar E: Execution failed: Exec format error E: Internal error: install
- Compress the chroot environment
cd ~/squeeze/ sudo tar czvf debian_squeeze.tar.gz *
- copy squeeze.tar.gz //YOUR.2BIG2.IP.ADDRESS/debian-squeeze using nautilus
Installing squeeze
- Upload downloaded squeeze to new share root
cd /squeeze tar zxvf squeeze.tar.gz chroot /squeeze /bin/bash
- Copy files from Lacie OS to chroot environment
cp /etc/hosts /squeeze/etc/ cp /etc/resolv.conf /squeeze/etc/
- Modify chroot bashrc
rm /squeeze/root/.bashrc vi /squeeze/root/.bashrc
- Paste the following into /squeeze/root/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells. # ne rien faire en mode non interactif [ -z "$PS1" ] && return # based on a function found in bashtstyle-ng 5.0b1 # Original author Christopher Roy Bratusek (http://www.nanolx.org) # Last arranged by ayoli (http://ayozone.org) 2008-02-04 17:16:43 +0100 CET function setColors() { export black="\[\033[0;38;5;0m\]" export red="\[\033[0;38;5;1m\]" export orange="\[\033[0;38;5;130m\]" export green="\[\033[0;38;5;2m\]" export yellow="\[\033[0;38;5;3m\]" export blue="\[\033[0;38;5;4m\]" export bblue="\[\033[0;38;5;12m\]" export magenta="\[\033[0;38;5;55m\]" export cyan="\[\033[0;38;5;6m\]" export white="\[\033[0;38;5;7m\]" export coldblue="\[\033[0;38;5;33m\]" export smoothblue="\[\033[0;38;5;111m\]" export iceblue="\[\033[0;38;5;45m\]" export turqoise="\[\033[0;38;5;50m\]" export smoothgreen="\[\033[0;38;5;42m\]" red='\e[0;31m' RED='\e[1;31m' blue='\e[0;34m' BLUE='\e[1;34m' cyan='\e[0;36m' CYAN='\e[1;36m' NC='\e[0m' # No Color } function setBW() { export black="" export red="" export orange="" export green="" export yellow="" export blue="" export bblue="" export magenta="" export cyan="" export white="" export coldblue="" export smoothblue="" export iceblue="" export turqoise="" export smoothgreen="" red='' RED='' blue='' BLUE='' cyan='' CYAN='' NC='' } function setprompt() { promptline1="$cyan┌($red${newPWD}$cyan)$fill($red$user@$host $date$cyan)┐" promptline2="$cyan└─>$black " } function pre_prompt { newPWD="${PWD}" user=$(whoami) host=$(hostname) date=$(date "+%a %d/%m/%Y %T") fill="" setBW setprompt let promptsize=$(echo -n "$promptline1" | wc -c | tr -d " ") let promptsize=$promptsize-4 # 2 additional chars per special char let fillsize=${COLUMNS}-${promptsize} while [ "$fillsize" -gt "0" ] do fill="${fill}─" let fillsize=${fillsize}-1 done if [ "$fillsize" -lt "0" ] then let cutt=3-${fillsize} newPWD="...$(echo -n $PWD | sed -e "s/\(^.\{$cutt\}\)\(.*\)/\2/")" fi case "$TERM" in xterm) setColors setprompt PS1="$promptline1\n$promptline2" ;; screen) setColors setprompt PS1="$promptline1\n$promptline2" ;; *) setColors setprompt PS1="$promptline1\n$promptline2" ;; esac xtitle_reset } PROMPT_COMMAND=pre_prompt export HISTCONTROL=ignoredups export HISTSIZE=5000 export HISTFILESIZE=20000 shopt -s checkwinsize umask 022 # Some more alias to avoid making mistakes: alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' alias pss='ps auxf' alias grep='grep --color=auto' alias du='du -kh --max-depth=1' alias df='df -kTh' if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi logview() { ccze -A < $1 | less -R } logtail() { tail -f $1 | ccze } export EDITOR=vim # ou nano / emacs scp) : if [[ -z "$SUDO_UID" && $UID -ne 0 ]]; then export SSH_AUTH_SOCK="/tmp/ssh-agent-$UID.socket" [[ -e "$SSH_AUTH_SOCK" ]] || ssh-agent -a $SSH_AUTH_SOCK -t 3000 > /dev/null fi alias ssh-add='ssh-add -t 3000' sshk() { [[ "$(ssh-add -l)" == "The agent has no identities." ]] && ssh-add; ssh "$@"; } scpk() { [[ "$(ssh-add -l)" == "The agent has no identities." ]] && ssh-add; scp "$@"; } export LS_OPTIONS='--color=auto' eval "`dircolors -b`" alias ls='ls $LS_OPTIONS -AhF' alias ll='ls -lo' alias chown='chown -h' bind 'set convert-meta off' alias calendar='var=$(cal -m); echo "${var/$(date +%-d)/$(echo -e "\033[1;31m$(date +%-d)\033[0m")}"' shopt -s cdspell alias apt-up="apt-get update && apt-get upgrade && apt-get dist-upgrade && apt-get autoclean && apt-get clean && apt-get autoremove" # && debclean" ulimit -S -c 0 # Don't want any coredumps. if [ -x /usr/games/fortune ]; then /usr/games/fortune -s # Makes our day a bit more fun.... :-) fi #------------------------------------------------------------- # tailoring 'less' #------------------------------------------------------------- # alias more='less' export PAGER=most export LESSCHARSET='latin1' export LESSOPEN='|/usr/bin/lesspipe.sh %s 2>&-' # Use this if lesspipe.sh exists export LESS='-i -N -w -z-4 -g -e -M -X -F -R -P%t?f%f \ :stdin .?pb%pb\%:?lbLine %lb:?bbByte %bb:-...' function xtitle() # Adds some text in the terminal frame. { case "$TERM" in *term | rxvt) echo -n -e "\033]0;$*\007" ;; *) ;; esac } # aliases that use xtitle function xtitle_reset() { xtitle "$(hostname):$PWD" } alias top='xtitle Processes on $HOST && top; xtitle_reset' alias make='xtitle Making $(basename $PWD) ; make ; xtitle_reset' function man() { for i ; do xtitle The $(basename $1|tr -d .[:digit:]) manual command man -a "$i" xtitle_reset done } # Find a file with a pattern in name: function findf() { find . -type f -iname '*'$*'*' -ls ; } # Find a file with pattern $1 in name and Execute $2 on it: function findexec() { find . -type f -iname '*'${1:-}'*' -exec ${2:-file} {} \; ; } # Find a pattern in a set of files and highlight them: # (needs a recent version of egrep) function findstr() { OPTIND=1 local case="" local usage="fstr: find string in files. Usage: fstr [-i] \"pattern\" [\"filename pattern\"] " while getopts :it opt do case "$opt" in i) case="-i " ;; *) echo "$usage"; return;; esac done shift $(( $OPTIND - 1 )) if [ "$#" -lt 1 ]; then echo "$usage" return; fi find . -type f -name "${2:-*}" -print0 | \ xargs -0 egrep --color=always -sn ${case} "$1" 2>&- | more } function tailcut() # cut last n lines in file, 10 by default { nlines=${2:-10} sed -n -e :a -e "1,${nlines}!{P;N;D;};N;ba" $1 } function repeat() # Repeat n times command. { local i max max=$1; shift; for ((i=1; i <= max ; i++)); do # --> C-like syntax eval "$@"; done } function ask() # See 'killps' for example of use. { echo -n "$@" '[y/n] ' ; read ans case "$ans" in y*|Y*) return 0 ;; *) return 1 ;; esac }
- Done. Now go to STEP 3: Squeeze time
STEP 3: Squeeze time
- Add squeeze chroot environment functions to "/root/.profile"
//Download squeeze chroot environment functions, add them to "/root/.profile" and delete temporary files wget -O /temp.txt http://downloads.lacie.nas-central.org/Users/andreus/scripts/debian/squeeze/.profile.txt cat /temp.txt >> /root/.profile rm /temp.txt //Source "/root/.profile" so you don't need to restart source /root/.profile
- Run Squeeze
squeeze
- Note: At this point, you're now chrooted into the squeeze distribution you just loaded. Any commands from this point forward will be inside the chroot.
- Finish setting up Squeeze (you should ONLY do this if you did STEP 2 the hard way)
cd /var/cache/bootstrap dpkg --force-all -i libc6*deb dpkg --force-all -i dpkg*deb dpkg -iGREB .
- The dpkg commands are going to bomb out on certain packages. Keep running the -i GREB. command a couple of times, and any packages that seem stuck, run the --force-all -i flags on the individual packages. Your final dpkg -i GREB. command should indicate no errors.
- Add sources to environment
echo "deb ftp://mirrors.usc.edu/pub/linux/distributions/debian squeeze main contrib non-free" > /etc/apt/source.list echo "deb ftp://mirrors.usc.edu/pub/linux/distributions/debian squeeze-updates main contrib non-free" >> /etc/apt/source.list echo "deb ftp://ftp.debian-multimedia.org/ squeeze main non-free" >> /etc/apt/source.list
- Note: You should pick a mirror for proper updating of squeeze. The one closest to you is usually the fastest.
- Finish setting APT up
apt-get update apt-get install debian-archive-keyring apt-get update apt-get dist-upgrade
- Final step is to set your squeeze root password
passwd
- That's it your Debian "squeeze" is installed!
Notes:
- Run "squeeze" from Lacie OS each time you need to go to squeeze and "exit" to get out of squeeze into Lacie OS
- If you are using PuTTY and can't see what you are writing in squeeze chroot environment, you may have to change your PuTTY color settings in "Window" -> "Colors"
- If you are using PuTTY and you're seeing some strange characters, you may have to change your PuTTY translation settings to "UTF-8" in "Window" -> "Translation"
- If you want to set squeeze language (example for files and folders with different charsets) do the following commands.
Example for Portuguese:
//Install locales packages apt-get install locales //Generate Portuguese language (pt_PT) to system echo -e "pt_PT UTF-8" >> /etc/locale.gen locale-gen //Add Portuguese language to "LANG" environment variable to "~/.bashrc" echo -e "export LANG=pt_PT.UTF-8" >> ~/.bashrc //Exit and start squeeze again exit squeeze
- If you want to set timezone do the following command.
Example for Madrid:
ln -sf /usr/share/zoneinfo/Europe/Madrid /etc/localtime
STEP 4: Start Squeeze services on startup
If you want to use Squeeze to run services which should be started automatically whenever the device reboots, do the following (based on a forum discussion):
(All the following should be executed *outside* of the chroot, so the root in the following refers to the root of the device, not the chroot root.)
- Create a file /etc/init.d/squeeze.sh with the following content:
#!/bin/sh . /root/.profile case $1 in start) mount4squeeze chroot /debian-squeeze /etc/init.d/rc 2 ;; esac
- Make this file executable:
chmod +x /etc/init.d/squeeze.sh
- Create a file /etc/initng/squeeze.i with the following content:
#!/sbin/itype # This is a i file, used by initng parsed by install_service service squeeze { need = samba-bind; script start = { /etc/init.d/squeeze.sh start exit 0 }; }
- Edit /etc/initng/runlevel/default.runlevel, and add the following line:
squeeze
Note: I did not find a way to stop all services within the chroot via a script.
'/etc/init.d/rc 0' also kills the services outside of the chroot, even when executed from within the chroot.
Debian "Lenny" (old stable) Chroot Environment
Please note that all of the following Hacks need root access.
Install Lenny
Props goes to olivm (Source).
STEP 1: Create a home for lenny
- There are a number of places you can put your chroot environment. I choose to make a private share that way I have raid 1 redundancy and an easy way to add files to the environment without having to scp or ssh to it all the time. To do that, create a private share "debian-lenny" in the dashboard (Dashboard -> Shares)
- Create lenny and user shares on lenny folders, then mount lenny and user shares
//Create "/debian-lenny" folder and mount it mkdir /debian-lenny mount -o bind /shares/debian-lenny /debian-lenny //Create shares folder inside "/debian-lenny" directory and mount it (and its submounts) on lenny mkdir /debian-lenny/shares mount -o rslave,bind /shares /debian-lenny/shares
- Add automount of "/debian-lenny" by following the automount section
STEP 2: Installing Lenny - The Easy Way (Prebuild)
- Download, extract and delete zipped lenny prebuild
cd / //Download zipped lenny prebuild wget -P / http://downloads.lacie.nas-central.org/Users/quicknick/debian-lenny/lenny-arm-olivm.tgz //Extract zipped file tar zxvf lenny-arm-olivm.tgz //Delete zipped file to save space and extra .profile generated in zip rm lenny-arm-olivm.tgz rm .profile //Change folder name mv /lenny-arm /debian-lenny
File Name: lenny-arm-olivm.tgz File Size: 85.421.677(81,4MB) md5sum: 181c53462b46b24d11b5fa02ab87d006 sha1sum: f8feeaa1b922912a7926026def5a169ad88b945f
- Copy "hosts" and "resolv.conf" files from Lacie OS to be used in lenny chroot environment
cp /etc/hosts /debian-lenny/etc/ cp /etc/resolv.conf /debian-lenny/etc/
STEP 3: Lenny time
- Add lenny chroot environment functions to "/root/.profile"
//Download lenny chroot environment functions, add them to "/root/.profile" and delete temporary files wget -O /temp.txt http://downloads.lacie.nas-central.org/Users/andreus/scripts/debian/lenny/.profile.txt cat /temp.txt >> /root/.profile rm /temp.txt //Source "/root/.profile" so you don't need to restart source /root/.profile
- Run lenny
lenny
- Note: At this point, you're now chrooted into the lenny distribution you just loaded. Any commands from this point forward will be inside the chroot.
- Add multimedia source to environment
echo "deb ftp://ftp.debian-multimedia.org lenny main" >> /etc/apt/source.list
- Finish setting APT up
apt-get update apt-get install debian-archive-keyring apt-get update apt-get dist-upgrade apt-get install wget
- Final step is to set your lenny root password
passwd
- That's it your Debian "lenny" is installed!
Notes:
- Run "lenny" from Lacie OS each time you need to go to lenny and "exit" to get out of lenny into Lacie OS
- If you are using PuTTY and can't see what you are writing in lenny chroot environment, you may have to change your PuTTY color settings in "Window" -> "Colors"
- If you are using PuTTY and you're seeing some strange characters, you may have to change your PuTTY translation settings to "UTF-8" in "Window" -> "Translation"
- If you want to set lenny language (example for files and folders with different charsets) do the following commands.
Example for Portuguese:
//Install locales packages apt-get install locales //Generate Portuguese language (pt_PT) to system echo -e "pt_PT UTF-8" >> /etc/locale.gen locale-gen //Add Portuguese language to "LANG" environment variable to "~/.bashrc" echo -e "export LANG=pt_PT.UTF-8" >> ~/.bashrc //Exit and start lenny again exit lenny
- If you want to set timezone do the following command.
Example for Madrid:
ln -sf /usr/share/zoneinfo/Europe/Madrid /etc/localtime
Software for Squeeze and Lenny chroot environments
All of the software in this section assumes you already setup a squeeze or lenny chroot environment
PS3MediaServer 1.21.1 (released 14 April 2011)
By default Lacie 2Big Network 2 uses TwonkyMedia Server as UPnP/DLNA server, but you can use others.
The goal here is replace TwonkyMedia Server for PS3MediaServer in squeeze/lenny chroot environment.
Please note, that while this method works, for what i tested the PS3MediaServer on squeeze/lenny on 2Big2 doesn't have the capability to transcode videos with mencoder (ex: for subtitles). Also PS3MediaServer doesn't start automatically because it's on squeeze/lenny environment.
Props go to quicknick and andreus.
STEP 1: Installing dependencies
- Install and test Java
apt-get install openjdk-6-jre
//Test java
java -version
- Install and test ffmpeg, mplayer, meconder and vlc
apt-get install ffmpeg mplayer meconder vlc //Download subtitle font to "/root/.mplayer/" wget -P /root/.mplayer/ http://ps3mediaserver.googlecode.com/svn/trunk/ps3mediaserver/win32/mplayer/subfont.ttf //Test ffmpeg ffmpeg -version //Test mplayer mplayer //Test mencoder mencoder -ovc help //Test vlc vlc -h
Mediainfo in Squeeze
- Install and test mediainfo
apt-get install mediainfo
//Test mediainfo
mediainfo --version
Mediainfo in Lenny
- Install compile, zip and ping tools (you'll need then for the next steps)
apt-get install g++ gcc binutils make libtool autoconf automake gettext build-essencial gzip bzip2 zlib1g-dbg zlib1g zlib1g-dev iputils-ping
- Download source and compile libzen, libmediainfo and mediainfo. Then delete source files and test mediainfo
mkdir /opt/src cd /opt/src //Get zipped file wget http://downloads.sourceforge.net/mediainfo/MediaInfo_CLI_0.7.44_GNU_FromSource.tar.bz2 //Extract zipped file tar xvjf MediaInfo_CLI_0.7.44_GNU_FromSource.tar.bz2 //Delete zipped file to save space rm MediaInfo_CLI_0.7.44_GNU_FromSource.tar.bz2 //Compile!! This next process could take up to 2 hours so take a break and come back later cd MediaInfo_CLI_GNU_FromSource ./CLI_Compile.sh //When it finishes copy mediainfo file to bin dir cp /opt/src/MediaInfo_CLI_GNU_FromSource/MediaInfo/Project/GNU/CLI/mediainfo /bin/ //Now install ZenLib, make install should work, but in my case it didn't so i manually installed it cd /opt/src/MediaInfo_CLI_GNU_FromSource/ZenLib/Project/GNU/Library /bin/sh ./libtool --mode=install /usr/bin/install -c 'libzen.la' '/usr/local/lib/libzen.la' //Now install MediaInfoLib, make install should work, but in my case it didn't so i manually installed it cd /opt/src/MediaInfo_CLI_GNU_FromSource/MediaInfoLib/Project/GNU/Library /bin/sh ./libtool --mode=install /usr/bin/install -c 'libmediainfo.la' '/usr/local/lib/libmediainfo.la' //Copy libraries files to lib folder cp -Rrp /usr/local/lib/lib* /lib/ //Delete source files cd /opt rm -rf /opt/src //Test mediainfo --version
STEP 2: Installing PS3MediaServer
- Install ps3mediaserver (download, extract and delete tgz file)
cd /opt //Get zipped file wget http://ps3mediaserver.googlecode.com/files/pms-generic-linux-unix-1.21.1.tgz //Extract zipped file tar -xvf pms-generic-linux-unix-1.21.1.tgz //Delete zipped file rm -rf pms-generic-linux-unix-1.21.1.tgz cd /opt/pms-linux-1.21.1/
- Create configuration file and put what you want to share (you can share the folders you want, separate with ",")
echo "folders=/shares/YOUR.SHARE.NAME/" > PMS.conf
- Note: All configuration options in PS3MediaServer source code. You can change the file "/opt/pms-linux-1.21.1/PMS.conf" for general configurations and "/opt/pms-linux-1.21.1/WEB.conf" for webservices configurations.
STEP 3: Running PS3MediaServer
- Copy pre-created script (or create it yourself) and put it in your squeeze/lenny "/opt/pms-linux-1.21.1" directory
wget -O /opt/pms-linux-1.21.1/pms http://downloads.lacie.nas-central.org/Users/andreus/scripts/debian/pms.txt
- Give execute permission and create a symlink to "/bin" so it can be executed from anywhere
cd /opt/pms-linux-1.21.1/ chmod +x pms ln -s /opt/pms-linux-1.21.1/pms /bin/pms
- You know have a start/stop script of PS3MediaServer. Usage: "pms start" or "pms stop" or "pms info" or "pms log". Start PS3MediaPlayer
pms start
- Try it in PS3MediaPlayer Web Manager http://YOUR.2BIG2.IP.ADDRESS:5001/console/
Example: http://192.168.1.120:5001/console/
- If you completed everything correctly you'll have a PS3MediaServer. Now you can check from UPnP reader device (PS3, Windows Media Player or other)
STEP 4: Stop TwonkyMediaServer daemon (initng startup script)
Since you already have PS3MediaServer working you can now stop your original UPnP Server (TwonkyMediaServer) so you can save some memory.
The following steps are in Lacie OS, not in squeeze/lenny chroot environment
- Edit "/etc/initng/twonkymedia.i" and change:
/bin/rm -f /usr/local/twonkymedia/twonkymediaserver-log.txt;
/usr/local/twonkymedia/twonkymedia -D -inifile /usr/local/twonkymedia/twonkymedia-server.ini -logfile /var/log/twonkymedia.log -v 1;
to# /bin/rm -f /usr/local/twonkymedia/twonkymediaserver-log.txt;
# /usr/local/twonkymedia/twonkymedia -D -inifile /usr/local/twonkymedia/twonkymedia-server.ini -logfile /var/log/twonkymedia.log -v 1;
- Restart your Lacie
reboot
- Go to http://YOUR.2BIG2.IP.ADDRESS:9000/ to test if TwonkyMediaServer is down
Example: http://192.168.1.120:9000/config
More information
lighttpd (Web Server)
Props go to quicknick.
- Just run the following in chroot to install lighttpd. Hit yes for dependencies.
apt-get install lighttpd
- Make sure you run on a different port than Lacie OS WebServer. Edit "/etc/lighttpd/lighttpd.conf" and Modify line 70 Server.Port to your value
Server.Port = 81
- Start lighttpd
/etc/init.d/lighttpd start
- Try it http://YOUR.2BIG2.IP.ADDRESS:81/
Example: http://192.168.1.120:81/
Postfix (SMTP Server)
Props go to andreus.
- Install Postfix
apt-get install postfix
- In the first screen of setup choose "Internet site". In the second screen of the setup you will see your hostname, say ok.
- Configure mail server allowed send networks editing "/etc/postfix/main.cf" and changing
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
- for
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.1.0/24
- Pelase note thios configuration is for a usual network, your network can have other ips
- Test it using a SMTP client like Outlook or Thunderbird
SSH
Props go to quicknick.
- Just run the following to install SSH (hit yes for dependencies).
apt-get install ssh
- Make sure you run on a different port than Lacie OS SSH. Edit "/etc/ssh/sshd_config" and modify to
Port 2222
- Test SSH access
Subversion Server
Memory usage = 1.2Mb
Props go to quicknick.
I chose to make a private share "repos" and made it automatically mount by the automount service
Create a home for subversion
Create a new directory for repositories
mkdir /srv/svn mkdir /srv/svn/repos
Manual mount
mount -o bind /shares/repos/ /"chroot_env"/srv/svn/repos/
Automatic mount is described in the Automount section
Install Subversion
Just run the following in chroot to install subversion. Hit yes for dependencies.
apt-get install subversion
Create a repository
A new subversion user group should be created. This can be done by creating a new user called svn and and the existing users to this group, as follows:
useradd svn usermod -a -G svn user1
Where user1 is an existing user that is added to the group svn.
Set a new password for the user svn:
passwd svn
Create a new repository for testing:
svnadmin create /srv/svn/repos/test chown -R svn:svn /srv/svn
Don’t forget to change the permission for all users in the group svn for the test project:
chmod -R g+w /srv/svn/repos/test
Test the setting by usinf the file protocol:
svn co file:///srv/svn/repos/test /tmp/test
This will check out our test project to /tmp/test. You should get an output like “Checked out revision 0″.
Create a Startup Script
All that's needed here is to create a new file and add the command to startup svnserve. This can be done as follows:
cd /etc/init.d/ touch svnserve vi svnserve
Then copy/paste the following to the file svnserve:
#!/bin/sh -e ### BEGIN INIT INFO # Provides: svnserve # Required-Start: $remote_fs $network # Required-Stop: $remote_fs $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start the lighttpd web server. ### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON="/usr/bin/svnserve" NAME=svnserve DESC="svn server" SCRIPTNAME=/etc/init.d/$NAME OPTIONS="-d -r /srv/svn --pid-file /var/run/svnserve.pid" [ -x $DAEMON ] || exit 0 . /lib/lsb/init-functions case "$1" in start) log_daemon_msg "Starting svnserve" start-stop-daemon --start --pidfile /var/run/svnserve.pid \ --exec $DAEMON -- $OPTIONS log_end_msg 0 ;; stop) log_daemon_msg "Stopping svnserve" start-stop-daemon --stop --pidfile /var/run/svnserve.pid \ --oknodo log_end_msg 0 ;; restart) log_daemon_msg "Restarting svnserve" start-stop-daemon --stop --quiet --pidfile /var/run/svnserve.pid \ --oknodo sleep 1 start-stop-daemon --start --quiet --pidfile /var/run/svnserve.pid \ --exec $DAEMON -- $OPTIONS log_end_msg 0 ;; *) echo "Usage: /etc/init.d/svnserver.sh {start|stop|restart}" exit 2 ;; esac exit 0
chmod +x /etc/init.d/svnserve
And then to start you can run
/etc/init.d/svnserve start
And to stop it you run
/etc/init.d/svnserve stop
Add svnserve to runlevel for automatic startup
In order to make svnserve automatically start you need to link the newly created startup script into the runlevel directories.
cd /etc/rc2.d ln -s /etc/init.d/svnserve S19svnserve
cd /etc/rc3.d ln -s /etc/init.d/svnserve S19svnserve
cd /etc/rc4.d ln -s /etc/init.d/svnserve S19svnserve
cd /etc/rc5.d ln -s /etc/init.d/svnserve S19svnserve
Test your new subversion server
Verify subversion is running
ps -ef |grep svn
Should output this:
root 13811 1 0 21:33 ? 00:00:00 /usr/bin/svnserve -d -r /srv/svn --pid-file /var/run/svnserve.pid
then you can svn co svn://YOUR.2BIG2.IP.ADDRESS/repos/YOUR_REPO
X Window System (X11)
Props go to quicknick and andreus.
- Install the following packages and hit yes to agree to install the needed dependencies:
apt-get install xvfb fluxbox x11vnc
- Copy pre-created script (or create it yourself) and put it in your squeeze/lenny "/bin" directory
wget -O /bin/x11 http://downloads.lacie.nas-central.org/Users/andreus/scripts/debian/x11.txt
- Give execute permissions to that script
chmod +x /bin/x11
- You know have a start/stop script of X11. Usage: "x11 start" or "x11 stop" or "x11 info" or "x11 log". Start X11
x11 start
- Use a VNC Viewer and access to Your Lacie in a graphical interface
JDownloader
Props go to andreus.
Please note that, for now, you'll have to use JDownloader with X11 through VNC connection with makes it very slow to use.
At least, you can also use JDownloader Web Manager.
STEP 1: Install dependencies
- Install and test Java
apt-get install openjdk-6-jre
//Test java
java -version
- Install X11, if not yet installed
STEP 2: Install JDownloader
- Download JDownloader install/update/run script
mkdir /opt/jdownloader cd /opt/jdownloader //Download wget install script wget http://212.117.163.148/jd.sh //Change in "jd.sh" all "-Xmx512m" for "-Xmx192m" and "JDDIR=~/.jd" for "JDDIR=/opt/jdownloader" and define the DISPLAY variable sed -i 's/Xmx512m/Xmx192m/g' jd.sh sed -i 's/~\/\.jd/\/opt\/jdownloader/g' jd.sh sed -i 's/JDDIR=/export DISPLAY=\:1\nJDDIR=/g' jd.sh //Give execute permission to jd.sh chmod +x jd.sh
- Run X11
x11 start
- Now install (and update) JDownloader by running "/opt/jdownloader/jd.sh" script in x11 graphical environment using VNC (use XTerm)
- NOTE: it will take more than 15 minutes). In the setup, you have too select the language and the download folder.
- Now start JDownloader by running "/opt/jdownloader/jd.sh" script in x11 graphical environment using VNC (use XTerm) and go to "Options" -> "Plugins & Add-ons" -> "Extensions" and activate the webserver. You can also configure the webserver in the "JD Web interface" menu item
- Try it in JDownloader Web Manager http://YOUR.2BIG2.IP.ADDRESS:8765/
Example: http://192.168.1.120:8765/
If it asks for a login/password the default is JD/JD
- Close JDownloader and close VNC connection
- Copy pre-created script (or create it yourself) and put it in your squeeze/lenny "/opt/jdownloader" directory
wget -O /opt/jdownloader/jdownloader http://downloads.lacie.nas-central.org/Users/andreus/scripts/debian/jdownloader.txt
- Give execute permission and create a symlink to "/bin" so it can be executed from anywhere
cd /opt/jdownloader/ chmod +x jdownloader ln -s /opt/jdownloader/jdownloader /bin/jdownloader
- You know have a start/stop script of JDownloader. Usage: "jdownloader start" or "jdownloader update" or "jdownloader stop" or "jdownloader info" or "jdownloader log".
STEP 3: Running JDownloader
- Start X11 and a VNC connection
x11 start
- Start JDownloader in xterm
jdownloader start
- You can now use JDownloader trough VNC and JDownloader Web Manager to download what you want
More information:
xfe (File Manager)
- Install a file browser that you can use within VNC or SSH
apt-get install xfe
- From VNC connection to Lacie open xfe
Ipkg binary packages (without Chroot Environment)
There is lots of cool stuff out there and binary packages already built for armel is awesome. Some may ask what is the benefit of this way versus a chroot environment and I'd tell you it is far easier, lighter in weight (less taxing) than a chroot environment and newer packages than a lenny environment. Another bonus is that you can add daemons to initng so when Lacie starts up so does your daemons.
- nslu2 homepage
- Packages information
- ipkg cs08q1armel repository location
- ipkg cs08q1armel repository package list
DISCLAIMER: Please use partedmagic or some other linux OS to backup your partitions because this method does not protect you like a chroot environment. All packages will install in /opt/ this makes it easy for us to remove installed packages. Consider yourself warned.
Install ipkg
Props go to bago (Source).
STEP 1: Create a home for ipkg
- For avoiding problems with lack of space, first you should make a private share that way you have a lot of space and an easy way to add files without having to scp or ssh to it all the time. To do that, create a private share "opt" in the dashboard (Dashboard -> Shares)
- Mount "opt" share on Lacie OS
//If it doesn't exists allready, create an opt folder and mount it with opt share
mkdir /opt
mount -o bind /shares/opt /opt
- Add automount of "/opt" by following the automount section
STEP 2: Installing ipkg
- Add package repository and ipkg location URLs to variables
cd /opt //Add package repository URLs to variables feed=http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable feednative=http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/native/unstable //Add ipkg location URLs to variable ipk_name=`wget -qO- $feed/Packages | awk '/^Filename: ipkg-opt/ {print $2}'`
- Download, extract and delete ipkg install package
wget $feed/$ipk_name tar -xOvzf $ipk_name ./data.tar.gz | tar -C / -xzvf - rm $ipk_name
- Configure ipkg package sources
mkdir -p /opt/etc/ipkg echo "src cross $feed" > /opt/etc/ipkg/feeds.conf echo "src native $feednative" >> /opt/etc/ipkg/feeds.conf
STEP 3: Ipkg time
- Add "/opt/bin" to system PATH in "/root/.profile" and source it
//Add "/opt/bin" to system PATH in "/root/.profile" echo -e "\nexport PATH=/opt/bin:\$PATH" >> /root/.profile //Source /root/.profile so you don't need to restart source /root/.profile
- Finish setting ipkg (update it)
ipkg update
- That's it your ipkg is installed!
Install Subversion Server
I use svn with a great deal of regularity so here is a similar method to the chroot environment.
I'll also be integrating this with the lacie webpage to administer easier.
Memory usage = 918kb
Props go to quicknick.
Install
ipkg install svn
verify all of it's packages install by running svn --version
svn, version 1.6.15 (r1038135) compiled Nov 25 2010, 21:22:22
You'll see this version is a later revision than the package in lenny (1.5.1). Of course you could compile a later version, but I'll leave that to people who really want the latest and greatest
Configure
Modify /etc/group and add svn group with a user ie YOURUSERNAME to the svn group
echo -e "svn:!:21:YOURUSERNAME >> /etc/group adduser -D -G svn svn
Where YOURUSERNAME is your user name you added from Lacie dashboard.
Create a new directory for repositories, and create a new repository for testing:
mkdir /srv/svn mkdir /srv/svn/repos
mount -o bind /shares/repos /srv/repos svnadmin create /srv/svn/repos/test chown -R svn:svn /srv/svn
This will create a new directory called /srv/svn/repos which contains a new testing repository test.
Automatic mount on 2big network bootup just add the following to /etc/fstab
echo -e "/shares/repos/\t/svn/repos\tdefaults\tbind\t0 0" >> /etc/fstab
Don’t forget to change the permission for all users in the group svn for the test project:
chmod -R g+w /srv/svn/repos/test
Test the setting by using the file protocol:
svn co file:///svn/repos/test /tmp/test
Start svnserve and test remotely
svnserve -d -r /svn
Verify svnserve runs manually by running the following:
ps |grep svn
Will output the following:
12069 root 7284 S /opt/bin/svnserve -d -r /svn
From your client box run the following to checkout
svn co svn://YOUR.2BIG2.IP.ADDRESS/repos/test /tmp/test
initng Startup Script
cd /etc/initng touch svnserve.i
Then copy the following:
#!/sbin/itype # This is a i file, used by initng parsed by install_service daemon svnserve { need = bootmisc sshd/generate_keys virtual/net; exec daemon = /opt/bin/svnserve -d -r /svn; pid_file = /var/run/svnserve.pid; daemon_stops_badly; forks; }
Then paste in vi
vi svnserve.i
Close vi and then run test the svnserve service
ngc -z svnserve ngc --stop svnserve ngc --start svnserve
Verify the service is running:
ps |grep svn
Repository on lacie storage
If you created a share on lacie storage follow the automount section to automatically mount your storage and then the subversion service start section.
Repository on root filesystem
- note: If you just created /svn on the root file system then use this.
Add svnserve to the default runlevel
echo -e "svnserve" >> /etc/initng/runlevel/default.runlevel
Verify "svnserve" has been added to /etc/initng/runlevel/default.runlevel
cat /etc/initng/runlevel/default.runlevel
Should output the following:
initial dbus udev hald clock dhcdbd logrotate syslogd klogd swap modules mountfs mountuserfs raid usb hostname NetworkManager http getty/1 sshd cron unicorn thumbd svnserve
Reboot your Lacie
reboot
When the Lacie comes back up check to see if the service is running
ps |grep svn
and
ngc --status
If setup correctly it should return with:
1389 root 7284 S /opt/bin/svnserve -d -r /svn
Install MiniDLNA 1.0.24 (released 15 March 2011)
By default Lacie 2Big Network 2 uses TwonkyMedia Server as UPnP/DLNA server, but you can use others.
The goal here is replace TwonkyMedia Server for MiniDLNA in Lacie OS.
Note: that with Showtime and MiniDLNA in Lacie OS you CAN stream movies with subtitles to your PS3.
Props go to andreus.
STEP 1: Installing dependencies
- Install zlib, readline, ncurses and e2fslibs
ipkg install zlib readline ncurses e2fslibs
- Install and test ffmpeg, flac, sqlite and multimedia libraries (exif, id3tag, ogg, vorbis)
cd /opt ipkg install ffmpeg flac libexif libid3tag libjpeg libogg libvorbis //Test ffmpeg ffmpeg -version //Test flac flac -v
- Install and test sqlite
ipkg install sqlite
//Test sqlite
sqlite3 -version
STEP 2: Compiling & Installing MiniDLNA
- Install compile dependencies
ipkg install binutils gcc libc-dev libnsl libtool make m4 libstdc++
- Download source and extract it
mkdir /opt/src cd /opt/src //Get zipped file wget http://sourceforge.net/projects/minidlna/files/minidlna/1.0.24/minidlna_1.0.24_src.tar.gz //Extract zipped file tar zxvf minidlna_1.0.24_src.tar.gz //Delete zipped file to save space rm minidlna_1.0.24_src.tar.gz
- Compile minidlna and install it. Then delete source files and test minidlna
//Change in "genconfig.sh" and "Makefile" all "usr" for "opt" in order to correct the paths cd /opt/src/minidlna-1.0.24 sed -i 's/usr/opt/g' genconfig.sh sed -i 's/usr/opt/g' Makefile //Create symlink to "libpthread" library ln -s /opt/arm-none-linux-gnueabi/lib/libpthread.so /opt/lib/libpthread.so ln -s /opt/arm-none-linux-gnueabi/lib/libpthread.so.0 /opt/lib/libpthread.so.0 //Compile!! This next process could take up to 5 minutes make
- Install minidlna. Then delete source files and test minidlna
//Copy compiled files to directories cp minidlna /opt/sbin cp minidlna.conf /opt/etc mkdir /tmp/minidlna //Symlink multimedia libraries ln -s /opt/lib/libexif.so.12.3.1 /usr/lib/libexif.so.12 ln -s /opt/lib/libavformat.so.52 /usr/lib/libavformat.so.52 ln -s /opt/lib/libavutil.so.49 /usr/lib/libavutil.so.49 ln -s /opt/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51 ln -s /opt/lib/libFLAC.so.8 /usr/lib/libFLAC.so.8 ln -s /opt/lib/libogg.so.0 /usr/lib/libogg.so.0 ln -s /opt/lib/libvorbis.so.0 /usr/lib/libvorbis.so.0 //Delete source files cd /opt rm -rf /opt/src //Test MiniDLNA /opt/sbin/minidlna -V
- Change your config file in "/opt/etc/minidlna.conf"
STEP 3: Running MiniDLNA
- Copy pre-created script (or create it yourself) and put it in your "/opt/bin" directory
wget -O /opt/bin/minidlna http://downloads.lacie.nas-central.org/Users/andreus/scripts/lacieos-ipkg/minidlna.txt
- Give execute permission to file
cd /opt/bin/ chmod +x minidlna
- Run MiniDLNA
minidlna start
- If you completed everything correctly you'll have MiniDLNA running. Now you can check from UPnP reader device (PS3, Windows Media Player or other)
More information
STEP 4: Stop TwonkyMediaServer daemon (initng startup script)
Since you already have MiniDLNA working you can now stop your original UPnP/DLNA Server (TwonkyMediaServer) so you can save some memory.
- Edit "/etc/initng/twonkymedia.i" and change:
/bin/rm -f /usr/local/twonkymedia/twonkymediaserver-log.txt;
/usr/local/twonkymedia/twonkymedia -D -inifile /usr/local/twonkymedia/twonkymedia-server.ini -logfile /var/log/twonkymedia.log -v 1;
to# /bin/rm -f /usr/local/twonkymedia/twonkymediaserver-log.txt;
# /usr/local/twonkymedia/twonkymedia -D -inifile /usr/local/twonkymedia/twonkymedia-server.ini -logfile /var/log/twonkymedia.log -v 1;
- Restart your Lacie
reboot
- Go to http://YOUR.2BIG2.IP.ADDRESS:9000/ to test if TwonkyMediaServer is down
Example: http://192.168.1.120:9000/config
STEP 5: MiniDLNA daemon (initng startup script)
- Copy pre-created script (or create it yourself) and put it in "/etc/initng" directory
wget -O /etc/initng/minidlna.i http://downloads.lacie.nas-central.org/Users/andreus/scripts/lacieos-ipkg/minidlna.i.txt
- Please note that this script is for using with automount shares. If you don't use ipkg in a share remove " samba-bind" from this file.
- Add it to initng startup script
echo -e "minidlna" >> /etc/initng/runlevel/default.runlevel
- Restart your Lacie
reboot
Install PS3MediaServer 1.21.1 (released 14 April 2011)
By default Lacie 2Big Network 2 uses TwonkyMedia Server as UPnP/DLNA server, but you can use others.
The goal here is replace TwonkyMedia Server for PS3MediaServer in Lacie OS.
WARNING: This method works for installing PS3MediaServer, but since the ipkg mencoder package has errors, it doesn't work for transcoding with mencoder (ex: for subtitles).
Props go to quicknick and andreus.
STEP 1: Installing dependencies
- Install and test Java
cd /opt //Get zipped file wget http://downloads.lacie.nas-central.org/Users/quicknick/ps3mediaserver/OpenJDK-camswl.tar.gz //Extract zipped file tar zxvf OpenJDK-camswl.tar.gz //Delete zipped file to save space rm OpenJDK-camswl.tar.gz //Link Java to /opt/bin ln -s /opt/OpenJDK-camswl/bin/java /opt/bin/java ln -s /opt/OpenJDK-camswl/bin/javac /opt/bin/javac //Test java java -version
- Install and test ffmpeg and vlc
ipkg install ffmpeg vlc //Test ffmpeg ffmpeg -version //Test vlc vlc -h
- Install and test mplayer
//Get package wget http://downloads.lacie.nas-central.org/Users/quicknick/ps3mediaserver/mplayer-bvdd_1.1.5-1_arm.ipk //Install package ipkg install mplayer-bvdd_1.1.5-1_arm.ipk cp -Rrp /opt/QtPalmtop/* /opt/ //Remove not needed files rm -rf /opt/QtPalmtop/ rm mplayer-bvdd_1.1.5-1_arm.ipk //Test mplayer mplayer //Download subtitle font to "/root/.mplayer/" wget -P /root/.mplayer/ http://ps3mediaserver.googlecode.com/svn/trunk/ps3mediaserver/win32/mplayer/subfont.ttf
- Install and test mencoder
//Get package wget http://downloads.lacie.nas-central.org/Users/quicknick/ps3mediaserver/mencoder_1.1.0-1_arm.ipk //Install package ipkg install mencoder_1.1.0-1_arm.ipk cp -Rrp /opt/QtPalmtop/* /opt/ //Remove not needed files rm -rf /opt/QtPalmtop/ rm mencoder_1.1.0-1_arm.ipk //Test mencoder mencoder -ovc help
- Install compile dependencies (needed for compiling mediainfo), and create symlink to ldconfig (you'll need for install)
ipkg install binutils gcc libc-dev libnsl libtool make m4 libstdc++ ln -s /opt/share/ipkg/intercept/ldconfig /opt/bin/ldconfig
- Download source and compile libzen, libmediainfo and mediainfo. Then delete source files and test mediainfo
mkdir /opt/src cd /opt/src //Extract zipped file wget http://downloads.sourceforge.net/mediainfo/MediaInfo_CLI_0.7.44_GNU_FromSource.tar.bz2 //Extract zipped file tar xvjf MediaInfo_CLI_0.7.44_GNU_FromSource.tar.bz2 //Delete zipped file to save space rm MediaInfo_CLI_0.7.44_GNU_FromSource.tar.bz2 //Compile!! This next process could take up to 2 hours so take a break and come back later cd MediaInfo_CLI_GNU_FromSource ./CLI_Compile.sh //When it finishes copy mediainfo file to bin dir cp /opt/src/MediaInfo_CLI_GNU_FromSource/MediaInfo/Project/GNU/CLI/mediainfo /opt/bin/ //Now install ZenLib cd /opt/src/MediaInfo_CLI_GNU_FromSource/ZenLib/Project/GNU/Library/ make install //Now install libmediainfo cd /opt/src/MediaInfo_CLI_GNU_FromSource/MediaInfoLib/Project/GNU/Library/ make install //Copy libraries files to lib folder cp -Rrp /usr/local/lib/lib* /opt/lib/ //Delete source files cd /opt rm -rf /opt/src //Test mediainfo --version
STEP 2: Installing PS3MediaServer
- Install ps3mediaserver (download, extract and delete tgz file)
cd /opt //Get zipped file wget http://ps3mediaserver.googlecode.com/files/pms-generic-linux-unix-1.21.1.tgz //Extract zipped file tar -xvf pms-generic-linux-unix-1.21.1.tgz //Delete zipped file rm pms-generic-linux-unix-1.21.1.tgz cd /opt/pms-linux-1.21.1/
- Create configuration file and put what you want to share (you can share the folders you want, separate with ",")
echo "folders=/shares/YOUR.SHARE.NAME/" > PMS.conf
- Note: All configuration options in PS3MediaServer source code. You can change the file "/opt/pms-linux-1.21.1/PMS.conf" for general configurations and "/opt/pms-linux-1.21.1/WEB.conf" for webservices configurations.
STEP 3: Running PS3MediaServer
- Copy pre-created script (or create it yourself) and put it in your squeeze/lenny "/opt/pms-linux-1.21.1" directory
wget -O /opt/pms-linux-1.21.1/pms http://downloads.lacie.nas-central.org/Users/andreus/scripts/lacieos-ipkg/pms.txt
- Please note that this script is for using with automount shares. If you don't use ipkg in a share remove " samba-bind" from this file.
- Give execute permission and create a symlink to "/opt/bin" so it can be executed from anywhere
cd /opt/pms-linux-1.21.1/ chmod +x pms ln -s /opt/pms-linux-1.21.1/pms /opt/bin/pms
- You know have a start/stop script of PS3MediaServer. Usage: "pms start" or "pms stop" or "pms log". Start PS3MediaPlayer
pms start
- Try it in PS3MediaPlayer Web Manager http://YOUR.2BIG2.IP.ADDRESS:5001/console/
Example: http://192.168.1.120:5001/console/
- If you completed everything correctly you'll have a PS3MediaServer. Now you can check from UPnP reader device (PS3, Windows Media Player or other)
STEP 4: Stop TwonkyMediaServer daemon (initng startup script)
Since you already have PS3MediaServer working you can now stop your original UPnP Server (TwonkyMediaServer) so you can save some memory.
- Edit "/etc/initng/twonkymedia.i" and change:
/bin/rm -f /usr/local/twonkymedia/twonkymediaserver-log.txt;
/usr/local/twonkymedia/twonkymedia -D -inifile /usr/local/twonkymedia/twonkymedia-server.ini -logfile /var/log/twonkymedia.log -v 1;
to# /bin/rm -f /usr/local/twonkymedia/twonkymediaserver-log.txt;
# /usr/local/twonkymedia/twonkymedia -D -inifile /usr/local/twonkymedia/twonkymedia-server.ini -logfile /var/log/twonkymedia.log -v 1;
- Restart your Lacie
reboot
- Go to http://YOUR.2BIG2.IP.ADDRESS:9000/ to test if TwonkyMediaServer is down
Example: http://192.168.1.120:9000/config
STEP 5: PS3MediaServer daemon (initng startup script)
- Copy pre-created script (or create it yourself) and put it in "/etc/initng" directory
wget -O /etc/initng/ps3mediaserver.i http://downloads.lacie.nas-central.org/Users/andreus/scripts/lacieos-ipkg/ps3mediaserver.i.txt
- Add it to initng startup script
echo -e "ps3mediaserver" >> /etc/initng/runlevel/default.runlevel
- Restart your Lacie
reboot
- Test it in PS3MediaPlayer Web Manager http://YOUR.2BIG2.IP.ADDRESS:5001/console/
Example: http://192.168.1.120:5001/console/
More information
Compile your own software
Props go to quicknick.
The following will need to be installed:
- autoconf
- automake
- binutils
- gcc
- gettext
- libc-dev
- libnsl
- libtool
- make
- m4
Install the all of these dependencies by running the following:
ipkg install gcc binutils make libtool autoconf automake gettext
Good luck compiling, make sure you backup your drives for easy restores.
Ditch Lacie OS and Install Debian Sid
WIP Instead of being limited to the Lacie OS, you can blow it away and install Debian Sid.
Connect to Lacie via Clunc
Download clunc and run the following command:
./clunc -i YOUR.2BIG2.IP.ADDRESS
Reboot your Lacie and then just wait till you see the Marvel prompt
Marvel>>
tftpboot method
You'll need to have a tftp server for this.
Once you have set up a tftp server download uImage and place in the tftpboot directory.
setenv ipaddr ${NAS_IP}; setenv serverip ${SERVER_IP}; tftpboot 800000 uImage
You'll see the following:
Then boot the debian sid kernel
bootm 0x800000
usb boot method
Download uImage and place on the root of a fat or fat32 usb drive.
create the following script "usb_boot" where your clunc resides and paste the following in the file
#!/bin/bash # nas_ip='''NAS IP''' # You can get it by ifconfig eth0 server_ip='''YOUR SERVER IP''' server_mac='''YOUR SERVER MAC''' echo -e " set mainlineLinux 2206; setenv bootargs netconsole=6666@${nas_ip}/,6666@${server_ip}/${server_mac} auto=true debian-installer/allow_unauthenticated=true file=/preseed.cfg; usb reset; fatload usb 0:1 0x800000 uImage; usb stop; bootm 0x800000; " | ./clunc -i ${nas_ip} -t 60
Run the script
Connect to debian sid
telnet
Backups
After you get root access you can backup your lacie partitions.
- Backup your MBR Blocks
//MBR block of disk a dd if=/dev/sda of=/shares/[YOUR_SHARE_NAME]/sda.mbr count=1 bs=512 //MBR block of disk b dd if=/dev/sdb of=/shares/[YOUR_SHARE_NAME]/sdb.mbr count=1 bs=512
- Backup LacieOS partitions (you only need to backup partition 6, 7, 8)
//Partition 1 (disk a & b): Extended (contains sda5, sda6, sda7, sda8, sda9 and sda10) dd if=/dev/sda1 | gzip > /shares/[YOUR_SHARE_NAME]/partition1a.gz dd if=/dev/sdb1 | gzip > /shares/[YOUR_SHARE_NAME]/partition1b.gz //Partition 5 (disk a & b): Swap dd if=/dev/sda5 | gzip > /shares/[YOUR_SHARE_NAME]/partition5a.gz dd if=/dev/sdb5 | gzip > /shares/[YOUR_SHARE_NAME]/partition5b.gz //Partition 6 (disk a & b): U-Boot uImage dd if=/dev/sda6 | gzip > /shares/[YOUR_SHARE_NAME]/partition6a.gz dd if=/dev/sdb6 | gzip > /shares/[YOUR_SHARE_NAME]/partition6b.gz //Partition 7 (disk a & b): Initial root filesystem dd if=/dev/sda7 | gzip > /shares/[YOUR_SHARE_NAME]/partition7a.gz dd if=/dev/sdb7 | gzip > /shares/[YOUR_SHARE_NAME]/partition7b.gz //Partition 8 (disk a & b): Runtime root filesystem dd if=/dev/sda8 | gzip > /shares/[YOUR_SHARE_NAME]/partition8a.gz dd if=/dev/sdb8 | gzip > /shares/[YOUR_SHARE_NAME]/partition8b.gz //Partition 9 (disk a & b): Runtime root filesystem dd if=/dev/sda9 | gzip > /shares/[YOUR_SHARE_NAME]/partition9a.gz dd if=/dev/sdb9 | gzip > /shares/[YOUR_SHARE_NAME]/partition9b.gz //Partition 10 (disk a & b): U-Boot image dd if=/dev/sda10 | gzip > /shares/[YOUR_SHARE_NAME]/partition10a.gz dd if=/dev/sdb10 | gzip > /shares/[YOUR_SHARE_NAME]/partition10b.gz
- Backup User data partitions (Note: you have to have a larger external disk than your lacie to backup this partitions)
//Partition 2 (disk a & b): User shares
dd if=/dev/sda2 | gzip > /shares/[YOUR_EXTERNAL_DISK_SHARE_NAME]/partition2a.gz
dd if=/dev/sdb2 | gzip > /shares/[YOUR_EXTERNAL_DISK_SHARE_NAME]/partition2b.gz
Please note that this full backup will take a lot of time.
Updates
There are 3 methods for updating your 2Big firmware:
1. Auto-update/Update Using the Dashboard
Lacie explains this method pretty good.
2. Update Using LaCie Network Assistant
Lacie explains this method pretty good.
3. Manual Force Update
This method isn't in Lacie manuals.
If you are having problems with updating your NAS with the 2 previous methods:
- In the dashboard, create a share named "Share" (on Network Space 2/MAX is "MyShare")
- Create a folder in that share named "Update"
Note: In Network Space 2 lower version, you don't need to create the "Update" folder (see the Network Space 2 from 1.0.2 to 1.2.5 using MyShare)
- Download the capsule file from Lacie FTP
- Put the *.capsule file in that folder (ex: /Share/Update/2bignetwork2_2.0.5.capsule, or /MyShare/Update/2bignetwork2_2.0.5.capsule on Network Space 2/MAX)
- Reboot your NAS
- Wait for the upgrade. It should take a while
- When it's done you can delete the share "Share" from the dashboard (on Network Space 2/MAX is "MyShare")
Factory Reset
If you are having problems you can do factory reset to get your default firmware. Lacie explains this method pretty good.
Pages in category "2big Network 2"
The following 3 pages are in this category, out of 3 total.