Useful mounting options
In Embedded linux development process it is very common to create a mount points from target to host and between hosts. some useful commands
mounting NFS file system:
the nfs server name is NFSSERVER and its IP address is: 192.168.20.34
the server directory is /opt/files and it is configured with permissions on the server (/etc/exports file). also the client added the server IP and name to its /etc/hosts file.
# mkdir /mnt/nfsserver
# mount -t nfs NFSSERVER:/opt/files /mnt/nfsserver
if you cant configure the server name on /etc/hosts file you should use the IP address:
#mount -t nfs 192.168.20.34:/opt/files /mnt/nfsserver
mounting Windows system
the windows workstation is WINWS with ip: 192.168.20.70
make sure SAMBA daemon(service) is running on your linux system - depends on your distribution.
# mkdir /mnt/windows
# mount -t smbfs -o username=winuser,password=pass //192.168.20.70/linux_files /mnt/windows
NOTES:
- If you get an error try cifs instead of smbfs
- sometimes (IT reasons) it is working only with the server name (not IP address) and sometimes only with IP so try both if you have problems
Loop mount image file
# mount -o loop file.img /mnt/image
mount USB disk on key
# mount /dev/sda1 /mnt/usb
for more options and situations see man pages
Recent Stories
Top DiscoverSDK Experts
Compare Products
Select up to three two products to compare by clicking on the compare icon () of each product.
{{compareToolModel.Error}}
{{CommentsModel.TotalCount}} Comments
Your Comment