How do I mount a hard disk in FreeBSD using command line options?
You need to use the mount command to mount local or remote (network based share such as NFS or CIFS) on to the FreeBSD file system tree. The genral syntax is as follows:
mount /dev/adXYZE /path/to/mount/point
/dev/adXZE is actual disk partition name. Use the following command to list all detected hard disks including cdrom and partitions:
egrep 'ad[0-9]|cd[0-9]' /var/run/dmesg.boot
Sample outputs:
ad0: 5120MBat ata0-master WDMA2 acd0: CDROM at ata1-master WDMA2 Trying to mount root from ufs:/dev/ad0s1a ad0: 5120MB at ata0-master WDMA2 acd0: CDROM at ata1-master WDMA2 Trying to mount root from ufs:/dev/ad0s1a ad0: 5120MB at ata0-master WDMA2 acd0: CDROM at ata1-master WDMA2 Trying to mount root from ufs:/dev/ad0s1a ad0: 5120MB at ata0-master WDMA2 acd0: CDROM at ata1-master WDMA2 Trying to mount root from ufs:/dev/ad0s1a
The following provides much cleaner output:
atacontrol list</prE> Sample outputs: <pre> ATA channel 0: Master: ad0 <QEMU HARDDISK/0.9.1> ATA/ATAPI revision 7 Slave: no device present ATA channel 1: Master: acd0 <QEMU DVD-ROM/0.9.1> ATA/ATAPI revision 4 Slave: no device present
To mount a partition called /dev/ad1s1d at /data, enter:
mkdir /data mount /dev/ad6s1d /data df -h
Edit /etc/fstab and append entry as follows:
/dev/ad6s1d /data ufs rw 2 2
Save and close the file.
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop













{ 0 comments… add one now }