- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Re: Step by step instructions to get root access on Stora after a factory reset for dummies
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Step by step instructions to get root access on Stora after a factory reset for dummies
Hi,
I’ve decided to do this step by step guide to try to help guys that, like me, are just beginners in linux.
Every think in this guide is not out of my own work, I’m just putting (copying) together parts of somebody else work.
The whole guide is based on steps that worked in my case, so please do not blame me if it is not working with you or if you brick your system following the guide.
Also, there might be not mandatory steps in my guide as well.
I have used a pc with Ubuntu 14 on it. You can use whatever you want but be aware that additional steps (not in my guide) might be necessary in this case.
Log in ubuntu with root access (if you do not know how to do it just google it, it’s very easy). All the steps below are assumed to be executed with root access.
- In your ubuntu machine install tftp-hpa, nfs-utils, u-boot-tools and wireshark
apt-get update
apt-get install tftp-hpa
apt-get install nfs-kernel-server
apt-get install nfs-utils
apt-get install u-boot-tools
apt-get install wireshark
- Set up your ethernet interface with the ip of 10.0.0.1 and a netmask of 255.0.0.0, its default route (gateway) needs to be the interface address itself, 10.0.0.1 and connect a network cable from your network plug to the stora one
- Create the following directories /mnt/Axentra/marvell.nfs.rootfs
cd /
mkdir /mnt/Axentra
mkdir /mnt/Axentra/marvell.nfs.rootfs
- Download Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 from here and store it in the above directory
- Extract these file there
cd /mnt/Axentra/marvell.nfs.rootfs
tar xvjf Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2
- Edit /mnt/Axentra/marvell.nfs.rootfs/etc/fstab and set/replace with following lines (thanks to Karlchang). I used gedit to do it
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
#LABEL=rootfs / ext3 noatime,errors=remount-ro 0 1
10.0.0.1:/mnt/Axentra/marvell.nfs.rootfs / nfs nfsvers=3,wsize=2048,tcp 0 0
tmpfs /tmp tmpfs defaults 0 0
- Generate the uImage with DTB embedded inside
cd /mnt/Axentra/marvell.nfs.rootfs/boot
cp -a zImage-5.2.9-kirkwood-tld-1 zImage.fdt
cat dts/kirkwood-netgear_stora_ms2000.dtb >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.2.9-kirkwood-tld-1 -d zImage.fdt uImage
sync
- Configure nfs-utils to use nfsv2 and UDP (ubuntu 14 has it already)
- Configure your nfs server by adding the following (one) line in the /etc/exports file:
- Restart the nfs server running:
- Check if nfs server is running with the right protocol by running:
if you see in the output something like the following then is ok.
100003 3 tcp 2049 nfs
100003 2 tcp 2049 nfs
100227 3 tcp 2049
100003 2 udp 2049 nfs
100227 3 udp 2049 nfs
- Change the file /etc/default/tftpd-hpa and set the following options:
# /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/mnt/Axentra/marvell.nfs.rootfs/boot"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="--secure"
RUN_DAEMON="yes"
OPTIONS="-l -s /tftpboot
- Copy uImage file to /var/lib/tftpboot
cp -af /mnt/Axentra/marvell.nfs.rootfs/boot/uImage /var/lib/tftpboot
- Restart the daemon
- Check if needed service are up and running
if you find the highlighted lines in the output then it is ok and you can go ahead
[ - ] alsa-utils
[ - ] anacron
[ + ] avahi-daemon
…………
[ + ] nfs-kernel-server
…………
[ + ] tftpd-hpa
…………
- Startup wireshark and start listening to ethx, your network port you have set to 10.0.0.1. If you do not know which one is, run ifconfig to find out
- While holding down the small reset button on the stora with a paper clip, turn on the stora. You'll need to hold in the reset button for quite some time. The green lights on the front panel will go through three cycles. Eventually, you will see the tftp transfer in wireshark, and at this point you can release the reset button. After the tftp transfer, there will be a couple of arp requests, and then you should see the nfs activity. Your Stora boots with the nfs mounted alternate filesystem.
- Once the Stora is booted (wait for a couple of minutes, at least), you will be able to log into it. By running:
where x.x.x denotes the ip of the Stora found in wireshark. The password will be “root”
- Mount the Stora's regular root filesystem, by running the following commands while logged into the Stora:
The Stora's regular file system is now mounted on /mnt/
- Create and add your ssh keys by opening a new terminal in your ubuntu machine.Generate your key in your ubuntu pc by running:cd /
> cd /
> ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key /root/.ssh/id_rsa): [Press enter key]
Created directory '/home/tecmint/.ssh'.
Enter passphrase (empty for no passphrase): [Press enter key]
Enter same passphrase again: [Press enter key]
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
5f:ad:40:00:8a:d1:9b:99:b3:b0:f8:08:99:c3:ed:d3 tecmint@tecmint.com
The key's randomart image is:
+--[ RSA 2048]----+
| ..oooE.++|
| o. o.o |
| .. . |
| o . . o|
| S . . + |
| . . . o|
| . o o ..|
| + + |
| +. |
+-----------------+
- Copy the generated keys to NFS rootfs by running:
cp -af /root/.ssh/* /mnt/Axentra/marvell.nfs.rootfs/root/.ssh
- Go to the ssh logged to stora terminal and place the public key(id_rsa.pub) to the Stora “authorized_keys” by running:
cp -af /root/.ssh/id_rsa.pub /mnt/root/.ssh/authorized_keys
chmod 700 /mnt/root/.ssh/authorized_keys
- To enable root login, you'll want to edit the /mnt/etc/ssh/ssh_config file on the stora and add the line "PermitRootLogin yes"
- The configuration is completed and now you can shutdown your Stora by running:
shutdown -h now
The stora will then shutdown and turn itself off.
Now you can move the Stora back to your regular network, start it again and ssh into it as root by running:
ssh root@your_stora_ip
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Step by step instructions to get root access on Stora after a factory reset for dummies
It's perfect
Thank you for sorting out more details.
I believe that with your kind assistance, more Stora bricks will be resurrected.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Step by step instructions to get root access on Stora after a factory reset for dummies
May I add that you need to install the below as the one you installed seems to be the client (sorry I am also new to all this)
apt-get install tftpd-hpa
also in TFTP config when I have the below command the tftpd-hpa was not able to start and I had to remove the below line
OPTIONS="-l -s /tftpboot
After pressing the reset button and powering it up I am getting the requests in wireshark however if I give it few minutes and I try to login ssh I am getting connection refused. (video1)
If after few minutes I remove the power of the stora and give it power back is starts to load however it gets ip with 169 (check video2)
Video 1:
Video2:
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Step by step instructions to get root access on Stora after a factory reset for dummies
after connecting it to the home network again it seems that it is still with the software of stora for some reason it is not pulling the image from the linux server when I am resetting it :S
Any ideas ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Step by step instructions to get root access on Stora after a factory reset for dummies
in the TFTP configuration there is a missing " in the last line
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/mnt/Axentra/marvell.nfs.rootfs/boot"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="--secure"
RUN_DAEMON="yes"
OPTIONS="-l -s /tftpboot"
however I am still having issues in wireshark it seems that there are some logs with tftp but after giving some time and rebooting it is still loading with its default software. I am starting to give up 😕
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Step by step instructions to get root access on Stora after a factory reset for dummies
This is what wireshark is picking up however after giving it even an hour, I cannot login to telnet and if I reboot the nas it gets booted with factory image
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Step by step instructions to get root access on Stora after a factory reset for dummies
Thank you for this instructions. Everything is all right but when i enter ssh root@IP i have port 22 connection refused and impossible to continue. Do you have some ideas?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Step by step instructions to get root access on Stora after a factory reset for dummies
probably you are having the same error as I do. If you connect the NAS back to a router try accessing it via the ip address and probably you still haev the factory image.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Step by step instructions to get root access on Stora after a factory reset for dummies
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Step by step instructions to get root access on Stora after a factory reset for dummies
Not sure if this is the best place to ask.
I have a working Stora with root access, but have had to replace the Hard Disk with a new one. (Old one is gone). Not trying to recover any data, just set up a 'new' Stora.
How can this be achieved without access to the web interface please?
I tried with a newly-formatted drive - the Stora is accessible, drive light is orange, and cannot see any shared folders (not surprising with new disk), bit cannot see any way to make the Stora recognise the new disk and create a 'FamilyLibrary' .
I can SSH to the Stora.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Step by step instructions to get root access on Stora after a factory reset for dummies
Hi,
I realise this thread is a little old but I am trying to revive my Stora after committing the schoolboy error of factory resetting it before realising the stora site was no longer available.
I have got to the point of adding the ssh key to the hipserv filesystem and restarting into hipserv to connect, but I can't get in.
I have some questions that might help me get there:
1. Are there any logs that I can look at if I then tftp boot it again and mount the filesystem?
2. If not, how can I enable logging from sshd to see the issue?
3. Given that the Stora is old and I already had to enable old NFS to get the TFTP working, is there an older key algorithm that I should be using in ssh-keygen perhaps?
Many thanks for any suggestions.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rif.: Step by step instructions to get root access on Stora after a factory reset for dummies
I followed the whole procedure, my stora downloads the files from the tftp server, I am able to ssh in with the ssh command root@10.x.x.x, I complete the configuration and everything seems ok, but when I try to ssh in from the router network I get the message 'Permission denied, please try again.'
Can anyone help me?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Step by step instructions to get root access on Stora after a factory reset for dummies
Unfortunately i can no longer get access! So unless i am missing something your instructions are irrelevant
• Introducing NETGEAR WiFi 7 Orbi 770 Series and Nighthawk RS300
• What is the difference between WiFi 6 and WiFi 7?
• Yes! WiFi 7 is backwards compatible with other Wifi devices? Learn more