DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 12th June 2008
s25 s25 is offline
New User
 
Join Date: Jun 2008
Posts: 6
Thanked 1 Time in 1 Post
Default Boot freeBSD from USB drive?

Thanks to Carpetsmoker for telling me about this great place.
To begin my apologies if this is not meant to be in here. I was unsure where this would fit.

What I am trying to do is dual boot my computer with freeBSD and Windows. I want the Windows boot loader to be there for it all to work as standard and only to boot into freeBSD when my usbkey is in the computer. I can do the partitioning and all that however I am stumbling at this bit of getting it to boot freeBSD from a usb-key, I don't want my filesystem on the usb key I only want it to boot from a USB key. I have looked into boot0config but donot see how I can do it.
I tried the following after copying /boot /mnt/usb(/dev/da0):
fdisk -B -b /boot/boot0 /dev/da0

I also tried this:

Join Date: Apr 2006
Posts: 2
mount /dev/da0s1 /mnt/usb
mkdir /mnt/usb/boot
cd /boot
cp -Rpv * /mnt/usb/boot
boot0cfg -B -s 1 -t -v 182 /dev/da0

So now when I select FreeBSD when I boot by usb I get some BTX Error and the screen scrolls so fast that I cannot make out what is being meant however it does look like numbers. Any ideas?

I would be really grateful if anyone can guide me in this.

Thanks allot.

Last edited by s25; 12th June 2008 at 08:39 PM.
Reply With Quote
  #2   (View Single Post)  
Old 12th June 2008
ua549's Avatar
ua549 ua549 is offline
Port Guard
 
Join Date: Jun 2008
Posts: 22
Thanked 0 Times in 0 Posts
Default

I'm a Windows guy and a total newbie with FreeBSD/Unix like operating systems. On my notebook PC all I did was boot from FBSD CD #1 and direct the installer to use the entire USB drive. In the BIOS I put the USB drive ahead of the hard drive in the boot sequence. I did not touch the hard drive or its MBR; it remains 100% Vista. When I want to boot FreeBSD, all I do is insert the USB drive otherwise Vista boots. It is all automatic.
Reply With Quote
  #3   (View Single Post)  
Old 12th June 2008
s25 s25 is offline
New User
 
Join Date: Jun 2008
Posts: 6
Thanked 1 Time in 1 Post
Default

That is now what I asked however. I only want enough info to boot into the hardrive for the following reasons first of all is that constant read/writes may kill the usb stick and I fear a serious decrease in speed.

What is the speed stability like on the system?

Thanks
Reply With Quote
  #4   (View Single Post)  
Old 12th June 2008
ua549's Avatar
ua549 ua549 is offline
Port Guard
 
Join Date: Jun 2008
Posts: 22
Thanked 0 Times in 0 Posts
Default

You can set the FreeBSD file system other than root to run on a free partition on the hard drive. It is part of the initial installation process.

Running from USB is quite slow, but is OK for certain tasks that don't require much disk i/o.
I use it for testing configuration files for the main BSD desktop machine I'm trying to get working (so far without much success).
Reply With Quote
  #5   (View Single Post)  
Old 13th June 2008
robbak's Avatar
robbak robbak is offline
Real Name: Robert Backhaus
VPN Cryptographer
 
Join Date: May 2008
Location: North Queensland, Australia
Posts: 366
Thanked 40 Times in 39 Posts
Default

It's not something I have done either, but there are a couple of ways. One is to install to the USB key, as ua549 suggested. A simpler way would be to use boot0cfg(8) to add the FreeBSD boot manager to the USB key. That boot manager would then allow you to select the FreeBSD slice to boot from. Search for boot0cfg on the forum for another few threads where we have recently discussed this utility. Also read the man page linked earlier in this post for more information.

Edit: OK, I just read your post properly. You don't need the /boot folder - you should have the root partition on the hard drive. Then when the USB key brings up the boot manager, select the freeBSD partition. Unless you put the full root partition on the USB drive, attempting to boot from it will not work.

(Re: my sig - OK, there is a dumb answer given!)
__________________
The only dumb question is a question not asked.
The only dumb answer is an answer not given.

Last edited by robbak; 13th June 2008 at 04:43 AM.
Reply With Quote
  #6   (View Single Post)  
Old 13th June 2008
s25 s25 is offline
New User
 
Join Date: Jun 2008
Posts: 6
Thanked 1 Time in 1 Post
Default

Ok I do that I removed the /boot from the usb key and it is still fialing on me, I get to the select freeBSD screen and then when I select freeBSD I just get lots of scrolling numbers and text going so fast I cannot read it!
This is the command I used.
boot0cfg -B -s 1 -v /dev/da0

I am hoping that tells the system that there is a bootloader there and then boot loader tells them to go ahead as normal. However it does not seem to be working quite like that.... As you heard the problems above.

Any ideas? I am doing lots of reading up on boot0cfg but cannot seem to be able to get it right. I am probably missing something simple..
Reply With Quote
  #7   (View Single Post)  
Old 13th June 2008
s25 s25 is offline
New User
 
Join Date: Jun 2008
Posts: 6
Thanked 1 Time in 1 Post
Default

fdisk -B -b mbr da0s1 I tried that and I get a BTX Halted error with lots of numbers and text above it...

All help is welcome I hope it is not bad to double post here, Just on different unrelated attempts to the one above I feel it is often better to add it like this.

Thanks again guys.
Reply With Quote
  #8   (View Single Post)  
Old 14th June 2008
robbak's Avatar
robbak robbak is offline
Real Name: Robert Backhaus
VPN Cryptographer
 
Join Date: May 2008
Location: North Queensland, Australia
Posts: 366
Thanked 40 Times in 39 Posts
Default

Just thought of it: no, it will not work with the FreeBSD boot manager. No doubt other boot managers will be able to do this, but the freeBSD one is too simple (by design, by the way: It is that way so it will fit entirely inside the boot sector.)

With multiple drives, the FreeBSD boot manager simply looks for other boot managers, and gives you the option of handing over to that one. So you will be presented with any bootable slices on the current disk, plus any other disks with bootable entries.

You will have to take a look at some other boot managers (eg grub). These ones are more complex than the freebsd one, and probably have the smarts to look inside other drives for bootable slices.
__________________
The only dumb question is a question not asked.
The only dumb answer is an answer not given.
Reply With Quote
  #9   (View Single Post)  
Old 14th June 2008
s25 s25 is offline
New User
 
Join Date: Jun 2008
Posts: 6
Thanked 1 Time in 1 Post
Default

Thanks allot ! I will keep looking!
Reply With Quote
Old 17th June 2008
Weaseal's Avatar
Weaseal Weaseal is offline
Package Pilot
 
Join Date: May 2008
Location: East Coast, US
Posts: 177
Thanked 7 Times in 7 Posts
Default

Try grub. I am fairly sure you can load that on a usb stick. Google around, I know there are tutorials about.
__________________
FreeBSD addict since 4.2-RELEASE.
My FreeBSD wiki.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hard drive error on boot 'READ_DMA timed out' map7 FreeBSD General 7 19th November 2008 06:07 AM
which Flash Drive I must buy for FreeBSD and OpenBSD mfaridi General Hardware 18 22nd October 2008 07:43 PM
FreeBSD 7.0 hangs with USB disk drive. map7 FreeBSD General 7 9th August 2008 03:02 AM
moving freebsd install to new drive carpman FreeBSD General 7 7th August 2008 06:09 PM
FreeBSD 7.0 hard drive problems. Errinok FreeBSD Installation and Upgrading 8 13th June 2008 03:24 PM


All times are GMT. The time now is 03:59 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick