# Stuck on Boot Loader



## Magic (Jul 27, 2010)

Recently had a power outage and it has caused our server not to be able to boot.  Currently it is stopping before the boot menu with:


```
/boot/defaults/loader.conf
/boot/kernel/kernel text=0x7e9a48 /
```

The cursor stops spinning and sits there.  I can boot from the live CD and have fsck all partitions.  I am unsure what the next step would be?  

I have installed FreeBSD 7.2 and using the 7.2 live CD.

I appreciate any help with this.

Thanks.


----------



## da1 (Jul 27, 2010)

Hi,

One option would be to reinstall the boot loader.
Another one would be to use some external boot loader (grub,LILO,etc).

Personally, I would go with reinstalling the FreeBSD boot loader or simply rewriting the mbr (no boot loader). You can find this at the second screen of the normal installation process (be sure to commit it before exiting)


----------



## Magic (Jul 27, 2010)

I did run:
`fdisk -B -b /boot/boot0 /dev/ar0`

This now brought up the prompt

```
F1 FreeBSD
```
but then goes to loading the kernel again and freezes at the same place


----------



## da1 (Jul 27, 2010)

can you boot into single user mode (option 4) ? if yes, you can do "return" and off you go to multi-user mode. you can recompile the kernel (seems like this is the issue here) and check logs,etc

you can also "escape to loader prompt" (option 6) and do "unload" (to unload all your kernel modules) and then "load GENERIC" or "load /boot/kernel" or "load <whatever kernel name>".

BTW ... did you recompile your kernel or userland before this disaster ? or was it simply a power failure ?

because I never had this problem from a power failure (although I agree that power failures can be quite "generous" at giving problems)


----------



## Magic (Jul 27, 2010)

When booting from the raid I can not get to the boot menu to do any options (4,6, etc.)  It is freezing before loading the boot menu.  

I have not messed with the kernel in any way.  About 6 months ago I upgraded from 6.0 to 7.2.  I have not had any problems since then until now.  =/  

I can mount the raid and noticed there is a /boot/kernel.prev/  Would it be possible to boot off of that?  Or is there a way to recompile the kernel using the live CD?

I'm trying to learn about the loader.conf & boot process but would like to not mess things up further...


----------



## Magic (Jul 27, 2010)

Update:

I did modify /boot/loader.conf and told it to load /boot/kernel.prev/kernel

I was able to boot using that.  However it had some errors while booting.  Specifically:

```
/libexec/ld-elf.so.1: shared object "libpam.so.4" not found...
```
It wouldn't let me login because of that error.  I rebooted in single user mode and have since tried to recompile the kernel.  I followed the instructions from the FreeBSD handbook and used the GENERIC kernel and did not modify anything.

Now after restarting it still freezes at the same spot, actually a little before.. now I receive this:

```
Loading /boot/defaults/loader.conf
/
```

Once again I'm stuck and out of ideas.


----------

