首先 查看整个硬盘的分区信息
在root用户下使用 fdisk -l 或者df -lk 即可获得,或者在普通用户下使用sudo fdisk -l 或者sudo df -lk作用同上
fdisk -l 使用显示如下所示:
root@panda-pc:/etc# fdisk -l
Disk /dev/sda: 250.1 GB, 250058268160 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x73d0c6af
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2551 20490876 c W95 FAT32 (LBA)
/dev/sda2 2552 30402 223705414 f W95 Ext'd (LBA)
/dev/sda5 2552 10200 61440561 7 HPFS/NTFS
/dev/sda6 10201 17493 58580991 7 HPFS/NTFS
/dev/sda7 17494 18798 10482381 7 HPFS/NTFS
/dev/sda8 18799 19296 3999744 82 Linux swap / Solaris
/dev/sda9 19297 30402 89200640 83 Linux
root@panda-pc:/etc#
df -lh使用显示如下:
root@panda-pc:/etc# df -lh
Filesystem Size Used Avail Use% Mounted on
/dev/sda9 84G 4.8G 75G 7% /
none 995M 644K 994M 1% /dev
none 1002M 720K 1001M 1% /dev/shm
none 1002M 92K 1001M 1% /var/run
none 1002M 0 1002M 0% /var/lock
/dev/sda5 59G 45G 14G 77% /media/Software
/dev/sda6 56G 3.3G 53G 6% /media/Study
/dev/sda7 10G 58M 10G 1% /media/Enterment
root@panda-pc:/etc#
从以上信息我们知道个分区所对应的sda,下面有两种方式挂载
一、手动挂载
实际操作如下,首先要使用mkdir在media目录下创建一个目录,然后将要挂载的系统盘挂载到刚创建的目录上去。(该演示是在root用户下)
这样即可挂载!
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2551 20490876 c W95 FAT32 (LBA)
/dev/sda2 2552 30402 223705414 f W95 Ext'd (LBA)
/dev/sda5 2552 10200 61440561 7 HPFS/NTFS
/dev/sda6 10201 17493 58580991 7 HPFS/NTFS
/dev/sda7 17494 18798 10482381 7 HPFS/NTFS
/dev/sda8 18799 19296 3999744 82 Linux swap / Solaris
/dev/sda9 19297 30402 89200640 83 Linux
root@panda-pc:/# mkdir media/winxp
root@panda-pc:/# mkdir media/Software
root@panda-pc:/# mkdir media/Study
root@panda-pc:/# mkdir media/Enterment
root@panda-pc:/# mount /dev/sda1 media/winxp/
root@panda-pc:/# mount /dev/sda5 media/Software/
root@panda-pc:/# mount /dev/sda6 media/Study/
root@panda-pc:/# mount /dev/sda7 media/Enterment/
二、开机自动挂载
只需要更改一下根目录下etc下的fstab文件即可
不过也得先创建media下的新目录
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
#
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda9 during installation
UUID=eed9c698-a02f-41e1-af18-9e9be617c8bd / ext4 errors=remount-ro 0 1
# swap was on /dev/sda8 during installation
UUID=9a384d0e-6f8e-4d27-bfd3-2eb40756f2dd none swap sw 0 0
/dev/sda5 /media/Software ntfs rw,iocharset=cp936 0 0
/dev/sda6 /media/Study ntfs rw,iocharset=cp936 0 0
/dev/sda7 /media/Enterment ntfs rw,iocharset=cp936 0 0
阅读(1569) | 评论(0) | 转发(1) |