Fix system

I made a change on /boot/loader.conf and now kernel don't want to boot!
How can i mount my filesystem from Freebsd cd and use fixit to remove the line from /boot/loader.conf?
 
Have you tried single-user mode?

If you know the device node of the root partition (e.g. /dev/ad0s1a), you can mount it on any available directory (e.g. /mnt?) then you use the absolute path of your favorite editor to change the line. I don't remember exact paths, just browse the disc a little bit. ;)

And double-check with the defaults in /boot/defaults/loader.conf.
 
If you know which loader.conf entry is causing the problem, then select 6 (Drop to loader prompt) from the boot menu, and type unset bad.option.name

You can see all the loader tunables via show.

Once you have the bad option removed, you can boot normally (type boot), then edit the file on disk.
 
My bad option is not there.
I put on /boot/loader.conf a module that kernel cannot recognise it. So hangs and is rebooting when come the time to load this module.
I see /boot/loader.conf but how can i remove option witch is inside the file?
 
boot from the fixit cd
mount your normal root partition somewhere (like /mnt)
edit /mnt/boot/loader.conf
 
At the boot loader prompt, type 'unload' and it will unload all modules and the kernel. Then 'load /boot/kernel/kernel' . Then boot.

Adam
 
If you put a basic install on another disk and boot from it. the mount the bad disk as a usb moun. then fix it. ... when push comes to shove!
 
sk8harddiefast said:
Single user mode don't work.
From cd don't let me to mount nothing.
Operation not permitted
What do you mean single-user mode doesn't work? What does it say?

To check and mount partitions enter the following:
Code:
fsck -y
mount -u /
mount -a -t ufs
 
sk8harddiefast said:
Maybe was my fault. Now Single user mode worked

Also worked, i delete this line and now i back on my system :)
Thanks all of you for your responses.

You didn't need to do any of this, actually.

You could've gone to the loader prompt.

loader> unload (this unloads the kernel, and any modules that were loaded with it with /boot/loader.conf)
loader> load /boot/kernel/kernel
loader> load /boot/kernel/<a module file> (load any necessary modules to boot (ie. scsi, something else) )
loader> boot

This will boot your system and you could freely edit /boot/loader.conf.
 
Just i was a little afraid to do this because i listen for kernel and modules unloading but i was not knowing that only delete all the lines inside /boot/loader.conf
 
Back
Top