Page 1 of 1

Recovering existing configuration on a NAS

Posted: 11 Jun 2014 14:23
by Helpmeh
Hi,

First of all I want to tell you that I'm French so my written English is not perfect and i ask you to be understanding.

I have a Zyxel NSL-100 NAS used as log server, in order to register informations about users using the Wifi (date, time, day, @mac, visited sites...). I have to recover its GUI configuration (It was not me who configured it)

The OS used is FreeNAS 6.4.

But i have an error at booting :

FreeBSD/i386 bootstrap loader, Revision 1.1
Unable to load a kernel!
\
can’t load ‘kernel’
Type ‘?’ for a list of commands, ‘help’ for more details
OK

So I don't know what to do. Someone can help me with this error?


The best way for me should be to format the Nas with the last FreeNAS OS, but I wonder how can I recover the configuration on the defective NAS ?

Is there a file who keeps the whole configuration of the GUI, which can be reinjected after formating?


Do you have any other solution?

Hope you understand.

Regards

Re: Recovering existing configuration on a NAS

Posted: 11 Jun 2014 14:50
by crowi
Is there a file who keeps the whole configuration of the GUI
Yes, it is the config.xml, which can be saved via the webgui.
Usually you should backup the config frequently or at least before you change something.

Cheers,
crowi

Re: Recovering existing configuration on a NAS

Posted: 11 Jun 2014 14:52
by raulfg3
Helpmeh wrote:reeBSD/i386 bootstrap loader, Revision 1.1
Unable to load a kernel!
\
can’t load ‘kernel’
Type ‘?’ for a list of commands, ‘help’ for more details
This indicate some type of OS corruption.
Helpmeh wrote:he best way for me should be to format the Nas with the last FreeNAS OS, but I wonder how can I recover the configuration on the defective NAS ?
Do a new install of N4F on a new boot (if you use a USB key to boot, is really easy to use a new one).

Your data is safe and can be easy remounted, only need more work to configure SMB shares, ftp, and other services by hand.

Please provide more info about your boot medium.

and remember that boot medium is UFS formated, so you can read in other PC that support UFS and in this case search for /CF folder and *.xml config files that N4F use for store las 4 sucessfull boots

Re: Recovering existing configuration on a NAS

Posted: 11 Jun 2014 17:00
by Helpmeh
Thanks for replies

Does the config.xml exist on the server even if we did not backup the GUI config?

I have installed FreeNAS on a VM to make tests, i don't find /CF folder. I'm sorry i'm really bad with FreeNAS, BSD.

I tried grep -r -i config.xml, it's not better.

@raulfg3: what you mean is that I should boot on a usb key, like in live cd (with FreeNAS?) and there I could browse my hard disk and recover the config.xml?
and remember that boot medium is UFS formated, so you can read in other PC that support UFS and in this case search for /CF folder and *.xml config files that N4F use for store las 4 sucessfull boots
I don't understand :(

Re: Recovering existing configuration on a NAS

Posted: 11 Jun 2014 17:16
by raulfg3
Helpmeh wrote:@raulfg3: what you mean is that I should boot on a usb key, like in live cd (with FreeNAS?) and there I could browse my hard disk and recover the config.xml?
more or less.
I mean that you can boot from a liveUSB image, and browse your old install to recover config.xml.

and you can take advantage of a liveUSB (That do not touch your data or boot disk), to detect your data disk, mount and share by SMB, so you can recover your data and see how easy is to recover data from a Nas4Free System.


to download liveUSB: http://sourceforge.net/projects/nas4fre ... 2.0.1.972/

Re: Recovering existing configuration on a NAS

Posted: 11 Jun 2014 17:58
by Helpmeh
OK, i'll try this.

I failed when I said that the OS used is Freenas 6.4.. It's FreeNAS 0.69 "Kwisatz Haderach", so I hope it's not a problem..?

When I have recover the config.xml, I will have to copy/paste on /cf/conf/ using winscp or else, and everything will be ok, that's right? :mrgreen:

Re: Recovering existing configuration on a NAS

Posted: 11 Jun 2014 18:29
by b0ssman
that config might be to old for the upgrade in nas4free.
see viewtopic.php?f=16&t=61

Re: Recovering existing configuration on a NAS

Posted: 12 Jun 2014 11:32
by Helpmeh
@b0ssman : I don't want to upgrade in nas4free but in freenas

How can you explain that on my VM with FreeNAS 9.2 I don't have the CF folder and I don't find that config.xml file ?

Re: Recovering existing configuration on a NAS

Posted: 12 Jun 2014 12:00
by raulfg3

Re: Recovering existing configuration on a NAS

Posted: 12 Jun 2014 12:09
by b0ssman
Helpmeh wrote:@b0ssman : I don't want to upgrade in nas4free but in freenas

How can you explain that on my VM with FreeNAS 9.2 I don't have the CF folder and I don't find that config.xml file ?
this is the nas4free forum.
you can not upgrade freenas 0.x to freenas 9.2. they are not compatible.

Re: Recovering existing configuration on a NAS

Posted: 12 Jun 2014 12:36
by raulfg3
b0ssman wrote:this is the nas4free forum.
you can not upgrade freenas 0.x to freenas 9.2. they are not compatible.
sorry, but FreeNAS 0.6x can be upgraded to N4F 9.x , perhaps, need to do a fresh install and config by hand services, but data is safe , and can be possible to upgrade 0.7 to n4F : viewtopic.php?f=16&t=6751

But upgrade from 0.6x to 0.75 is possible, and then upgrade to N4F

Re: Recovering existing configuration on a NAS

Posted: 12 Jun 2014 13:08
by armandh
a quick explanation

NAS4Free is the continuation of the FreeNAS-7 OS
FreeNAS-8 and later are different but with the old brand name
the fork was between product [rights/ownership] and name [rights/ownership]

sort of like slapping super sport badges on an Edsel

Re: Recovering existing configuration on a NAS

Posted: 16 Jun 2014 10:04
by Helpmeh
Hi,

I try to keep this post updated, here is my progress:

I first plugged the HDD in Sata, and have sailed in the files on the NAS through UFS explore software (otherwise the disk does not appear in Computer ..)
I spotted in cf / conf config.xml. I extracted and placed on key.

Then via the GUI I uploaded config.xml. I recovered actived services (TFTP was enabled with the path of the directory, CIFS/SMB settings..) but nothing about ZFS pool, users and group.. is it normal? (Honestly, I don't know what I should recover)

Thank you

Re: Recovering existing configuration on a NAS

Posted: 16 Jun 2014 10:22
by raulfg3
Helpmeh wrote:but nothing about ZFS pool, users and group.. is it normal?
YES.

To recover ZFS, you only need:

1 - Detect disk in first place = Use butoon ""clear config & Import Disk" on http://wiki.nas4free.org/doku.php?id=do ... management

2 - Now you need to import your ZFS volume, go to : http://wiki.nas4free.org/doku.php?id=do ... n_detected

And use button to import your pool

3 - Once your pool are detected and configured ( perhaps you need to change SMART detection), go to Disks|ZFS|Configuration|Synchronize

And use button Syncronize to sync actual detected pool with WEbGUI:
http://wiki.nas4free.org/doku.php?id=do ... ynchronize

Re: Recovering existing configuration on a NAS

Posted: 16 Jun 2014 11:09
by Helpmeh
Oh sorry, I forgot to tell you that I'm using FreeNAS 0.7 now

But is it the same process? And after formating, can ZFS volume be still imported?

Thanks !

Re: Recovering existing configuration on a NAS

Posted: 16 Jun 2014 11:19
by raulfg3
Helpmeh wrote:Oh sorry, I forgot to tell you that I'm using FreeNAS 0.7 now

But is it the same process? And after formating, can ZFS volume be still imported?

Thanks !
yes, you allways be able to import your ZFS volumes using webGUI or by shell, but be carefully I do not know what you say "after formating" If you plan to format your data disk in ZFS , you lose your actual data.

You need to add disk to webGUI but DO NOT FORMAT or you lose all your data <- In Nas4Free 9.2.x this action is done using refered button to import your disk and do not touch data on it.

Re: Recovering existing configuration on a NAS

Posted: 16 Jun 2014 13:44
by Helpmeh
Actually my NAS can't boot, so I have to format it, is not it? :roll:

If so, is there any recommendation ? (What format, how many partitions etc...)

Re: Recovering existing configuration on a NAS

Posted: 16 Jun 2014 14:13
by raulfg3
Helpmeh wrote:Actually my NAS can't boot, so I have to format it, is not it? :roll:

If so, is there any recommendation ? (What format, how many partitions etc...)
OK, but only your boot device, never your data disk.

To do in a safe way, disconnect your data disk to do a fresh install ( embeded if you use a USB Key) full if you use a HD.

if you do this fresh install using Nas4Free.ISO, you can't be asked about format ( N4F use UFS by default) and my only recomendation is do not use swap partition on any case: if you have enought RAM you do not need swap, if you do not have enought RAM, buy more.

Re: Recovering existing configuration on a NAS

Posted: 16 Jun 2014 15:07
by Helpmeh
The fact is there is only one disk.. Tell me if i'm wrong:

I have to "Unetboot" my usb key with the OS that I want, then boot on the key, and then...install the OS on the HD (without swap)?

But data is old, it's not a problem to erase it.

Re: Recovering existing configuration on a NAS

Posted: 16 Jun 2014 16:23
by raulfg3
if you can boot from USB, you only need to install nas4Free embeded on a USB and boot your NAS, so your only Disk are for Data.

http://wiki.nas4free.org/doku.php?id=do ... ad_options
http://wiki.nas4free.org/doku.php?id=do ... user_guide




PD: Please consider to buy a more powerfull hardware like: http://www.pccomponentes.com/hp_prolian ... 250gb.html

it's capable of 6 Disk and boot from USB. and have ECC RAM ( Better for ZFS)

Re: Recovering existing configuration on a NAS

Posted: 17 Jun 2014 09:06
by Helpmeh
Up to now, my only hard disk was used for System and Data.. I don't want to use a usb key constantly, but only for the first boot before formating.. is not it possible?

Re: Recovering existing configuration on a NAS

Posted: 17 Jun 2014 09:17
by b0ssman
as you are experiencing at the moment. it is a good idea to keep os and data separate.
what is wrong in your opinion with using a usb key?

Re: Recovering existing configuration on a NAS

Posted: 17 Jun 2014 09:18
by raulfg3
Helpmeh wrote:Up to now, my only hard disk was used for System and Data.. I don't want to use a usb key constantly, but only for the first boot before formating.. is not it possible?
It's possible, but not recomended, because if your BSD ( OS that use Nas4Free to work), have some type of corruption, you need to do a new fresh full install and you lose your second partition when you store data.

The recomended install is to install Nas4Free embeded on a USB key and boot from this USB key, this separete DATA from boot disk, so if your boot disk is corrupt, you only need to do a new fresh embeded install and restore your previosly saved config and your data are recovered, no lost data.

Do a embeded install have the advantage of running on RAM so your USB key do not burn-ing premature.

At the end you can decide what is best for you, but my suggest is to use embeded install and boot from USB Key ( and that consider to buy a better hardware with more sata space).

Re: Recovering existing configuration on a NAS

Posted: 17 Jun 2014 09:41
by Helpmeh
( and that consider to buy a better hardware with more sata space).
In fact I have to make work the Nas as it worked before it crashed..so it was using system and data on one disk. I can't change hardware. Data saved is only connexion logs : informations about users using the Wifi (date, time, day, @mac, visited sites...).

So I can always browse in the HD even if the system crashes, right?

I 'll keep a backup of config.xml, and the ISO of the system in prevention.

Thank you for explanations guys

I think I 'll encounter other problems during the install

Re: Recovering existing configuration on a NAS

Posted: 17 Jun 2014 10:08
by Helpmeh
SO, if I format my hard disk, will I be able to import ZFS volume or not? Or I have to import it (before formating) on a VM and then reinject config.xml ?

It's a little bit confused sorry :oops:

Re: Recovering existing configuration on a NAS

Posted: 17 Jun 2014 10:51
by raulfg3
Helpmeh wrote:SO, if I format my hard disk, will I be able to import ZFS volume or not? Or I have to import it (before formating) on a VM and then reinject config.xml ?

It's a little bit confused sorry :oops:
NO, it's NOT possible to import any OS ( ZFS, UFS, etc...) if you format your Disks.

This is the reason because I suggesto to separate boot disk of data Disk, to avoid loss of data if you reinstall/format your boot disk.

Re: Recovering existing configuration on a NAS

Posted: 17 Jun 2014 11:32
by Helpmeh
mmh ok, ..installing an OS on a key looks like interesting, but settings are not lost on every reboot ?

Re: Recovering existing configuration on a NAS

Posted: 17 Jun 2014 11:45
by raulfg3
Helpmeh wrote:mmh ok, ..installing an OS on a key looks like interesting, but settings are not lost on every reboot ?
NO for embeded install, YES for LiveUSB.

Re: Recovering existing configuration on a NAS

Posted: 18 Jun 2014 04:40
by armandh
installing the os on a disk will likely wipe any data on that disk
booting from some other boot medium even live CD may allow data to be recovered from a data partition

as I have never had the OS and data on the same disk I can not assert this with absolute certainty

but I can say that trying to recover data from a disk DO NOT install to or format or even write to that data disk
doing so will likely end the chance to recover some, possibly any, of the data