Welcome! Log In Create A New Profile

Advanced

Boot your Dockstar by TFTP/NFS

Posted by tsunulukai 
Boot your Dockstar by TFTP/NFS
April 17, 2013 04:45AM
Hi there!

A few month ago, I was trying to boot my dockstar by TFTP & NFS... but did not succeed.
I've left my dockstar on the side for a time, and I recently tried again successfully !

My deep gratitude to this fellow community who made it all possible by their numerous contributions !

Here's my modest contribution...

I tried this with a newly-installed debian wheezy distribution on my dockstar, the latest uboot, and a unmodified debian kernel.

This guide assumes that you already have a functionnal NFS, TFTP and DHCP server on your network.
In my example, I'm running the TFTP and NFS server on a NAS running Debian, and the DHCP server on a router running OpenWRT.

Here's how I proceeded

1. Install latest uboot on the Dockstar:
cd /tmp
wget http://projects.doozan.com/uboot/install_uboot_mtd0.sh
chmod +x install_uboot_mtd0.sh
./install_uboot_mtd0.sh

2. Install a fresh debian on the Dockstar using the well known Jeff's script, or try to use your existing dockstar installation.

3. Copy the dockstar rootfs on the NFS Server:
mkdir -p /mnt/usbdockstar
mkdir -p /srv/nfs/hosts/dockstar
mount /dev/<whatever-device-your-dockstar-rootfs-is-on> /mnt/usbdockstar
cp -av /mnt/usbdockstar/* /srv/nfs/hosts/dockstar/
umount /mnt/usbdockstar

4. Copy the dockstar boot files on the TFTP Server:
mkdir -p /mnt/usbdockstar
mkdir -p /srv/nfs/hosts/dockstar
mount /dev/<whatever-device-your-dockstar-rootfs-is-on> /mnt/usbdockstar
cp -av /mnt/usbdockstar/boot/u* /srv/tftp/nfs/dockstar/
umount /mnt/usbdockstar

5. Add the dockstar folder as shared folder on the NFS server:
if ! cat /etc/exports | grep /srv/nfs/hosts/dockstar >/dev/null; then
cat <<EOF >>/etc/exports
/srv/nfs/hosts/dockstar                 192.168.0.0/255.255.0.0(rw,sync,no_root_squash,no_subtree_check)
EOF
fi
exportfs -av

6. Make changes onto the dockstar rootfs hosted on the NFS server to allow it to properly boot by NFS:
# Define Dockstar RootFS location on NFS Server
ROOTFS=/srv/nfs/hosts/dockstar

#Change Root entry in /etc/fstab
sed -i 's;^/dev/root.*;/dev/root       /               nfs    noatime,errors=remount-ro 0 1;' $ROOTFS/etc/fstab

#Disable eth0 auto-configuration
sed -i 's;auto eth0;#auto eth0;' $ROOTFS/etc/network/interfaces

#Disable eth0 auto-configuration (ifplugd)
sed -i 's;eth0;;' $ROOTFS/etc/default/ifplugd;
sed -i 's;^\(INTERFACES\)="auto";\1="";' $ROOTFS/etc/default/ifplugd
sed -i 's;^\(HOTPLUG_INTERFACES\)="all";\1="";' $ROOTFS/etc/default/ifplugd

7. Create NetBoot variables in uboot on the Dockstar from the running Linux:
This will not yet alter the Dockstar startup configuration. All the following commands create non-existing variables into uBoot.
#NetBoot variables
# -User-Serviceable
fw_setenv net_dhcp_c '1'
fw_setenv net_dhcp_s '0'
fw_setenv net_c_ipaddr ''
fw_setenv net_c_netmask ''
fw_setenv net_c_gatewayip ''
fw_setenv net_tftp_server '192.168.1.1'
fw_setenv net_tftp_kernel 'nfs/dockstar/uImage'
fw_setenv net_tftp_initrd 'nfs/dockstar/uInitrd'
fw_setenv net_nfs_server '192.168.1.1'
fw_setenv net_nfs_path '/srv/nfs/hosts/dockstar'

# -Fixed
fw_setenv autoload 'no'
fw_setenv net_bootcmd 'run net_check_dhcp_c; run net_check_dhcp_s; run net_set_bootargs; run net_boot'
fw_setenv net_boot 'tftp 0x800000 $net_tftp_kernel; echo; echo ** Kernel Boot Arguments: $bootargs; echo;if tftp 0xe00000 $net_tftp_initrd; then bootm 0x800000 0xe00000;else bootm 0x800000;fi'
fw_setenv net_set_bootargs 'setenv serverip $net_tftp_server; setenv bootargs console=$console root=/dev/nfs rootfstype=nfs rootwait nfsroot=$net_nfs_server:$net_nfs_path ip=$ipaddr:$net_nfs_server:$gatewayip:$netmask:dockstar:eth0:off $mtdparts'
fw_setenv net_check_dhcp_c 'if test $net_dhcp_c -eq 1 ; then run net_set_c_ip_dhcp; else run net_set_c_ip_stat; fi;echo ** IP Address: $ipaddr; echo ** Subnet Mask: $netmask; echo ** Def Gateway: $gatewayip'
fw_setenv net_set_c_ip_dhcp 'dhcp; echo; echo ** net_dhcp_c = 1 --> Getting IP Settings by DHCP'
fw_setenv net_set_c_ip_stat 'setenv ipaddr $net_c_ipaddr; setenv netmask $net_c_netmask; setenv gatewayip $net_c_gatewayip; echo; echo ** net_dhcp_c = 0 --> Using static IP Settings'
fw_setenv net_check_dhcp_s 'if test $net_dhcp_s -eq 1 && test $net_dhcp_c -eq 1 ; then run net_set_s_ip_dhcp; else run net_set_s_ip_stat; fi;echo ** TFTP Boot Server: $net_tftp_server; echo ** NFS Boot Server: $net_nfs_server; echo'
fw_setenv net_set_s_ip_dhcp 'setenv net_tftp_server $serverip; setenv net_nfs_server $serverip;echo; echo ** net_dhcp_s and net_dhcp_c = 1 --> Getting TFTP and NFS Boot Server by DHCP'
fw_setenv net_set_s_ip_stat 'echo; echo ** net_dhcp_s or net_dhcp_c = 0 --> Using static TFTP and NFS Boot Server'

#NetBoot variables End

8. Now you need access to uBoot to test the TFTP/NFS boot.
You can either plug a serial adapter on your Dockstar or configure uBoot to send the information by netconsole
I used the first option, but here's the procedure for the second one, assuming your NetCat client runs on 192.168.1.250.

On the dockstar, enter:
fw_setenv netcatip 192.168.1.250
fw_setenv if_netconsole 'ping $netcatip'
fw_setenv start_netconsole 'setenv ncip $netcatip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;'
fw_setenv preboot 'dhcp; run if_netconsole start_netconsole'

To receive the console on your computer, run:
nc -l -u -p 6666

9. Reboot the dockstar, interrupt the autoboot and execute
run net_bootcmd

It should boot your dockstar by TFTP and NFS.
U-Boot 2011.12 (Feb 12 2012 - 21:33:07)
Seagate FreeAgent DockStar

SoC:   Kirkwood 88F6281_A0
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
u-boot>> run net_bootcmd
BOOTP broadcast 1
*** Unhandled DHCP Option in OFFER/ACK: 28
*** Unhandled DHCP Option in OFFER/ACK: 28
DHCP client bound to address 192.168.1.239

** net_dhcp_c = 1 --> Getting IP Settings by DHCP
** IP Address: 192.168.1.239
** Subnet Mask: 255.255.255.0
** Def Gateway: 192.168.1.254

** net_dhcp_s or net_dhcp_c = 0 --> Using static TFTP and NFS Boot Server
** TFTP Boot Server: 192.168.1.1
** NFS Boot Server: 192.168.1.1

Using egiga0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.239
Filename 'nfs/dockstar/uImage'.
Load address: 0x800000
Loading: #################################################################
         #############################################
done
Bytes transferred = 1606576 (1883b0 hex)

** Kernel Boot Arguments: console=ttyS0,115200 root=/dev/nfs rootfstype=nfs rootwait nfsroot=192.168.1.1:/srv/nfs/hosts/dockstar ip=192.168.1.239:192.168.1.1:192.168.1.254:255.255.255.0:dockstar:eth0:off mtdparts=orion_nand:1M(u)

Using egiga0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.239
Filename 'nfs/dockstar/uInitrd'.
Load address: 0xe00000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##########
done
Bytes transferred = 6817161 (680589 hex)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.2.0-4-kirkwood
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1606512 Bytes = 1.5 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 00e00000 ...
   Image Name:   initramfs-3.2.0-4-kirkwood
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6817097 Bytes = 6.5 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.2.0-4-kirkwood (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-15) ) #1 Debian 3.2.41-2

 ...

IP-Config: eth0 hardware address 00:10:75:27:3e:f3 mtu 1500
IP-Config: eth0 guessed broadcast address 192.168.1.255
IP-Config: eth0 complete:
 address: 192.168.1.239  broadcast: 192.168.1.255    netmask: 255.255.255.0
 gateway: 192.168.1.254  dns0     : 0.0.0.0          dns1   : 0.0.0.0
 host   : dockstar
 rootserver: 192.168.1.1 rootpath:
 filename  :
Begin: Running /scripts/nfs-premount ... done.

 ...

[....] Starting OpenBSD Secure Shell server: sshd. ok

Debian GNU/Linux 7.0 dockstar ttyS0

dockstar login:

10. If your boot attempt was successful, alter the dockstar boot sequence to try to boot by NFS with the following command:
fw_setenv bootcmd 'usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run net_bootcmd; run rescue_bootcmd; run pogo_bootcmd; reset'

It's a copy of the original boot command, altered to try to boot by NFS after it fails to boot by USB, but before it tries to boot the rescue_system.

Next time you reboot, your dockstar will boot by NFS if it cannot find a bootable USB storage.

EnJoY !


N.B.
In the current configuration, the dockstar will get an IP address by DHCP, but will boot from the statically defined TFTP & NFS server. If you want the dockstar to get the IP address of the TFTP & NFS server by DHCP, just change this:
fw_setenv net_dhcp_s '1'
The DHCP server should then provide the server address with the dhcp option 66
(known as 'TFTP server name' or 'next-server')

Alternatively, if there's no DHCP server on your network or the DHCP server gives faulty information (I had the case with a cable modem that returned an inexisting boot file in option 67), You can statically define your client IP settings with the following changes:
fw_setenv net_dhcp_c '0'
fw_setenv net_c_ipaddr '192.168.1.5'
fw_setenv net_c_netmask '255.255.255.0'
fw_setenv net_c_gatewayip '192.168.1.254'
In this case, you also MUST statically define the IP address for
fw_setenv net_tftp_server '192.168.1.1'
fw_setenv net_nfs_server '192.168.1.1'



Edited 6 time(s). Last edit at 06/17/2013 02:51PM by tsunulukai.
Re: Boot your Dockstar by TFTP/NFS
April 20, 2013 08:22AM
Very nice!
I don't know if I'll ever use this myself, but you did a nice job of specifying details, documenting the scripts/code. Its always nice to see (yet another!) a reminder of the cool things one can do w/ code, some experimentation and some perseverance.

=====================================================


Re: Boot your Dockstar by TFTP/NFS
June 12, 2013 02:04PM
Hey! That's exactly what i was looking for!

But where is and where can i find 'boot/gpxelinux.0' file?

Thanks

Edit : i think i got it, this file is in the syslinux-common package... Nothing mentioned this in the tutorial... so going to "apt-get install syslinux-common"...
Edit2 : finally it seems that the uboot dhcp command is the problem because when i type help at the uboot prompt i have this :
dhcp - boot image via network using DHCP/TFTP protocol
and it's very strange... and when i type 'dhcp' it tries to load a image CA807.img or something like that!
So i modify the settings to have static ip - so no more dhcp, and i go one step ahead = Kernel booting, but no access to the dockstar ==> time to make a serial cable...

Edit3 : suppress the br0 bridged interface (was created to bridge an usb2ethernet network key) from /etc/network/interfaces .... It works !!!!! So the only problem was with the uBoot dhcp command, but i see in the log in the first message that there's the loading of gpxelinux.0 but i don't understand why?

Edit4 : Got it! The problem with the dhcp uBoot command trying to load an image can be changed by the uboot command 'setenv autoload no'. After that if i type 'dhcp' it gives me my ip without trying to load an image...

Edit5 : to make the 'set autoload no' permanent, i just change the line in the script :
from
fw_setenv net_set_c_ip_dhcp 'setenv autoload no; dhcp; echo; echo ** net_dhcp_c = 1 --> Getting IP Settings by DHCP'
to
fw_setenv net_set_c_ip_dhcp 'setenv autoload no; dhcp; echo; echo ** net_dhcp_c = 1 --> Getting IP Settings by DHCP'

Next Step (Done!) : modify the tftp command to nfs command ==> so i can run all the things with just a dhcp and a nfs server and no more needing a tftp server...
Next Step 2: use nfsv4 for the root filesystem... This one should be to difficult/impossible (dracut-network package????)



Edited 8 time(s). Last edit at 06/15/2013 01:29AM by qdftowner.
Re: Boot your Dockstar by TFTP/NFS
June 16, 2013 04:08AM
Hi !

The file gpxelinux.0 is NOT necessary here. It only appears in my output because I have network boot enabled on my network for x86/64 computers. As the Dockstar initiates its DHCP request during the boot sequence, it also receives from my DHCP server the boot server and file (DHCP options 66 & 67) for x86/64 machines, and tries, unsuccessfully, to boot from it.... which is useless for the dockstar. That's the reason I've foreseen to statically define the boot file name for the dockstar instead of getting it from the DHCP server.

The problem you encounter with the file 'CA807.img' come from the fact that your dockstar gets this filename as bootfile by DHCP. Many ISPs return a TFTP boot server and file names that are bogus... Hence the need to disable DHCP if it's the case. (See the last comment in my initial post).

I wasn't aware about the autoload command. It might be usefull to check if it doesn't break the rescue system loading if the dockstar is unable to foot by TFTP/NFS. From the OpenWRT wiki, it seems to only affect the behavior of the DHCP boot :
Quote
OpenWR Wiki
autoload - if set to no (or any string beginning with 'n'), the rarpb, bootp or dhcp commands will perform only a configuration lookup from the BOOTP / DHCP server, but not try to load any image using TFTP.

I've adapted my first post to deactivate the autoload. I removed the output related by gpxelinux.0: the dockstar doesn't try to load it anymore thanks to the autoload command set to no.

Could you describe the changes you made to boot by NFS without a TFTP server ?



Edited 1 time(s). Last edit at 06/16/2013 05:28AM by tsunulukai.
Re: Boot your Dockstar by TFTP/NFS
June 16, 2013 08:21AM
To made it boot from nfs without tftp, just changed :

fw_setenv net_boot 'tftp 0x800000 $net_tftp_kernel; echo; echo ** Kernel Boot Arguments: $bootargs; echo;if tftp 0xe00000 $net_tftp_initrd; then bootm 0x800000 0xe00000;else bootm 0x800000;fi'


to
fw_setenv net_boot 'nfs 0x800000 $net_nfs_server:$net_nfs_path/boot/$net_tftp_kernel; echo; echo ** Kernel Boot Arguments: $bootargs; echo;if nfs 0xe00000 $net_nfs_server:$net_nfs_path/boot/$net_tftp_initrd; then bootm 0x800000 0xe00000;else bootm 0x800000;fi'

I consider that uImage and uInitrd are present in the /boot directory (like a normal install).
Every thing is fine with nfs (v3)!

Booting from nfs4 is not possible uBoot seems to not be able to do that (using nfsv3 naming works).
Mounting / on a nfs4 partition is not possible (well , i'm trying to do this with dracut-network package but i does not work and i 'm sure i have a message from the kernel but i have no serial connection so i'm stuck a this step for nfs4)
Re: Boot your Dockstar by TFTP/NFS
June 22, 2013 03:19PM
Hi qdftowner,

> I consider that uImage and uInitrd are present in
> the /boot directory (like a normal install).
> Every thing is fine with nfs (v3)!
>

> Booting from nfs4 is not possible uBoot seems to
> not be able to do that (using nfsv3 naming works).
>

How did you do do select nfs v3 on uBoot side? Regarding "using nfsv3 naming", does it mean there is certain naming convention in uBoot envs that you used to make it v3 only?

Update - found the answer: nfsroot parameter can have options, so it seems to take
nfsroot=$net_nfs_server:$net_nfs_path,v3



Thanks,

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 06/22/2013 09:19PM by bodhi.
Re: Boot your Dockstar by TFTP/NFS
June 23, 2013 03:14PM
@tsunulukai,

Thanks for a very well written guide! and most of all the inspiration. I'm playing with this and I have learned some new and very useful subjects.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Boot your Dockstar by TFTP/NFS
June 23, 2013 10:38PM
bodhi Wrote:
-------------------------------------------------------
> nfsroot=$net_nfs_server:$net_nfs_path,v3

This did not seems to be able to force the nfs share to mount as v3.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Boot your Dockstar by TFTP/NFS
June 25, 2013 12:38PM
it should be :
nfsroot=$net_nfs_server:$net_nfs_path,vers=3

but when i talk about nfsv4 vs nfsv3 notation i mean :
if /export is the nfsv4 export (option fsid=0) then you can have another export into /export, say /export/dockroot and dockroot is a mount --bind of a directory elsewhere then if you write:

nfsroot=$net_nfs_server:/ <==nfsv4
nfsroot=$net_nfs_server:/export <== nfsv3 or <

and (what we want)

nfsroot=$net_nfs_server:/dockroot <==nfsv4 (but it does not work even with dracut-network, the classic nonody:nobody problem is occuring when trying to mount at boot)
nfsroot=$net_nfs_server:/export/dockroot <== nfsv3 or <

you can lso force nfs server to v3...
Re: Boot your Dockstar by TFTP/NFS
June 26, 2013 10:53AM
qdftowner,

Thanks for the info. But strange, "vers=3" did not work for me, the kernel rejected it as an option in the command line. I'm running 3.8.11. When I use v3, it was accepted.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Boot your Dockstar by TFTP/NFS
July 04, 2013 01:29PM
run fine also with debian jessie (stock kernel 3.9.6.1 from a fresh debootstrap)!
going to test if more success with nfsv4 ...
root@dockstar2:~# uname -a
Linux dockstar2 3.9-1-kirkwood #1 Debian 3.9.6-1 armv5tel GNU/Linux
root@dockstar2:~# free
             total       used       free     shared    buffers     cached
Mem:        124428      24068     100360          0          0      15392
-/+ buffers/cache:       8676     115752
Swap:            0          0          0
root@dockstar2:~# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=14614,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=12444k,mode=755)
192.168.1.35:/export/dockjessie on / type nfs (rw,noatime,vers=3,rsize=262144,wsize=262144,namlen=255,hard,nolock,proto=tcp,port=2049,timeo=7,retrans=10,sec=sys,local_lock=all,addr=192.168.1.35)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=24880k)
tmpfs on /tmp type tmpfs (rw,relatime)
root@dockstar2:~# cat /etc/debian_version
jessie/sid
Re: Boot your Dockstar by TFTP/NFS
July 27, 2013 06:07PM
Forcing NFS version 3 for nfsroot did not seem to work for me. I'm running kernel 3.9.11.

In this bootargs I tried to set to version 3:
nfs_set_bootargs=setenv bootargs console=$console root=/dev/nfs nfsroot=$nfs_server:$nfs_path,vers=3 rootfstype=nfs rootwait  ip=$nfs_ipconfig $mtdparts

UPDATE:
Perhaps the syntax has changed, I tried nfsroot=$nfs_server:$nfs_path,v3 before, and it seems to take. But I also had other problem with "protocol not supported" error so I thought that this option did not work. But now that my other problem was solved, I left the v3 option in, and everything works as intended.

So my bootargs currently is
nfs_set_bootargs=setenv bootargs console=$console root=/dev/nfs nfsroot=$nfs_server:$nfs_path,v3 rootfstype=nfs rootwait  ip=$nfs_ipconfig $mtdparts

Thanks tsunulukai and qdftowner for the info.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 07/28/2013 02:26PM by bodhi.
Re: Boot your Dockstar by TFTP/NFS
March 26, 2015 07:51PM
Hi, i updated the envs a bit for use with my PogoPlug Mobile. Works great. It's using NFS only, no TFTP.

I added DTB-support also.

Bootlog:
U-Boot 2014.07-tld-1 (Jul 18 2014 - 00:59:45)
Pogoplug V4
gcc (Debian 4.6.3-14) 4.6.3
GNU ld (GNU Binutils for Debian) 2.22
Hit any key to stop autoboot:  0 
** Bad device mmc 0 **
** Bad device mmc 0 **
Card did not respond to voltage select!
** Bad device mmc 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
** Bad device usb 0 **
** Bad device usb 0 **
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!

Reset IDE: ide_preinit failed
** Bad device size - ide 0 **
** Bad device size - ide 0 **
** Bad device size - ide 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
DHCP client bound to address 10.0.0.20

** net_dhcp_c = 1 --> Getting IP Settings by DHCP
** IP Address: 10.0.0.20
** Subnet Mask: 255.255.255.0
** Def Gateway: 10.0.0.1

** net_dhcp_s or net_dhcp_c = 0 --> Using static NFS Boot Server
** NFS Boot Server: 10.0.0.22

Using egiga0 device
File transfer via NFS from server 10.0.0.22; our IP address is 10.0.0.20
Filename '/srv/nfs/hosts/pp01/boot/dts/kirkwood-pogoplug_v4.dtb'.
Load address: 0x1c00000
Loading: ##
done
Bytes transferred = 10028 (272c hex)
Using egiga0 device
File transfer via NFS from server 10.0.0.22; our IP address is 10.0.0.20
Filename '/srv/nfs/hosts/pp01/boot/uImage'.
Load address: 0x800000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ########################################
done
Bytes transferred = 2865664 (2bba00 hex)

** Kernel Boot Arguments: console=ttyS0,115200 root=/dev/nfs rw rootfstype=nfs rootwait nfsroot=10.0.0.22:/srv/nfs/hosts/pp01,v3,tcp ip=10.0.0.20:10.0.0.22:10.0.0.1:255.255.255.0:pogoplugv4:eth0:off mtdparts=orion_nand:1M(u-boot),-(empty)

Using egiga0 device
File transfer via NFS from server 10.0.0.22; our IP address is 10.0.0.20
Filename '/srv/nfs/hosts/pp01/boot/uInitrd'.
Load address: 0x1100000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ##########################################
done
Bytes transferred = 6535284 (63b874 hex)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.18.5-kirkwood-tld-1
   Created:      2015-02-08   9:02:01 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2865600 Bytes = 2.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-3.18.5-kirkwood-tld-1
   Created:      2015-02-19   1:49:36 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6535220 Bytes = 6.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 ...

Das code:
#NetBoot variables
# -User-Serviceable
fw_setenv net_dhcp_c '1'
fw_setenv net_dhcp_s '0'
fw_setenv net_c_ipaddr ''
fw_setenv net_c_netmask ''
fw_setenv net_c_gatewayip ''
fw_setenv net_nfs_server '10.0.0.22'
fw_setenv net_nfs_path '/srv/nfs/hosts/yourpogoplug'
fw_setenv net_nfs_dtb '/boot/dts/kirkwood-pogoplug_v4.dtb'
fw_setenv net_nfs_kernel '/boot/uImage'
fw_setenv net_nfs_initrd '/boot/uInitrd'

# -Fixed
fw_setenv autoload 'no'
fw_setenv net_bootcmd 'run net_check_dhcp_c; run net_check_dhcp_s; run net_set_bootargs; run net_boot'
fw_setenv net_boot 'nfs 0x1c00000 ${net_nfs_server}:${net_nfs_path}${net_nfs_dtb}; nfs 0x800000 ${net_nfs_server}:${net_nfs_path}${net_nfs_kernel}; echo; echo ** Kernel Boot Arguments: $bootargs; echo;if nfs 0x1100000 ${net_nfs_server}:${net_nfs_path}${net_nfs_initrd}; then bootm 0x800000 0x1100000 0x1c00000;else bootm 0x800000 - 0x1c00000;fi'
fw_setenv net_set_bootargs 'setenv serverip $net_nfs_server; setenv bootargs console=$console root=/dev/nfs rw rootfstype=nfs rootwait nfsroot=$net_nfs_server:$net_nfs_path,v3,tcp ip=$ipaddr:$net_nfs_server:$gatewayip:$netmask:pogoplugv4:eth0:off $mtdparts'
fw_setenv net_check_dhcp_c 'if test $net_dhcp_c -eq 1 ; then run net_set_c_ip_dhcp; else run net_set_c_ip_stat; fi;echo ** IP Address: $ipaddr; echo ** Subnet Mask: $netmask; echo ** Def Gateway: $gatewayip'
fw_setenv net_set_c_ip_dhcp 'dhcp; echo; echo ** net_dhcp_c = 1 --> Getting IP Settings by DHCP'
fw_setenv net_set_c_ip_stat 'setenv ipaddr $net_c_ipaddr; setenv netmask $net_c_netmask; setenv gatewayip $net_c_gatewayip; echo; echo ** net_dhcp_c = 0 --> Using static IP Settings'
fw_setenv net_check_dhcp_s 'if test $net_dhcp_s -eq 1 && test $net_dhcp_c -eq 1 ; then run net_set_s_ip_dhcp; else run net_set_s_ip_stat; fi;echo ** NFS Boot Server: $net_nfs_server; echo'
fw_setenv net_set_s_ip_dhcp 'setenv net_nfs_server $serverip;echo; echo ** net_dhcp_s and net_dhcp_c = 1 --> Getting NFS Boot Server by DHCP'
fw_setenv net_set_s_ip_stat 'echo; echo ** net_dhcp_s or net_dhcp_c = 0 --> Using static NFS Boot Server'

#NetBoot variables End

Note i'm using NFS v3 + TCP.

Cheers,
John



Edited 2 time(s). Last edit at 03/26/2015 08:23PM by JohnW.
Re: Boot your Dockstar by TFTP/NFS
March 26, 2015 07:56PM
You'll have to edit your bootcmd aswall. Just add "net_bootcmd;" before reset in the end...

fw_setenv bootcmd 'run bootcmd_mmc; run bootcmd_usb; run bootcmd_sata; net_bootcmd; reset'
Re: Boot your Dockstar by TFTP/NFS
March 26, 2015 10:42PM
> Note i'm using NFS v3 + TCP.

Yes. Booting with NFS v3 has been working well for me for a couple of years. NFS v4 had some problem. I have not tried to change it, so don't know the current status for NFS v4 booting.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Boot your Dockstar by TFTP/NFS
March 27, 2015 09:56AM
Haven't tried v4 either. By default it will use v3, even if you don't specify it.
By default (comes with the new kernel) the rootfs will be mounted as read-only, so you'll need to add "rw" to "net_set_bootargs" as i did. Wasn't needed earlier.

Anyways i'm happy with my NFS-setup...
My PogoPlug V4 with a 2.5"-drive is exporting the rootfs for my (now medialess) PogoPlug Mobile...
Writespeed to disk (export = sync) is 13,5mb/s. The only concern is the cpu/memory usage of the server under load, but it seems to work ok.
Re: Boot your Dockstar by TFTP/NFS
March 27, 2015 12:43PM
JohnW,

> By default it will use
> v3, even if you don't specify it.

But you have to export the NFS share as V3 by using the V3 syntax.

> By default (comes with the new kernel) the rootfs
> will be mounted as read-only, so you'll need to
> add "rw" to "net_set_bootargs" as i did. Wasn't
> needed earlier.

Strange, which NFS version you're running? I don't need to do this. Perhaps it has something to do with your specific export.

> The only concern is the cpu/memory usage of the
> server under load, but it seems to work ok.

Perhaps I can help if you can describe what is abnormal, my Pogo E02 running as normal as other plugs, nothing unusual.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Boot your Dockstar by TFTP/NFS
March 27, 2015 03:23PM
Hi Bodhi,

I tested without the v3-syntax and it worked anyway. Theres no change in the output of "mount" if you add it, i choosed to include it anyway.

Mount gave me:
10.0.0.22:/srv/nfs/hosts/pp02 on / type nfs (rw,relatime,vers=3,rsize=16384,wsize=16384,namlen=255,hard,nolock,proto=tcp,port=2049,timeo=7,retrans=3,sec=sys,local_lock=all,addr=10.0.0.22)

My export is so standard as it can be. I haven't specified NFS-version anywhere.

Heres my fstab on the client.
root@pp02:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/root      /               nfs     noatime,errors=remount-ro 0 1
tmpfs          /tmp            tmpfs   defaults          0       0
10.0.0.22:/exports/music /media/music nfs ro,async,hard,intr 0 0
(Will change the second to sync, tcp so they all are the same).

The wierd thing is that my secondary NFS-share (for MPD) doesn't get mounted at boot. No error-messages at all.
Tried to add _netdev etc, hoping it would have an effect.
Maybe a bit offtopic...

Full mount output, minus tmpfs-mounts.
10.0.0.22:/srv/nfs/hosts/pp02 on / type nfs (rw,relatime,vers=3,rsize=16384,wsize=16384,namlen=255,hard,nolock,proto=tcp,port=2049,timeo=7,retrans=3,sec=sys,local_lock=all,addr=10.0.0.22)
rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
10.0.0.22:/exports/music on /media/music type nfs (ro,relatime,vers=3,rsize=16384,wsize=16384,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.0.0.22,mountvers=3,mountport=56581,mountproto=udp,local_lock=none,addr=10.0.0.22)

Any ideas? I asume it has have something related to the primary NFS-rootfs existing...
"mount /media/music" mounts it w/o problems...

Regarding the performance-issues, it's not a big deal. It's just that when i run "apt-get update/upgrade" etc. on the clients the CPU hits 100% continuously. Memory goes up to 20MB free an swap is used.

No big deal, under normal operations the NFS-clients don't do any heavy disk-related stuff (if non at all!)...

/John :-)
Re: Boot your Dockstar by TFTP/NFS
March 27, 2015 04:10PM
John,

> My export is so standard as it can be. I haven't
> specified NFS-version anywhere.

It does imply different version with the syntax. So if it's vanilla then the syntax imply v3. But if you use something specific like fsid in the parameter then it's exported as v4 (if you do have nfs v4 in the kernel).

> "mount /media/music" mounts it w/o problems...

You can mount it in /etc/rc.local. I think it is too early because the rootfs itself has not been mounted completely yet.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Boot your Dockstar by TFTP/NFS
March 27, 2015 04:34PM
Yes you're absolutely right, i did read about it earlier - don't know why didn't think of it now, doh... Even qdftowner wrote about it above...

Yes, i'm not fully aware of how and at which time the lines in fstab are processed - but you're probably right about it.
Re: Boot your Dockstar by TFTP/NFS
March 31, 2015 05:59PM
Bodhi, with systemvinit i had to add "mount -a -t nfs4" to rc.local to have the second nfs-share mounted at boot.

With systemd i did not need to do that. My idea is that systemd is a bit more intelligent when it comes to pick the moment when to run stuff... Case closed.
Re: Boot your Dockstar by TFTP/NFS
April 11, 2015 08:59AM
Nice. When I get sometimes, I will definitely peruse this thread and use my DockStar as a test bed. Thank you all.
Re: Boot your Dockstar by TFTP/NFS
July 05, 2015 03:55AM
Thanks so much tsunulukai!
I had a usb drive enclosure die and my dockstar has become so integral to my everything here. I had a couple of spares, one doesn't work at all on the dockstar, the other works fine from cold boot but upon reboot it can't be seen (the infamous Super Top m6116 chip, try not to get one). Yes I tried usb stop-sleep-start, etc., nothing worked. But this did, and it was so easy with the code already done! Once booted into say, rescue, the disk was seen just fine, I only had to get past the kernel booting, so this was ideal, I only have to tftp the zImage/dtb. And my tomato router has dnsmasq, it has tftp built in, just use the routers usb stick for storage.
I've fooled around with tftp before, always disappointed, but this was easy. Wow, can't tell you how thrilled I am to be able to reboot, my dockstar is kept in a somewhat inaccessible place, quite the effort to get to, so getting up and doing that to pull the plug every time I needed to reboot didn't thrill me. Now I can take my time getting a good replacement enclosure.
So much good stuff at Jeff Doozan's place...



Edited 1 time(s). Last edit at 07/05/2015 04:00AM by sputnik.
Re: Boot your Dockstar by TFTP/NFS
July 05, 2015 08:30AM
JohnW Wrote:
-------------------------------------------------------
> Bodhi, with systemvinit i had to add "mount -a -t
> nfs4" to rc.local to have the second nfs-share
> mounted at boot.
>
> With systemd i did not need to do that. My idea is
> that systemd is a bit more intelligent when it
> comes to pick the moment when to run stuff... Case
> closed.

I've forgot all about this. But since this thread is active again :) FWIW.

Regarding mounting NFS shares in sysvinit. Here is a way to specify in whether NFS share should be mounted asynchroneously, or wait until the NFS rootfs was mounted.

Add this in /etc/default/rcS
ASYNCMOUNTNFS=no

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Boot your Dockstar by TFTP/NFS
July 06, 2017 01:02AM
Hi there !

First of all, many thanks for your positive feedback :)

Just a quick update for those of you who run debian as their NFS server to boot their dockstar. When updating to Debian 9 Stretch, the nfs-kernel-server packages disables NFSv2 by default. This broke my NFS setup with the dockstars, which, although configured to use NFSv3, seems to initialize their boot using NFSv2. (It might be due to the kernel version I'm running)

I could confirm this in wireshark:
Remote Procedure Call, Type:Reply XID:0x00000004
    XID: 0x00000004 (4)
    Message Type: Reply (1)
    [Program: NFS (100003)]
    [Program Version: 2]
    [Procedure: LOOKUP (4)]
    Reply State: accepted (0)
    [This is a reply to a request in frame 9]
    [Time from request: 0.000080000 seconds]
    Verifier
        Flavor: AUTH_NULL (0)
        Length: 0
    Accept State: remote can't support version # (2)
    Program Version (Minimum): 3
    Program Version (Maximum): 4

To re-enable NFSv2 in Debian 9 Stretch, you just need to add the following lines to /etc/default/nfs-kernel-server:

# Enable NFSv2
RPCNFSDOPTS="-V 2"

Hope this helps :)
Greetz !
Re: Boot your Dockstar by TFTP/NFS
July 06, 2017 03:24AM
tsunulukai,

> To re-enable NFSv2 in Debian 9 Stretch, you just n
> eed to add the following lines to /etc/default/nfs
> -kernel-server:
>
>
> # Enable NFSv2
> RPCNFSDOPTS="-V 2"
>
>
> Hope this helps :)
> Greetz !

If I might add further explanation. The reason was older u-boots only has NFS v2 :) So the nfs-kernel-server detects that and provide NFS v2 protocol. Even though we export the rootfs share as v3.

u-boot did not have NFS V3 until recently. So when I release the new kirkwood u-boot-2017.05. This problem will be solved by itself. In the mean time, thanks for this hints! people are likely to run in to this problem after upgrading to stretch.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 07/06/2017 03:25AM by bodhi.
Re: Boot your Dockstar by TFTP/NFS
December 10, 2017 10:01AM
Hello there !

I finally updated my Dockstars to uBoot 2017-07 by bodhi, so I thought I might as well provide you with the updated procedure to NFS boot. It concerns the section #7 of my initial guide, which should be replaced with the following after having update to the latest uBoot and reset the uboot environment to uboot.2016.05-tld-1.environment.bodhi.tar. This update also only relies on NFS to complete the boot sequence, completely bypassing TFTP as suggested by JohnW. It also supports using DTB using the variable net_nfs_dtb. The network boot commands mimics the new boot commands delivered by bodhi.

I've tried to align the syntax on bodhi's one.



7. Create NetBoot variables in uboot on the Dockstar from the running Linux:
This will not yet alter the Dockstar startup configuration. All the following commands create non-existing variables into uBoot, assuming you're using the stock uboot.2016.05-tld-1.environment.bodhi uboot env.

#NetBoot variables
# -User-Serviceable
fw_setenv net_dhcp_c '1'
fw_setenv net_dhcp_s '1'
fw_setenv net_c_ipaddr ''
fw_setenv net_c_netmask ''
fw_setenv net_c_gatewayip ''
fw_setenv net_nfs_path   '/srv/nfs/hosts/dockstar'
fw_setenv net_nfs_dtb    'boot/dts/kirkwood-dockstar.dtb'
fw_setenv net_nfs_initrd 'boot/uInitrd'
fw_setenv net_nfs_kernel 'boot/uImage'

# -Fixed
fw_setenv console 'ttyS0,115200'
fw_setenv autoload 'no'
fw_setenv net_check_dhcp_c 'if test $net_dhcp_c -eq 1 ; then run net_set_c_ip_dhcp; else run net_set_c_ip_stat; fi;echo ** IP Address:  $ipaddr; echo ** Subnet Mask: $netmask; echo ** Def Gateway: $gatewayip'
fw_setenv net_set_c_ip_dhcp 'dhcp; echo; echo ** Getting IP Settings by DHCP (net_dhcp_c = 1):'
fw_setenv net_set_c_ip_stat 'setenv ipaddr $net_c_ipaddr; setenv netmask $net_c_netmask; setenv gatewayip $net_c_gatewayip; echo; echo ** Using static IP Settings (net_dhcp_c = 0):'
fw_setenv net_check_dhcp_s 'if test $net_dhcp_s -eq 1 && test $net_dhcp_c -eq 1 ; then run net_set_s_ip_dhcp; else run net_set_s_ip_stat; fi; echo ** NFS Boot Server: $net_nfs_server; echo'
fw_setenv net_set_s_ip_dhcp 'setenv net_nfs_server $serverip;echo; echo ** Getting NFS Boot Server by DHCP (net_dhcp_s and net_dhcp_c = 1):'
fw_setenv net_set_s_ip_stat 'echo; echo ** Using static NFS Boot Server (net_dhcp_s or net_dhcp_c = 0) :'

fw_setenv net_load_dtb    'echo NFS loading DTB     :$net_nfs_server:$net_nfs_path/$net_nfs_dtb ...   ; nfs $load_dtb_addr    $net_nfs_server:$net_nfs_path/$net_nfs_dtb; echo'
fw_setenv net_load_initrd 'echo NFS loading uInitrd :$net_nfs_server:$net_nfs_path/$net_nfs_initrd ...; nfs $load_initrd_addr $net_nfs_server:$net_nfs_path/$net_nfs_initrd; echo'
fw_setenv net_load_uimage 'echo NFS loading uImage  :$net_nfs_server:$net_nfs_path/$net_nfs_kernel ...; nfs $load_uimage_addr $net_nfs_server:$net_nfs_path/$net_nfs_kernel; echo'

fw_setenv net_bootcmd 'run net_check_dhcp_c; run net_check_dhcp_s; run net_set_bootargs; run net_bootcmd_exec'
fw_setenv net_set_bootargs 'setenv serverip $net_nfs_server; setenv bootargs console=$console root=/dev/nfs rw rootfstype=nfs rootwait nfsroot=$net_nfs_server:$net_nfs_path/,rsize=32768,wsize=32768,hard,intr,udp,v3 ip=$ipaddr:$net_nfs_server:$gatewayip:$netmask:dockstar:eth0:off $mtdparts $custom_params; echo ** Kernel Boot Arguments:; echo ** $bootargs; echo'
fw_setenv net_bootcmd_exec 'run net_load_uimage; if run net_load_initrd; then if run net_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'

Reboot the dockstar, interrupt the autoboot and execute

run net_bootcmd

If booting succeeds, the you may override the default bootcmd with

fw_setenv bootcmd 'run net_bootcmd'

Unlike my initial guide, which would first try to boot from the network, and failover to usb drive, this config will only attempt to boot from the network.
Should you need to restore the initial boot behavior, just restore the original bootcmd with

fw_setenv bootcmd 'run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec'

As before, you can check the boot process using the serial or network console.



Edited 2 time(s). Last edit at 12/10/2017 11:03AM by tsunulukai.
Re: Boot your Dockstar by TFTP/NFS
July 27, 2018 06:43AM
somone help

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:13:18 -0700)
Pogo E02

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.1-kirkwood-tld-1 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: CloudEngines Pogoplug E02
[    0.000000] earlycon: ns16550a0 at MMIO 0xf1012000 (options '')
[    0.000000] bootconsole [ns16550a0] enabled
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: console= root=/dev/nfs rw rootfstype=nfs rootwait nfsroot=192.168.1.204:/srv/nfs4/pogo/,rsize=32768,wsize=32768,hard,intr,udp,v3 ip=192.168.1.153:192.168.1.204:192.168.1.1:255.255.255.0:dockstar:eth0:off orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 239376K/262144K available (8192K kernel code, 716K rwdata, 1972K rodata, 1024K init, 288K bss, 22768K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xd0800000 - 0xff800000   ( 752 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0db3274   ( 717 kB)
[    0.000000]        .bss : 0xc0db9b9c - 0xc0e01e60   ( 289 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000008] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.007893] Switching to timer-based delay loop, resolution 5ns
[    0.014294] Console: colour dummy device 80x30
[    0.018826] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.029446] pid_max: default: 32768 minimum: 301
[    0.034274] Security Framework initialized
[    0.038547] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.045196] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.053172] CPU: Testing write buffer coherency: ok
[    0.059151] Setting up static identity map for 0x100000 - 0x100058
[    0.065604] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.074133] devtmpfs: initialized
[    0.081721] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.091692] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.098269] prandom: seed boundary self test passed
[    0.106917] prandom: 100 self tests passed
[    0.111081] pinctrl core: initialized pinctrl subsystem
[    0.117478] NET: Registered protocol family 16
[    0.122590] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.131111] cpuidle: using governor ladder
[    0.135298] cpuidle: using governor menu
[    0.139845] Feroceon L2: Enabling L2
[    0.143468] Feroceon L2: Cache support initialised.
[    0.148776] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.163720] No ATAGs?
[    0.172941] vgaarb: loaded
[    0.178302] SCSI subsystem initialized
[    0.182529] usbcore: registered new interface driver usbfs
[    0.188158] usbcore: registered new interface driver hub
[    0.193566] usbcore: registered new device driver usb
[    0.199869] clocksource: Switched to clocksource orion_clocksource
[    0.295667] VFS: Disk quotas dquot_6.6.0
[    0.299681] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.317368] NET: Registered protocol family 2
[    0.322535] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.329551] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.335993] TCP: Hash tables configured (established 2048 bind 2048)
[    0.342481] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.348356] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.354840] NET: Registered protocol family 1
[    0.359625] RPC: Registered named UNIX socket transport module.
[    0.365649] RPC: Registered udp transport module.
[    0.370409] RPC: Registered tcp transport module.
[    0.375129] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.381847] Unpacking initramfs...
[    1.045892] Freeing initrd memory: 7076K
[    1.050176] NetWinder Floating Point Emulator V0.97 (double precision)
[    1.057689] audit: initializing netlink subsys (disabled)
[    1.063631] Initialise system trusted keyrings
[    1.068144] Key type blacklist registered
[    1.072248] audit: type=2000 audit(1.053:1): state=initialized audit_enabled=0 res=1
[    1.080227] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    1.086759] zbud: loaded
[    1.090374] NFS: Registering the id_resolver key type
[    1.095467] Key type id_resolver registered
[    1.099665] Key type id_legacy registered
[    1.103751] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.110512] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    1.117089] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    1.124382] fuse init (API version 7.26)
[    1.128680] orangefs_debugfs_init: called with debug mask: :none: :0:
[    1.135441] orangefs_init: module version upstream loaded
[    1.140894] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.559876] random: fast init done
[    7.026254] Key type asymmetric registered
[    7.030683] Asymmetric key parser 'x509' registered
[    7.035649] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    7.043227] io scheduler noop registered
[    7.047167] io scheduler deadline registered
[    7.051584] io scheduler cfq registered (default)
[    7.057604] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    7.066880] mv_xor f1060800.xor: Marvell shared XOR driver
[    7.130628] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    7.138452] mv_xor f1060900.xor: Marvell shared XOR driver
[    7.200607] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    7.208626] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    7.216307] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[    7.233957] loop: module loaded
[    7.238265] nand: Could not find valid ONFI parameter page; aborting
[    7.244763] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    7.251182] nand: Hynix NAND 128MiB 3,3V 8-bit
[    7.255648] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    7.263278] Scanning device for bad blocks
[    7.365098] Bad eraseblock 918 at 0x0000072c0000
[    7.380932] 4 ofpart partitions found on MTD device orion_nand
[    7.386786] Creating 4 MTD partitions on "orion_nand":
[    7.391975] 0x000000000000-0x000000100000 : "u-boot"
[    7.398158] 0x000000100000-0x000000600000 : "uImage"
[    7.404376] 0x000000500000-0x000002a00000 : "pogoplug"
[    7.410984] 0x000002500000-0x000009100000 : "root"
[    7.415800] mtd: partition "root" extends beyond the end of device "orion_nand" -- size truncated to 0x5b00000
[    7.428804] libphy: Fixed MDIO Bus: probed
[    7.433827] libphy: orion_mdio_bus: probed
[    7.443071] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    8.551629] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:25:31:02:e6:9e
[    8.560529] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    8.567102] ehci-pci: EHCI PCI platform driver
[    8.571652] ehci-orion: EHCI orion driver
[    8.575875] orion-ehci f1050000.ehci: EHCI Host Controller
[    8.581442] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    8.589304] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[    8.619904] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    8.626178] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    8.633028] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.640299] usb usb1: Product: EHCI Host Controller
[    8.645197] usb usb1: Manufacturer: Linux 4.12.1-kirkwood-tld-1 ehci_hcd
[    8.651948] usb usb1: SerialNumber: f1050000.ehci
[    8.657446] hub 1-0:1.0: USB hub found
[    8.661310] hub 1-0:1.0: 1 port detected
[    8.665955] usbcore: registered new interface driver usb-storage
[    8.672366] mousedev: PS/2 mouse device common for all mice
[    9.019906] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    9.211680] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    9.218430] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    9.225636] usb 1-1: Product: USB2.0 Hub
[    9.230477] hub 1-1:1.0: USB hub found
[    9.234556] hub 1-1:1.0: 4 ports detected
[    9.689900] rtc-mv f1010300.rtc: internal RTC not ticking
[    9.695493] i2c /dev entries driver
[    9.700349] hidraw: raw HID events driver (C) Jiri Kosina
[    9.706132] drop_monitor: Initializing network drop monitor service
[    9.712693] NET: Registered protocol family 17
[    9.717241] Key type dns_resolver registered
[    9.722448] registered taskstats version 1
[    9.726563] Loading compiled-in X.509 certificates
[    9.731470] zswap: loaded using pool lzo/zbud
[    9.746045] Key type big_key registered
[    9.759426] Key type encrypted registered
[    9.764933] hctosys: unable to open rtc device (rtc0)
[   13.968210] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   14.019890] IP-Config: Complete:
[   14.023140]      device=eth0, hwaddr=00:25:31:02:e6:9e, ipaddr=192.168.1.153, mask=255.255.255.0, gw=192.168.1.1
[   14.033384]      host=dockstar, domain=, nis-domain=(none)
[   14.038891]      bootserver=192.168.1.204, rootserver=192.168.1.204, rootpath=
[   14.046420] Warning: unable to open an initial console.

not go anymore
Re: Boot your Dockstar by TFTP/NFS
July 27, 2018 04:59PM
Your u-boot envs are messed up.

Power up, interrupt serial console and:

printenv

And post the serial boot log here.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Boot your Dockstar by TFTP/NFS
July 27, 2018 05:55PM
bodhi Wrote:
-------------------------------------------------------
> Your u-boot envs are messed up.
>
> Power up, interrupt serial console and:
>
>
> printenv
>
>
> And post the serial boot log here.


PogoE02> printenv 
arcNumber=3542
autoload=no
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
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
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
ethact=egiga0
ethaddr=00:25:31:02:E6:9E
if_netconsole=ping $serverip
ipaddr=192.168.1.153
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
machid=dd6
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
nc_ready=0
net_boot=nfs 0x1c00000 ${net_nfs_server}:${net_nfs_path}${net_nfs_dtb}; nfs 0x800000 ${net_nfs_server}:${net_nfs_path}${net_nfs_kernel}; echo; echo ** Kernel Boot Arguments: $bootargs; echo;if nfs 0x1100000 ${net_nfs_server}:${net_nfs_path}${net_nfs_initrd}; then bootm 0x800000 0x1100000 0x1c00000;else bootm 0x800000 - 0x1c00000;fi
net_bootcmd=run net_check_dhcp_c; run net_check_dhcp_s; run net_set_bootargs; run net_bootcmd_exec
net_bootcmd_exec=run net_load_uimage; if run net_load_initrd; then if run net_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
net_check_dhcp_c=if test $net_dhcp_c -eq 1 ; then run net_set_c_ip_dhcp; else run net_set_c_ip_stat; fi;echo ** IP Address:  $ipaddr; echo ** Subnet Mask: $netmask; echo ** Def Gateway: $gatewayip
net_check_dhcp_s=if test $net_dhcp_s -eq 1 && test $net_dhcp_c -eq 1 ; then run net_set_s_ip_dhcp; else run net_set_s_ip_stat; fi; echo ** NFS Boot Server: $net_nfs_server; echo
net_dhcp_c=1
net_dhcp_s=0
net_load_dtb=echo NFS loading DTB     :$net_nfs_server:$net_nfs_path/$net_nfs_dtb ...   ; nfs $load_dtb_addr    $net_nfs_server:$net_nfs_path/$net_nfs_dtb; echo
net_load_initrd=echo NFS loading uInitrd :$net_nfs_server:$net_nfs_path/$net_nfs_initrd ...; nfs $load_initrd_addr $net_nfs_server:$net_nfs_path/$net_nfs_initrd; echo
net_load_uimage=echo NFS loading uImage  :$net_nfs_server:$net_nfs_path/$net_nfs_kernel ...; nfs $load_uimage_addr $net_nfs_server:$net_nfs_path/$net_nfs_kernel; echo
net_nfs_dtb=boot/dts/kirkwood-pogo_e02.dtb
net_nfs_initrd=boot/uInitrd
net_nfs_kernel=boot/uImage
net_nfs_path=/srv/nfs4/pogo
net_nfs_server=192.168.1.204
net_set_bootargs=setenv serverip $net_nfs_server; setenv bootargs console=$console root=/dev/nfs rw rootfstype=nfs rootwait nfsroot=$net_nfs_server:$net_nfs_path/,rsize=32768,wsize=32768,hard,intr,udp,v3 ip=$ipaddr:$net_nfs_server:$gatewayip:$netmask:dockstar:eth0:off $mtdparts $custom_params; echo ** Kernel Boot Arguments:; echo ** $bootargs; echo
net_set_c_ip_dhcp=dhcp; echo; echo ** Getting IP Settings by DHCP (net_dhcp_c = 1):
net_set_c_ip_stat=setenv ipaddr $net_c_ipaddr; setenv netmask $net_c_netmask; setenv gatewayip $net_c_gatewayip; echo; echo ** Using static IP Settings (net_dhcp_c = 0):
net_set_s_ip_dhcp=setenv net_nfs_server $serverip;echo; echo ** Getting NFS Boot Server by DHCP (net_dhcp_s and net_dhcp_c = 1):
net_set_s_ip_stat=echo; echo ** Using static NFS Boot Server (net_dhcp_s or net_dhcp_c = 0) :
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
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.1.162
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=serial
stdin=serial
stdout=serial
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
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: