Lacie NAS rooting
Jump to navigation
Jump to search
Log
Content of file lacie-nas-rooting.txt:
ROOTING LACIE-CLOUDBOX
Following instructions from http://lacie.nas-central.org/wiki/Category:CloudBox
(Using clunc)
Another relevant thread: http://forum.nas-central.org/viewtopic.php?f=277&t=7215&start=15
Another wiki page, very long: http://lacie.nas-central.org/wiki/Category:2big_Network_2#Debian_.22Squeeze.22_.28stable.29_Chroot_Environment
- Get CLUNC
# CLUNC Home: http://lacie-nas.org/doku.php?id=clunc
git clone 'http://git.lacie-nas.org/clunc.git'
- Build CLUNC
cd clunc
make
- Create file telnetd.sh
#!/bin/sh
/usr/sbin/telnetd -l /bin/sh
##################################################################################
beq06659@nxl67170ux ~/work/_git/clunc (master)
$ ./clunc -i 172.19.100.98
Marvell>> setenv console "ttyS0,115200 a=a;/*/*/telnetd.sh"
setenv console "ttyS0,115200 a=a;/*/*/telnetd.sh"
Marvell>> ide reset
ide reset
Reset IDE:
Marvell Serial ATA Adapter
Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode (5)
Device 0 @ 0 0:
Model: ST3000DM001-1CH166 Firm: CC47 Ser#: Z1F4SDRK
Type: Hard Disk
Supports 48-bit addressing
Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
PCIe SATA:ffffffff
Marvell>> run nexus_boot
run nexus_boot
Booting Nexus layout from disk 0...
boot_count=0
saved_entry=1
Loading file "/boot/uImage" from ide device 0:5 (gpt5
)
7182500 bytes read
## Checking Image at 00800000 ...
Image Name: Linux-2.6.31.14-svn7493
Created: 2014-10-17 14:00:55 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 7182436 Bytes = 6.8 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Error: "rescue" not defined
## Booting image at 00800000 ...
Image Name: Linux-2.6.31.14-svn7493
Created: 2014-10-17 14:00:55 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 7182436 Bytes = 6.8 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK
bootargs from environment variables : ttyS0,115200 a=a;/*/*/telnetd.sh boot=UUID=cd7a1c60-168d-4679-9217-bb43aeacecf8 root=UUID=998d1e20-6baf-4595-a736-8f5ce2b993b7 cap=gpt,lba64
Starting kernel ...
##################################################################################
- After 2min, telnet to cloudbox:
telnet lacie-cloudbox
/etc/unicorn/unicorn_conf # uname -a
Linux LaCie-CloudBox 2.6.31.14-svn7493 #1 Fri Oct 17 14:00:51 UTC 2014 armv5tel GNU/Linux
cd /etc/initng/runlevel
cp default.runlevel default.runlevel.bak
sed -i '/^#sshd$/s/^#//' default.runlevel
1. Remove comment from sshd in the default.runlevel file, so initng will start it at boot time:
cd /etc/initng/runlevel
cp default.runlevel default.runlevel.bak
sed -i '/^#sshd$/s/^#//' default.runlevel
2. Enable sshd in Unicorn
cd /etc/unicorn/unicorn_conf
cp unicorn.sharing.ssh.conf unicorn.sharing.ssh.conf.bak
sed -i '/enabled:.*false/s/:.*/: true/' unicorn.sharing.ssh.conf
2. Enable root login for sshd (necessary on first manual start apparently)
cd /etc/ssh
cp sshd_config sshd_config.bak
sed -i '/PermitRootLogin.*no/s/no/yes/; /AllowUsers/s/$/ root/' sshd_config
3. Start sshd
ngc --start sshd
You should now be able to connect on port 2222.
4. On client. Setup .ssh/config:
Host lacie
User root
HostName lacie-cloudbox.local
ProxyCommand none
ForwardX11 no
ForwardX11Trusted no
Port 2222
5. Connect
ssh lacie
[root@LaCie-CloudBox ssh]#
Voilà!
#################################
TODO:
- Exclude .gvfs from backup
- Backup must include truecrypt volume. Check if we need --checksum option
- Backup vbox on c partition on nxl67170ux
#################################
$ wakeonlan 00:d0:4b:96:34:32
Sending magic packet to 255.255.255.255:9 with 00:d0:4b:96:34:32
#################################
Basic performance tests:
(on griffin)
$ dd if=/dev/zero of=/data/tmp/ddfile bs=1024k count=20000
20971520000 bytes (21 GB) copied, 270,671 s, 77,5 MB/s
(from nxl67170ux to lacie under desk)
$ dd if=/dev/zero of=/smb/lacie-cloudbox/family/ddfile bs=1024k count=20000
858783744 bytes (859 MB) copied, 19,2096 s, 44,7 MB/s
...
4579131392 bytes (4,6 GB) copied, 123,565 s, 37,1 MB/s
(from nxl67170ux to mnemosyne under desk)
$ dd if=/dev/zero of=/smb/lacie-cloudbox/family/ddfile bs=1024k count=20000
246415360 bytes (246 MB) copied, 3,13408 s, 78,6 MB/s
...
5197791232 bytes (5,2 GB) copied, 143,574 s, 36,2 MB/s
#################################
Q: HOW COME I CAN NAME RESOLV ON LACIE-CLOUDBOX WITHOUT HOSTS FILE?
--> uses nmblookup. But it gives bad address if remote pc has both eth0 + wlan0
#################################
CGI on Mnemosyne
cfr http://synology.asfi-fr.com/tutos_phi/%5Btuto%5D%20syno%20CGI.pdf
######################################################################################
######################################################################################
######################################################################################
######################################################################################
######################################################################################
######################################################################################
######################################################################################
TODO:
- Force lacie-cloudbox to use wired ip address when available (not the wlan)
- Don't exclude completely /var/log, but only some of them (eg. rsync.log)
- Disable rsyncd transfer logging on client
- Configure email notification
NTP CONFIGURATION:
Frequent time desync.
Change server to 0.ubuntu.pool.ntp.org