How to edit loader.conf without a working freeNAS OS

Status
Not open for further replies.

ragnvaldr2

Cadet
Joined
Mar 13, 2013
Messages
3
I setup a freeNAS (8.0.4) system at our small business office to backup about 6-8 computers.
It's an older computer, 5 HDDs with 12 or 13 TB between them. 3GB of DDR.

It was running fine until for a few months and lately it's been randomly crashing. I finally plugged in a screen and got this:

Panic: kmem_malloc(131072):
kmem_map too small: 314327040

http://freebsd.1045724.n5.nabble.co...small-quot-panic-on-8-0-STABLE-td4033650.html

So looking up how to fix this, I found this thread and did what they suggested by adding 'vm.kmem_size="20G" to /boot/loader.conf via ssh.

And now it won't boot fully. It'll get into the screen to choose my boot type, and booting normally I get:

kmem_suballoc: bad status return of 1
cpuid = 0
kdb: enter: panic
thread pid 0 tid 0
stopped at kdb_enter+0x3b:
movl $0,kdb_why

And since it won't boot properly, I can't ssh back in.

I've tried making a fresh 8.0.4 install (I run it off a flashdrive. I didn't erase my original drive though) to see if it would let me access the files on the other flash drive. No dice there. Looked into a virtual freeBSD machine (via VirtualBox on OS 10.8) and couldn't get that working quite right either. I read that there's a way to read UFS on OSX with OSXFuse, but I also need to be able to write, and from what it looked like, that won't let me write to the disk.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
ragnvaldr2,

As you've discovered, this is a risky area to experiment with unless you understand more details. The link below will tell you what you want to know, but if you are successful in getting your system to boot again, PLEASE UPDATE FreeNAS to at least version 8.3.0-p1. Simply save your settings from the GUI, install the NEW version of FreeNAS on another USB key, boot from that, and restore your settings. There are more detailed discussions here about how to do that. Also please be sure to post the details about your hardware when asking for help.


http://forums.freenas.org/showthrea...-included-SOLVED&p=24413&viewfull=1#post24413
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
First, I'd upgrade to FreeNAS 8.3.0. 8.0.4 has security vulnerabilities that are only fixed by updating FreeNAS.

The kmem_map_too_small is the most common error for "add more RAM".

I'm not keen on tweaking systems or with that tweak and how it works(or doesn't work). My philosophy is that if you are having to tweak your system you should fully and completely understand what that setting does and why you in particular need it. The only tweaks I've seen that I'd ever recommend would be tweaks for iscsi on ZFS and a system tweak for the new Intel NICs. I've never tweaked any of my systems aside from "autotune" and they all saturate Gb.. blah blah blah.

Are you sure you are using UFS and not ZFS? If you are using ZFS(which I'd never ever recommend with 3GB of RAM, but from your error message I want to think you are using ZFS). If you are using ZFS I believe your only option is to use FreeBSD(or the experimental project ZFS on Linux). Also, if you are using ZFS you should be able to restore from a backup config file and be back in business. If you don't have a backup config you should be able to use the "auto-import" function to import ZFS.

If you are 100% sure you are using UFS then I can't provide much assistance with how to mount and use UFS with a new USB stick. I went to FreeNAS for the amazing file system called ZFS. I consider UFS to be mature(heck.. the darn thing is almost twice my age) but is extremely simple and doesn't provide much for error detection and correction compared to ZFS.
 

ragnvaldr2

Cadet
Joined
Mar 13, 2013
Messages
3
Back to usual, which is still problematic

ragnvaldr2,

As you've discovered, this is a risky area to experiment with unless you understand more details. The link below will tell you what you want to know, but if you are successful in getting your system to boot again, PLEASE UPDATE FreeNAS to at least version 8.3.0-p1. Simply save your settings from the GUI, install the NEW version of FreeNAS on another USB key, boot from that, and restore your settings. There are more detailed discussions here about how to do that. Also please be sure to post the details about your hardware when asking for help.


http://forums.freenas.org/showthrea...-included-SOLVED&p=24413&viewfull=1#post24413
Perfect, thank you.
Should the update help with my original kernel panic, you think? (and if not, should I open a new thread with an appropriate title, or just carry on here?)
Well I posted the HDDs and RAM, also running with a 300W PSU, and, I believe, a Core 2 Quad CPU (it's an old HP Pavillion m9040n)


First, I'd upgrade to FreeNAS 8.3.0. 8.0.4 has security vulnerabilities that are only fixed by updating FreeNAS.

The kmem_map_too_small is the most common error for "add more RAM".

I'm not keen on tweaking systems or with that tweak and how it works(or doesn't work). My philosophy is that if you are having to tweak your system you should fully and completely understand what that setting does and why you in particular need it. The only tweaks I've seen that I'd ever recommend would be tweaks for iscsi on ZFS and a system tweak for the new Intel NICs. I've never tweaked any of my systems aside from "autotune" and they all saturate Gb.. blah blah blah.

Are you sure you are using UFS and not ZFS? If you are using ZFS(which I'd never ever recommend with 3GB of RAM, but from your error message I want to think you are using ZFS). If you are using ZFS I believe your only option is to use FreeBSD(or the experimental project ZFS on Linux). Also, if you are using ZFS you should be able to restore from a backup config file and be back in business. If you don't have a backup config you should be able to use the "auto-import" function to import ZFS.

If you are 100% sure you are using UFS then I can't provide much assistance with how to mount and use UFS with a new USB stick. I went to FreeNAS for the amazing file system called ZFS. I consider UFS to be mature(heck.. the darn thing is almost twice my age) but is extremely simple and doesn't provide much for error detection and correction compared to ZFS.
That's what I was afraid of. Unfortunately, there are only 2 RAM slots on my mobo, and DDR2 is expensive. Luckily, we're going to be getting another NAS system soon, but I still need to get it to run long enough to transfer the data over to that one, and restore another computer in the meantime.

Understandable about the tweaking. I mostly agree, but there's also the problem of sometimes you just don't have the time to understand as much as you should.

I believe I was using ZFS, you're right. At least I think it was RAID-Z.
I did try installing freeBSD on a VM, but after installing and rebooting, it just wanted to install again, and so I figured I'd try to find a simpler alternative rather than spending even more time trying to learn a new OS.

But, luckily I'm back to where I started. Which still isn't good, but it's something. Thanks.
 

ragnvaldr2

Cadet
Joined
Mar 13, 2013
Messages
3
Okay, and now I'm back to a degraded zpool, but also one of my sparcebundles is totally corrupted. One of our laptops (Macbook Pro) has been having issues lately and finally bit the dust. Some sort of surge through the logic board that fried the HDD, HDD cable, and the sata port on the board. So the HDD is gone--some data recovered, but not much. And that's the computer whose time machine sparcebundle is now gone. Though there are 4 snapshots -- they're a little old, but they're there and would be better than nothing. Though they say "Used - 0" and "Refe" 579G." I tried rolling back, but no dice.

I'm guessing this isn't a freeNAS issue though, since the other datasets' backups seem okay and intact.
 
Status
Not open for further replies.
Top