# Need help in loading FreeBSD  from USB using UNetbootin



## Shreekantha (Aug 24, 2015)

Hi,

I am trying to load freebsdFreeBSD on baremetal switch from USB using UNetbootin.
Steps followed:
> Created bootable USB using Unetbootin.
> I have added "SERIAL 1 115200 0" and "console=tty1 console=ttyS1,115200n8" to the syslinux.cfg file to have the console logs on tty1. So my syslinux.cfg content is as below:

```
=============================================
SERIAL 1 115200 0
default menu.c32
prompt 0
menu title UNetbootin
timeout 100

label unetbootindefault
menu label Default
kernel /ubnkern
append initrd=/ubninit console=tty1 console=ttyS1,115200n8
=============================================
```
With this when I try to load the image:
>  "unetbootindefault" option on screen is seen. After selecting this I get "corrupted kernel image"  error.

Am I missing any option/etc here ? Please help.

Note:  I have added the SERIAL, console=tty1 information to syslinux.cfg file to get the logs. Without this, I was not seeing any logs on terminal.

Please help.
Thanks much,
Shreekantha


----------



## wblock@ (Aug 24, 2015)

FreeBSD has separate images for USB sticks.  Please use these rather than trying to convert an image that is meant for use on CD or DVD.  Remember, FreeBSD is not Linux, and the same techniques might work on one but not the other.


----------



## Shreekantha (Aug 25, 2015)

Hi. thanks for the info. I am using memstick image only to boot my switch. So was wondering if need to add any parameter explicitly to boot in syslinux.cfg file. Thanks again.


----------



## wblock@ (Aug 25, 2015)

I still don't see why you are using UNetbootin.  If you want a bootable FreeBSD memory stick, just install FreeBSD on one.


----------



## scottro (Aug 25, 2015)

I don't know if unetbootin is supposed to work with FreeBSD these days or not.
However, all you have to do is download a memstick image and dd it to a USB stick. There are some pretty clear instructions in the handbook's pre-install section.  
https://www.freebsd.org/doc/handbook/bsdinstall-pre.html


----------



## wblock@ (Aug 25, 2015)

Shreekantha wants to run from USB stick, not just install from it.  Or maybe run from an image of one?  It's not clear.


----------



## Shreekantha (Aug 26, 2015)

Hi Guys, I need to install FreeBSD from USB. That's all what I am trying. The reason for using UnetBootin is to add some debug information so that the logs will come on to my serial console of switch as mentioned in post #1.

I followed the Windows method to write the USB (mentioned in https://www.freebsd.org/doc/handbook/bsdinstall-pre.html) still not successful. 

Thanks again


----------



## kpa (Aug 26, 2015)

How much debug information you need and from what point? It's trivial to enable the comconsole on the FreeBSD loader(8) prompt if that's enough for you:


```
set console=comconsole
boot
```

You can even build your own memory stick image or CD image that uses that setting by default, see release(7).


----------



## wblock@ (Aug 26, 2015)

Shreekantha said:


> I followed the Windows method to write the USB (mentioned in https://www.freebsd.org/doc/handbook/bsdinstall-pre.html) still not successful.



What did not work?


----------



## Shreekantha (Aug 26, 2015)

wblock@ said:


> What did not work?


USBb is ready by the switch and it just hangs there. That might be because , switch does not know where to log the debug/info messages. That's the whole reason for using Unetbootin here so that I can add the serial/debug information to syslinux.cfg.



kpa said:


> You can even build your own memory stick image or CD image that uses that setting by default, see release(7).


Thanks for that information, I will try this.


----------



## wblock@ (Aug 26, 2015)

Enable a serial console as kpa showed in post #8.  FreeBSD kernels do not work the same as Linux kernels, so it is unlikely that using Linux serial console configuration will help.


----------

