Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've got usb-keys setup to multi-boot different Linux images. I wouldn't mind adding FreeNAS, and there's a doc with samples to add to grub.cfg

menuentry "FreeNAS-8.0.4-RELEASE-x64" {
    insmod ufs2
    insmod iso9660

    # /usr/local/sbin/grub-probe -d /dev/sde1 -t fs_uuid
    # c89c-7b3a
    #search --no-floppy --fs-uuid --set c89c-7b3a

    set isofile="/boot/FreeNAS-8.0.4-RELEASE-x64.iso"
    loopback loop $isofile
    kfreebsd  (loop)/boot/kernel/kernel.gz
    kfreebsd_loadenv  (loop)/boot/device.hints

    #set FreeBSD.vfs.root.mountfrom=ufs:/dev/ad4s1a
    set kFreeBSD.vfs.root.mountfrom=ufs:/dev/acd0
    set kFreeBSD.vfs.root.mountfrom.options=rw
    #set vfs.root.mountfrom=cd9660:/dev/ad1s1
    #set vfs.root.mountfrom.options=rw
}

I'm a little unsure on setting the vfs root, Here's the result of attempting to boot this;

failed to mount root

Some useful information may be found at; boot FreeBSD iso from grub2 USB stick

share|improve this question
    
sadly I don't know the answer, but thanks for the grub.cfg –  phunehehe Nov 19 '10 at 15:31
    
I'm taking a look at this at the moment. Some forums indicate that the cd is mounted as an iso9660 virtual ram drive by grub. playing with it presently. –  hbdgaf Jan 24 '11 at 17:26
    
@aking1012 did you end up figuring anything out? –  maxmackie Feb 14 '12 at 2:37
    
@NaxMackie - I got REALLY side-tracked, but it was to school and now that I'm done an employment search. I'll get back on this soon. –  hbdgaf Feb 28 '12 at 13:05
    
added more details from my latest attempts –  Thermionix Mar 8 '12 at 2:52

3 Answers 3

Try adding a loader variable to increase the delay for USB initialization. You can add this variable to /boot/loader.conf or during boot time at the prompt. Alternatively you can also select the '3'rd option in the boot menu to allow for booting from USB. (not 100% sure if it's the 3rd)

set kern.cam.boot_delay="10000"

This works for when the boot process has trouble mounting the USB stick.

All three options above accomplish the same thing

Good luck

share|improve this answer

Since you're trying to boot off a USB flash drive, the device is going to start with da. In the output, you can see it was detected as /dev/da0. Depending on how the device was partitioned, it might be something like /dev/da0s1a or /dev/da0a (if no bsdlabel).

The problem with this is that depending on the computer, it might not detect as da0 in all cases. da is also used for scsi devices and usb media readers will also come up as da* devices. A workaround once you can get it to boot, is to use the GEOM label feature to "name" the mount point and then you can change your fstab to refer to it by name. It will always work regardless of which device is labeled then. man glabel for more information in a FreeBSD environment. (or check a website with freebsd manuals)

share|improve this answer

It seems that kernel has stalled as when it comes to booting usb drive hasn't yet reported about it existence. I wonder what does your config do but it doesn't works and didn't provide FreeBSD kernel correct device name for booting.

You need to ask kernel about available drives typing '?' as prompt suggests. After that you should type in correct root filesystem specification for your root partition. It should be something like ufs:/dev/da0s1a depending on how you did partition your usb drive.

When you do find correct drive path you should alter your grub.conf with that path. Also note that it should read 'FreeBSD', not 'kFreeBSD' as your setting is just silently ignored.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.