Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Howto]Restore a near dead NAS' DOM (x86)
#1
Hi!
Let’s enter into the heart of the matter bluntly. Smile
But first, excuse my english, I’m not a native speaker.

Ze original in french: ici

Why did I do this and why should you do this thingy?
Because I had a problem at the last update of my N4100PRO. Sad
I was lucky that it happens during a slack period of my activity. But, this is frustrating not being able to access its data!
And, I suppose it could be used for other models as well.

I do NOT guarantee you will not lose your data! It is up to you to make arrangements to safeguard and especially to accept that improper handling can savagely erase all your data...

MAKE BACKUPS

To reassure you a little, I had a problem during the update, I have 4 1TB drives in RAID 5, I take them out, numbered them and placed them in a drawer. I then made the manipulations listed here and when I put the discs back in, while I was sure my DOM was safe, my NAS has recover all my data without problems.
In fact, I urge you to do the same. Take out your discs before any of these operations.


And MAKE BACKUPS
Did I already said that? ‘Don’t care!
MAKE BACKUPS :!: :!:

/!\ I performed all these operations on virtual machines only because I have NO PC! /!\
And I wanted confirmation that was possible :ugeek: I can’t help it Wink

~ Notice to Trolls and Defenders of poor-companies-and-editors-of-paid-softwares: ~
The version of Windows 7 installed for the occasion on a VM came from a dead laptop [sic] Sad No software were harmed during this tutorial Wink

FYI: If — like me — you only have Macs, I do NOT recommend using VirtualBox (I tried...), I have a Parallels license, but for this tutorial I took the trial version, and — good news — it works! 14 days are more than enough to save your NAS Wink

If you do not have the patience (or desire) to do it yourself, here is a link to a bootable image with sshd enabled and fixed IP:
<!-- m --><a class="postlink" href="https://www.dropbox.com/s/eac55jq4wa14ws2/Slax-ssh-ipfixe.img">https://www.dropbox.com/s/eac55jq4wa14w ... ipfixe.img</a><!-- m --> (Yeah, I forgot to gzip before upload...)
Default login root:toor (user:password) fixed IP 192.168.1.200

Requirements:
A sick NAS, not a dead one! Resurrections poses too many administrative problems...
A Mac and a VM or a PC (with or without VM)
A hard disk, a USB stick or any USB support, at least 256 MB (Slax is about 210 MB)
A Slax for USB distribution corresponding to the NAS architecture (32 or 64 bit) and your preferred language
- <!-- m --><a class="postlink" href="http://www.slax.org/en/download.php">http://www.slax.org/en/download.php</a><!-- m -->
Incense and nude dancers, to lighten the mood… yaay! Wink

FYI: I tried (and succeeded) to start the NAS with a 1GB USB stick, as well with this image copied on a 80GB partition of a 160GB HDD.
This also works on a one-partition HDD whatever it size… I also explain the (wobbly) workaround that I have used to overcome the lack of PC. If you are on a PC with Windows or Linux natively installed, the step of creating bootable media should work without a hitch! Wink

Method:
Step 1: Setting the Stage!
- Format your USB support FAT16 or FAT32.

If you use GParted, I will not encumber this tutorial with the manual, already available here. Remember the « boot » flag!

Step 2: Slax!
- Unzip the archive of Slax on your support.
- The following instructions are in the text file located at Slax’s root, you can safely delete this file.
Here is a slightly adapted version:
- Open a terminal or command prompt
- Navigate to the /slax/boot folder.
Code:
cd /slax/boot
- Run the bootinst file corresponding to your system, .bat for Windows or .sh for Linux.
If all goes well, you should see this: (This is the capture of the test under Windows with the trial version of Parallels, oddly, under VirtualBox as the script executed without error, neither the USB stick nor the HDD were bootables)
[Image: img_Slax-bootinst.png]
And voilà!

Quote:This step caused me a lot of problems because I did not have a PC at hand ... To work around the problem with VMs, I had to prepare my HDD with GParted and then copy the data with Win7 Otherwise ... I could not have a bootable partition from Win7 VM Cry
If you use Windows natively, you should have no problem. But I could test it only once with a friend’s laptop under Win7.
If you use Linux natively or in a VM, it works well.

Step 3: Configure Slax
- Start Slax (from your VM or by booting your computer) (PLEASE Captain Obvious!) Smile
(Again, with VirtualBox, even using Plop Boot Manager, no way to boot from the USB stick or the HDD.)
- By default, there’s on Slax an « explorer » I really like and we will use it: mc

Step 3.1: Configuring SSHD
- Launch Konsole, right next to the K menu in the bottom left.
- In the command prompt type
Code:
mc
- NOW, your EYES are BLEEDING! MWAHAHAHAHA :twisted:
- Type
Code:
cd /etc/rc.d/
When you press Enter mc’s display changes
- Go to rc.sshd with the down arrow
- Type
Code:
chmod 755 rc.sshd
That’s it.
And then you say, but... mc does nothing!
Yes ... I’m cruel :twisted:
Well no, in fact it just allows you to see an asterisk appearing before the name and that it changes color (which is a good sign!) :mrgreen:
If you don’t see an asterisk and rc.sshd doesn’t turn flashy green, something is wrong. Verify you are in the good « window » with Tab-key.
When all’s set:
- Type
Code:
exit
Enough Terminal for now! :ugeek:

Step 3.2: Configure a fixed IP
- In the bottom right, just before the hour, is an icon who wants to look like an Ethernet port. Confusedhock:
- Click it, then just above the « Manage Connections... »
- A window appears therein select the « Wired » tab, then click « + Add... v »
- On the small menu, select « Wired »
- In the new window, you can enter a name for the connection
- Check « Connect automatically » and « System Connection »
- In method, select « Manual »
- Fill the IP address that you want, for example 192.168.1.200
- The subnet mask is automatically filled
- Then go to the Ethernet tab and verify that « Restrict to the interface » is on « Any »
- Apply and OK

That’s it! Slax is configured

Step 4: Boot the NAS out of his catalepsy
- Download the DOM image for your NAS here.

Quote:/!\ WARNING /!\ If ever your NAS boots on USB without any problems, ignore manipulations 1 and 3 /!\
- NAS off, open it and remove CAREFULLY the sickly DOM
- Connect the USB device and boot
- If you removed the DOM, replace it equally delicately right after the beep
- Once the NAS started, run a terminal on your computer
- Type
Code:
ssh root@192.168.1.200
(with the IP address you configured)
- During the first login, you will receive a message like this:
Quote:The authenticity of host "192.168.1.200 (192.168.1.200)" can’t be, established.
RSA key fingerprint is XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX.
Are you sure you want to continue connecting (yes/no)?
- Answer « yes » (not just « y »)
Then it will re-warns you:
Quote:Warning: Permanently added ‘192 .168.1.200’ (RSA) to the list of known hosts
.
- Then it requests the root password. On Slax, it’s « toor » by default
Quote:root@192.168.1.200’s password:
Nothing is displayed when you type the password, that’s normal Wink
- You are now connected to your NAS!
Quote:root@192.168.1.200’s password:
Last login: Fri Aug 30 23:11:03 2013
Linux 3.8.2.
root@slax:~#
- Perfect! Start a second terminal wherein you will navigate to the folder containing the image you downloaded
OR
- Type the full path to the image after the command below
(e.g)
-
Code:
scp /path/to/N4100Pro_img_DOM_Version.bin root@192.168.1.200:/root/Documents/
- Once the file has arrived on Slax (when « root@slax:~# » reappears), you can close this terminal
- Back on the first Terminal
- A
Code:
lsscsi
should allow you to find the DOM (usually /dev/sdb, but trust lsscsi, not my example!)
- Once you have identified the offending DOM with certainty
- Run the command
Code:
dd if=/root/Documents/N4100Pro_img_DOM_Version.bin of=/dev/sdb bs=1k
- When « root@slax:~# » reappear, type
Code:
halt
- Disconnect the USB support
- Restart your NAS

If all went well, you should end up with a young and dashing NAS, all dapper with his new OS.
Well... You know what I mean... Wink

Good luck!
N4100Pro - OS: OMV Stone Burner 2.2.5 (Kernel 3.2.0) - RAM: 1GB - Capacity: 12TB RAID 5 - FS: XFS
Reply
#2
Hi!
Let’s enter into the heart of the matter bluntly. Smile
But first, excuse my english, I’m not a native speaker.

Ze original in french: ici

Why did I do this and why should you do this thingy?
Because I had a problem at the last update of my N4100PRO. Sad
I was lucky that it happens during a slack period of my activity. But, this is frustrating not being able to access its data!
And, I suppose it could be used for other models as well.

I do NOT guarantee you will not lose your data! It is up to you to make arrangements to safeguard and especially to accept that improper handling can savagely erase all your data...

MAKE BACKUPS

To reassure you a little, I had a problem during the update, I have 4 1TB drives in RAID 5, I take them out, numbered them and placed them in a drawer. I then made the manipulations listed here and when I put the discs back in, while I was sure my DOM was safe, my NAS has recover all my data without problems.
In fact, I urge you to do the same. Take out your discs before any of these operations.


And MAKE BACKUPS
Did I already said that? ‘Don’t care!
MAKE BACKUPS :!: :!:

/!\ I performed all these operations on virtual machines only because I have NO PC! /!\
And I wanted confirmation that was possible :ugeek: I can’t help it Wink

~ Notice to Trolls and Defenders of poor-companies-and-editors-of-paid-softwares: ~
The version of Windows 7 installed for the occasion on a VM came from a dead laptop [sic] Sad No software were harmed during this tutorial Wink

FYI: If — like me — you only have Macs, I do NOT recommend using VirtualBox (I tried...), I have a Parallels license, but for this tutorial I took the trial version, and — good news — it works! 14 days are more than enough to save your NAS Wink

If you do not have the patience (or desire) to do it yourself, here is a link to a bootable image with sshd enabled and fixed IP:
<!-- m --><a class="postlink" href="https://www.dropbox.com/s/eac55jq4wa14ws2/Slax-ssh-ipfixe.img">https://www.dropbox.com/s/eac55jq4wa14w ... ipfixe.img</a><!-- m --> (Yeah, I forgot to gzip before upload...)
Default login root:toor (user:password) fixed IP 192.168.1.200

Requirements:
A sick NAS, not a dead one! Resurrections poses too many administrative problems...
A Mac and a VM or a PC (with or without VM)
A hard disk, a USB stick or any USB support, at least 256 MB (Slax is about 210 MB)
A Slax for USB distribution corresponding to the NAS architecture (32 or 64 bit) and your preferred language
- <!-- m --><a class="postlink" href="http://www.slax.org/en/download.php">http://www.slax.org/en/download.php</a><!-- m -->
Incense and nude dancers, to lighten the mood… yaay! Wink

FYI: I tried (and succeeded) to start the NAS with a 1GB USB stick, as well with this image copied on a 80GB partition of a 160GB HDD.
This also works on a one-partition HDD whatever it size… I also explain the (wobbly) workaround that I have used to overcome the lack of PC. If you are on a PC with Windows or Linux natively installed, the step of creating bootable media should work without a hitch! Wink

Method:
Step 1: Setting the Stage!
- Format your USB support FAT16 or FAT32.

If you use GParted, I will not encumber this tutorial with the manual, already available here. Remember the « boot » flag!

Step 2: Slax!
- Unzip the archive of Slax on your support.
- The following instructions are in the text file located at Slax’s root, you can safely delete this file.
Here is a slightly adapted version:
- Open a terminal or command prompt
- Navigate to the /slax/boot folder.
Code:
cd /slax/boot
- Run the bootinst file corresponding to your system, .bat for Windows or .sh for Linux.
If all goes well, you should see this: (This is the capture of the test under Windows with the trial version of Parallels, oddly, under VirtualBox as the script executed without error, neither the USB stick nor the HDD were bootables)
[Image: img_Slax-bootinst.png]
And voilà!

Quote:This step caused me a lot of problems because I did not have a PC at hand ... To work around the problem with VMs, I had to prepare my HDD with GParted and then copy the data with Win7 Otherwise ... I could not have a bootable partition from Win7 VM Cry
If you use Windows natively, you should have no problem. But I could test it only once with a friend’s laptop under Win7.
If you use Linux natively or in a VM, it works well.

Step 3: Configure Slax
- Start Slax (from your VM or by booting your computer) (PLEASE Captain Obvious!) Smile
(Again, with VirtualBox, even using Plop Boot Manager, no way to boot from the USB stick or the HDD.)
- By default, there’s on Slax an « explorer » I really like and we will use it: mc

Step 3.1: Configuring SSHD
- Launch Konsole, right next to the K menu in the bottom left.
- In the command prompt type
Code:
mc
- NOW, your EYES are BLEEDING! MWAHAHAHAHA :twisted:
- Type
Code:
cd /etc/rc.d/
When you press Enter mc’s display changes
- Go to rc.sshd with the down arrow
- Type
Code:
chmod 755 rc.sshd
That’s it.
And then you say, but... mc does nothing!
Yes ... I’m cruel :twisted:
Well no, in fact it just allows you to see an asterisk appearing before the name and that it changes color (which is a good sign!) :mrgreen:
If you don’t see an asterisk and rc.sshd doesn’t turn flashy green, something is wrong. Verify you are in the good « window » with Tab-key.
When all’s set:
- Type
Code:
exit
Enough Terminal for now! :ugeek:

Step 3.2: Configure a fixed IP
- In the bottom right, just before the hour, is an icon who wants to look like an Ethernet port. Confusedhock:
- Click it, then just above the « Manage Connections... »
- A window appears therein select the « Wired » tab, then click « + Add... v »
- On the small menu, select « Wired »
- In the new window, you can enter a name for the connection
- Check « Connect automatically » and « System Connection »
- In method, select « Manual »
- Fill the IP address that you want, for example 192.168.1.200
- The subnet mask is automatically filled
- Then go to the Ethernet tab and verify that « Restrict to the interface » is on « Any »
- Apply and OK

That’s it! Slax is configured

Step 4: Boot the NAS out of his catalepsy
- Download the DOM image for your NAS here.

Quote:/!\ WARNING /!\ If ever your NAS boots on USB without any problems, ignore manipulations 1 and 3 /!\
- NAS off, open it and remove CAREFULLY the sickly DOM
- Connect the USB device and boot
- If you removed the DOM, replace it equally delicately right after the beep
- Once the NAS started, run a terminal on your computer
- Type
Code:
ssh root@192.168.1.200
(with the IP address you configured)
- During the first login, you will receive a message like this:
Quote:The authenticity of host "192.168.1.200 (192.168.1.200)" can’t be, established.
RSA key fingerprint is XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX.
Are you sure you want to continue connecting (yes/no)?
- Answer « yes » (not just « y »)
Then it will re-warns you:
Quote:Warning: Permanently added ‘192 .168.1.200’ (RSA) to the list of known hosts
.
- Then it requests the root password. On Slax, it’s « toor » by default
Quote:root@192.168.1.200’s password:
Nothing is displayed when you type the password, that’s normal Wink
- You are now connected to your NAS!
Quote:root@192.168.1.200’s password:
Last login: Fri Aug 30 23:11:03 2013
Linux 3.8.2.
root@slax:~#
- Perfect! Start a second terminal wherein you will navigate to the folder containing the image you downloaded
OR
- Type the full path to the image after the command below
(e.g)
-
Code:
scp /path/to/N4100Pro_img_DOM_Version.bin root@192.168.1.200:/root/Documents/
- Once the file has arrived on Slax (when « root@slax:~# » reappears), you can close this terminal
- Back on the first Terminal
- A
Code:
lsscsi
should allow you to find the DOM (usually /dev/sdb, but trust lsscsi, not my example!)
- Once you have identified the offending DOM with certainty
- Run the command
Code:
dd if=/root/Documents/N4100Pro_img_DOM_Version.bin of=/dev/sdb bs=1k
- When « root@slax:~# » reappear, type
Code:
halt
- Disconnect the USB support
- Restart your NAS

If all went well, you should end up with a young and dashing NAS, all dapper with his new OS.
Well... You know what I mean... Wink

Good luck!
N4100Pro - OS: OMV Stone Burner 2.2.5 (Kernel 3.2.0) - RAM: 1GB - Capacity: 12TB RAID 5 - FS: XFS
Reply
#3
Good job !!
Stéphane Guérithault

In a world without walls and fences, who needs Windows and Gates

PayPal Donation: https://www.paypal.me/qoolbox

My apps

##########################################################################

rolling now for competitor, i do not support anymore Thecus apllications due to lack of time

##########################################################################


voyance - Sophrologue Hypnothérapeute Essonne 
Reply
#4
Good job !!
Stéphane Guérithault

In a world without walls and fences, who needs Windows and Gates

PayPal Donation: https://www.paypal.me/qoolbox

My apps

##########################################################################

rolling now for competitor, i do not support anymore Thecus apllications due to lack of time

##########################################################################


voyance - Sophrologue Hypnothérapeute Essonne 
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Howto]Restore a near dead NAS' DOM (x86) 0 2,043 Less than 1 minute ago
Last Post:

Forum Jump:


Users browsing this thread: 1 Guest(s)