Welcome! Log In Create A New Profile

Advanced

NAND errors - BAD eraseblocks - how to fix it? NSA310, Archlinux 4.4.97-1-ARCH, no chance for a new uBoot?

Posted by arti74 
Hello members.

This is part of my dmesg:
[   12.438580] Bad eraseblock 0 at 0x000000000000
[   12.443121] Bad eraseblock 1 at 0x000000020000
[   12.447626] Bad eraseblock 2 at 0x000000040000
[   12.452143] Bad eraseblock 3 at 0x000000060000
[   12.456641] Bad eraseblock 4 at 0x000000080000
[   12.461157] Bad eraseblock 5 at 0x0000000a0000
[   12.465658] Bad eraseblock 6 at 0x0000000c0000
[   12.470174] Bad eraseblock 7 at 0x0000000e0000
[   12.474675] Bad eraseblock 8 at 0x000000100000
[   12.479189] Bad eraseblock 9 at 0x000000120000
...
fw_printenv lesults this:
Too few good blocks within range

Printenv from console:
NSA310>> printenv
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootdelay=2
baudrate=115200
loads_echo=0
eth1addr=00:19:CB:00:51:82
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
nandEcc=1bit
MODEL_ID=A203
PRODUCT_NAME=NSA-310
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=ZyXEL Communications Corp.
run_diag=yes
console=100000
=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
CASset=min
ethprime=egiga1
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
eth1mtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
arcNumber=4022
bootargs_stock=console=ttyS0,115200 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootcmd_linux=setenv bootargs $(bootargs_linux); ide reset; ext2load ide 0:1 $(loadaddr) /uImage; bootm $(loadaddr)
bootargs_linux=console=ttyS0,115200 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/sda2 rw rootwait loglevel=8
to_stock="setenv mainlineLinux no
MALLOC_len=3
to_linux="setenv mainlineLinux yes
bootcmd='run bootcmd_linux'
ethaddr=CC:5D:4E:C9:F5:4A
stdin=serial
stdout=serial
stderr=serial
nandEnvBase=100000
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
disaMvPnp=no
hddPowerCtrl=no
enaAutoRecovery=yes
kernel_addr=0xc80000
pcieTune=no
ethact=egiga1

Environment size: 2241/131068 bytes
I cant install uboot from arch repos (the too few good blocks error).
Is it because of a wrong NAND chip timing in the DTS? How to fix it?



Edited 1 time(s). Last edit at 04/28/2018 06:18PM by arti74.
arti74,

> Is it because of a wrong NAND chip timing in the
> DTS? How to fix it?

Yes, most likely a wrong timing. This needs to be fixed in DTS. Let me show you how and you can bring it back to Arch site.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
The NSA310 DTS definition for NAND:

kirkwood-nsa3x0-common.dtsi

&nand {
        status = "okay";
        chip-delay = <35>;

        partition@0 {
                label = "uboot";
                reg = <0x0000000 0x0100000>;
                read-only;
        };
        partition@100000 {
                label = "uboot_env";
                reg = <0x0100000 0x0080000>;
        };
        partition@180000 {
                label = "key_store";
                reg = <0x0180000 0x0080000>;
        };
        partition@200000 {
                label = "info";
                reg = <0x0200000 0x0080000>;
        };
        partition@280000 {
                label = "etc";
                reg = <0x0280000 0x0a00000>;
        };
        partition@c80000 {
                label = "kernel_1";
                reg = <0x0c80000 0x0a00000>;
        };
        partition@1680000 {
                label = "rootfs1";
                reg = <0x1680000 0x2fc0000>;
        };
        partition@4640000 {
                label = "kernel_2";
                reg = <0x4640000 0x0a00000>;
        };
        partition@5040000 {
                label = "rootfs2";
                reg = <0x5040000 0x2fc0000>;
        };
};

Try chip-delay = <40>;

of different value or find the correct one. It is most likely greater, not smaller than 35.

With that said, I'm surprised that no members here has reported this problem. Perhaps because it is a different kernel build so we did not see this problem.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
More thoughts.

Note that the DTS can be used to specify the NAND chip-delay timing. However, you need to boot with the Arch Kirkwood FDT in the 1st place to do that. Are you running Arch FDT kernel when attempting to set/use the envs or flashing u-boot?

If you are running stock OS, then it would be a completely different story.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Hello Bodhi! Many thanks for your answer, really appreciated.
My kernel is original from archlinux arm website https://archlinuxarm.org/platforms/armv5/zyxel-nsa320
for nsa320 with installer for nsa310: nsa310-alarm.tar.gz
So not stock kernel (and not "dt"), but stock uBoot though.
Regarding the dt kernel - I just now installed linux-kirkwood-dt 4.16.5-1, but after restart the regular non-dt kernel is starting. Some more tweaks are needed to run the dt kernel, as stated in the warning during dt installation:
WARNING! This kernel package will NOT boot without user intervention.

         A Kirkwood Flattened Device Tree supporting zImage is
         placed in /boot and all mainline supported .dtb and .dts
         files are in /boot/dtb for you to prep as appropriate.

         Depending on your particular device, you may need to upgrade
         your installed U-Boot version, and/or modify your boot env.
         Some platforms may need to append the appropriate .dtb to the
         end of the zImage and make a uImage from the resulting blob.

         If you are not familiar with the care and feeding of a DT
         enabled kernel for your device, uninstall this package and
         continue to use linux-kirkwood for now.
I don't have any idea what exactly to do now, I'm stuck with it.
Hi arti74,

What it said: because you are running stock u-boot, the Arch kernel file uImage must be created manually using zImage (you need to append the NSA310 DTB to it).

That's what it means:

Quote

If you are not familiar with the care and feeding of a DT
enabled kernel for your device, uninstall this package and
continue to use linux-kirkwood for now.

So linux-kirkwood is non-FDT kernel, and you are running this kernel.


The problem I suspected is chip-delay. Thismust be hardcoded inside a non-FDT kernel. In the old days, I had to patch the kernel code to change chip-delay to fix this problem in non-FDT kernel proper. Unlike in FDT kernel, where we can just replace the DTB with another one to try.

You could ask moonman about this problem and basically inform him that I think chip-delay needs to be changed, as described in this post:
https://forum.doozan.com/read.php?3,58144,58164#msg-58164

If Arch is going to maintain non-FDT kernel for this box, then that should be looked into and fixed if indeed was the problem.

Other than what I said above, I can't do anything to fix it for you easily (because you are running Arch Linux non-FDT kernel). If you had already installed Arch FDT kernel, then you could use my released DTB for this box to see if the problem is fixed. And I could potentially help you more by compiling a new DTB.

=====

FYI, I have been releasing new u-boot for this here (new u-boot allows you run FDT kernel just like any other Kirkwood box):
https://forum.doozan.com/read.php?3,12381

You could also bring this up, Arch is still running stock u-boot for NSA310?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Thank you for your time.
Yes, I'm still on the stock u-boot 1.1.4
As I said I installed the linux-kirkwood-dt kernel, but I never compiled anything and don't know how to merge it with the .dtb file.
> but I never compiled anything and don't
> know how to merge it with the .dtb file.

Basically doing something silmilar to this
https://forum.doozan.com/read.php?2,12096

4b. Boot with DTB file embedded in the kernel image (no U-Boot envs changes are needed if your system already booting on USB or HDD) 

Again, please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box. 

Generate the uImage and uInitrd: 
cd /boot
mv uImage uImage.orig
cp -a zImage-4.16.1-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.16.1-kirkwood-tld-1 -d zImage.fdt  uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.16.1-kirkwood-tld-1 -d initrd.img-4.16.1-kirkwood-tld-1 uInitrd

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
OK, I'll give it a try... I'll report back with results.
Thank you.
Quote
bodhi
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n -d zImage.fdt uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.16.1-kirkwood-tld-1 -d initrd.img-4.16.1-kirkwood-tld-1 uInitrd
1)I have problem with the first line. I'm not sure if the 0x00... parameters are good for my system
2)Files: 'Linux-4.16.1-kirkwood-tld-1', and other: initramfs-4.16.1-kirkwood-tld-1 -d initrd.img-4.16.1-kirkwood-tld-1 - I guess I should replace it with some others, according to my kernel?
The problem is I don't have any idea how to get these proper files?
arti74,

> 1)I have problem with the first line. I'm not sure
> if the 0x00... parameters are good for my system
> 2)Files: 'Linux-4.16.1-kirkwood-tld-1', and other:
> initramfs-4.16.1-kirkwood-tld-1 -d
> initrd.img-4.16.1-kirkwood-tld-1 - I guess I
> should replace it with some others, according to
> my kernel?

The parameters are good for Debian and Arch kernels. Yes, the idea is to use the correct kernel files to generate the uImage and uInitrd. The ones above are my released Debian kernel files.

And, Arch does not normally use uInitrd, it's an option when you run Arch.


> The problem is I don't have any idea how to get
> these proper files?

I think you should ask at Arch site for this. I don't use Arch everyday so I should not give advice. You already have experts that can help you at Arch site. Give it a try, I am sure moonman will help. Sometime they are just too busy and slow responding.

Again, you should ask about the chip delay timing issue to make sure they have the correct value already in the kernel.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Yes you have the right - I should ask about the delay issue on Arch site.
Thank you for everything for now. I will be busy to for a next couple of days now, I'll get back to you if I would know some more.
Thanks again for your time.
Hi arti74,

Why dont you just install new u-boot, and then you can boot Arch FDT kernel? that would solve all you problems.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Oh Bodhi thank you that you care! Really appreciated. Sorry that I missed your post.
I would like that - to install this new u-boot - but my knowledge is slim on this matter, I would need more like step by step directions to do this. I have now trouble even install Archlinux on my device - and I did it before quite quickly... I have access practically only to the stock environment now - just one BAD eraseblock there.

EDIT: today can't start checking the process, I'm really sick :( Hopefully I'll feel better tomorrow.



Edited 4 time(s). Last edit at 05/06/2018 04:45PM by arti74.
arti74,

U-boot can be installed from stock OS. That should be OK.

But first as a precaution, you should try to run the new u-boot with kwboot using serial console. This is the rescue mechanism. If you can run kwboot, then no worry about bricking.

To recover from a bad u-boot flashing, or to make sure you have a rescue plan. We need 1) serial console connection like you already did. 2) The next step is to use kwboot to load the good uboot image using serial console. As I mentioned in the u-boot release thread:

Quote
https://forum.doozan.com/read.php?3,12381

UART Booting: If possible, try to test this boot image with UART booting before flashing to NAND. See davygravy's UART booting using kwboot instruction here in this thread. The latest u-boot image released here should be used for UART booting, if your box is the type that supports it (these do not: Dockstar, Pogo E02, iConnect).

Basically, you would download the latest u-boot for NSA310:

Quote
https://forum.doozan.com/read.php?3,12381

uboot.2017.07-tld-1.nsa310.bodhi.tar
md5
b2d04eafe402bb356c8dc8e42dc21f8f
sha256
4a5e1e730607b8d8f42544de0bd6c476e0af0e70cc1d201405ae6d4843047d21

And then from the your serial console server, instead of running picom/minicom/screen, you would run kwboot binary that was downloaded, as I mentioned in the u-boot release thread:

Quote
https://forum.doozan.com/read.php?3,12381
To download ARM kwboot binary for UART booting at Dropbox

kwboot-2016.05.tar
md5:
76977c5a61544a5707dfa17ae832a3ad
sha256:
25ee4fa8a94372d2d398cac4704e9ee3ca87585c29e72e18323209b7f163209d

kwboot (this is an older version)
md5:
0efd011bdb244436e432a8de33e639a1

Note: the kwboot binary above is for ARM. If your serial console server is x86 then you need that version. Usually on your latest Ubuntu,Mint,... Linux system, kwboot is already available. If not then install u-boot-tools:
apt-get install u-boot-tools


The command to run kwboot in the server is:

kwboot  -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.nsa310.mtd0.kwb  -p

Note: from other Linux rootfs the device might be different, so the command can also be:
kwboot  -t -B 115200 /dev/ttyAMA0 -b uboot.2017.07-tld-1.nsa310.mtd0.kwb -p



When you see the new u-boot outputs its banner and the rest of the booting activities and you can interrupt it, you've successfully run new u-boot on-the fly with your box! This will be a peace of mind to rescue your box if needed.

Now you can reboot to stock OS to install new u-boot. But let's see if kwboot works first.

The new u-boot installation post seems too much for beginner, because it was written to cover all Kirkwood boxes. What you would want to do is to copy the installation steps to a notepad, and remove info about other boxes, just list the commands that you think relevant to NSA310. And then post those commands here, I will review them and correct them as necessary.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Hello again!
I feel a bit better today, additionally I managed to run again my archlinux and kirkwood-dt kernell on it - with great help from summers from the Arch thread.
I would like to prepare everything properly before trying to install the new u-boot. Please check below if should I change something:
[rtorrent@alarm ~]$ cat /etc/fw_env.config 
/dev/mtd0 0xc0000 0x20000 0x20000
[rtorrent@alarm ~]$ cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "uboot"
mtd1: 00080000 00020000 "uboot_env"
mtd2: 00080000 00020000 "key_store"
mtd3: 00080000 00020000 "info"
mtd4: 00a00000 00020000 "etc"
mtd5: 00a00000 00020000 "kernel_1"
mtd6: 02fc0000 00020000 "rootfs1"
mtd7: 00a00000 00020000 "kernel_2"
mtd8: 02fc0000 00020000 "rootfs2"

[root@alarm rtorrent]# fw_printenv ethaddr
Warning: Bad CRC, using default environment
ethaddr=00:00:11:22:33:44
(this MAC address above seems incorrect)

[root@alarm rtorrent]# nanddump --noecc --omitoob -l 0x80000 -f mtd0 /dev/mtd0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00080000...
This is to backup the current uboot? Where's a file to copy it somewhere?

[root@alarm rtorrent]# fw_printenv
Warning: Bad CRC, using default environment
bootcmd=run distro_bootcmd
bootdelay=2
baudrate=115200
arch=sandbox
cpu=sandbox
board=sandbox
board_name=sandbox
stdin=serial,cros-ec-keyb,usbkbd
stdout=serial,vidconsole
stderr=serial,vidconsole
ethaddr=00:00:11:22:33:44
eth1addr=00:00:11:22:33:45
eth3addr=00:00:11:22:33:46
eth5addr=00:00:11:22:33:47
ipaddr=1.2.3.4
host_boot=if host dev ${devnum}; then setenv devtype host; run scan_dev_for_boot_part; fi
boot_net_pci_enum=pci enum
boot_net_usb_start=usb start
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi
sata_boot=if sata dev ${devnum}; then setenv devtype sata; run scan_dev_for_boot_part; fi
scsi_init=if ${scsi_need_init}; then setenv scsi_need_init false; scsi scan; fi
scsi_boot=run scsi_init; if scsi dev ${devnum}; then setenv devtype scsi; run scan_dev_for_boot_part; fi
ide_boot=if ide dev ${devnum}; then setenv devtype ide; run scan_dev_for_boot_part; fi
boot_prefixes=/ /boot/
boot_scripts=boot.scr.uimg boot.scr
boot_script_dhcp=boot.scr.uimg
boot_targets=host1 host0 
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
bootcmd_host1=setenv devnum 1; run host_boot
bootcmd_host0=setenv devnum 0; run host_boot
distro_bootcmd=setenv scsi_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
bootm_size=0x10000000
kernel_addr_r=0x1000000
fdt_addr_r=0xc00000
ramdisk_addr_r=0x2000000
scriptaddr=0x1000
pxefile_addr_r=0x2000
Bad CRC - this is disturbing...

[rtorrent@alarm ~]$ dmesg | grep -i 'bad'
[    1.110614] Scanning device for bad blocks
[    1.181542] Bad eraseblock 631 at 0x000004ee0000

Now I have some mess in the kernel environment:
[rtorrent@alarm ~]$ yaourt -Ss kirkwood
core/linux-kirkwood 4.4.97-1 [installed]
    The Linux Kernel and modules - Marvell Kirkwood
core/linux-kirkwood-dt 4.16.6-1
    The Linux Kernel and modules - Marvell Kirkwood DT
core/linux-kirkwood-dt-headers 4.16.6-1 [installed]
    Header files and scripts for building modules for linux kernel - Marvell Kirkwood DT
core/linux-kirkwood-headers 4.4.97-1
    Header files and scripts for building modules for linux kernel - Marvell Kirkwood
I put modified uImage (with the correct dts timing) instead of my old kernel.
Now I have:
[rtorrent@alarm ~]$ uname -r
4.16.7-1-ARCH
Which is newer than this from the repo. Should I maybe downgrade this to the current dt-kernel from repo? But then probably I'll get a lot of Bad eraseblock errors..

[EDIT]
I changed the fw_env.config file for this
/dev/mtd1 0x0 0x20000 0x20000
and now can see printenv without the CRC error:
[rtorrent@alarm ~]$ sudo fw_printenv 
[sudo] password for rtorrent: 
bootdelay=2
baudrate=115200
loads_echo=0
eth1addr=00:19:CB:00:51:82
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
nandEcc=1bit
MODEL_ID=A203
PRODUCT_NAME=NSA-310
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=ZyXEL Communications Corp.
run_diag=yes
console=100000
=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
CASset=min
ethprime=egiga1
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
eth1mtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
arcNumber=4402
bootargs_linux=console=ttyS0,115200 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/sda2 rw rootwait loglevel=8
bootcmd_linux=setenv=bootargs $(bootargs_linux); ide reset; ext2load ide 0:1 $(loadaddr) /uImage; bootm $(loadaddr)
MALLOC_len=3
bootcmd=run bootcmd_linux
bootargs=console=ttyS0,115200=mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/sda2 rw rootwait loglevel=8
stdin=serial
stdout=serial
stderr=serial
nandEnvBase=100000
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
disaMvPnp=no
hddPowerCtrl=no
enaAutoRecovery=yes
kernel_addr=0xc80000
pcieTune=no
ethact=egiga1
ethaddr=CC:5D:4E:C9:F5:4A
And the uboot is also in arch repos
[rtorrent@alarm ~]$ pacman -Qi uboot-nsa310
Name            : uboot-nsa310
Version         : 2016.09-1
Description     : U-Boot for the Zyxel NSA310
Architecture    : arm
URL             : https://github.com/archlinuxarm/u-boot
Licenses        : GPL
Groups          : None
Provides        : None
Depends On      : uboot-tools  mtd-utils
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 648.00 KiB
Packager        : Arch Linux ARM Build System <builder+xu7@archlinuxarm.org>
Build Date      : Tue Oct 11 07:17:41 2016
Install Date    : Thu Apr 26 22:40:03 2018
Install Reason  : Explicitly installed
Install Script  : Yes
Validated By    : SHA-256 Sum
bootcmd=run startboot;run bootubi
bootdir=/boot
bootfilem=uImage
bootfilez=zImage
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs  rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
console=ttyS0,115200
ethact=egiga0
fdtaddr=0x800000
fdtdir=/boot/dtbs
fdtfile=kirkwood-nsa310.dtb
ipaddr=10.10.10.3
loadaddr=0x810000
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
ncip=10.10.10.5
ncipk=10.10.10.4
netconsole=on
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then  setenv stdin nc; setenv stdout nc;  setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
rdaddr=0x1100000
rdfile=initramfs-linux.img
startboot=usb start; ide reset; for devtype in usb ide; do  setenv devnum 0; while ${devtype} dev ${devnum}; do  echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then  load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then  echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi;  run mainargs; if run loadfdt; then  if run loadrd; then  bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else  bootz ${loadaddr} - ${fdtaddr}; fi; else  if run loadrd; then echo Booting uImage with initrd;  bootm ${loadaddr} ${rdaddr}:${filesize}; else  bootm ${loadaddr}; fi; fi; else  echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;
https://archlinuxarm.org/packages/arm/uboot-nsa310/files/uboot-nsa310.txt
It would be easier just to install it from there. Probably there are pros and cons of this idea..

Has the newer u-boot an influence for recognizing big drives on GPT not mbr? I have one 4tb WD drive where only less than 2tb is the visible size on stock 1.1.4 uboot...



Edited 4 time(s). Last edit at 05/07/2018 03:01PM by arti74.
arti74,

> [rtorrent@alarm ~]$ cat /etc/fw_env.config
> /dev/mtd0 0xc0000 0x20000 0x20000

The above works only after you installed new u-boot.

> cat /proc/mtd
> dev: size erasesize name
> mtd0: 00100000 00020000 "uboot"
> mtd1: 00080000 00020000 "uboot_env"
> mtd2: 00080000 00020000 "key_store"
> mtd3: 00080000 00020000 "info"
> mtd4: 00a00000 00020000 "etc"
> mtd5: 00a00000 00020000 "kernel_1"
> mtd6: 02fc0000 00020000 "rootfs1"
> mtd7: 00a00000 00020000 "kernel_2"
> mtd8: 02fc0000 00020000 "rootfs2"

The above looks good.

> [root@alarm rtorrent]# nanddump --noecc --omitoob
> -l 0x80000 -f mtd0 /dev/mtd0
> Block size 131072, page size 2048, OOB size 64
> Dumping data starting at 0x00000000 and ending at
> 0x00080000...
> This is to backup the current uboot? Where's a
> file to copy it somewhere?

The nanddump was saved in the file name "mtd" in the current directory. You could use a more descriptive name for it: mtd0.nsa310.

nanddump --noecc --omitoob -l 0x80000 -f mtd0.nsa310 /dev/mtd0

> I changed the fw_env.config file for this
> /dev/mtd1 0x0 0x20000 0x20000
> and now can see printenv without the CRC error

Cool. That's how stock OS see the u-boot env mtd.

> And the uboot is also in arch repos
> [rtorrent@alarm ~]$ pacman -Qi uboot-nsa310
> Name : uboot-nsa310
> Version : 2016.09-1
> Description : U-Boot for the Zyxel NSA310
> Architecture : arm

> It would be easier just to install it from there.
> Probably there are pros and cons of this idea..

Definitely. Since you are going to run Arch, you should install it from Arch repo. That will make it easier to get help there when you have problem. You can install my released u-boot later if you need something specific that only available from my released version. I expect it is very close to Arch repo version in capabilities.

> Has the newer u-boot an influence for recognizing
> big drives on GPT not mbr? I have one 4tb WD drive
> where only less than 2tb is the visible size on
> stock 1.1.4 uboot...

Yes, I do recall Arch u-boot 2016.x or later support large drive, just like mine. So there is no need to do hybrid. Just format the whole drive as one GPT partition.

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



Edited 1 time(s). Last edit at 05/07/2018 05:25PM by bodhi.
Thank you for all your clarifications!
OK, I tried to install new u-boot from arch repos and got this:
Warning: Bad CRC, using default environment
flash_erase: error!: /dev/mtd0
             error 13 (Permission denied)
flash_erase: error!: /dev/mtd0
             error 13 (Permission denied)
nandwrite: error!: /dev/mtd0
           error 13 (Permission denied)
nandwrite: error!: /dev/mtd0
           error 13 (Permission denied)
Warning: Bad CRC, using default environment
Can't open /dev/mtd0: Permission denied
Error: can't write fw_env to flash
error: command failed to execute correctly
Is it because the /etc/fw_env.config changed spontaneously for this?
/dev/mtd0 0xc0000 0x20000 0x20000
What now I can do?

Couple minutes earlier I reinstalled linux-kirkwood-dt 4.16.7-1 - via official way (pacman) - and haven't rebooted then. Maybe should I do it now and try again?



Edited 2 time(s). Last edit at 05/08/2018 10:56AM by arti74.
arti74,

I'm not familiar with what Arch repo u-boot installation does, so no idea why that would happen. Perhaps the Arch guys know?

But if you'd like me to determine why, then do this.

With serial console, power up, let it boot into Arch. and then
cat /proc/mtd
cat /etc/fw_env.config

Please post the entire serial log (from u-boot banner until the last cat command above).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Thank you for quick answer. This is the whole log:
         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__| 
 ** MARVELL BOARD: RD-88F6281A LE 

U-Boot 1.1.4 (Jun  8 2011 - 18:48:37) Marvell version: 3.4.19

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFEE0

Soc: 88F6281 A1 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB 
DRAM Total size 256MB  16bit width
Addresses 10M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (10M - 7M): Done
NAND:128 MB
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)
Kernel address is 0xc80000.

Streaming disabled 
Write allocate disabled

Module 0 is RGMII
Module 1 is TDM

USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
Net:   egiga0, egiga1 [PRIME]
Hit any key to stop autoboot:  0 
Unknown command 'setenv=bootargs' - try 'help'

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode (6)
  Device 0 @ 0 0:
Model: SAMSUNG HD753LJ                          Firm: 1AA01110 Ser#: S13UJ1DQ400383      
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512)


5155808 bytes read
## Booting image at 02000000 ...
   Image Name:   Linux 4.16.7-1 with nsa310 dt
   Created:      2018-05-06  17:04:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5155744 Bytes =  4.9 MB
   Load Address: 00810000
   Entry Point:  00810000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.16.7-1-ARCH (builduser@leming) (gcc version 7.3.1 20180406 (GCC)) #1 PREEMPT Thu May 3 00:35:40 UTC 2018
[    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: ZyXEL NSA310
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 65536
[    0.000000]   Normal zone: 576 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65536 pages, LIFO batch:15
[    0.000000] random: get_random_bytes called from start_kernel+0x80/0x424 with crng_init=0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
[    0.000000] Kernel command line: console=ttyS0,115200=mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/sda2 rw rootwait loglevel=8
[    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: 248444K/262144K available (7543K kernel code, 599K rwdata, 1692K rodata, 356K init, 681K bss, 13700K 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 : 0x(ptrval) - 0x(ptrval)   (7544 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   ( 356 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 600 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 682 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000007] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000038] Switching to timer-based delay loop, resolution 5ns
[    0.000238] Console: colour dummy device 80x30
[    0.000269] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000289] pid_max: default: 32768 minimum: 301
[    0.000634] Security Framework initialized
[    0.000800] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000820] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001739] CPU: Testing write buffer coherency: ok
[    0.002708] Setting up static identity map for 0x8200 - 0x8258
[    0.002961] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.003174] Hierarchical SRCU implementation.
[    0.004353] devtmpfs: initialized
[    0.009067] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.009091] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.009443] pinctrl core: initialized pinctrl subsystem
[    0.010654] NET: Registered protocol family 16
[    0.011091] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.012443] cpuidle: using governor ladder
[    0.012505] cpuidle: using governor menu
[    0.012951] Feroceon L2: Enabling L2
[    0.012994] Feroceon L2: Cache support initialised.
[    0.017888] No ATAGs?
[    0.027371] vgaarb: loaded
[    0.027669] SCSI subsystem initialized
[    0.027880] libata version 3.00 loaded.
[    0.028092] usbcore: registered new interface driver usbfs
[    0.028149] usbcore: registered new interface driver hub
[    0.028233] usbcore: registered new device driver usb
[    0.028337] pps_core: LinuxPPS API ver. 1 registered
[    0.028346] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.028375] PTP clock support registered
[    0.029308] clocksource: Switched to clocksource orion_clocksource
[    0.094296] VFS: Disk quotas dquot_6.6.0
[    0.094391] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.094601] FS-Cache: Loaded
[    0.104042] NET: Registered protocol family 2
[    0.104775] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.104812] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.104845] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.104875] TCP: Hash tables configured (established 2048 bind 2048)
[    0.104972] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.104995] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.105231] NET: Registered protocol family 1
[    0.105724] RPC: Registered named UNIX socket transport module.
[    0.105736] RPC: Registered udp transport module.
[    0.105743] RPC: Registered tcp transport module.
[    0.105749] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.105761] PCI: CLS 0 bytes, default 32
[    0.107716] Initialise system trusted keyrings
[    0.107925] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    0.117457] FS-Cache: Netfs 'nfs' registered for caching
[    0.118124] NFS: Registering the id_resolver key type
[    0.118162] Key type id_resolver registered
[    0.118170] Key type id_legacy registered
[    0.118212] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.118817] fuse init (API version 7.26)
[    0.125863] Key type asymmetric registered
[    0.125877] Asymmetric key parser 'x509' registered
[    0.125956] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.125969] io scheduler noop registered
[    0.125977] io scheduler deadline registered
[    0.126323] io scheduler cfq registered (default)
[    0.126335] io scheduler mq-deadline registered
[    0.126343] io scheduler kyber registered
[    0.126637] io scheduler bfq registered
[    0.128167] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.130228] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    0.130247] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.130258] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    0.130271] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.130305] pci 0000:00:01.0: [11ab:6281] type 01 class 0x060400
[    0.130550] PCI: bus0: Fast back to back transfers disabled
[    0.130567] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.130720] pci 0000:01:00.0: [10ec:8168] type 00 class 0x020000
[    0.130762] pci 0000:01:00.0: reg 0x10: [io  0xf0000000-0xf00000ff]
[    0.130793] pci 0000:01:00.0: reg 0x18: [mem 0x40000000-0x40000fff 64bit pref]
[    0.130816] pci 0000:01:00.0: reg 0x20: [mem 0x40004000-0x40007fff 64bit pref]
[    0.130834] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    0.130926] pci 0000:01:00.0: supports D1 D2
[    0.130938] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    0.131132] PCI: bus1: Fast back to back transfers disabled
[    0.131148] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.131186] pci 0000:00:01.0: BAR 8: assigned [mem 0xe0000000-0xe00fffff]
[    0.131201] pci 0000:00:01.0: BAR 7: assigned [io  0x10000-0x10fff]
[    0.131218] pci 0000:01:00.0: BAR 6: assigned [mem 0xe0000000-0xe000ffff pref]
[    0.131233] pci 0000:01:00.0: BAR 4: assigned [mem 0xe0010000-0xe0013fff 64bit pref]
[    0.131254] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0014000-0xe0014fff 64bit pref]
[    0.131273] pci 0000:01:00.0: BAR 0: assigned [io  0x10000-0x100ff]
[    0.131288] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.131298] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    0.131312] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    0.131774] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.190449] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    0.190681] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.250441] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    0.254520] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.255703] console [ttyS0] disabled
[    0.255765] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    1.034953] console [ttyS0] enabled
[    1.049124] brd: module loaded
[    1.059677] loop: module loaded
[    1.063142] sata_mv f1080000.sata: version 1.28
[    1.067956] sata_mv f1080000.sata: slots 32 ports 2
[    1.075605] scsi host0: sata_mv
[    1.079299] scsi host1: sata_mv
[    1.082701] ata1: SATA max UDMA/133 irq 32
[    1.086819] ata2: SATA max UDMA/133 irq 32
[    1.091614] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    1.097996] nand: Samsung NAND 128MiB 3,3V 8-bit
[    1.102909] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.110565] Scanning device for bad blocks
[    1.181497] Bad eraseblock 631 at 0x000004ee0000
[    1.227674] 9 ofpart partitions found on MTD device orion_nand
[    1.233551] Creating 9 MTD partitions on "orion_nand":
[    1.238717] 0x000000000000-0x000000100000 : "uboot"
[    1.244020] 0x000000100000-0x000000180000 : "uboot_env"
[    1.249631] 0x000000180000-0x000000200000 : "key_store"
[    1.255209] 0x000000200000-0x000000280000 : "info"
[    1.260367] 0x000000280000-0x000000c80000 : "etc"
[    1.265453] 0x000000c80000-0x000001680000 : "kernel_1"
[    1.271022] 0x000001680000-0x000004640000 : "rootfs1"
[    1.276683] 0x000004640000-0x000005040000 : "kernel_2"
[    1.282246] 0x000005040000-0x000008000000 : "rootfs2"
[    1.288364] libphy: Fixed MDIO Bus: probed
[    1.293233] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    1.298870] pci 0000:00:01.0: enabling device (0140 -> 0143)
[    1.305275] r8169 0000:01:00.0 eth0: RTL8168d/8111d at 0x(ptrval), 00:00:00:00:00:30, XID 083000c0 IRQ 35
[    1.314930] r8169 0000:01:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[    1.323637] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.330241] ehci-pci: EHCI PCI platform driver
[    1.334752] ehci-orion: EHCI orion driver
[    1.338990] orion-ehci f1050000.ehci: EHCI Host Controller
[    1.344575] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    1.352463] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    1.379333] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    1.386146] hub 1-0:1.0: USB hub found
[    1.390012] hub 1-0:1.0: 1 port detected
[    1.394573] usbcore: registered new interface driver uas
[    1.400073] usbcore: registered new interface driver usb-storage
[    1.406173] usbcore: registered new interface driver ums-alauda
[    1.412209] usbcore: registered new interface driver ums-cypress
[    1.418296] usbcore: registered new interface driver ums-datafab
[    1.424407] usbcore: registered new interface driver ums_eneub6250
[    1.430686] usbcore: registered new interface driver ums-freecom
[    1.436775] usbcore: registered new interface driver ums-isd200
[    1.442848] usbcore: registered new interface driver ums-jumpshot
[    1.448999] usbcore: registered new interface driver ums-karma
[    1.454910] usbcore: registered new interface driver ums-onetouch
[    1.461097] usbcore: registered new interface driver ums-realtek
[    1.467164] usbcore: registered new interface driver ums-sddr09
[    1.473162] usbcore: registered new interface driver ums-sddr55
[    1.479142] usbcore: registered new interface driver ums-usbat
[    1.485326] mousedev: PS/2 mouse device common for all mice
[    1.491378] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    1.498368] i2c /dev entries driver
[    1.502898] orion_wdt: Initial timeout 21 sec
[    1.508114] sdhci: Secure Digital Host Controller Interface driver
[    1.514393] sdhci: Copyright(c) Pierre Ossman
[    1.518859] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.526142] ledtrig-cpu: registered to indicate activity on CPUs
[    1.532295] usbcore: registered new interface driver r8712u
[    1.538120] gre: GRE over IPv4 demultiplexor driver
[    1.543096] NET: Registered protocol family 17
[    1.547644] Key type dns_resolver registered
[    1.552755] registered taskstats version 1
[    1.556868] Loading compiled-in X.509 certificates
[    1.563105] Key type encrypted registered
[    1.568952] console [netcon0] enabled
[    1.572730] netconsole: network logging started
[    1.578029] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[    1.585143] rtc-mv f1010300.rtc: setting system clock to 2018-05-08 19:44:14 UTC (1525808654)
[    1.609364] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    1.639691] ata1.00: ATA-7: SAMSUNG HD753LJ, 1AA01110, max UDMA7
[    1.645752] ata1.00: 1465149168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    1.679701] ata1.00: configured for UDMA/133
[    1.694844] scsi 0:0:0:0: Direct-Access     ATA      SAMSUNG HD753LJ  1110 PQ: 0 ANSI: 5
[    1.704052] sd 0:0:0:0: [sda] 1465149168 512-byte logical blocks: (750 GB/699 GiB)
[    1.712002] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    1.717576] sd 0:0:0:0: [sda] Write Protect is off
[    1.722632] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    1.727856] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    1.745174]  sda: sda1 sda2
[    1.749478] sd 0:0:0:0: [sda] Attached SCSI disk
[    1.759353] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    1.962607] hub 1-1:1.0: USB hub found
[    1.966891] hub 1-1:1.0: 4 ports detected
[    2.052971] ata2: SATA link down (SStatus 0 SControl F300)
[    2.072450] EXT4-fs (sda2): couldn't mount as ext3 due to feature incompatibilities
[    2.080722] random: fast init done
[    2.085116] EXT4-fs (sda2): couldn't mount as ext2 due to feature incompatibilities
[    2.373688] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[    2.381538] VFS: Mounted root (ext4 filesystem) on device 8:2.
[    2.410303] devtmpfs: mounted
[    2.414733] Freeing unused kernel memory: 356K
[    2.419212] This architecture does not have kernel memory protection.
[    3.256552] NET: Registered protocol family 10
[    3.322113] Segment Routing with IPv6
[    3.416645] systemd[1]: systemd 238 running in system mode. (+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN +PCRE2 default-hierarchy=hybrid)
[    3.438738] systemd[1]: Detected architecture arm.

Welcome to Arch Linux ARM!

[    3.507198] systemd[1]: Set hostname to <alarm>.
[    4.722607] systemd[1]: Configuration file /etc/systemd/system/led.service is marked executable. Please remove executable permission bits. Proceeding anyway.
[    4.750702] systemd[1]: /etc/systemd/system/led.service:10: Ignoring unknown escape sequences: "/usr/bin/echo default-on > /sys/class/leds/nsa310\:green\:System/trigger"
[    4.766058] systemd[1]: /etc/systemd/system/led.service:11: Ignoring unknown escape sequences: "/usr/bin/echo ide-disk1 > /sys/class/leds/nsa310\:green\:SATA1/trigger"
[    4.781234] systemd[1]: /etc/systemd/system/led.service:12: Ignoring unknown escape sequences: "/usr/bin/echo none > /sys/class/leds/nsa310\:green\:System/trigger"
[    4.796035] systemd[1]: /etc/systemd/system/led.service:13: Ignoring unknown escape sequences: "/usr/bin/echo none > /sys/class/leds/nsa310\:green\:System/trigger"
[    4.871377] random: systemd: uninitialized urandom read (16 bytes read)
[    4.881222] systemd[1]: Created slice User and Session Slice.
[  OK  ] Created slice User and Session Slice.
[    4.919732] random: systemd: uninitialized urandom read (16 bytes read)
[    4.926553] systemd[1]: Reached target Local File Systems.
[  OK  ] Reached target Local File Systems.
[    4.959581] random: systemd: uninitialized urandom read (16 bytes read)
[  OK  ] Created slice system-getty.slice.
[  OK  ] Listening on Journal Socket.
         Starting Rebuild Dynamic Linker Cache...
         Starting LED control service...
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Listening on LVM2 metadata daemon socket.
         Activating swap /swapfile...
         Starting Load/Save Random Seed...
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on Network Service Netlink Socket.
         Starting Rebuild Journal Catalog...
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Process Core Dump Socket.
[  OK  ] Set up automount Arbitrary Executab…rmats File System Automount Point.
         Mounting FUSE Control File System...
         Starting Create list of required st…ce nodes for the current kernel...
         Starting Journal Service...
         Mounting POSIX Message Queue File System...
[  OK  ] Reached target Remote File Systems.
         Starting Apply Kernel Variables...
[  OK  ] Listening on Device-mapper event daemon FIFOs.
         Starting Monitoring of LVM2 mirrors…ng dmeventd or progress polling...
[  OK  ] Reached target Slices.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Listening on LVM2 poll daemon socket.
         Mounting Kernel Debug File System...
[  OK  ] Listening on udev Control Socket.
         Starting udev Coldplug all Devices...
         Starting Create System Users...
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Reached target Local Encrypted Volumes.
[  OK  ] Reached target Paths.
[FAILED] Failed to start LED control service.
[    6.298624] Adding 1048572k swap on /swapfile.  Priority:-2 extents:2 across:1179644k 
See 'systemctl status led.service' for details.
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started Rebuild Journal Catalog.
[  OK  ] Activated swap /swapfile.
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Started Create list of required sta…vice nodes for the current kernel.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started Rebuild Dynamic Linker Cache.
[  OK  ] Mounted Kernel Debug File System.
[  OK  ] Started Journal Service.
[  OK  ] Started Create System Users.
[  OK  ] Started LVM2 metadata daemon.
         Starting Flush Journal to Persistent Storage...
         Starting Create Static Device Nodes in /dev...
[  OK  ] Reached target Swap.
         Starting Update is Completed...
[    7.029072] systemd-journald[112]: Received request to flush runtime journal from PID 1
[  OK  ] Started Update is Completed.
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Started Create Static Device Nodes in /dev.
         Starting udev Kernel Device Manager...
[  OK  ] Started udev Kernel Device Manager.
         Starting Network Service...
[  OK  ] Started Network Service.
[  OK  ] Started Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Found device /dev/ttyS0.
[   10.009642] marvell-cesa f1030000.crypto: CESA device successfully registered
[   10.017056] r8169 0000:01:00.0 enp1s0: renamed from eth0
[   10.452621] random: crng init done
[   10.456043] random: 7 urandom warning(s) missed due to ratelimiting
[  OK  ] Started Create Volatile Files and Directories.
[   10.969451] r8169 0000:01:00.0 enp1s0: link down
[   10.974113] r8169 0000:01:00.0 enp1s0: link down
[   10.978893] IPv6: ADDRCONF(NETDEV_UP): enp1s0: link is not ready
[  OK  ] Started Monitoring of LVM2 mirrors,…sing dmeventd or progress polling.
         Starting Network Name Resolution...
         Starting Network Time Synchronization...
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started Network Name Resolution.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily verification of password and group files.
[  OK  ] Started Daily rotation of log files.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Started Daily man-db cache update.
[  OK  ] Reached target Timers.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting Login Service...
         Starting Initialize hardware monitoring sensors...
[  OK  ] Started Entropy Harvesting Daemon.
[   12.697901] r8169 0000:01:00.0 enp1s0: link up
[   12.702545] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0: link becomes ready
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Reached target Network.
         Starting rTorrent...
         Starting The PHP 5.6 FastCGI Process Manager...
[  OK  ] Started OpenSSH Daemon.
         Starting Samba SMB Daemon...
         Starting Permit User Sessions...
[  OK  ] Reached target Host and Network Name Lookups.
         Starting A high performance web server and a reverse proxy server...
[  OK  ] Started Login Service.
[  OK  ] Started Permit User Sessions.
[FAILED] Failed to start Initialize hardware monitoring sensors.
See 'systemctl status lm_sensors.service' for details.
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Started Getty on tty1.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started rTorrent.
[  OK  ] Started A high performance web server and a reverse proxy server.
[  OK  ] Started The PHP 5.6 FastCGI Process Manager.
[  OK  ] Started Samba SMB Daemon.
[  OK  ] Reached target Multi-User System.

Arch Linux 4.16.7-1-ARCH (ttyS0)

alarm login: rtorrent
Password: 
Last login: Tue May  8 21:43:06 from 192.168.1.5
[rtorrent@alarm ~]$ cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "uboot"
mtd1: 00080000 00020000 "uboot_env"
mtd2: 00080000 00020000 "key_store"
mtd3: 00080000 00020000 "info"
mtd4: 00a00000 00020000 "etc"
mtd5: 00a00000 00020000 "kernel_1"
mtd6: 02fc0000 00020000 "rootfs1"
mtd7: 00a00000 00020000 "kernel_2"
mtd8: 02fc0000 00020000 "rootfs2"
[rtorrent@alarm ~]$ cat /etc/fw_env.config
# /dev/mtd0 0xc0000 0x20000 0x20000
/dev/mtd1 0x0 0x20000 0x20000 
[rtorrent@alarm ~]$
Before reboot I first changed /etc/fw_env.config for the proper one,
/dev/mtd1 0x0 0x20000 0x20000
but it seems that the uboot installation is changing it... My another attempt to update boot and then the view for envconfig:
warning: uboot-nsa310-2016.09-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) uboot-nsa310-2016.09-1

Total Installed Size:  0.63 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Processing package changes...
(1/1) reinstalling uboot-nsa310                    [######################] 100%
A new U-Boot version needs to be flashed to NAND.
Do you want to do this now? [y|N]
y
Warning: Bad CRC, using default environment
flash_erase: error!: /dev/mtd0
             error 13 (Permission denied)
flash_erase: error!: /dev/mtd0
             error 13 (Permission denied)
nandwrite: error!: /dev/mtd0
           error 13 (Permission denied)
nandwrite: error!: /dev/mtd0
           error 13 (Permission denied)
Warning: Bad CRC, using default environment
Can't open /dev/mtd0: Permission denied
Error: can't write fw_env to flash
error: command failed to execute correctly
[rtorrent@alarm ~]$ cat /etc/fw_env.config
/dev/mtd0 0xc0000 0x20000 0x20000
[rtorrent@alarm ~]$
The install claims "reinstalling" but it is just saved to the system, not flashed on the nand yet.

EDIT:
I forgot to show the cat /proc/mtd
[rtorrent@alarm ~]$ cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "uboot"
mtd1: 00080000 00020000 "uboot_env"
mtd2: 00080000 00020000 "key_store"
mtd3: 00080000 00020000 "info"
mtd4: 00a00000 00020000 "etc"
mtd5: 00a00000 00020000 "kernel_1"
mtd6: 02fc0000 00020000 "rootfs1"
mtd7: 00a00000 00020000 "kernel_2"
mtd8: 02fc0000 00020000 "rootfs2"

EDIT:
Check the uboot installation script from Archlinux.

And now I see that the mt0 is not writable..
[rtorrent@alarm ~]$ mtdinfo /dev/mtd0
mtd0
Name:                           uboot
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          8 (1048576 bytes, 1024.0 KiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  512 bytes
OOB size:                       64 bytes
Character device major/minor:   90:0
Bad blocks are allowed:         true
Device is writable:             false
On the other hand the mtd1 is...
[rtorrent@alarm ~]$ mtdinfo /dev/mtd1
mtd1
Name:                           uboot_env
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          4 (524288 bytes, 512.0 KiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  512 bytes
OOB size:                       64 bytes
Character device major/minor:   90:2
Bad blocks are allowed:         true
Device is writable:             true



Edited 6 time(s). Last edit at 05/08/2018 03:59PM by arti74.
arti74,


> And now I see that the mt0 is not writable..
>
> [rtorrent@alarm ~]$ mtdinfo /dev/mtd0
> mtd0
> Name:                           uboot
> Type:                           nand
> Eraseblock size:                131072 bytes,
> 128.0 KiB
> Amount of eraseblocks:          8 (1048576 bytes,
> 1024.0 KiB)
> Minimum input/output unit size: 2048 bytes
> Sub-page size:                  512 bytes
> OOB size:                       64 bytes
> Character device major/minor:   90:0
> Bad blocks are allowed:         true
> Device is writable:             false
>

I think the only possibility is that the DTS for this box has mtd0 defined as read-only. Your bootargs specified that mtd0 is writable.

[    0.000000] Kernel command line: console=ttyS0,115200=mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/sda2 rw rootwait loglevel=8

But booting with stock u-boot, the DTB was embedded inside uImage. So I think the DTS definition for mtd0 as read-only was used by the kernel. The DTS source from mainline must have been used by Arch to compile this DTB.

So you should modify and recompile the DTS to remove the read-only attribute, recreate the kernel uImage file with the new DTB, and then reboot.

/usr/src/linux-4.16.1-tld/arch/arm/boot/dts/kirkwood-nsa3x0-common.dtsi
	};
};

&nand {
	status = "okay";
	chip-delay = <35>;

	partition@0 {
		label = "uboot";
		reg = <0x0000000 0x0100000>;
		read-only;
	};
	partition@100000 {
		label = "uboot_env";
		reg = <0x0100000 0x0080000>;
	};
	partition@180000 {
		label = "key_store";
		reg = <0x0180000 0x0080000>;
	};
	partition@200000 {

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Thank you Bodhi, I think it's very useful. Maybe someone from Archlinux users will be able to help me with it.
Problem with mtd0 solved here by removing "=" sign from this line:
115200=mtdparts
Installing the uboot:
A new U-Boot version needs to be flashed to NAND.
Do you want to do this now? [y|N]
y
Warning: Bad CRC, using default environment
Erasing 128 Kibyte @ 60000 -- 100 % complete
Erasing 128 Kibyte @ c0000 -- 100 % complete
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Writing data to block 6 at offset 0xc0000
Unfortunately system won't start..
U-Boot 2016.09.01-1 (Oct 10 2016 - 23:14:18 -0600) Arch Linux ARM
Zyxel NSA310

SoC:   Kirkwood 88F6281_A1
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Error: egiga0 address not set.

PHY reset timed out
MV88E1318 PHY initialized on egiga0
IDE:   Bus 0: OK Bus 1: not available 
  Device 0: Model: SAMSUNG HD753LJ  Firm: 1AA01110 Ser#: S13UJ1DQ400383
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512)
*** ERROR: `ethaddr' not set
ping failed; host 10.10.10.5 is not alive
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available 
  Device 0: Model: SAMSUNG HD753LJ  Firm: 1AA01110 Ser#: S13UJ1DQ400383
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512)

USB device 0: unknown device

Device 0: Model: SAMSUNG HD753LJ  Firm: 1AA01110 Ser#: S13UJ1DQ400383
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512)
... is now current device
ide found on device 0
Checking for: /boot/uEnv.txt ...
** File not found /boot/zImage **
** File not found /boot/uImage **
No kernel found

Device 1: not available
Trying to boot from NAND ...
ubi0: attaching mtd1
ubi0: scanning is finished
UBI init error 22
Error reading superblock on volume 'ubi0:rootfs' errno=-19!
ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
    - mount 'volume-name' volume
NSA310>
How can I fix it? Please advise...

Current printenv:
NSA310> printenv
bootcmd=run startboot;run bootubi
bootdir=/boot
bootfilem=uImage
bootfilez=zImage
bootpart=0:1
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs  rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
console=ttyS0,115200
devnum=1
ethact=egiga0
fdtaddr=0x800000
fdtdir=/boot/dtbs
fdtfile=kirkwood-nsa310.dtb
ipaddr=10.10.10.3
loadaddr=0x810000
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
mtddevname=u-boot
mtddevnum=0
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
ncip=10.10.10.5
ncipk=10.10.10.4
netconsole=on
partition=nand0,0
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then  setenv stdin nc; setenv stdout nc;  setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
rdaddr=0x1100000
rdfile=initramfs-linux.img
startboot=usb start; ide reset; for devtype in usb ide; do  setenv devnum 0; while ${devtype} dev ${devnum}; do  echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then  load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then  echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi;  run mainargs; if run loadfdt; then  if run loadrd; then  bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else  bootz ${loadaddr} - ${fdtaddr}; fi; else  if run loadrd; then echo Booting uImage with initrd;  bootm ${loadaddr} ${rdaddr}:${filesize}; else  bootm ${loadaddr}; fi; fi; else  echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;

Environment size: 2842/131068 bytes
The uEnv.txt file:
root=PARTUUID=ab197877-02
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}; fdt addr ${fdtaddr}; fdt set /mbus@f1000000/nand@12f chip-delay <35>
ethaddr=CC:5D:4E:XX:XX:XX

EDIT:
This helped reach some limited console
NSA310> setenv bootdir
NSA310> run startboot
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available 
  Device 0: Model: SAMSUNG HD753LJ  Firm: 1AA01110 Ser#: S13UJ1DQ400383
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512)

USB device 0: unknown device

Device 0: Model: SAMSUNG HD753LJ  Firm: 1AA01110 Ser#: S13UJ1DQ400383
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512)
... is now current device
ide found on device 0
Checking for: /uEnv.txt ...
** File not found /zImage **
5155808 bytes read in 1868 ms (2.6 MiB/s)
loading /boot/dtbs/kirkwood-nsa310.dtb ...
** File not found /boot/dtbs/kirkwood-nsa310.dtb **
5530551 bytes read in 1972 ms (2.7 MiB/s)
Booting uImage with initrd
## Booting kernel from Legacy Image at 00810000 ...
   Image Name:   Linux 4.16.7-1 with nsa310 dt
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5155744 Bytes = 4.9 MiB
   Load Address: 00810000
   Entry Point:  00810000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.16.7-1-ARCH (builduser@leming) (gcc version 7.3.1 20180406 (GCC)) #1 PREEMPT Thu May 3 00:35:40 UTC 2018
[    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: ZyXEL NSA310
[    0.000000] Memory policy: Data cache writeback
[    0.000000] random: get_random_bytes called from start_kernel+0x80/0x424 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
[    0.000000] Kernel command line: console=ttyS0,115200 mtdparts=orion_nand:1M(u-boot),-(rootfs) root=PARTUUID=ab197877-01 rw rootwait
[    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: 243040K/262144K available (7543K kernel code, 599K rwdata, 1692K rodata, 356K init, 681K bss, 19104K 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 : 0x(ptrval) - 0x(ptrval)   (7544 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   ( 356 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 600 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 682 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]    Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 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.000039] Switching to timer-based delay loop, resolution 5ns
[    0.000255] Console: colour dummy device 80x30
[    0.000289] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000311] pid_max: default: 32768 minimum: 301
[    0.000662] Security Framework initialized
[    0.000834] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000855] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001820] CPU: Testing write buffer coherency: ok
[    0.002877] Setting up static identity map for 0x8200 - 0x8258
[    0.003150] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.003385] Hierarchical SRCU implementation.
[    0.004638] devtmpfs: initialized
[    0.009509] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.009536] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.009904] pinctrl core: initialized pinctrl subsystem
[    0.011197] NET: Registered protocol family 16
[    0.011647] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.013057] cpuidle: using governor ladder
[    0.013125] cpuidle: using governor menu
[    0.013609] Feroceon L2: Enabling L2
[    0.013655] Feroceon L2: Cache support initialised.
[    0.018599] No ATAGs?
[    0.028128] vgaarb: loaded
[    0.028438] SCSI subsystem initialized
[    0.028859] usbcore: registered new interface driver usbfs
[    0.028914] usbcore: registered new interface driver hub
[    0.028999] usbcore: registered new device driver usb
[    0.029105] pps_core: LinuxPPS API ver. 1 registered
[    0.029114] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.029143] PTP clock support registered
[    0.030159] clocksource: Switched to clocksource orion_clocksource
[    0.095086] VFS: Disk quotas dquot_6.6.0
[    0.095182] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.095394] FS-Cache: Loaded
[    0.104866] NET: Registered protocol family 2
[    0.105614] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.105651] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.105685] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.105715] TCP: Hash tables configured (established 2048 bind 2048)
[    0.105814] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.105837] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.106062] NET: Registered protocol family 1
[    0.106568] RPC: Registered named UNIX socket transport module.
[    0.106580] RPC: Registered udp transport module.
[    0.106587] RPC: Registered tcp transport module.
[    0.106594] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.106837] Trying to unpack rootfs image as initramfs...
[    0.558873] Freeing initrd memory: 5404K
[    0.560825] Initialise system trusted keyrings
[    0.561090] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    0.570789] FS-Cache: Netfs 'nfs' registered for caching
[    0.571457] NFS: Registering the id_resolver key type
[    0.571487] Key type id_resolver registered
[    0.571495] Key type id_legacy registered
[    0.571539] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.572149] fuse init (API version 7.26)
[    0.579110] Key type asymmetric registered
[    0.579125] Asymmetric key parser 'x509' registered
[    0.579217] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.579230] io scheduler noop registered
[    0.579238] io scheduler deadline registered
[    0.579589] io scheduler cfq registered (default)
[    0.579601] io scheduler mq-deadline registered
[    0.579609] io scheduler kyber registered
[    0.579908] io scheduler bfq registered
[    0.581580] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.583471] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    0.583491] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.583503] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    0.583515] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.583794] PCI: bus0: Fast back to back transfers disabled
[    0.583811] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.584343] PCI: bus1: Fast back to back transfers disabled
[    0.584396] pci 0000:00:01.0: BAR 8: assigned [mem 0xe0000000-0xe00fffff]
[    0.584411] pci 0000:00:01.0: BAR 7: assigned [io  0x10000-0x10fff]
[    0.584428] pci 0000:01:00.0: BAR 6: assigned [mem 0xe0000000-0xe000ffff pref]
[    0.584443] pci 0000:01:00.0: BAR 4: assigned [mem 0xe0010000-0xe0013fff 64bit pref]
[    0.584464] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0014000-0xe0014fff 64bit pref]
[    0.584484] pci 0000:01:00.0: BAR 0: assigned [io  0x10000-0x100ff]
[    0.584498] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.584509] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    0.584523] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    0.584999] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.641336] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    0.641570] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.701314] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    0.705426] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.706632] console [ttyS0] disabled
[    0.706699] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    1.391710] console [ttyS0] enabled
[    1.406030] brd: module loaded
[    1.416491] loop: module loaded
[    1.420346] sata_mv f1080000.sata: slots 32 ports 2
[    1.427907] scsi host0: sata_mv
[    1.431688] scsi host1: sata_mv
[    1.435042] ata1: SATA max UDMA/133 irq 32
[    1.439163] ata2: SATA max UDMA/133 irq 32
[    1.443980] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    1.450641] nand: Samsung NAND 128MiB 3,3V 8-bit
[    1.455316] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.462949] Scanning device for bad blocks
[    1.534127] Bad eraseblock 631 at 0x000004ee0000
[    1.580405] 2 cmdlinepart partitions found on MTD device orion_nand
[    1.586702] Creating 2 MTD partitions on "orion_nand":
[    1.591892] 0x000000000000-0x000000100000 : "u-boot"
[    1.597260] 0x000000100000-0x000008000000 : "rootfs"
[    1.603768] libphy: Fixed MDIO Bus: probed
[    1.608596] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    1.614271] pci 0000:00:01.0: enabling device (0140 -> 0143)
[    1.619974] r8169 0000:01:00.0: enabling device (0140 -> 0143)
[    1.626527] r8169 0000:01:00.0 eth0: RTL8168d/8111d at 0x(ptrval), 00:00:00:00:00:30, XID 083000c0 IRQ 35
[    1.636177] r8169 0000:01:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[    1.644880] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.651466] ehci-pci: EHCI PCI platform driver
[    1.655980] ehci-orion: EHCI orion driver
[    1.660228] orion-ehci f1050000.ehci: EHCI Host Controller
[    1.665763] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    1.673665] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    1.700187] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    1.707035] hub 1-0:1.0: USB hub found
[    1.710906] hub 1-0:1.0: 1 port detected
[    1.715472] usbcore: registered new interface driver uas
[    1.720995] usbcore: registered new interface driver usb-storage
[    1.727090] usbcore: registered new interface driver ums-alauda
[    1.733128] usbcore: registered new interface driver ums-cypress
[    1.739224] usbcore: registered new interface driver ums-datafab
[    1.745334] usbcore: registered new interface driver ums_eneub6250
[    1.751611] usbcore: registered new interface driver ums-freecom
[    1.757700] usbcore: registered new interface driver ums-isd200
[    1.763723] usbcore: registered new interface driver ums-jumpshot
[    1.769899] usbcore: registered new interface driver ums-karma
[    1.775834] usbcore: registered new interface driver ums-onetouch
[    1.782101] usbcore: registered new interface driver ums-realtek
[    1.788169] usbcore: registered new interface driver ums-sddr09
[    1.794175] usbcore: registered new interface driver ums-sddr55
[    1.800180] usbcore: registered new interface driver ums-usbat
[    1.806355] mousedev: PS/2 mouse device common for all mice
[    1.812421] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    1.819410] i2c /dev entries driver
[    1.823962] orion_wdt: Initial timeout 21 sec
[    1.829208] sdhci: Secure Digital Host Controller Interface driver
[    1.835487] sdhci: Copyright(c) Pierre Ossman
[    1.839945] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.847230] ledtrig-cpu: registered to indicate activity on CPUs
[    1.853390] usbcore: registered new interface driver r8712u
[    1.859228] gre: GRE over IPv4 demultiplexor driver
[    1.864199] NET: Registered protocol family 17
[    1.868744] Key type dns_resolver registered
[    1.873845] registered taskstats version 1
[    1.877959] Loading compiled-in X.509 certificates
[    1.895354] Key type encrypted registered
[    1.901364] console [netcon0] enabled
[    1.905044] netconsole: network logging started
[    1.910532] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[    1.917568] rtc-mv f1010300.rtc: setting system clock to 2018-05-10 21:02:15 UTC (1525986135)
[    1.950278] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    1.980541] ata1.00: ATA-7: SAMSUNG HD753LJ, 1AA01110, max UDMA7
[    1.986676] ata1.00: 1465149168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    2.020559] ata1.00: configured for UDMA/133
[    2.035746] scsi 0:0:0:0: Direct-Access     ATA      SAMSUNG HD753LJ  1110 PQ: 0 ANSI: 5
[    2.044968] sd 0:0:0:0: [sda] 1465149168 512-byte logical blocks: (750 GB/699 GiB)
[    2.052947] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    2.058525] sd 0:0:0:0: [sda] Write Protect is off
[    2.063716] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.078059]  sda: sda1 sda2
[    2.080937] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    2.089121] sd 0:0:0:0: [sda] Attached SCSI disk
[    2.293583] hub 1-1:1.0: USB hub found
[    2.297833] hub 1-1:1.0: 4 ports detected
[    2.304417] random: fast init done
[    2.404749] ata2: SATA link down (SStatus 0 SControl F300)
[    2.422035] Freeing unused kernel memory: 356K
[    2.426568] This architecture does not have kernel memory protection.
:: running early hook [udev]
Warning: /lib/modules/4.16.7-1-ARCH/modules.devname not found - ignoring
starting version 238
:: running hook [udev]
:: Triggering uevents...
:: performing fsck on '/dev/sda1'
boot was not cleanly unmounted, check forced.
/lost+found not found.  CREATED.                                                     
boot: 13/4096 files (15.4% non-contiguous), 11130/16384 blocks                 
:: mounting '/dev/sda1' on real root
[    4.267618] EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem
[    4.302724] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
:: running cleanup hook [udev]
ERROR: Root device mounted successfully, but /sbin/init does not exist.
Bailing out, you are on your own. Good luck.

sh: can't access tty; job control turned off
[rootfs ]#
[rootfs ]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
dev                     121520         0    121520   0% /dev
run                     124400         4    124396   0% /run
/dev/sda1                15863     10609      4435  71% /new_root
[rootfs ]# ls new_root/
initramfs-linux.img  lost+found           uImage
[rootfs ]# mkdir /uss
[rootfs ]# mount /dev/sda2 /uss
[ 1810.128625] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[rootfs ]# ls /uss/
bin       etc       mnt       root      skrypty   sys       var
boot      home      opt       run       srv       tmp
dev       lib       proc      sbin      swapfile  usr
[rootfs ]# ls /uss/boot/
dtbs                 uEnv.txt             uboot-nsa310.kwb
initramfs-linux.img  uImage               zImage.ok
kirkwood.dtb         uboot-nsa310.env
So my boot isn't there where it was before?! Now's on the root /dev/sda2 partition?

EDIT!
I just copied uEnv.txt to the 'new_root' directory, and also the kirkwood-nsa310 file there. After restart - again 'setenv bootdir' and 'run startboot' and I'm in Arch again!
fw_setenv bootdir and fw_setenv 'run startboot' at the and, so the archlinux is starting without problems on the new u-boot.

Thank you @bodhi for your assistance :)



Edited 4 time(s). Last edit at 05/10/2018 05:29PM by arti74.
arti74,

Is this HDD still a hybrid MBR/GPT HDD?

Looks like you have 2 partitions and the bootargs pointing to the wrong partition.

Your u-boot envs setting is a mess right now, if you have to resort to doing these to boot:

NSA310> setenv bootdir
NSA310> run startboot

=========


Normally I don't want to troubleshoot Arch u-boot booting, because I think Arch developers should help you. But if you can't get help there, then come back and we'll start from the beginning of a troubleshooting session. Please get these info when you want me to help getting your u-boot envs back to a good state.


1. Make sure your HDD has only one partition, and it has Arch rootfs on that single partition.
2. Post the content of the boot folder (mount it on another LInux box)
ls -lart /boot

3. Power up, interrupt serial console and

printenv
boot
And please post the entire serial console log here.

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



Edited 1 time(s). Last edit at 05/10/2018 05:26PM by bodhi.
Quote
bodhi
Is this HDD still a hybrid MBR/GPT HDD?
No it's the smaller hdd - just mbr. My plan now is to move - dd everything to the big drive with the GPT partition. I'm not sure how to do it yet.

Quote
bodhi
Post the content of the boot folder
ls -lart /boot
total 16172
-rw-r--r--  1 root root  524288 Oct 11  2016 uboot-nsa310.kwb
-rw-r-----  1 root root  131072 Oct 11  2016 uboot-nsa310.env
drwxr-xr-x 17 root root    4096 Apr 18 18:10 ..
-rwxr-xr-x  1 root root 5143200 May  3 03:03 zImage.ok
drwxr-xr-x  2 root root    4096 May  8 17:26 dtbs
-rw-r--r--  1 root root 5570114 May  8 17:28 initramfs-linux.img
-rw-r--r--  1 root root     432 May  9 10:18 uEnv.txt
-rw-r--r--  1 root root 5155962 May  9 22:55 uImage
-rw-r--r--  1 root root   12522 May 10 16:59 kirkwood.dtb
drwxr-xr-x  3 root root    4096 May 10 18:37 .

And the full log now:
U-Boot 2016.09.01-1 (Oct 10 2016 - 23:14:18 -0600) Arch Linux ARM
Zyxel NSA310

SoC:   Kirkwood 88F6281_A1
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Error: egiga0 address not set.

PHY reset timed out
MV88E1318 PHY initialized on egiga0
IDE:   Bus 0: OK Bus 1: not available  
  Device 0: Model: SAMSUNG HD753LJ  Firm: 1AA01110 Ser#: S13UJ1DQ400383
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512)
*** ERROR: `ethaddr' not set
ping failed; host 10.10.10.5 is not alive
Hit any key to stop autoboot:  0 
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: SAMSUNG HD753LJ  Firm: 1AA01110 Ser#: S13UJ1DQ400383
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512)

USB device 0: unknown device

Device 0: Model: SAMSUNG HD753LJ  Firm: 1AA01110 Ser#: S13UJ1DQ400383
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512)
... is now current device
ide found on device 0
Checking for: /uEnv.txt ...
432 bytes read in 6 ms (70.3 KiB/s)
Loaded environment from /uEnv.txt
Checking if uenvcmd is set ...
** File not found /zImage **
5155808 bytes read in 1873 ms (2.6 MiB/s)
root has been defined by user
loading /boot/dtbs/kirkwood-nsa310.dtb ...
** File not found /boot/dtbs/kirkwood-nsa310.dtb **
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
No FDT memory address configured. Please configure
the FDT address via "fdt addr <address>" command.
Aborting!
5530551 bytes read in 1963 ms (2.7 MiB/s)
Booting uImage with initrd
## Booting kernel from Legacy Image at 00810000 ...
   Image Name:   Linux 4.16.7-1 with nsa310 dt
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5155744 Bytes = 4.9 MiB
   Load Address: 00810000
   Entry Point:  00810000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.16.7-1-ARCH (builduser@leming) (gcc version 7.3.1 20180406 (GCC)) #1 PREEMPT Thu May 3 00:35:40 UTC 2018
[    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: ZyXEL NSA310
[    0.000000] Memory policy: Data cache writeback
[    0.000000] random: get_random_bytes called from start_kernel+0x80/0x424 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
[    0.000000] Kernel command line: console=ttyS0,115200 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=PARTUUID=ab197877-02 rw rootwait
[    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: 243040K/262144K available (7543K kernel code, 599K rwdata, 1692K rodata, 356K init, 681K bss, 19104K 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 : 0x(ptrval) - 0x(ptrval)   (7544 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   ( 356 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 600 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 682 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 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.000039] Switching to timer-based delay loop, resolution 5ns
[    0.000255] Console: colour dummy device 80x30
[    0.000288] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000310] pid_max: default: 32768 minimum: 301
[    0.000656] Security Framework initialized
[    0.000830] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000852] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001811] CPU: Testing write buffer coherency: ok
[    0.002869] Setting up static identity map for 0x8200 - 0x8258
[    0.003143] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.003377] Hierarchical SRCU implementation.
[    0.004629] devtmpfs: initialized
[    0.009547] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.009574] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.009945] pinctrl core: initialized pinctrl subsystem
[    0.011232] NET: Registered protocol family 16
[    0.011691] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.013106] cpuidle: using governor ladder
[    0.013172] cpuidle: using governor menu
[    0.013655] Feroceon L2: Enabling L2
[    0.013701] Feroceon L2: Cache support initialised.
[    0.018650] No ATAGs?
[    0.028153] vgaarb: loaded
[    0.028466] SCSI subsystem initialized
[    0.028884] usbcore: registered new interface driver usbfs
[    0.028941] usbcore: registered new interface driver hub
[    0.029026] usbcore: registered new device driver usb
[    0.029132] pps_core: LinuxPPS API ver. 1 registered
[    0.029141] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.029170] PTP clock support registered
[    0.030196] clocksource: Switched to clocksource orion_clocksource
[    0.095140] VFS: Disk quotas dquot_6.6.0
[    0.095236] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.095444] FS-Cache: Loaded
[    0.104923] NET: Registered protocol family 2
[    0.105670] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.105708] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.105742] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.105771] TCP: Hash tables configured (established 2048 bind 2048)
[    0.105872] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.105895] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.106122] NET: Registered protocol family 1
[    0.106623] RPC: Registered named UNIX socket transport module.
[    0.106635] RPC: Registered udp transport module.
[    0.106642] RPC: Registered tcp transport module.
[    0.106648] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.106891] Trying to unpack rootfs image as initramfs...
[    0.558927] Freeing initrd memory: 5404K
[    0.560896] Initialise system trusted keyrings
[    0.561154] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    0.570843] FS-Cache: Netfs 'nfs' registered for caching
[    0.571511] NFS: Registering the id_resolver key type
[    0.571543] Key type id_resolver registered
[    0.571551] Key type id_legacy registered
[    0.571593] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.572206] fuse init (API version 7.26)
[    0.579168] Key type asymmetric registered
[    0.579183] Asymmetric key parser 'x509' registered
[    0.579273] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.579286] io scheduler noop registered
[    0.579293] io scheduler deadline registered
[    0.579638] io scheduler cfq registered (default)
[    0.579650] io scheduler mq-deadline registered
[    0.579658] io scheduler kyber registered
[    0.579957] io scheduler bfq registered
[    0.581626] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.583524] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    0.583544] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.583555] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    0.583567] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.583846] PCI: bus0: Fast back to back transfers disabled
[    0.583863] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.584396] PCI: bus1: Fast back to back transfers disabled
[    0.584449] pci 0000:00:01.0: BAR 8: assigned [mem 0xe0000000-0xe00fffff]
[    0.584464] pci 0000:00:01.0: BAR 7: assigned [io  0x10000-0x10fff]
[    0.584481] pci 0000:01:00.0: BAR 6: assigned [mem 0xe0000000-0xe000ffff pref]
[    0.584495] pci 0000:01:00.0: BAR 4: assigned [mem 0xe0010000-0xe0013fff 64bit pref]
[    0.584517] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0014000-0xe0014fff 64bit pref]
[    0.584536] pci 0000:01:00.0: BAR 0: assigned [io  0x10000-0x100ff]
[    0.584550] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.584561] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    0.584576] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    0.585050] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.641370] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    0.641602] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.701357] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    0.705457] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.706658] console [ttyS0] disabled
[    0.706725] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    1.403681] console [ttyS0] enabled
[    1.417965] brd: module loaded
[    1.428407] loop: module loaded
[    1.432262] sata_mv f1080000.sata: slots 32 ports 2
[    1.439828] scsi host0: sata_mv
[    1.443628] scsi host1: sata_mv
[    1.446984] ata1: SATA max UDMA/133 irq 32
[    1.451153] ata2: SATA max UDMA/133 irq 32
[    1.456096] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    1.462594] nand: Samsung NAND 128MiB 3,3V 8-bit
[    1.467231] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.474866] Scanning device for bad blocks
[    1.546072] Bad eraseblock 631 at 0x000004ee0000
[    1.592385] 9 cmdlinepart partitions found on MTD device orion_nand
[    1.598682] Creating 9 MTD partitions on "orion_nand":
[    1.603871] 0x000000000000-0x000000100000 : "uboot"
[    1.609158] 0x000000100000-0x000000180000 : "uboot_env"
[    1.614751] 0x000000180000-0x000000200000 : "key_store"
[    1.620373] 0x000000200000-0x000000280000 : "info"
[    1.625484] 0x000000280000-0x000000c80000 : "etc"
[    1.630605] 0x000000c80000-0x000001680000 : "kernel_1"
[    1.636129] 0x000001680000-0x000004640000 : "rootfs1"
[    1.641803] 0x000004640000-0x000005040000 : "kernel_2"
[    1.647339] 0x000005040000-0x000008000000 : "rootfs2"
[    1.653486] libphy: Fixed MDIO Bus: probed
[    1.658331] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    1.664001] pci 0000:00:01.0: enabling device (0140 -> 0143)
[    1.669701] r8169 0000:01:00.0: enabling device (0140 -> 0143)
[    1.676263] r8169 0000:01:00.0 eth0: RTL8168d/8111d at 0x(ptrval), 00:00:00:00:00:30, XID 083000c0 IRQ 35
[    1.685950] r8169 0000:01:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[    1.694668] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.701269] ehci-pci: EHCI PCI platform driver
[    1.705798] ehci-orion: EHCI orion driver
[    1.710040] orion-ehci f1050000.ehci: EHCI Host Controller
[    1.715621] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    1.723519] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    1.750221] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    1.757050] hub 1-0:1.0: USB hub found
[    1.760924] hub 1-0:1.0: 1 port detected
[    1.765480] usbcore: registered new interface driver uas
[    1.770991] usbcore: registered new interface driver usb-storage
[    1.777089] usbcore: registered new interface driver ums-alauda
[    1.783127] usbcore: registered new interface driver ums-cypress
[    1.789222] usbcore: registered new interface driver ums-datafab
[    1.795385] usbcore: registered new interface driver ums_eneub6250
[    1.801663] usbcore: registered new interface driver ums-freecom
[    1.807725] usbcore: registered new interface driver ums-isd200
[    1.813730] usbcore: registered new interface driver ums-jumpshot
[    1.819879] usbcore: registered new interface driver ums-karma
[    1.825790] usbcore: registered new interface driver ums-onetouch
[    1.831977] usbcore: registered new interface driver ums-realtek
[    1.838043] usbcore: registered new interface driver ums-sddr09
[    1.844042] usbcore: registered new interface driver ums-sddr55
[    1.850015] usbcore: registered new interface driver ums-usbat
[    1.856213] mousedev: PS/2 mouse device common for all mice
[    1.862277] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    1.869269] i2c /dev entries driver
[    1.873806] orion_wdt: Initial timeout 21 sec
[    1.879042] sdhci: Secure Digital Host Controller Interface driver
[    1.885318] sdhci: Copyright(c) Pierre Ossman
[    1.889775] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.897063] ledtrig-cpu: registered to indicate activity on CPUs
[    1.903225] usbcore: registered new interface driver r8712u
[    1.909060] gre: GRE over IPv4 demultiplexor driver
[    1.914042] NET: Registered protocol family 17
[    1.918595] Key type dns_resolver registered
[    1.923700] registered taskstats version 1
[    1.927819] Loading compiled-in X.509 certificates
[    1.945355] Key type encrypted registered
[    1.951365] console [netcon0] enabled
[    1.955043] netconsole: network logging started
[    1.960320] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    1.967015] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[    1.974067] ata1.00: ATA-7: SAMSUNG HD753LJ, 1AA01110, max UDMA7
[    1.980109] ata1.00: 1465149168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    1.987522] rtc-mv f1010300.rtc: setting system clock to 2018-05-10 22:37:54 UTC (1525991874)
[    2.020599] ata1.00: configured for UDMA/133
[    2.035788] scsi 0:0:0:0: Direct-Access     ATA      SAMSUNG HD753LJ  1110 PQ: 0 ANSI: 5
[    2.045071] sd 0:0:0:0: [sda] 1465149168 512-byte logical blocks: (750 GB/699 GiB)
[    2.053023] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    2.058605] sd 0:0:0:0: [sda] Write Protect is off
[    2.063886] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.078878]  sda: sda1 sda2
[    2.083205] sd 0:0:0:0: [sda] Attached SCSI disk
[    2.130290] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    2.333557] hub 1-1:1.0: USB hub found
[    2.337767] random: fast init done
[    2.341265] hub 1-1:1.0: 4 ports detected
[    2.401341] ata2: SATA link down (SStatus 0 SControl F300)
[    2.418468] Freeing unused kernel memory: 356K
[    2.423002] This architecture does not have kernel memory protection.
:: running early hook [udev]
Warning: /lib/modules/4.16.7-1-ARCH/modules.devname not found - ignoring
starting version 238
:: running hook [udev]
:: Triggering uevents...
:: performing fsck on '/dev/sda2'
rootfs: clean, 89901/45785088 files, 16602775/183139294 blocks
:: mounting '/dev/sda2' on real root
[    4.586346] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
:: running cleanup hook [udev]
[    5.548407] NET: Registered protocol family 10
[    5.613686] Segment Routing with IPv6
[    5.724048] systemd[1]: systemd 238 running in system mode. (+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN +PCRE2 default-hierarchy=hybrid)
[    5.746744] systemd[1]: Detected architecture arm.

Welcome to Arch Linux ARM!

[    5.814551] systemd[1]: Set hostname to <alarm>.
[    7.060544] systemd[1]: Configuration file /etc/systemd/system/led.service is marked executable. Please remove executable permission bits. Proceeding anyway.
[    7.086582] systemd[1]: /etc/systemd/system/led.service:10: Ignoring unknown escape sequences: "/usr/bin/echo default-on > /sys/class/leds/nsa310\:green\:sys/trigger"
[    7.101681] systemd[1]: /etc/systemd/system/led.service:11: Ignoring unknown escape sequences: "/usr/bin/echo ide-disk > /sys/class/leds/nsa310\:green\:hdd/trigger"
[    7.116606] systemd[1]: /etc/systemd/system/led.service:12: Ignoring unknown escape sequences: "/usr/bin/echo usb-host > /sys/class/leds/nsa310\:green\:usb/trigger"
[    7.131514] systemd[1]: /etc/systemd/system/led.service:13: Ignoring unknown escape sequences: "/usr/bin/echo none > /sys/class/leds/nsa310\:red\:sys/trigger"
[    7.216492] random: systemd: uninitialized urandom read (16 bytes read)
[    7.227573] systemd[1]: Created slice system-serial\x2dgetty.slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[    7.260700] random: systemd: uninitialized urandom read (16 bytes read)
[    7.268559] systemd[1]: Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket (/dev/log).
[    7.300422] random: systemd: uninitialized urandom read (16 bytes read)
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on LVM2 metadata daemon socket.
[  OK  ] Listening on Journal Socket.
         Starting Apply Kernel Variables...
         Starting LED control service...
[  OK  ] Listening on Device-mapper event daemon FIFOs.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Reached target Paths.
[  OK  ] Reached target Local Encrypted Volumes.
         Starting Journal Service...
[  OK  ] Listening on Process Core Dump Socket.
         Mounting POSIX Message Queue File System...
         Starting Create list of required st…ce nodes for the current kernel...
[  OK  ] Listening on LVM2 poll daemon socket.
         Starting Load/Save Random Seed...
         Mounting FUSE Control File System...
[  OK  ] Created slice system-getty.slice.
[  OK  ] Listening on Network Service Netlink Socket.
[  OK  ] Reached target Local File Systems.
         Mounting Kernel Debug File System...
[  OK  ] Created slice User and Session Slice.
[  OK  ] Reached target Slices.
[  OK  ] Reached target Remote File Systems.
         Activating swap /swapfile...
         Starting Monitoring of LVM2 mirrors…ng dmeventd or progress polling...
[  OK  ] Set up automount Arbitrary Executab…rmats File System Automount Point.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on udev Kernel Socket.
         Starting udev Coldplug all Devices...
[  OK  ] Started Journal Service.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Started Create list of required sta…vice nodes for the current kernel.
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Mounted Kernel Debug File System.
[  OK  ] Started LVM2 metadata daemon.
         Starting Create Static Device Nodes in /dev...
         Starting Flush Journal to Persistent Storage...
[  OK  ] Started LED control service.
[    8.852973] Adding 1048572k swap on /swapfile.  Priority:-2 extents:2 across:1179644k 
[  OK  ] Activated swap /swapfile.
[    8.962896] systemd-journald[155]: Received request to flush runtime journal from PID 1
[  OK  ] Reached target Swap.
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Started Create Static Device Nodes in /dev.
         Starting udev Kernel Device Manager...
[  OK  ] Started udev Kernel Device Manager.
         Starting Network Service...
[  OK  ] Started Network Service.
[   11.621134] random: crng init done
[   11.624568] random: 7 urandom warning(s) missed due to ratelimiting
[  OK  ] Started Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Found device /dev/ttyS0.
[   12.162165] r8169 0000:01:00.0 enp1s0: renamed from eth0
[   12.198139] marvell-cesa f1030000.crypto: CESA device successfully registered
[  OK  ] Started Create Volatile Files and Directories.
[   13.161798] r8169 0000:01:00.0 enp1s0: link down
[   13.166483] r8169 0000:01:00.0 enp1s0: link down
[   13.213816] IPv6: ADDRCONF(NETDEV_UP): enp1s0: link is not ready
[  OK  ] Started Monitoring of LVM2 mirrors,…sing dmeventd or progress polling.
         Starting Network Time Synchronization...
         Starting Update UTMP about System Boot/Shutdown...
         Starting Network Name Resolution...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Started Network Name Resolution.
[  OK  ] Reached target Host and Network Name Lookups.
[  OK  ] Reached target Network.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting The PHP 5.6 FastCGI Process Manager...
         Starting Login Service...
         Starting rTorrent...
[  OK  ] Started OpenSSH Daemon.
         Starting Samba SMB Daemon...
         Starting A high performance web server and a reverse proxy server...
[  OK  ] Started Entropy Harvesting Daemon.
         Starting Permit User Sessions...
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Started D-Bus System Message Bus.
[   15.006460] r8169 0000:01:00.0 enp1s0: link up
[   15.056079] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0: link becomes ready
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Started Daily man-db cache update.
[  OK  ] Started Daily rotation of log files.
[  OK  ] Started Daily verification of password and group files.
[  OK  ] Reached target Timers.
[  OK  ] Started rTorrent.
[  OK  ] Started Permit User Sessions.
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Started Getty on tty1.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started Login Service.
[  OK  ] Started A high performance web server and a reverse proxy server.
[  OK  ] Started The PHP 5.6 FastCGI Process Manager.
[  OK  ] Started Samba SMB Daemon.
[  OK  ] Reached target Multi-User System.

Arch Linux 4.16.7-1-ARCH (ttyS0)

alarm login:
I'm sure that not everything is smooth there.. But my network is working too, what is important.



Edited 2 time(s). Last edit at 05/10/2018 05:41PM by arti74.
Quote

No it's the smaller hdd - just mbr. My plan now is to move - dd everything to the big drive with the GPT partition. I'm not sure how to do it yet.

Don't use dd to copy rootfs. Just become root, and use cp or tar

Using cp
su -
cd /media/HDD2/
cp -aR /media/HDD1/* . &

Using tar:
https://forum.doozan.com/read.php?2,12096,24034#msg-24034

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Thank you! I will do it this way tomorrow and report back (I like the tar option - but I wonder if the speed is the same for both).



Edited 1 time(s). Last edit at 05/10/2018 06:25PM by arti74.
Quote

Arch Linux 4.16.7-1-ARCH (ttyS0)

alarm login:
I'm sure that not everything is smooth there.. But my network is working too, what is important.

Everything is working great now, no troubleshooting needed!

The only potential for problem when you move the rootfs is the bootargs root device.

root=PARTUUID=ab197877-02 rw rootwait

You are booting Arch with initrd, so you can use rootfs label to ensure booting successfully with multiple partitions on multiple disk.

Assign the label (if the rootfs partition is assigned /dev/sda1) then

e2label /dev/sda1 rootfs
And change bootargs root device to use label (use uEnv.txt if you like, or set it permanently in u-boot env)
root=LABEL=rootfs rw rootwait

And your fstab root device should look like this (adjust the fs type to ext2 or ext4 as needed)

LABEL=rootfs    /               ext3    noatime,errors=remount-ro 0 1

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



Edited 1 time(s). Last edit at 05/10/2018 06:30PM by bodhi.
Another great advise - thank you Bodhi!
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: