Questions from newbie - Debian on GoFlex Home February 06, 2022 12:43PM |
Registered: 2 years ago Posts: 15 |
https://cyanlabs.net/tutorials/recovering-a-seagate-goflex-via-serial/
Re: Questions from newbie - Debian on GoFlex Home February 06, 2022 05:00PM |
Admin Registered: 13 years ago Posts: 18,975 |
Quote
Rescue Systems
Rescue System V2 (Original)
MacPlug & SMBPLug
Rescue System Pogo V3
Rescue System V4, using a custom LEDE firmware (BETA)
Rescue System for Pogo E02 using LEDE/OpenWrt (Install with Serial Console)
Rescue System for Pogo V4/Mobile using OpenWrt (Install with NetConsole)
Re: Questions from newbie - Debian on GoFlex Home February 07, 2022 07:59AM |
Registered: 2 years ago Posts: 15 |
https://downloads.openwrt.org/releases/21.02.1/targets/kirkwood/generic/openwrt-21.02.1-kirkwood-seagate_goflexhome-squashfs-factory.bin
iptables -A udp_inbound -p UDP --dport 6666 -j ACCEPT iptables -A tcp_inbound -p TCP --dport 6666 -j ACCEPT
Re: Questions from newbie - Debian on GoFlex Home February 07, 2022 04:30PM |
Admin Registered: 13 years ago Posts: 18,975 |
Quote
Rescue Systems
Rescue System V2 (Original)
MacPlug & SMBPLug
Rescue System Pogo V3
Rescue System V4, using a custom LEDE firmware (BETA)
Rescue System for Pogo E02 using LEDE/OpenWrt (Install with Serial Console)
Rescue System for Pogo V4/Mobile using OpenWrt (Install with NetConsole)
Quote
Booting Debian on Pogoplug
How to set up U-Boot for booting in multiple drives configuration
Backup and Restore NAND mtds
UART Booting HowTo for Selected Kirkwood Devices
Migrating from Arch to Debian?
How to boot new Debian rootfs using stock u-boot tftp - Pogo E02
How to boot new Debian rootfs on USB using stock u-boot - NSA325
How to boot Debian rootfs on a GPT HDD with stock u-boot (kernel files stored in HDD raw sector), 2nd HowTo post
How to boot Pogo V3 from SATA (to unbrick), 2nd How to Post
How to install U-Boot for Pogoplug V3 (OXNAS OX820) from OpenWRT
Boot Kirkwood rootfs with stock u-boot
Booting with U-Boot multi-image (with all kernel files embedded).
Booting with uEnv.txt (to fix messed up U-Boot envs or corrupted NAND envs area)
Quote
C. Add uEnv.txt to /boot directory (Optional)
To adjust the default envs to your specific configuration, and not having to permanently alter u-boot envs NAND. Create a text file in /boot directory with the content in the format that u-boot envs are listed.
Examples:
The example below only to demonstrate the syntax in uEnv.txt (they might or might not apply to your current settings):
- Load appropriate DTB file for the kernel to run GoFlex Net box.
- Use SD card, USB and SATA for booting. The kernel and rootfs search order is as they are appeared on the list: mmc, usb, ide.
- Define that there are 8 storage devices (i.e. disk partitions).
- Load the DTB at address 0x2c00000 (u-boot default is 0x1c00000) to allow larger uInitrd.
cat /boot/uEnv.txt
dtb_file=/boot/dts/kirkwood-goflexnet.dtb
devices=mmc usb ide
disks=0 1 2 3 4 5 6 7
load_dtb_addr=0x2c00000
Re: Questions from newbie - Debian on GoFlex Home February 07, 2022 05:36PM |
Registered: 2 years ago Posts: 15 |
18:57:44.357479 IP 192.168.3.62 > 192.168.3.14: ICMP echo request, id 0, seq 0, length 8
iptables -A icmp_packets -p icmp -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT
chmod 600 /swapfile mkswap /swapfile swapon /swapfile cp /etc/fstab /etc/fstab.bak echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab apt remove locales apt install -y locales export LANGUAGE="en_US.UTF-8" && dpkg-reconfigure locales
Re: Questions from newbie - Debian on GoFlex Home February 09, 2022 02:58AM |
Registered: 2 years ago Posts: 15 |
# date --set="20220208 22:48" # hwclock --systohc
# find /usr/share/zoneinfo | grep -i -e 'Puerto' # rm /etc/localtime # ln -s /usr/share/zoneinfo/America/Puerto_Rico /etc/localtime
# apt install ntpdate cron # ntpdate pool.ntp.org # hwclock --systohc
# echo '@reboot /usr/sbin/ntpdate pool.ntp.org' | tee -a /var/spool/cron/crontabs/root
# cp /etc/network/interfaces /etc/network/interfaces.bck # echo 'allow-hotplug eth0' | tee -a /etc/network/interfaces
Re: Questions from newbie - Debian on GoFlex Home February 09, 2022 03:13AM |
Registered: 2 years ago Posts: 15 |
# cd /boot # ls initrd.img-* uInitrd # update-initramfs -u # mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-`uname -r` -d /boot/initrd.img-`uname -r` /boot/uInitrd
root@debian:/# cd /boot root@debian:/boot# ls initrd.img-* uInitrd initrd.img-5.13.6-kirkwood-tld-1 uInitrd root@debian:/boot# cat /etc/initramfs-tools/modules # List of modules that you want to include in your initramfs. # They will be loaded at boot time in the order below. # # Syntax: module_name [args ...] # # You must run update-initramfs(8) to effect this change. # # Examples: # # raid1 # sd_mod # # load netconsole to log kernel messages on this machine 192.168.0.220 to the server 192.168.0.223 # #netconsole netconsole=6666@192.168.3.62/eth0,6666@192.168.3.14/ netconsole netconsole=6666@192.168.3.14/eth0,6666@192.168.3.62/ root@debian:/boot# update-initramfs -u update-initramfs: Generating /boot/initrd.img-5.13.6-kirkwood-tld-1 root@debian:/boot# mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-`uname -r` -d /boot/uImage /boot/uInitrd Image Name: initramfs-5.13.6-kirkwood-tld-1 Created: Wed Feb 9 03:58:27 2022 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 9670985 Bytes = 9444.32 KiB = 9.22 MiB Load Address: 00000000 Entry Point: 00000000 root@debian:/boot# ls -la /boot total 47016 drwxr-xr-x 5 root root 4096 Feb 9 03:57 . drwxr-xr-x 21 root root 4096 Feb 9 03:47 .. drwxr-xr-x 2 root root 4096 Feb 9 03:24 b2 drwxr-xr-x 2 root root 4096 Feb 7 10:55 backup -rw-r--r-- 1 root root 183927 Feb 9 03:26 config-5.13.6-kirkwood-tld-1 drwxr-xr-x 2 root root 4096 Aug 1 2021 dts -rw-r--r-- 1 root root 9670985 Feb 9 03:57 initrd.img-5.13.6-kirkwood-tld-1 <======= changed time -rw-r--r-- 1 root root 7762080 Feb 9 03:26 linux-headers-5.13.6-kirkwood-tld-1_1.0_armel.deb -rw-r--r-- 1 root root 4403336 Feb 9 03:26 System.map-5.13.6-kirkwood-tld-1 -rw-r--r-- 1 root root 5435888 Feb 9 03:26 uImage -rw-r--r-- 1 root root 9671049 Feb 9 03:58 uInitrd <======= changed time -rwxr-xr-x 1 root root 5435824 Feb 9 03:26 vmlinuz-5.13.6-kirkwood-tld-1 -rwxr-xr-x 1 root root 5435824 Feb 9 03:26 zImage-5.13.6-kirkwood-tld-1
# netconsole 192.168.3.62 MYPID=20829 U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:21:31 -0700) Seagate GoFlex Home gcc (Debian 6.3.0-18) 6.3.0 20170516 GNU ld (GNU Binutils for Debian) 2.28 Hit any key to stop autoboot: 0 Initializing devices... starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 2 USB Device(s) found scanning usb for storage devices... Use USB retry period from the environment: 15 second(s) 1 Storage Device(s) found Reset IDE: ide_preinit failed Unknown command 'mmc' - try 'help' Loading envs from usb 0... ** File not found /boot/uEnv.txt ** Loading envs from usb 1... ** Bad device usb 1 ** Loading envs from usb 2... ** Bad device usb 2 ** Loading envs from usb 3... ** Bad device usb 3 ** Loading envs from ide 0... ** Bad device ide 0 ** Loading envs from ide 1... ** Bad device ide 1 ** Loading envs from ide 2... ** Bad device ide 2 ** Loading envs from ide 3... ** Bad device ide 3 ** Loading envs from mmc 0... ** Bad device mmc 0 ** Loading envs from mmc 1... ** Bad device mmc 1 ** Loading envs from mmc 2... ** Bad device mmc 2 ** Loading envs from mmc 3... ** Bad device mmc 3 ** running scan_disk ... Scan device usb device usb 0:1 1 bytes read in 415 ms (0 Bytes/s) Found bootable drive on usb 0 loading uImage ... <=============== 5435888 bytes read in 826 ms (6.3 MiB/s) loading uInitrd ... <=============== 9671049 bytes read in 1310 ms (7 MiB/s) loading DTB /boot/dts/kirkwood-goflexhome.dtb ... 10257 bytes read in 1230 ms (7.8 KiB/s) ## Booting kernel from Legacy Image at 00800000 ... Image Name: Linux-5.13.6-kirkwood-tld-1 <=============== Created: 2021-09-24 0:22:58 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 5435824 Bytes = 5.2 MiB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK ## Loading init Ramdisk from Legacy Image at 01100000 ... Image Name: initramfs-5.13.6-kirkwood-tld-1 Created: 2022-02-09 7:58:27 UTC Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 9670985 Bytes = 9.2 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 01c00000 Booting using the fdt blob at 0x1c00000 Starting kernel ...
# cd /boot # apt-get remove flash-kernel # dpkg -i linux-image-5.16.5-kirkwood-tld-1_1.0_armel.deb # mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.16.5-kirkwood-tld-1 -d vmlinuz-5.16.5-kirkwood-tld-1 uImage # mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.16.5-kirkwood-tld-1 -d initrd.img-5.16.5-kirkwood-tld-1 uInitrd
Re: Questions from newbie - Debian on GoFlex Home February 09, 2022 04:09AM |
Admin Registered: 13 years ago Posts: 18,975 |
auto lo eth0 iface lo inet loopback iface eth0 inet dhcp
netconsole netconsole=6666@192.168.3.14/eth0,6666@ 192.168.3.62/
Re: Questions from newbie - Debian on GoFlex Home February 09, 2022 01:28PM |
Registered: 2 years ago Posts: 15 |
Re: Questions from newbie - Debian on GoFlex Home February 10, 2022 05:02AM |
Registered: 2 years ago Posts: 15 |
#!/bin/bash # Please adjust as needed IPTABLERESTORE=0 # if NOT = 0, will restore Firewall after running NETCAT="netcat" # your netcat binary name. nc, netcat, netcat-tradicional LANRANGE="192.168.3.1-192.168.3.200" # your lan range # function called by trap function clean_up { # Perform program exit housekeeping echo -e "\n\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" echo -e "[CTRL-C] detected" echo -e "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" trap "" SIGINT if [ $IPTABLERESTORE -ne 0 ]; then echo "Restoring Original firewall" iptables-restore < /tmp/IPtablesbackup.txt fi killall $NETCAT exit -1 } trap clean_up SIGINT if [ $IPTABLERESTORE -ne 0 ]; then echo "Saving Original firewall" iptables-save > /tmp/IPtablesbackup.txt fi iptables-save | grep $LANRANGE > /dev/null if [ "$?" -ne 0 ]; then echo "Allowing ports in local lan, range $LANRANGE" iptables -I INPUT -m iprange --src-range $LANRANGE -j ACCEPT sleep 2 else echo "Range $LANRANGE is free from firewall" fi if [ -z "$1" ]; then echo Missing destination host exit 1 else $NETCAT -l -u -p 6666 & ncpid=$! $NETCAT -u "$1" 6666 fi if [ $IPTABLERESTORE -ne 0 ]; then echo "Restoring Original firewall" iptables-restore < /tmp/IPtablesbackup.txt fi killall $NETCAT 2> /dev/null
auto lo eth0 iface lo inet loopback #iface eth0 inet dhcp #allow-hotplug eth0 iface eth0 inet static address 192.168.3.62 mask 255.255.254.0 gateway 192.168.3.1
fw_printenv > /boot/uEnv.txt
Re: Questions from newbie - Debian on GoFlex Home February 10, 2022 04:43PM |
Admin Registered: 13 years ago Posts: 18,975 |
fw_printenv > /boot/uEnv.txt
Re: Questions from newbie - Debian on GoFlex Home February 10, 2022 11:08PM |
Registered: 2 years ago Posts: 15 |
# cat /proc/mtd dev: size erasesize name mtd0: 00100000 00020000 "u-boot" mtd1: 00400000 00020000 "uImage" mtd2: 02000000 00020000 "rootfs" mtd3: 0db00000 00020000 "data"
cat /proc/mtd dev: size erasesize name mtd0: 00100000 00020000 "u-boot" mtd1: 00600000 00020000 "uImage" mtd2: 0f900000 00020000 "root"
Wrong Image Format for bootm command ERROR: can't get kernel image! GoFlexHome>
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
Re: Questions from newbie - Debian on GoFlex Home February 11, 2022 03:50AM |
Admin Registered: 13 years ago Posts: 18,975 |
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
Re: Questions from newbie - Debian on GoFlex Home February 11, 2022 04:13PM |
Registered: 2 years ago Posts: 15 |
> >>come from. It is added by the system. Normally we see
[ qoute ] .... [ / qoute ]
root@LEDE:/# cat /proc/mtd dev: size erasesize name mtd0: 00100000 00020000 "u-boot" mtd1: 0ff00000 00020000 "ubi"
fw_setenv mtdparts 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)'And what it seem to me like a magic trick is in fact uBoot just reporting what we put in fw_setenv mtdparts ...
Re: Questions from newbie - Debian on GoFlex Home February 11, 2022 04:25PM |
Admin Registered: 13 years ago Posts: 18,975 |
fw_setenv mtdparts > 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)'> And what it seem to me like a magic trick is in
Re: Questions from newbie - Debian on GoFlex Home February 11, 2022 04:35PM |
Admin Registered: 13 years ago Posts: 18,975 |
How to install LEDE/openwrt on a Pogo E02: You can do this similar with all the kirkwoodplugs using the matching files... Note: If you dont have serial console (USB/serial adapter), NC (NetCat) should be configured properly! 1. Upgrade the Uboot + uboot-envs to most recent bodhi version (atm = uboot.2017.07-tld-1.pogo_e02.bodhi + uboot.2016.05-tld-1.environment) download, (rename) and place the lede-kirkwood-pogo_e02-initramfs-uImage on the root of a USB flash drive formatted with FAT32 and insert it in the device https://downloads.lede-project.org/releases/17.01.4/targets/kirkwood/generic/lede-17.01.4-kirkwood-pogo_e02-initramfs-uImage That file is a LEDE system image that runs from RAM, and you will only use that to do a sysupgrade as normal with lede-kirkwood-pogo_e02-squashfs-sysupgrade.tar. It will reformat flash if needed, deal with any bad blocks and so on. Put this stick into Pogo then from uboot write set the new parameters 2. Set additional parameters for dualboot LEDE/nand and debian/stick (based on bodhis uboot.2016.05-tld-1 envs) with this envs extensions you can upgrade nand only with WIF, but soft reboot works (didnt work with old one) and you have to change the envs only once with the following: # bootenvs for Pogo E02 based on uboot.2016.05-tld-1.environment: setenv mtdparts 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)' setenv partition 'nand0,0' setenv set_bootargs_lede 'setenv bootargs console=ttyS0,115200 $mtdparts' setenv bootcmd_lede 'run set_bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000' setenv bootcmd 'run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_lede' setenv bootcmd_exec 'if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi' saveenv
Quote
mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)
nand erase.part ubi # when you change/add a new partition layout you always need to erase the ubi nand first before new install: nand erase.part ubi
3. Run the following code for starting the process: # @bootloader run LEDE from usb pendrive usb reset; fatload usb 0 0x800000 lede-kirkwood-pogo_e02-initramfs-uImage; bootm 0x800000
Here you have the choice how to upgrade: 4a CLI or 4b over LEDE/openwrt-WIF - use this!! 4a. CLI upgrade: (wont work anymore, you will run out of space with newer Lede or openwrt - use 4b) opkg update opkg install libustream-openssl ubi-utils cd /tmp wget https://downloads.lede-project.org/releases/17.01.4/targets/kirkwood/generic/lede-17.01.4-kirkwood-pogo_e02-squashfs-sysupgrade.tar sysupgrade lede*kirkwood-pogo_e02-squashfs-sysupgrade.tar or: 4b. LEDE/openwrt-WIF upgrade: log in a Webbrowser session @pogos ipadress download the upgrade-File on your PC. Link: lede-17.01.04-kirkwood-pogo_e02-squashfs-sysupgrade.tar in the LEDE menue search for Upgrade device/router and select your downloaded file press upgrade and wait Pogo will reboot and start from nand with LEDE/openwrt
5. change/create the /etc/fw_env.config in LEDE/openwrt to: /dev/mtd0 0xc0000 0x20000 0x20000
Re: Questions from newbie - Debian on GoFlex Home February 11, 2022 10:15PM |
Registered: 2 years ago Posts: 15 |
https://openwrt.org/toh/seagate/goflexhome#installationIn particular
Download from tftp-server file openwrt-18.06.2-kirkwood-seagate_goflexhome-squashfs-factory.bin to RAM start default offset 0x800000 # tftpboot openwrt-18.06.2-kirkwood-seagate_goflexhome-squashfs-factory.bin Erase nand UBI partition # nand erase.part ubi Write nand from RAM start offset 0x800000 to nand UBI partition size 0x3e0000 # nand write 0x800000 ubi 0x600000 Reboot device # reset After Openwrt boot I did # echo '/dev/mtd0 0xc0000 0x20000 0x20000' > /etc/fw_env.config
https://forum.archive.openwrt.org/viewtopic.php?id=63714 https://github.com/dasty/kernel-openwrt-tmp/blob/master/Documentation/filesystems/ubifs.txt https://openwrt.org/docs/techref/flash.layout https://forum.openwrt.org/t/ubifs-rootfs-data-with-ramboot-rootfs/115945/5
Go to the top System tab, then the lower tab should be selected as Backup / Flash Firmware. Under 'Flash new firmware image' please select the ubi from the location on the desktop PC.
Re: Questions from newbie - Debian on GoFlex Home February 12, 2022 01:09PM |
Registered: 7 years ago Posts: 373 |
Re: Questions from newbie - Debian on GoFlex Home February 13, 2022 04:12PM |
Registered: 2 years ago Posts: 15 |
fw_setenv mtdparts 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)'Thats it? or I am wrong?
Re: Questions from newbie - Debian on GoFlex Home February 13, 2022 05:50PM |
Registered: 7 years ago Posts: 373 |
Re: Questions from newbie - Debian on GoFlex Home February 13, 2022 07:28PM |
Admin Registered: 13 years ago Posts: 18,975 |
Quote
For new openwrt, Use this file, openwrt-21.02.1-oxnas-ox820-cloudengines_pogoplugpro-ubifs-ubinized.bin, because it is a standard ubi image file.
fw_setenv mtdparts 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)'
ubiformat /dev/mtd1 -f openwrt-xxxxx-ubifs-ubinized.bin
Re: Questions from newbie - Debian on GoFlex Home February 14, 2022 12:19PM |
Registered: 2 years ago Posts: 15 |