linux dm365 挂载SATA硬盘

来源:互联网 发布:江南大学网络远程教育 编辑:程序博客网 时间:2024/06/06 09:27

环境: DaVinci Dm365,linux 2.6.32.2


今天设备上新加了一块硬盘,我来把它给挂上去。

1.接好设备,上电,

usb 1-1.2: new low speed USB device using musb_hdrc and address 5
usb 1-1.2: device descriptor read/64, error -32
usb 1-1.2: device descriptor read/64, error -32
usb 1-1.2: new low speed USB device using musb_hdrc and address 6
usb 1-1.2: device not accepting address 6, error -32
usb 1-1.2: new low speed USB device using musb_hdrc and address 7
usb 1-1.2: device not accepting address 7, error -32
usb 1-1.3: new high speed USB device using musb_hdrc and address 8
usb 1-1.3: configuration #1 chosen from 1 choice

会有这样一串错误的打印,所以先编译内核

下面是内核的配置:

>让内核支持热插拔

General setup ---> Support for hot-pluggable devices

>USB驱动设置

Device Drivers --->Generic Driver Options

                                       ---> Hotplug firmware loading support

                                Block devices

                                       ---> Low Performance USB Block driver

                                SCSI device support

                                       ---> SCSI generic support

--->SCSI disk support

                              Probe all LUNs on each SCSI device

                                USB support

                                       --->Support for Host-side USB

                                USB device filesystem

                                     ---> USB Mass Storage support

                                  USB Monitor

>加入MSDOS FS和VFAT FS支持

File systems ---> DOS/FAT/NT Filesystems

                                     ---> MSDOS fs support

                                             VFAT (Windows-95) fs support

                                             (936) Default codepage for FAT

                                             (cp936) Default iocharset for FAT


编译好内核以后,重启

1.查看设备

# fdisk -l
Disk /dev/uba: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot Start End Blocks Id System
/dev/uba1 1 60801 488384001 b Win95 FAT32
 
 
2.建立挂载点,mkdir -p /mnt/usbhd_hx
 

3,mount 对ntfs格式的磁盘分区用- t ntfs ,对fat32格式的磁盘分区用-t vfat参数,
(汉子文件为乱码:mount - t vfat -o iocharset=cp936  /dev/uba1 /mnt/usbhd_hx )
 注意:需要挂载的是有Blocks Id System的分区

4.linux系统下面使用fdisk分区命令和mkfs 创建文件系统命令,可以讲移动硬盘分区制作成linux系统所特有的ext2、ext3格式。
 
5.直接挂载命令 mount /dev/uba1 /mnt/usbhd_hx





原创粉丝点击