Welcome! Log In Create A New Profile

Advanced

LG N1T1 NAS

Posted by ron 
ron
Re: LG N1T1 NAS
October 01, 2016 04:00PM
Good news everyone! :)

 96 % [......................................................................]
 99 % [..............................]
[Type Ctrl-\ + c to quit]


U-Boot 2015.10-g3ea3d35-dirty (Mar 22 2016 - 20:36:35 +0100)
LG NT1

SoC:   Kirkwood 88F6281_A1
SPI:   ready
DRAM:  128 MiB (ECC not enabled)
WARNING: Caches not enabled
SF: Detected MX25L4005 with page size 256 Bytes, erase size 64 KiB, total 512 KiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Error: egiga0 address not set.

Hit any key to stop autoboot:  0

This is a U-Boot that was adapted to run on the N1T1 back in March. Unfortunately at that time there was a problem with my serial cable. But today I got a different cable and managed to run it using kwboot. It also boots Linux.

Now the next step is to transfer the modifications into the latest U-Boot version from git and run it again. Also I need to flash it to the SPI Flash and make it run from there (shouldn't be a problem but it is a little risky). If all goes well, by next week there will be a pull request for the N1T1 U-Boot.



Edited 1 time(s). Last edit at 10/01/2016 04:01PM by ron.
Re: LG N1T1 NAS
October 18, 2016 04:58PM
Thank you, Ron and Bodhi, for having made possible to run a current Linux version on the N1T1. This is a significant enhancement for the use which I can make of the device.

I followed Ron's mini Howto and want to describe how it worked for me and the experiences I made - could be helpful for others.

I have a N1T1TD1 which is the branded version of the N1T1 sold by Deutsche Telekom some years ago. The mainboard looks identical to Ron's pictures in http://forum.doozan.com/read.php?2,26671,30316#msg-30316.

The following steps refer to the steps of the mini Howto.

Step 1:
According to the blinking of the LEDs of my USB-TTL-Adapter, the solder eyelets at the N1T1 are probably - from Power connector side to DVD side - 3V3, input of N1T1, output of N1T1, GND. The output of the N1T1 has to be connected to the input of the adapter and conversely.
The labels RX, TX may be sometimes confusing - at least at my USB-TTL-Adapter they are the other way around for people who want to connect RX with RX and TX with TX.

Step 5 and 6:
The original uboot (U-Boot 1.1.4 (Oct 28 2010 - 11:33:14) LGE version: NT1 Series) doesn't find files on an ext4 partition. At least uImage and uInitrd should be on an ext3 partition.

The uImage given by Ron for the very first boot didn't work for me. I got the message

   Image Name:   Linux-4.4.0-kirkwood-tld-1
   Created:      2016-03-19  22:59:01 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3326534 Bytes =  3.2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 00000000, header_addr = 0068dcdc, header_size = 00000040 ...
Bad Magic Number

I circumvented this problem by performing steps 7 to 9 in a chroot environment on a Raspberry Pi 2.
Additionally, I have used this to add a new sudo user to the N1T1 environment.
If /media/pi/rootext3/ is the mount point of my new N1T1 root partition on the Raspbery Pi, the commands to get to the chroot environment are:

sudo mount --bind /dev  /media/pi/rootext3/dev
sudo mount -t devpts devpts  /media/pi/rootext3/dev/pts
sudo mount -t proc proc  /media/pi/rootext3/proc
sudo mount -t sysfs sysfs  /media/pi/rootext3/sys
sudo chroot /media/pi/rootext3

After having finished Steps 6-9, the commands to get out from chroot are:

exit
sudo umount  /media/pi/rootext3/dev/pts  /media/pi/rootext3/dev /media/pi/rootext3/proc  /media/pi/rootext3/sys

I used Bodhi's
kernel linux-4.8.0-kirkwood-tld-1-bodhi.tar.bz2 (10 Oct 2016)
and rootfs Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (20 Feb 2016)

Step 10:
To get the number of the Partition where uImage and uInitrd reside in your configuration, the uboot commands

usb storage
usb part
ext2ls usb  0:1  /boot

may be useful, where 0:1 are to be replaced by the numbers (drive:partition) you have found out by "usb storage" and "usb part".

For the parameter "root=/dev/sda1" in the "setenv bootargs_usb" command (from step 6, needed here as well), a SATA disk if you have one connected to the N1T1 has to be taken into account. So for me, as my root is on the second partition of the USB stick or disk, it is "/root=/dev/sdb2"

Remark:
uImage and uInitrd may be on the same partition as the root filesystem or on a separate boot partition.



Edited 1 time(s). Last edit at 10/19/2016 04:51AM by bernd.
Re: LG N1T1 NAS
October 19, 2016 09:57AM
Thanks bernd for the additional comments! I guess I am seeing enough indication that this is working to try this on myself.

I have a couple questions to ron:

Any news regarding the u-boot?
Also, In #5 or #6 of your instructions, you give a link to download a uImage. Would you mind also giving instructions to create it myself?

Thanks in advance!
ron
Re: LG N1T1 NAS
October 19, 2016 10:33AM
Hi shwouchk!

To create your own uImage, download the 4.4 kernel sources from bodhi and apply the patch from the first post in this thread. Then build it and create an uImage from the zImage. I also enabled USB support, USB mass storage support and IDE/SATA support in the kernel menuconfig so the needed drivers are part of the kernel. That was needed because there was no initrd (or uInitrd) for my kernel and it could only boot from NFS.
Unfortunately I can't remember the exact steps but there should be a guide either on this forum on the Internet how to compile a kernel for the DockStar, you can use that.

Regarding the u-boot, I didn't had time to work on it in the last 2 weeks. So far there is a version that can be uploaded to the N1T1 by UART and it starts the kernel (including separate DTS/DTB loading). There is still work to be done, such as: figure out how the power button and power LED is connected, if the Ethernet PHY needs resetting at startup and of course to flash it to the SPI flash and boot from there.
As soon as I have a free weekend, it will be finished! :)
Re: LG N1T1 NAS
October 19, 2016 10:36AM
Thanks!
varma
Re: LG N1T1 NAS
January 20, 2017 03:53AM
hello everybody!

I saw your work and I'd like to know one thing
following your thread is possible to install an updated version of debian, to manage with webmin or stuff like this?
the best would be to install a distro Like OpenMediaVault
have you got any suggestion to leave the definitely the LG UI?

I'm asking this because I broke the stock UI making upgrades to the packages; otherwise, is possible to launch the official firmware upgrade process trough SSH without losing my DATA?
I'm still keeping the hacked firmware package I used to install the New UI, gaining the root access. (as expained here http://dandylife.net/blog/archives/63 )
Re: LG N1T1 NAS
January 20, 2017 04:04AM
varma Wrote:
-------------------------------------------------------
> hello everybody!
>
> I saw your work and I'd like to know one thing
> following your thread is possible to install an
> updated version of debian, to manage with webmin
> or stuff like this?
> the best would be to install a distro Like
> OpenMediaVault
> have you got any suggestion to leave the
> definitely the LG UI?
>
> I'm asking this because I broke the stock UI
> making upgrades to the packages; otherwise, is
> possible to launch the official firmware upgrade
> process trough SSH without losing my DATA?
> I'm still keeping the hacked firmware package I
> used to install the New UI, gaining the root
> access. (as expained here
> http://dandylife.net/blog/archives/63 )


You can get the Debian rootfs here:

http://forum.doozan.com/read.php?2,12096

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
ron
Re: LG N1T1 NAS
January 20, 2017 04:09AM
Hi varma!

Once you have Debian running (according to my guide for this particular device or another generic guide from the forum) it's up to you to install any web management interface for the NAS. I think OpenMediaVault can be installed on Debian by adding the repos to the apt configuration and installing the omv package. See http://wiki.openmediavault.org/index.php?title=Download_OpenMediaVault for more info.

Your data is stored on a different partition than the OS so as long as that partition (and the partition table) remains intact, you should be able to overwrite the stock OS without any data loss.
varma
Re: LG N1T1 NAS
January 20, 2017 04:28AM
Thank you for the super fast replies
I'll try to apply when I'll find enough time!
Maybe I could consider to replace the ODD with a notebook disk, within a caddy, to make an experimental configuration and avoid to destroy all my data, gaining even more disk space (or a chinese SSD to speed up the OS)
Den
Re: LG N1T1 NAS
February 01, 2017 06:12AM
Guys, total noob question here, can I swap the hdd (everything is still stock), for a 2tb hdd, just by cloning the original hdd onto the new one? Will that work without any other modifications?

I know this is totally off topic, apologies for that, but your thread was the only live one I could find on this device... TIA!
ron
Re: LG N1T1 NAS
February 01, 2017 06:18AM
It will probably work, no modifications should be needed (except for resizing the cloned partition).
Re: LG N1T1 NAS
February 01, 2017 06:35AM
ron & Den,

When cloning the rootfs, you should look at the udev files to make sure ethernet will work. Otherwise udev rules will prevent eth0 to be active.

See here:
http://forum.doozan.com/read.php?2,18007,18008#msg-18008

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 02/01/2017 06:36AM by bodhi.
Den
Re: LG N1T1 NAS
February 01, 2017 10:12AM
Thanks Ron, Bodhi

@Bodhi, can I look in the rootfs and change files while the hdd is attached to my laptop?
Den
Re: LG N1T1 NAS
February 01, 2017 10:55AM
Also, @ Ron,
How did you open the darn casing?

I managed to get the black front of (1 screw and pull)
And one white side (the right side when gabbing the dvd slot) with a spudger.
The other side has a different licking system by the looks of it, as does the rest of the black casing...

Any help appreciated, thanks guys
ron
Re: LG N1T1 NAS
February 01, 2017 03:07PM
Den,

you should be able to pull it towards yourself (when facing the DVD slot). There are some tabs locking the panel at the bottom and the back (near the fan outlet), so be careful.
Re: LG N1T1 NAS
February 01, 2017 04:08PM
@Den,

Yes, you can change it offline on your Linux laptop. But make sure that you are the root user while doing that (sudo won't work). After changing them, list the files and double check the permission. For example:

ls -l /etc/udev/rules.d/70-persistent-net.rules
-rw-r--r-- 1 root root 822 Jun  4  2016 /etc/udev/rules.d/70-persistent-net.rules

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: LG N1T1 NAS
February 01, 2017 05:19PM
@Den,

here is a Howto for opening the case: nasausbau.pdf.

(I don't find any more the webpage where I originally found this link.)

Bernd
Den
Re: LG N1T1 NAS
February 01, 2017 06:42PM
@all thanks for all the willingness to help and quick replies!

@Bodhi In my simple thinking mind, I should be able to get away with cloning and putting the new bigger hdd back in the old enclosure. If I were to clone a hdd and then put the clone from one enclosure to another I would have to check the settings. Am I correct in this assumption?

Thanks all!
Re: LG N1T1 NAS
February 01, 2017 07:07PM
@Den,

The enclosure will not matter. Only if the HDD rootfs was used in booting one box, and then you clone it, then it should be doublecheck.

But if everything is done for this specific N1T1 NAS, and you have no intention of using the backup rootfs for any other N1T1 box or other Kirkwood boxes then there is no need to worry.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Den
Re: LG N1T1 NAS
February 02, 2017 03:09AM
That's what I thought, thanks Bodhi, I'll let you guys know one I'm finished.
Den
Re: LG N1T1 NAS
February 02, 2017 10:56AM
Allright, some good, some bad..

1.) Enclosure opened without damage, easy to swap HDD's. Great, Thanks Bernd for the pdf!

2.) HDD cloned, looks exactly the same in Partition manager as the other one (4 partitions, two small ones, one 100GB, one almost 800GB. So far so good, but windows doesn't recognize the form of the partitions, so how can i resize the 800GB to 1800GB? Ron?

3.) I have put the new HDD in the enclosure, and it boots up fine, also in the LG NAS detector, the NAS shows up with an ip.
I can look up two of the partitions in windows file explorer.
However, if i try to connect to the webportal, i get the following error in my webbrowser:
Forbidden

You don't have permission to access / on this server.
Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8g DAV/2 PHP/5.2.11 with Suhosin-Patch Server at 192.168.1.12 Port 80

Maybe this has to do with the rootfs afterall Bodhi?
(i do not have a linux laptop, all i have is some minor experience with SSH through Putty)

Also even though i can see the drive partitions as network folders, i cannot see anything in them.

When i swap back to the original HDD, everything functions properly, and even, if i leave the webportal open, after swapping back to the clone, i can acces the NAS with cloned HDD through webportal (still no files visible in the main folders though)..

(I could reformat or scan HDD though the web portal after doing this, but the scan claims to take 6-8hrs, so i will only do this if you guys advise to)

Any more suggestions?
Thanks a bunch!!
Den
Re: LG N1T1 NAS
February 02, 2017 11:00AM
Addition:

If i enter the ip in my webbrowser, i get the error msg above.

If i go to my webbrowser history, i can acces the nas with clone HDD (with the above restrictions).
Re: LG N1T1 NAS
February 02, 2017 11:00AM
Den
Re: LG N1T1 NAS
February 02, 2017 01:28PM
Hi Bodhi,

Still not quite sure how to check my rootfs, right now putty wont let me connect with the new hdd in..

Cloning was done with a cloning dock (standalone, without use of computer)

can i get into rootfs if i put the hdd in a dock? Or do i have to do it inside the nas, (assuming NAS), then i have to figure out how i can get into it through ethernet, have to work around the error..
Re: LG N1T1 NAS
February 02, 2017 03:22PM
Den,

> Cloning was done with a cloning dock (standalone,
> without use of computer)

This could be problematic. But I don't know how your dock work so can't say for sure. Usually, if you clone a HDD --> a HDD, then the sectors would be replicated. But from a USB to HDD, I am not sure if this dock does that.

You can do the cloning in Linux, if you clone your USB rootfs to another USB drive first using the cloning dock. And then use the new USB drive to boot the NAS. After you logged in, you would plug in the HDD and the old USB rootfs. And follow the procedure here:

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

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
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: