Welcome! Log In Create A New Profile

Advanced

NSA310 installation

Posted by theboo 
theboo
NSA310 installation
November 13, 2016 10:59AM
Hello!
Is it possible to boot NSA310 from USB and use rootfs also from USB? Unfortunately I can use only stock uboot (bad blocks...).



Edited 1 time(s). Last edit at 11/14/2016 12:35AM by bodhi.
Re: Linux Kernel 4.6 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
November 13, 2016 06:05PM
theboo Wrote:
-------------------------------------------------------
> Hello!
> Is it possible to boot NSA310 from USB and use
> rootfs also from USB? Unfortunately I can use only
> stock uboot (bad blocks...).

Yes it is possible. Use the rootfs 4.4 in the first post. But you will need to set u-boot envs from stock OS, if you don't have serial console. Serial console would be the best way to install.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
bodhi Wrote:
-------------------------------------------------------
> Yes it is possible. Use the rootfs 4.4 in the
> first post. But you will need to set u-boot envs
> from stock OS, if you don't have serial console.
> Serial console would be the best way to install.

I needed to read a lot, decided to change uboot, and use boot and rootfs from usb.
root@nsa310:/uboot# dmesg | grep -i bad
[   13.657673] Scanning device for bad blocks
[   13.662059] Bad eraseblock 2 at 0x000000040000
[   13.666591] Bad eraseblock 3 at 0x000000060000
root@nsa310:/uboot# flash_erase /dev/mtd0 0 6
Erasing 128 Kibyte @ 20000 -- 16 % complete flash_erase: Skipping bad block at 00040000
flash_erase: Skipping bad block at 00060000
Erasing 128 Kibyte @ a0000 -- 100 % complete
root@nsa310:/uboot# nandwrite /dev/mtd0 uboot.2016.05-tld-1.nsa310.mtd0.kwb
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Bad block at 40000, 1 block(s) from 40000 will be skipped
Writing data to block 3 at offset 0x60000
Bad block at 60000, 1 block(s) from 60000 will be skipped
Writing data to block 4 at offset 0x80000
Writing data to block 5 at offset 0xa0000

root@nsa310:/uboot# flash_erase /dev/mtd0 0xc0000 1
Erasing 128 Kibyte @ c0000 -- 100 % complete
root@nsa310:/uboot# nandwrite -s 786432 /dev/mtd0 uboot.2016.05-tld-1.environmentt.img
Writing data to block 6 at offset 0xc0000
Not sure if done right but working. Kinda...
I did this stuff working on rootfs from kernel 3.5.1, using your kernel 3.16.0. After that I wanted to boot kernel 4.8.3 with your rootfs. After booting kernel is looking for disk by uuid. Looking for my old HDD's UUID, old rootfs - why is that? For now i just changed USB's uuid maching what kernel want. It should boot from labeled partition "rootfs" - is there a way to change it to do so?
ALERT ! /dev/disk/by-uuid/XXXXX does not exist. Dropping to a shell
Re: Linux Kernel 4.6 Kirkwood (FDT) and 3.16 Kirkwood (non-FDT) package and rootfs
November 14, 2016 12:42AM
theboo,


> root@nsa310:/uboot# dmesg | grep -i bad
> [ 13.657673] Scanning device for bad blocks
> [ 13.662059] Bad eraseblock 2 at 0x000000040000
> [ 13.666591] Bad eraseblock 3 at 0x000000060000

> root@nsa310:/uboot# flash_erase /dev/mtd0 0 6
> Erasing 128 Kibyte @ 20000 -- 16 % complete
> flash_erase: Skipping bad block at 00040000
> flash_erase: Skipping bad block at 00060000
> Erasing 128 Kibyte @ a0000 -- 100 % complete

> root@nsa310:/uboot# nandwrite /dev/mtd0
> uboot.2016.05-tld-1.nsa310.mtd0.kwb
> Writing data to block 0 at offset 0x0
> Writing data to block 1 at offset 0x20000
> Writing data to block 2 at offset 0x40000
> Bad block at 40000, 1 block(s) from 40000 will be
> skipped
> Writing data to block 3 at offset 0x60000
> Bad block at 60000, 1 block(s) from 60000 will be
> skipped
> Writing data to block 4 at offset 0x80000
> Writing data to block 5 at offset 0xa0000
>

> root@nsa310:/uboot# flash_erase /dev/mtd0 0xc0000
> 1
> Erasing 128 Kibyte @ c0000 -- 100 % complete
> root@nsa310:/uboot# nandwrite -s 786432 /dev/mtd0
> uboot.2016.05-tld-1.environmentt.img
> Writing data to block 6 at offset 0xc0000

Well done :)

> Not sure if done right but working. Kinda...

Yes it did.

> I did this stuff working on rootfs from kernel
> 3.5.1, using your kernel 3.16.0. After that I
> wanted to boot kernel 4.8.3 with your rootfs.

> After booting kernel is looking for disk by uuid.
> Looking for my old HDD's UUID, old rootfs - why is
> that? For now i just changed USB's uuid maching
> what kernel want. It should boot from labeled
> partition "rootfs" - is there a way to change it
> to do so?

Boot it. While in you current Debian rootfs, if the USB drive is the only one drive then it is sda1, if not then
mount

Then sdxx is whatever drive letter the rootfs is detected
tune2fs -L rootfs /dev/sdxx
sync

And reboot.

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



Edited 1 time(s). Last edit at 11/14/2016 12:43AM by 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: