# Loader prompt



## balanga (Jun 12, 2018)

If booting up from u-Boot and get as far as the FreeBSD loader prompt, I get a

```
can't load 'kernel'
```
 msg follwed by a
*loader>* prompt

How do I tell what file it is looking for and where it is looking for it?

And where can I find examples of using the available commands at the loader> prompt?
In particular how can I list files (using ls) which are on a usb stick? 
`lsdev` shows 
disk devices:
        disk0  (USB)
        disk0s1: DOS/Windows
        disk0s2: FreeBSD
disk0: read failed, error=2
net devices:
         net0:


----------



## Phishfry (Jun 12, 2018)

It is looking for the designated / drive to find and load the kernel.. This is usually pointed to by fstab.


----------



## ShelLuser (Jun 12, 2018)

Basically you'd need to define the same values as you have defined in /boot/loader.conf (the right values of course).

A good way to find out what parameters you need is by using the show command. It's a long read but it will have the configured information in there.

From the top of my head (so: not 100% sure) you need to set the currdev variable for this. And the menu already gave you the correct value:

OK> set currdev="disk0s2"
OK> set vfs.root.mountfrom="ufs:/dev/ada0s2a "

Followed by `boot`.

I grabbed the last value from Phishfry's example above, I obviously don't know if it's valid, (edit): but my guess is that you're using an MBR system.


----------



## nero (Jul 19, 2021)

is it at all possible to use the boot prompt to boot of a USB thumb drive?

T


----------



## astyle (Jul 21, 2021)

nero said:


> is it at all possible to use the boot prompt to boot of a USB thumb drive?
> 
> T


I would think so...


ShelLuser said:


> OK> set currdev="disk0s2"
> OK> set vfs.root.mountfrom="ufs:/dev/ada0s2a "
> 
> Followed by `boot`.





balanga said:


> `lsdev` shows
> disk devices:
> disk0 (USB)


Well, OP was saying this, though: 


balanga said:


> disk0: read failed, error=2


So you can try, but no promises.


----------

