devices:network:seagate_personal_cloud_srn21c
Table of Contents
TODO: https://plugout.net/viewtopic.php?f=38&t=3274
Information
TFTP Server
- A TFTP server is needed to serve files to uBoot
sudo dnf install 'tftp-server'
sudo firewall-cmd --add-service='tftp'
Debian Installer Files
uImage
sudo wget -O '/var/lib/tftpboot/uImage' 'http://ftp.debian.org/debian/dists/stretch/main/installer-armhf/current/images/network-console/seagate/personal-cloud/uImage'
uInitrd
sudo wget -O '/var/lib/tftpboot/uInitrd' 'http://ftp.debian.org/debian/dists/stretch/main/installer-armhf/current/images/network-console/seagate/personal-cloud/uInitrd'
Device Tree Blob
sudo wget -O '/var/lib/tftpboot/armada-370-seagate-personal-cloud.dtb' 'http://ftp.debian.org/debian/dists/stretch/main/installer-armhf/current/images/device-tree/armada-370-seagate-personal-cloud.dtb'
clunc
Information
- Needed to communicate with uBoot shell over network
Acquire and Compile
git clone -b 'master' 'http://git.lacie-nas.org/clunc.git' ~/'clunc' && cd ~/'clunc' && make && sync
Execute
- This needs to be running before the NAS is given power
- Getting the IP for the NAS in this state is tricky; had to set a static ARP from AdvancedTomato GUI
cd ~/'clunc' && ~/'clunc' -vi '192.168.1.129'
Debian Installer Initialize
- Following commands pulls the Debian installer files from the TFTP server and executes them to initiate the installer
setenv serverip 192.168.1.151
setenv ipaddr 192.168.1.129
tftpboot 0x2000000 uImage
tftpboot 0x5100000 uInitrd
tftpboot 0x5000000 armada-370-seagate-personal-cloud.dtb
setenv fdt_high 0xffffffff
setenv initrd_high 0xffffffff
bootm 0x2000000 0x5100000 0x5000000
Debian Installer
- No real tricks to install; just follow on-screen instructions
Debian Installer Finalize
clunc Execute
- This needs to be running before the Debian installer reboots at the last step
- IP should theoretically be the same as before
cd ~/'clunc' && ~/'clunc' -vi '192.168.1.129'
uBoot
- Following commands tell uBoot how to boot Debian on its own
setenv debian_kernel_addr 0x2000000
setenv debian_initrd_addr 0x5100000
setenv debian_dtb_addr 0x5000000
setenv initrd_high 0xffffffff
setenv fdt_high 0xffffffff
setenv debian_boot_part 1
setenv debian_kernel_img /uImage
setenv debian_initrd_img /uInitrd
setenv debian_dtb_img /dtb
setenv debian_bootargs setenv bootargs ${console}
setenv debian_load_image 'ext2load ${disk_iface} ${disk_num}:${boot_part} ${kern_addr} ${debian_kernel_img} && iminfo ${debian_kernel_addr}; ext2load ${disk_iface} ${disk_num}:${boot_part} ${debian_initrd_addr} ${debian_initrd_img}; ext2load ${disk_iface} ${disk_num}:${boot_part} ${debian_dtb_addr} ${debian_dtb_img}'
setenv debian_boot 'hdd start; ide reset; setenv boot_part ${debian_boot_part}; for disk in ${disk_list}; do run disk_expand; echo Booting Debian from disk ${disk}...; run debian_load_image; run debian_bootargs; bootm ${debian_kernel_addr} ${debian_initrd_addr} ${debian_dtb_addr}; done'
setenv bootcmd run debian_boot
saveenv
run bootcmd
Settings
- All interactions with Debian need to be done through SSH obviously and with
su
Root
su
Update Packages
apt update && apt full-upgrade -y && apt autoremove -y && apt clean && sync
Change hostname
hostnamectl set-hostname 'x'
Static IP
nano '/etc/network/interfaces'
#iface eth0 inet dhcp iface eth0 inet static address 192.168.1.154 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 84.200.69.80 84.200.70.40
vsftpd
Install
apt install 'vsftpd'
Directory
mkdir -p '/srv/ftp/NAS' && chgrp -R 'ftp' '/srv/ftp/NAS'
Configure
nano '/etc/vsftpd.conf' && systemctl restart 'vsftpd'
write_enable=YES
utf8_filesystem=YES
Create Users
adduser 'voidscream'
Automatic Updates
Service
nano '/etc/systemd/system/debian-up.service'
[Service] Type=oneshot ExecStartPre='/usr/bin/apt' clean ExecStart='/usr/bin/apt' update ExecStart='/usr/bin/apt' full-upgrade -y ExecStart='/usr/bin/apt' autoremove -y ExecStartPost='/bin/sync' ExecStartPost='/bin/systemctl' reboot
Timer
nano '/etc/systemd/system/debian-up.timer' && systemctl daemon-reload && systemctl enable 'debian-up.timer' --now
[Unit] Description=Software Package Maintenance and Updater After=network-online.target Wants=network-online.target [Timer] OnCalendar=weekly Persistent=true [Install] WantedBy=timers.target
/usr/local/www/wiki/data/pages/devices/network/seagate_personal_cloud_srn21c.txt · Last modified: by 127.0.0.1