Linux under U disk mount and NTFS partition mount __linux

Source: Internet
Author: User
Tags mkdir

programme I :
Linux is not like Windows, after the new hardware can be automatically recognized, in Linux cannot automatically identify new hardware, need to manually identify. USB Mobile storage devices are usually identified as SDA1, which can be queried by fdisk-l command.

Before using a U disk, we have to create a new subdirectory for the plug-in point, the general point of the subdirectory is built in the/mnt inside, we also built there, of course, can also be built in the/directory, the name can be set, we will be named USB, terminal commands as follows:

Mkdir/mnt/usb

Then we can connect to my USB drive, and then enter the command at the terminal and hit the ENTER key:

Mount/dev/sda1/mnt/usb

Under Windows when we run out of u disk, before we remove the U disk we want to delete, also in Linux we also want to delete the starting point, the method is:

Umount/dev/sda1/mnt/usb or UMOUNT/DEV/SDA1

If you do not umount off the U disk, it would easily result in loss of data.

Programme two :
USB support is the key to drive, without the drive device mount execution is certainly not. The common way I use U disk in Red Hat is as follows.


1. Do not insert U disk,/sbin/lsmod see whether there are usb-storage. If not:


Cd/lib/modules/2.4.20-8/kernel/drivers/usb

For V in *.O STORAGE/*.O; Do/sbin/insmod $v; Done

2. Here again/sbin/lsmod, should have Usbcore, USB-OHCI (or USB-UHCI, according to the motherboard chipset and different), Usb-storage, Scsi_mod and so on. Where the Usb-storage state should be (unused).


3. Insert U disk, Non-stop/sbin/lsmod, this period usb-storage state should be initializing, lasted about half a minute, in fact, the equivalent of windows in the lower right corner of the balloon balloons:)


4. After initialization,/SBIN/FDISK-L should be able to see the/DEV/SDA1 device. At this point, the execution

Mount/dev/sda1/mnt/udisk to succeed. If it is msdos format, and want to see Chinese, you can

Mount-t Vfat/dev/sda1/mnt/udisk-o iocharset=gb2312.


(For the convenience can/etc/fstab add a line, later can mount/mnt/udisk on the line).

5. It's strange that sometimes Fdisk can't see the sda1, but it can also mount


Use the above steps to hang U disk is basically "foolproof". Desktops, notebooks, VMware are the same.

Mkdir/mnt/usb

Mount/dev/sda1/mnt/usb

Install Linux usage on notebooks like desktop

PS:

First check the Lsmod|grep usb-storage This is a USB-enabled module. If not, it is the device that cannot operate the USB interface.

If not, can hand work modprobe usb-storage, general view USB disk can use Fdisk-l can be very clear to see this hardware device name, than guess hardware name to be more accurate.

Linux systems installed on VMware virtual machines:

1. First determine the position of the U disk:

My Red Hat system is installed on the virtual machine, yes, open the virtual machine into the Red Hat system, note, first put the mouse into the Red Hat system, and then the U disk inserted into the computer's USB interface,

At this time, running the fdisk-l command in the Red Hat, notice that nothing is added, just run this command (copy it), and then observe the results of the command run, see if there is anything with your U disk capacity, the file system format matches something out, if there is, then look for the/dev/sd* (* Representative a,b,c ..... A similar thing, if it is to find/dev/sdb


2. Create Mount Location

Are generally mounted under the/mnt folder. MNT folders mainly store CD-ROM, floppy disk and other Removable storage media
Run Command Mkdir/mnt/usb


3. Mount

Oh, to the most critical step, parameter-T, to say the truth, I do not know what it means, VFAT is a mount of the U disk File system, Linux in the FAT16, Fat32,ntfs are classified as VFAT format, and/DEV/SDB1 is want to mount the U disk location, That is, the first step to get the position, and/MNT/USB is the position to mount, after the successful mount, under/mnt/usb can see the U disk in the file, mount the following command to run, if the command does not appear after the message, it means that the Mount succeeded

Mount-t Vfat/dev/sdb1/mnt/usb


4. After use, of course, uninstall.
It's easier.
The following is the command, the next path is the position in the third step above, note that the/MNT/USB path under the direct operation of the command is not able to uninstall, to the directory or other directory can be

umount/mnt/usb/

NTFS partition mount

If the partition format is FAT32, it's free.

Hit uname-a in the terminal first.

Mine is 2.6.15.

2.6.15 's NTFS installation package cannot be found on the official website and the download address is spelled out in two articles

Http://sourceforge.net/project/downloading.php?groupname=linux-ntfs&filename= Kernel-module-ntfs-2.6.15-1.2054_fc5-2.1.26-0.rr.10.4.i686.rpm&use_mirror=jaist


Enter RPM-IVH in current directory kernel-module-ntfs-2.6.15-1.2054_fc5-2.1.26-0.rr.10.4.i686.rpm see Party.

Creates a mounted node. As follows
mkdir/mnt/Enter your favorite name.
2 with mount command, as follows I mount my e-disk.
[Root@localhost/]# mount-t ntfs-o iocharset=utf8/dev/sda5/mnt/wine

There is also an earlier command for querying fdisk-l such as:
[Root@localhost ~]# Fdisk-l

disk/dev/hda:80.0 GB, 80026361856 bytes
255 heads, Sectors/track, 9729 cylinders
Units = Cylinders of 16065 * 8225280 bytes

Device Boot Start End Blocks Id System
/DEV/SDA1 * 1 2550 20482843+ 7 hpfs/ntfs
/dev/sda2 2551 18813 130632547+ f W95 Ext ' d (LBA)
/dev/sda5 2551 6818 34282678+ 7 hpfs/ntfs
/dev/sda6 6819 10984 33463363+ 7 hpfs/ntfs
/dev/sda7 10985 17048 48709048+ 7 hpfs/ntfs
/dev/sda8 17049 18323 10241406 Linux
/DEV/SDA9 18324 18584 2096451 Linux Swap/solaris


Partition table entries are in-disk order
Note that SDA1 is a C disk, and SDA5 and SDA6 are respectively represented in D and E disks. (The size of the hda2 is Hda5 and Hda6)
My SATA hard drive shows SDA the normal IDE is HDA.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.