# System wont boot. Approaching limit on PV entries



## yoshisakan (Aug 24, 2010)

I booted in single user mode and increased the following:


```
kern.ipc.shm_use_phys=1
vm.pmap.shpgperproc=
vm.pmap.pv_entry_max=
```

I substantially increased th values of shpgperproc and pv_entry_max by running sysctl varname =value.

I believe running this alters the sysctl.conf so that when I reboot the values remain, if not that could be the problem. This system was running great until after I installed openoffice. I am trying to learn to become a Unix server admin, although this is lofty because I just installed FreeBSD for the first time 2 weeks ago and I don't have any prior Unix knowledge. I have been learning fast though, I have gnome running smoothly and all my ports are up to date . 

I need to fix this problem, and prevent it from happening. This isn't an acceptable scenario for a server to ever run into. How do I prevent it from occuring in the future?

System is a core 2 duo E8500, 8GB of ram and the file system is set up per the freebsd file system allocation manual.


----------



## SirDice (Aug 24, 2010)

yoshisakan said:
			
		

> I believe running this alters the sysctl.conf so that when I reboot the values remain, if not that could be the problem.


They don't. /etc/sysctl.conf gets processed by /etc/rc.d/sysctl during boot. Nothing more, nothing less.


----------



## yoshisakan (Aug 24, 2010)

Ok well when I boot in single user mode, it doesn't allow me access to vi or ee. Should I mount the drive in the same manner as when you illegally alter rc.conf and the system brings you to shell, so that I have the ability to alter files? Where is the proper place to add these values? Is it etc/rc.d/sysctl?

Futhermore, why am I experiencing this error, am I going to have to indefinitely increase these values over time? There must be a more streamline way of file system management. I am not even running apache, and I fear what would happen if I was running a slew of them in jails. System resource use would be exponentially increased.


----------



## SirDice (Aug 24, 2010)

yoshisakan said:
			
		

> Ok well when I boot in single user mode, it doesn't allow me access to vi or ee. Should I mount the drive in the same manner as when you illegally alter rc.conf and the system brings you to shell, so that I have the ability to alter files?


You use the same procedure as always:

```
fsck -y
mount -u /
mount -a -t ufs
swapon -a
```



> Where is the proper place to add these values? Is it etc/rc.d/sysctl?


No, it's /etc/sysctl.conf. See sysctl.conf(5).



> Futhermore, why am I experiencing this error, am I going to have to indefinitely increase these values over time?


I have no idea since you haven't told us when this happens, what you are running and on what system.


----------



## yoshisakan (Aug 24, 2010)

Sorry I meant to add that. I am running FreeBSD 8.1 AMD64. It happens upon boot, and I cant run the default boot. I can only boot in single user.


----------



## yoshisakan (Aug 24, 2010)

Also, I listed the wrong pc. The one that I am having this problem on has 4GB of ram. File system is set per the manuals allocation reccomendations.


----------



## SirDice (Aug 24, 2010)

yoshisakan said:
			
		

> File system is set per the manuals allocation reccomendations.


What filesystem? UFS or ZFS?

I've never, ever had any issues with the default values for these variables on an i386 with 2GB and UFS.


----------



## yoshisakan (Aug 24, 2010)

Im not sure, I just used the FreeBSD amd64 installation disc, and setup the file system structure like the manual said. 
http://www.freebsd.org/doc/en/books/handbook/install-steps.html

I think its UFS.


----------



## SirDice (Aug 24, 2010)

Are you running on GENERIC or do you have a custom kernel? 

If you are running a custom kernel, do you have the same problem with GENERIC?


----------



## yoshisakan (Aug 24, 2010)

I haven't done any modification, so I guess I am running on GENERIC. Maybe this isn't the place to mention this, but the last thing I did before these errors started occuring, was install openoffice, which took like 6 hours. I installed it from ports.


----------



## yoshisakan (Aug 25, 2010)

Ok, I solved the problem. I was trying to also install flash for firefox and I was doing some modifications to fstab and rc.conf as per http://forums.freebsd.org/showthread.php?t=5786

I removed what I had added and it boots fine now. I realized this when I was trying to get flash on my other computer. I didn't get the same error but it was the same in that I couldn't reach a shell.

I guess the next thing to do is find a write up on how to install flash, that works for my system.


----------



## wblock@ (Aug 25, 2010)

yoshisakan said:
			
		

> I guess the next thing to do is find a write up on how to install flash, that works for my system.



The Handbook chapter on browsers has the right procedure.  Always look in the Handbook first.


----------



## yoshisakan (Aug 25, 2010)

wblock said:
			
		

> The Handbook chapter on browsers has the right procedure.  Always look in the Handbook first.



I had tried that one too. Firstly, my ports tree is updated. When I try to make install nspluginwrapper and linux_base_f10, most of the fetches time out. Also, as far as linux emulation within the mounted virtual drive; is editing fstab in the ee editor the proper way of doing so? After I create the virtual drive, it becomes successfully populated with the linux files. However when I reboot, I can't get to shell, so theres a problem somewhere.


----------



## wblock@ (Aug 25, 2010)

It may be as simple as needing linux_enable="YES" in /etc/rc.conf.  But please, start a new thread for the linproc and flashplugin questions.


----------

