# edit /boot/loader.conf, but won't boot



## phospher (Aug 16, 2009)

hi,

i made a typo in my /boot/loader.conf file and rebooted the machine. now it won't boot. how can i edit this file now that it won't boot? 


thanks,


----------



## graudeejs (Aug 16, 2009)

insert fixit cd or freebsd dvd, boot from it, enter fixit mode, and fix your typos.

Simple & easy


----------



## MG (Aug 16, 2009)

Press 6 in the boot menu: escape to loader prompt
Then type:

unload
load kernel
boot


----------



## MG (Aug 16, 2009)

Just curious: what typo is in there? When I put "sdlkjflksdj" on top of loader.conf the system just ignores it and runs over it.


----------



## phospher (Aug 16, 2009)

kern.hz=5 or kern.hz=1 can't remember but on of those...

and i meant to try 50 but i'm finding 10 works best in my vm environment. i've been trying to tweak my freebsd machines so that their network performance is better. right now i'm only getting 30 to 40 mbits a second transfer with iperf. if i run the same test on the host system (centOS) to my pfsense firewall i get 95mbits a second. i understand that there is some overhead with vmware but i would expect better than 30 - 40 mbits.

at any rate, i tried the unload, load kernel, boot thing but it just tries to boot again and it dies. where do i get the fix it cd? is that not on the regular install iso?


----------



## graudeejs (Aug 16, 2009)

Can your HDD write faster thatn 30-40MB/s?
That is the question....

I doubt you need to tweak FreeBSD, it's already tweaked


----------



## graudeejs (Aug 16, 2009)

phospher said:
			
		

> where do i get the fix it cd? is that not on the regular install iso?



download from FreeBSD mirror ftp.....
ftp://ftp.freebsd.org/pub/FreeBSD/ISO-IMAGES-i386/7.2/


----------



## phospher (Aug 16, 2009)

well, the host system has the same hard drive and it will do 95. obviously, i don't think it's a freebsd issue but a vmware issue. or more so, how vmware works with freebsd.

do you know any tools that i can test hard drive performance with?


----------



## graudeejs (Aug 16, 2009)

```
dd if=/dev/random of=/tmp/test bs=8m
```
and in other terminal run *gstat* as root


This method has some issues, but i find it good enough to check if my disks write as fast as they should (aprox)


----------



## MG (Aug 16, 2009)

phospher said:
			
		

> kern.hz=5 or kern.hz=1 can't remember but on of those...
> 
> and i meant to try 50 but i'm finding 10 works best in my vm environment. i've been trying to tweak my freebsd machines so that their network performance is better. right now i'm only getting 30 to 40 mbits a second transfer with iperf. if i run the same test on the host system (centOS) to my pfsense firewall i get 95mbits a second. i understand that there is some overhead with vmware but i would expect better than 30 - 40 mbits.
> 
> at any rate, i tried the unload, load kernel, boot thing but it just tries to boot again and it dies. where do i get the fix it cd? is that not on the regular install iso?



Ah, sysctl settings, I see. Apparently they are not skipped.
Maybe it can be changed with the set and unset commands on the loader prompt?
A set kern.hz=5 results in panic with reboot here.
Otherwise, I would do it with a live cd like DesktopBSD or Freesbie. Never used Fixit.


----------



## graudeejs (Aug 16, 2009)

fixit cd is simple FreeBSD cd with sysinstall, in sysinstall you select fixit mode, then select cd/dvd as source, and FreeBSD shell will be started, form there you can do many things


----------



## Beastie (Aug 16, 2009)

Plus it's only 200+ MB instead of 700+ for the other "GUI-enabled" live CDs.


----------



## MG (Aug 16, 2009)

It's called livefs.iso these days, I think.
I'm gonna try it with Qemu. (have nothing to do P)


----------



## Beastie (Aug 16, 2009)

MG said:
			
		

> have nothing to do P


Ah, in that case, you should try Bochs instead! Qemu has native execution for userland code, unlike Bochs.


----------



## phospher (Aug 17, 2009)

at the loader prompt;


```
set kern.hz=10
```

did the trick. thanks!


----------



## phoenix (Aug 17, 2009)

Which virtual NIC chipset are you using?

The default lnc(4) if quite horrible.  As is the rl(4) chipset.  You'll want to switch to using the em(4) driver, using the e1000 virtual NIC.  Then you should be able to get close to 100 Mbps throughput, along with support for gigabit networking.


----------



## phospher (Aug 17, 2009)

i'm using both em and le. i get about the same speeds with both..


----------



## phospher (Aug 17, 2009)

i' ve figured out that it doesn't slow down until i start adding virtual switches. if i just bridge my FreeBSD server to the hosts nic i get the expected speeds of a 100mbit network. but once i add a virtual switch and connect directly to it, it slows.....

what i've built is a virtual network with 5 vyatta routers and 3 FreeBSD servers. the virtual server then connects to a hardware switch and then to my pfsense firewall.  

i'm thinking i might try esxi instead of vmware server 2...

weird thing is, i also have another vmware environment at work running vmware esx and the same thing happens.  i'm loosing confidence in vmware..

maybe i'll head over to the vmware forums..


----------

