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 22nd December 2008
map7 map7 is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 75
Default Trouble booting if USB drive attached

I'm running FreeBSD 7.0 on my server and I backup to a USB drive every night. I have a problem that if I reboot the kernel detects the USB drive first and tries to mount all the partitions/slices off it and that doesn't work.

I'm using a 3ware raid card configured as a RAID 5 in hardware. FreeBSD sees this as one device called /dev/da0s1, this is also the same devices that USBs use.

Is there a way to mount my system UFS2 drive/slices using UUIDs or Labels instead so that this problem will go away?
Reply With Quote
  #2   (View Single Post)  
Old 22nd December 2008
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 696
Default

First, you'll need to disable USB boot / mass-storage device support in the BIOS, so that it doesn't try to boot from USB.

Then, you can lock in the SCSI device names so that no matter which order you plug in the devices, they will always be numbered the same. That way, the 3Ware array will always be da0 and the USB backup drive will always be da1.

You do this via /boot/loader.conf.

Get the device name, SCSI bus name, and target number via camcontrol devlist:
Code:
# camcontrol devlist
<Kingston DataTraveler 2.0 1.00>   at scbus0 target 0 lun 0 (da0,pass0)
<AMCC 9650SE-12M DISK 3.08>        at scbus1 target 0 lun 0 (da1,pass1)
Here you see a USB drive and a 3Ware RAID controller, along with the scbus, and target info.

Check the output of dmesg or pciconf -vl to get the device names:
Code:
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <Kingston DataTraveler 2.0 1.00> Removable Direct Access SCSI-2 device
da0: 40.000MB/s transfers
da0: 1906MB (3905407 512 byte sectors: 255H 63S/T 243C)
da1 at twa0 bus 0 target 0 lun 0    
da1: <AMCC 9650SE-12M DISK 3.08> Fixed Direct Access SCSI-5 device 
da1: 100.000MB/s transfers                                         
da1: 476827MB (976541696 512 byte sectors: 255H 63S/T 60786C)
Now you add the needed info into /boot/loader.conf, re-arranging the order so that the 3Ware card is always da0:
Code:
hint.scbus.0.at="da0"                  
hint.scbus.0.bus="0"
hint.da.0.at="scbus0"
hint.da.0.target="0"
hint.da.0.unit="0"
hint.scbus.1.bus="umass-sim0"
hint.da.1.at="scbus1"
hint.da.1.target="0"
hint.da.1.unit="0"
Now, if you reboot, you should get the devices in the right order, and be able to boot correctly with the USB drive plugged in and turned on.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
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
Booting Failed (OpenBDS 4.3, 4.4) quanter OpenBSD Installation and Upgrading 5 27th November 2008 01:09 PM
mount second hard drive - newbie trouble corneliu FreeBSD General 7 23rd September 2008 10:51 PM
different booting bsd.rd & bsd Hihihi OpenBSD General 3 15th July 2008 10:34 PM
Intermitant fault upon booting Johnny2Bad FreeBSD Installation and Upgrading 7 17th May 2008 07:43 PM
Booting with external USB drive plugged in? Bruco FreeBSD General 29 17th May 2008 05:39 PM


All times are GMT. The time now is 09:04 AM.


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