Under linux mount (mount) CD-ROM image file. Removable hard disk. U disk. Windows and NFS network shares

2010-12-21  来源:本站原创  分类:OS  人气:140 

linux is an excellent open source operating system that can run on small to large to giant types of handheld computer systems, with the linux system, the growing maturity and stability as well as its unique advantages of open source, linux in the world been more widely used. Now many companies are from the UNIX system, computer systems, Linux systems and Windows system components of the hybrid system, different systems often need to exchange data. Here I offer my own practical experience tell us about how to mount the linux system (mount) CD-ROM image file, move the hard disk, U disk, and Windows network shares and UNIX NFS network shares.
Mount command (mount)
First of all, tell us about mount (mount) to use the command, mount command parameter is very large, here mainly to talk about today, we will use the.
Command format:
mount [-t vfstype] [-o options] device dir
Of which:
1.-t vfstype specified file system type, usually do not have to be specified. mount will automatically select the correct type. Common types are:
CD-ROM or CD-ROM image: iso9660
DOS fat16 file system: msdos
Windows 9x fat32 file system: vfat
Windows NT ntfs File System: ntfs
Mount Windows file network share: smbfs
UNIX (LINUX) file sharing network: nfs
2.-o options mainly used to describe the way of equipment or files attached. Commonly used parameters are:
loop: used to mount a file as a hard disk partition on the system ro: read-only mounted equipment using rw: read-write mounted device using iocharset: access to the file system used by the specified character set 3.device to mount (mount) equipment.
4.dir device on the system mount point (mount point).
CD-ROM image file attached disk technology in recent years great progress, new computer systems are equipped with large capacity disk systems, in Windows, many people are used to make the software and data through a virtual CD-ROM CD-ROM image file to use. This has many advantages: first, the drive to reduce wear and tear; two large storage capacity hard drives are now dozens of CD-ROM image file is not a problem, as used with the transfer is very convenient; Third, the hard drive is much higher than the CD-ROM read speed the read speed, CPU usage greatly reduced. In fact, the production and use linux system disc images more convenient than the Windows system, do not borrow any third-party packages.
1 CD-ROM image file from the CD-ROMs. The CD into the drive, execute the following command.
# Cp / dev / cdrom / home / sunky / mydisk.iso or # dd if = / dev / cdrom of = / home / sunky / mydisk.iso
Note: the implementation of any of the above command to the current drive can be made into a CD-ROM in the CD-ROM image file / home / sunky / mydisk.iso
2, the files and directories on CD-ROM image file, execute the following command.
# Mkisofs-r-J-V mydisk-o / home / sunky / mydisk.iso / home / sunky / mydir
Note: This command will / home / sunky / mydir directory of all the directories and files on CD-ROM image file / home / sunky / mydisk.iso, CD label is: mydisk
3, CD-ROM image file mounted (mount)
# Mkdir / mnt / vcdrom
Note: Create a directory used as a mount point (mount point)
# Mount-o loop-t iso9660 / home / sunky / mydisk.iso / mnt / vcdrom
Note: Use the / mnt / vcdrom can access the disk image file mydisk.iso in all the files.

Mount removable hard disk on linux systems, USB interface, removable hard disk is treated as a SCSI device. Into the mobile hard disk before you use the fdisk-l or more / proc / partitions View the system hard drive and hard disk partition situation.
[Root at pldyrouter /] # fdisk-l
Disk / dev / sda: 73 dot 4 GB, 73407820800 bytes
255 heads, 63 sectors / track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/ Dev/sda1 1 4 32098 + de Dell Utility
/ Dev/sda2 * 5 2554 20482875 7 HPFS / NTFS
/ Dev/sda3 2555 7904 42973875 83 Linux
/ Dev/sda4 7905 8924 8193150 f Win95 Ext'd (LBA)
/ Dev/sda5 7905 8924 8193118 + 82 Linux swap
Here you can clearly see that the system has a SCSI hard disk / dev / sda and its four disk partition / dev/sda1 - / dev/sda4, / dev/sda5 is the partition / dev/sda4 logical partitions. Connected mobile hard disk, then fdisk-l or more / proc / partitions View the system hard drive and hard disk partitioning [root at pldyrouter /] # fdisk-l
Disk / dev / sda: 73 dot 4 GB, 73407820800 bytes
255 heads, 63 sectors / track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/ Dev/sda1 1 4 32098 + de Dell Utility
/ Dev/sda2 * 5 2554 20482875 7 HPFS / NTFS
/ Dev/sda3 2555 7904 42973875 83 Linux
/ Dev/sda4 7905 8924 8193150 f Win95 Ext'd (LBA)
/ Dev/sda5 7905 8924 8193118 + 82 Linux swap
Disk / dev / sdc: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors / track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/ Dev/sdc1 1 510 4096543 + 7 HPFS / NTFS
/ Dev/sdc2 511 4864 3497 3505 f Win95 Ext'd (LBA)
/ Dev/sdc5 511 4864 3497 3473 + b Win95 FAT32
We should be able to find more than a SCSI hard disk / dev / sdc and its two disk partition / dev/sdc1?, / Dev/sdc2, where / dev/sdc5 is / dev/sdc2 partition logical partitions. We can use the following command mount / dev/sdc1 and / dev/sdc5.
# Mkdir-p / mnt/usbhd1
# Mkdir-p / mnt/usbhd2
Note: Create a directory used as a mount point (mount point)
# Mount-t ntfs / dev/sdc1 / mnt/usbhd1
# Mount-t vfat / dev/sdc5 / mnt/usbhd2
Note: ntfs formatted disk partition should use-t ntfs parameters, fat32 formatted disk partition should use-t vfat parameters. If the file name is displayed as garbled characters or no show, you can use the following command format.
# Mount-t ntfs-o iocharset = cp936 / dev/sdc1 / mnt/usbhd1
# Mount-t vfat-o iocharset = cp936 / dev/sdc5 / mnt/usbhd2
linux system partition using fdisk and mkfs command to create a command file system partition can be made into a mobile hard disk linux system unique to ext2, ext3 format. Thus, even more convenient to use linux. Use the following command can be directly attached.
# Mount / dev/sdc1 / mnt/usbhd1

U disk and mount removable hard disk USB interface on the linux systems, like U disk is treated as a SCSI device. Using the same methods and mobile hard disk. Insert U disk before you use the fdisk-l or more / proc / partitions View the system hard drive and hard disk partition situation.
[Root at pldyrouter root] # fdisk-l
Disk / dev / sda: 73 dot 4 GB, 73407820800 bytes
255 heads, 63 sectors / track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/ Dev/sda1 1 4 32098 + de Dell Utility
/ Dev/sda2 * 5 2554 20482875 7 HPFS / NTFS
/ Dev/sda3 2555 7904 42973875 83 Linux
/ Dev/sda4 7905 8924 8193150 f Win95 Ext'd (LBA)
/ Dev/sda5 7905 8924 8193118 + 82 Linux swap
Into the U-hours, and then fdisk-l or more / proc / partitions View the system hard drive and hard disk partition situation.
[Root at pldyrouter root] # fdisk-l
Disk / dev / sda: 73 dot 4 GB, 73407820800 bytes
255 heads, 63 sectors / track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/ Dev/sda1 1 4 32098 + de Dell Utility
/ Dev/sda2 * 5 2554 20482875 7 HPFS / NTFS
/ Dev/sda3 2555 7904 42973875 83 Linux
/ Dev/sda4 7905 8924 8193150 f Win95 Ext'd (LBA)
/ Dev/sda5 7905 8924 8193118 + 82 Linux swap
Disk / dev / sdd: 131 MB, 131072000 bytes
9 heads, 32 sectors / track, 888 cylinders
Units = cylinders of 288 * 512 = 147456 bytes
Device Boot Start End Blocks Id System
/ Dev/sdd1 * 1 889 127983 + b Win95 FAT32
Partition 1 has different physical / logical endings:
phys = (1000, 8, 32) logical = (888, 7, 31)
System more than a SCSI hard disk / dev / sdd, and a disk partition / dev/sdd1, / dev/sdd1 is what we want to mount the U disk.
# Mkdir-p / mnt / usb
Note: Create a directory used as a mount point (mount point)
# Mount-t vfat / dev/sdd1 / mnt / usb
Note: It can be / mnt / usb to visit U disk, and if the file name is displayed as garbled characters or no show, you can use the following command.
# Mount-t vfat-o iocharset = cp936 / dev/sdd1 / mnt / usb
Mount a network share Windows file sharing is the core of Windows SMB / CIFS, to be mounted under the linux (mount) windows disk sharing, you must install and use the samba package. Now most popular linux distributions already contain the samba package, if not installed install linux system, please first install samba samba. Of course, can also go to
www.samba.org ...... download the new version is 3.0.10 version.
When the windows system after sharing set, you can mount the linux client (mount), the specific operation is as follows:
# Mkdir-p / mnt / samba
Note: Create a directory used as a mount point (mount point)
# Mount-t smbfs-o username = administrator, password = pldy123 / / 10.140.133.23 / c $ / mnt / samba
Note: administrator and pldy123 is ip address 10.140.133.23 windows computer, a user name and password, c $ is a disk of this computer to share
So can the linux system through the / mnt / samba to access windows files on the system disk. Above operations in redhat as server 3, redflag server 4.1, suse server 9, and windows NT 4.0, windows 2000, windows xp, windows 2003 environment test.
NFS mount UNIX system similar to windows file sharing network to share, UNIX (Linux) system also has its own network sharing, that is NFS (Network File System), here we have the SUN Solaris2.8 and REDHAT as server 3 as an example a simple explain how to mount nfs in linux network share.
The client in linux mount (mount) NFS shared disk, you must configure NFS server.
1, Solaris NFS server system configuration is as follows:
(1) modify / etc / dfs / dfstab, increase the shared directory share-F nfs-o rw / export / home / sunky
(2) start the nfs service # / etc / init.d / nfs.server start
(3) NFS services started, you can use the following command to add new shared # share / export/home/sunky1
# Share / export/home/sunky2
Note: / export / home / sunky and / export/home/sunky1 is ready to share the directory 2, linux NFS server system configuration is as follows:
(1) modify / etc / exports, increase the shared directory / export / home / sunky 10.140.133.23 (rw)
/ Export/home/sunky1 * (rw)
/ Export/home/sunky2 linux-client (rw)
Note: / export / home / directory sunky, sunky1, sunky2 is ready to share the directory, 10.140.133.23, *, linux-client is allowed to mount this share linux client IP address or host name. If you want to use the host name linux-client to the server host in / etc / hosts file to increase linux-client host ip definition. The following format:
10.140.133.23 linux-client
(2) start and stop NFS service / etc / rc.d / init.d / portmap start (the default in the REDHAT started in PORTMAP)
/ Etc / rc.d / init.d / nfs start start the NFS service / etc / rc.d / init.d / nfs stop stop the NFS service NOTE: If modify / etc / export file to add new shares, should stop the NFS service, and then start NFS service can the sharing of the additional work. Use the command exportfs-rv can achieve the same effect.
3, linux client mount (mount) other linux system or UNIX system, NFS share # mkdir-p / mnt / nfs
Note: Create a directory used as a mount point (mount point)
# Mount-t nfs-o rw 10.140.133.9: / export / home / sunky / mnt / nfs
Note: Here we assume 10.140.133.9 is the NFS server host IP address, of course, here you can use the host name, but in the local / etc / hosts file to increase the definition of the server ip. / Export / home / sunky shared directory for the server.
So can the linux client through / mnt / nfs to access other linux system or UNIX system out of NFS Share file. Above operations in redhat as server 3, redflag server4.1, suse server 9, and Solaris 7, Solaris 8, Solaris 9 for x86 & sparc environment test.

相关文章
  • Under linux mount (mount) CD-ROM image file. Removable hard disk. U disk. Windows and NFS network shares 2010-12-21

    linux is an excellent open source operating system that can run on small to large to giant types of handheld computer systems, with the linux system, the growing maturity and stability as well as its unique advantages of open source, linux in the wor

  • linlinux the mount (mount) command Xiangjie ux of the mount (mount) command Xiangjie 2010-03-19

    Under linux mount (mount) CD-ROM image file, mobile hard disk, U disk, Windows, and NFS network share linux is a good open-source operating system can run at large to giant types of small handheld computer systems, with linux system with the growing

  • Linux: mount (mount) command to use (1) 2010-12-21

    Mount command (mount) First of all, tell us about mount (mount) to use the command, mount command parameter is very large, here mainly to talk about today, we will use the. Command format: mount [-t vfstype] [-o options] device dir Of which: 1.-t vfs

  • linux samba mount windows shared directory using 2011-06-28

    On linux access windows through samba shared directory: 1. Create mount points: mkdir-r / mnt / samba (2) to use smbclient to view remote windows shared directory: smbclient-L / / 192.168.203.1-U username Executed, will be prompted for a password, an

  • linux mount mount Detailed 2011-09-21

    First, introduce mount (mount) to use the command, mount command parameter is very large, we are here today to talk about the main use to. Command format: mount [-t vfstype] [-o options] device dir Of which: 1.-t vfstype specified file system type, u

  • Unix + OS IBM Aix Disk disk lvm / disk partition / disk mount / disk mon / File 2010-12-28

    AIX file JFS and JFS2 on AIX 5L performance of a simple test file system IO http://www.dstfix.cn/article/200808/16-207.html Source file where the file system type Where the file system type of target file Source and destination files are in the same

  • Mount options to improve ext4 file system performance 2010-07-29

    Mount options to improve ext4 file system performance

  • Linux, NFS (Network File System) was established with the configuration 2010-12-17

    Network File System (NFS, Network File System) is a partition on the remote host (directory) by the network to the local system to mount a mechanism, through the network file system support, users can operate on the local system as As to the local di

  • Linux, NFS (Network File System) to establish and configuration 2010-12-17

    Network File System (NFS, Network File System) is a partition on the remote host (directory) to local system via the network to mount a mechanism, through the network file system support, users can operate on the local system as as to the local distr

  • Unix + OS IBM Aix Disk disk lvm / disk partition / disk mount / disk monitor 2010-12-28

    aix disk management http://www.javaeye.com/topic/324818 Speaking from the problem, not previously exposed aix, linux is only the application of some fur. DB2 on the server after Bahrain and then to install the default installation directory was found

  • The three Redhat Linux 9 installation CD to burn to a DVD, 2010-10-15

    The three Redhat Linux 9 installation CD to burn to a DVD, DVD burner, and decided three Redhat Linux 9 installation CD to burn to a DVD. I tried using UltraISO to open the first disk of the ISO and then the rest two German documents incorporated, an

  • Red Hat Linux AS4 four CD package a DVD 2010-10-15

    Ready for Red Hat Linux AS4 four CD image file! [Redhat. Enterprise. AS. 4. Update. 3]. CD1 [Redhat. Enterprise. AS. 4. Update. 3]. CD2 [Redhat. Enterprise. AS. 4. Update. 3]. CD3 [Redhat. Enterprise. AS. 4. Update. 3]. CD4 Redhat Enterprise AS4 Upda

  • linux operating system, directory creation and file creation limit 2010-10-08

    We often process in the production environment for several days on the line, suddenly does not work, find out the reasons repeatedly found in the Linux operating system can not create directory or file, then what reason would normally have led to thi

  • I used Linux command of the cat - connection file or standard input and print 2010-11-02

    I used Linux command of the cat - connection file or standard input and print This link: http://codingstandards.javaeye.com/blog/801090 (reprint, please indicate the source) Use Description The purpose is to connect the command cat file or standard i

  • I used the Linux command unzip - uncompress the zip file 2010-10-23

    I used the Linux command unzip - uncompress the zip file This link: http://codingstandards.iteye.com/blog/792040 (reproduced please indicate the source) Use Description zip file is a compressed file format commonly used, WinZip, WinRar compression so

  • I used Linux command of the stat - display file or file system status 2011-04-17

    I used Linux command of the stat - display file or file system status This link: http://codingstandards.iteye.com/blog/1005498 (reproduced please indicate the source) Use Description stat command to display file or file system status information (dis

  • I used Linux command of the wc - Statistics file lines. Words or bytes 2011-07-26

    I used Linux command of the wc - Statistics file lines, words or bytes This link: http://codingstandards.iteye.com/blog/1132879 (reproduced please indicate the source) Use Description wc command to print the file number of text lines, words, bytes, e

  • NFS Network File System 2011-04-11

    http://jportal.iteye.com/blog/347544 Defective. Such as server-side, then reboot, client-side but also to re-mount, and speed not up to much can be done client-side without the need to re-mount Mounted disconnect between the words of general and rela

  • redHat linux install hadoop 0.20.2, under the remote connection in the windows of this hadoop, developing and debugging 2011-05-14

    The premise of this article is: hadoop know what, know what a distributed system, understanding hdfs and mapreduce the concepts and principles. This is just the author in the process of learning hadoop some experience and to share their views. This a

  • centos (linux) to mount ntfs file 2011-03-05

    In his recent useless desktop installed above centos, ready to install some software to do the above distribution of the cluster test. It very fast loading system can be fitted with a mounted NTFS file not found. Google today, the specific operation