Raspberry Pi centos system, automatically mount usb mobile hard disk

usb hard drive mounted automatically mount Shift and NAS storage is done on the basis, not complicated, but also pay attention to some places.
1. The drive is connected Needless to say, mobile hard disk access connection to send usb port, hard disk format to ext4 best grid format, in fact, other formats will do, NTFS format a little bit of trouble, you want to install additional software, or do not recognize.
2. Enterfdisk -l(Lowercase L) to see whether the mobile hard disk can be identified. Usually the bottom will show the following, a system has been identified.Here Insert Picture Description
In fact, this time manually mount is ready for use, but every time hang trouble, so be automatically mounted.
3. blkid >/etc/listExport all hard disk and partition information to / etc / list file, the next step requires information on the hard disk uuid in this document, the following figure sda1 is my mobile hard disk, removable hard disk is usually sda from the beginning named. (Export to the next etc, for easy editing with the next fstab file.)

Here Insert Picture Description

4.Fstab file information is written to the hard drive, and boot automatically mount.

CD / etc
Vim fstab list
hard disk in the list uuid copied to fstab, else press following format is completed.
UUID = 4eff9bdb-7e0b-4d25-8931- dc776537bc73 / media / samba ext4 defaults 0 0
Note that the above / media / samba is to establish their own, if not impossible to mount successfully, you can also hang elsewhere, look at the individual preferences, and authorized: chmod 777 / meida / samba (full access privileges). End fatab change file as shown below:
Here Insert Picture Description

5. reboot, automatic loading is completed.
Published 25 original articles · won praise 8 · views 9139

Guess you like

Origin blog.csdn.net/kim5659/article/details/104273104