Welcome! Log In Create A New Profile

Advanced

goflexnet w/ 6.2.7 envs?

Posted by flash 
goflexnet w/ 6.2.7 envs?
April 02, 2023 11:37AM
Hi im new here, managed to get 6.2.7 to boot from usb (1tb wd black nvme m.2) w/ ext4 filesystem however i havent had any luck with booting from either sata port with a 16gb sata drive (small sata chip that was in a mini pc)
But when I try same 16gb sata with a usb adapter and it boots!

i believe i may have borked my env's can someone with same device share please? thanks in advance!
Re: goflexnet w/ 6.2.7 envs?
April 02, 2023 02:08PM
flash,

> Hi im new here, managed to get 6.2.7 to boot from
> usb (1tb wd black nvme m.2) w/ ext4 filesystem
> however i havent had any luck with booting from
> either sata port with a 16gb sata drive (small
> sata chip that was in a mini pc)
> But when I try same 16gb sata with a usb adapter
> and it boots!

1. Do you have serial console? can you post the entire serial console boot log?

2. If you don't have serial console, what u-boot are you running?

Also, post dmesg output here
dmesg

3. If you are running my released u-boot 2017.07-tld-1, then while in Debian
cat /proc/mtd
cat /etc/fw_env.config
fw_printenv
And please post the output of the commands above.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: goflexnet w/ 6.2.7 envs?
April 02, 2023 05:09PM
bodhi Wrote:
-------------------------------------------------------
> flash,
>
> > Hi im new here, managed to get 6.2.7 to boot
> from
> > usb (1tb wd black nvme m.2) w/ ext4 filesystem
> > however i havent had any luck with booting from
> > either sata port with a 16gb sata drive (small
> > sata chip that was in a mini pc)
> > But when I try same 16gb sata with a usb
> adapter
> > and it boots!
>
> 1. Do you have serial console? can you post the
> entire serial console boot log?
>
> 2. If you don't have serial console, what u-boot
> are you running?
>
> Also, post dmesg output here
>
> dmesg
>
>
> 3. If you are running my released u-boot
> 2017.07-tld-1, then while in Debian
>
> cat /proc/mtd
> cat /etc/fw_env.config
> fw_printenv
>
> And please post the output of the commands above.

no serial only nc..

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:17:19 -0700)

Seagate GoFlex Net
Linux version 6.2.7-kirkwood-tld-1 (root@tldDebian) (gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1.0 PREEMPT Tue Mar 21 18:52:10 PDT 2023
Debian 11.6
Sun Apr 2 14:05:10 PDT 2023 up 4 hours, 21 minutes

root@netflex:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 02000000 00020000 "rootfs"
mtd3: 0db00000 00020000 "data"

root@netflex:~# cat /etc/fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000

root@netflex:~# fw_printenv
arcNumber=3089
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run rescue_bootcmd
bootcmd_exec=run load_uimage; 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
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3
bootdelay=10
bootdev=usb
device=0:1
devices=ide usb
disks=0 1 2 3 4
dtb_file=/boot/dts/kirkwood-goflexnet.dtb
ethact=egiga0
ethaddr=00:10:75:26:8E:FE
if_netconsole=ping $serverip
ipaddr=192.168.0.27
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
nc_ready=1
ncip=192.168.0.26
partition=nand0,2
preboot=run preboot_nc
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
rescue-usb_bootcmd=usb reset; run scan_disk; setenv bootargs "console=ttyS0,115200 root=PARTLABEL=rescue-usb rootdelay=10 rw rootfstype=ext3 $mtdparts" ; mw 0x800000 0 1; ext2load usb 0:1 0x800000 /boot/uImage; bootm 0x800000; bootdelay=15
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
rescue_installed=1
rescue_set_bootargs=setenv bootargs console=ttyS0,115200 ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.26
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=nc
stdin=nc
stdout=nc
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15
usb_root=LABEL=rootfs

=================
bodhi's edit: please use code tags (formatted code button) to post log.



Edited 1 time(s). Last edit at 04/02/2023 05:24PM by bodhi.
Re: goflexnet w/ 6.2.7 envs?
April 02, 2023 05:40PM
flash,

> usb_root=LABEL=rootfs

You don't need to use this env to boot with USB rootfs.

As long as the USB partition is labeled rootfs, u-boot will boot and then kernel will find the USB partition that has rootfs on it. Use the e2label command to label a partition. Such as

e2label /dev/sda1 rootfs

=====

So now when you want to boot from SATA, all you need to do is to label the HDD partition rootfs.

Note that to boot successfully, only one partition can use the label rootfs. So if you boot SATA, then remove the USB drive.

=====

After you booted with SATA, you can plug the USB drive in and relabel it to something else, i.e usb_rootfs. Or if you don't intend to have the USB rootfs attached, then don't need to relabel it (save it to use as "rescue" USB) if and when the HDD rootfs is bad).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: