FreeBSD
PREVIOUS
NEXT
Mounting ISO images under freebsd
This command is useful for mounting ISO images under FreeBSD.
You have to the vnode driver in your kernel or loaded as a module.
Check for vn driver with "kldstat -v" command:
% kldstat -v | grep vn
8 vn
%
Configure vnode disk:
% vnconfig -v /dev/vn0c image.iso
Mount the virtual disk:
% mount -r -t cd9660 /dev/vn0c /mnt
Access/Check what you need then unmount the disk:
% umount /mnt
Clear the vnode disk:
% vnconfig -u -v /dev/vn0c... Read More
Show media type supported by an interface
This command is useful for showing the valid media options for an interfaceifconfig -m ep0
ep0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 161.81.18.66 netmask 0xfffffff8 broadcast 161.81.18.71
ether 00:12:ff:97:a1:86
media: Ethernet 10baseT/UTP
supported media:
media 10baseT/UTP
media 10base5/AUI
In this case the interface only has two options twisted pair and AUI (aka thicknet)
this is a 3com 3c509 card
ifconfig -m fxp0
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 161.81.22.103 netmask 0xffffff00 broadcast 161.81.22.255
ether 00:91:44:ec:3f:17
&nb... Read More
eject a cdrom in freebsd
This is the way via software to eject a cdrom under freebsdFor ATA (IDE/EIDE) cdroms the device is /dev/acd0c and the command looks like this:
cdcontrol -f /dev/acd0c eject
For SCSI cdroms the device is /dev/cd0c and the command would be:
cdcontrol -f /dev/cd0c eject
I do not have a usb cdrom so I am not sure what that one would look like. Please post a comment if you have seen that one.... Read More
using camcontrol to find information and dynamically add/remove SCSI devices
camcontrol is a very useful command for finding information and for adding and removing SCSI devices.Find what CAM SCSI busses exist and what devices are connected to them:
# camcontrol devlist
<eUSB Compact Flash 5.07 > at scbus0 target 0 lun 0 (pass0,da0)
<EXABYTE EXB-8505SMBANSH2 0793 > at scbus1 target 3 lun 0 (pass1,sa0)
<IBM CDRM00203\000\000\000\000\000!K BZ26 > at scbus1 target 6 lun 0 (pass2,cd0)
#
Notice that the USB bus on my system is considered a CAM SCSI bus.
I have two busses here. Bus 0 (USB) has a compact flash reader on it at target 0.
Bus 1 (SCSI) has a tape drive (sequential access device: sa0) at target 3 and a
cdrom drive (cd0) at target 6.
Let's say that we want to temporarily take the tape drive off without rebooting the
system and go backup another system. Since we only have a tape drive and
a cdrom drive this is pretty safe (disk drives with mounted filesystems would be
a differen... Read More