HGIGA Service Docs 
» 遊客:  註冊 | 登錄 | 統計 | 幫助
RSS 訂閱當前論壇  

上一主題 下一主題
       
標題: 各式磁區的掛載  
  本主題由 service.support 於 2009-2-12 13:59 移動 
 
service.support





UID 14
精華 0
積分 0
帖子 523
閱讀權限 200
註冊 2006-10-2
狀態 離線
各式磁區的掛載

mount [-ahlV]  
mount -t type /dev/hdxx /mountpoint
mount -o [options]
umount /mountpoint
參數說明:
-a   :依照 /etc/fstab 的內容將所有相關的磁碟都掛上來!
-h   :只列出 mount 相關的參數,並不掛載任何裝置
-l   :列出目前已經掛載的裝置、檔案系統名稱與掛載點!
-V   :列出 mount 的版本資訊
type :將後面 /dev/hdxx 這個裝置以 type 的檔案格式掛載到 /mountpoint 這個點,
      常見的 type 有底下幾個:
      vfat, msdos       :這個是支援 Windows 系統的檔案格式,尤其是 vfat 常用!
      ext, ext2         :這個就是 Linux 的主要檔案格式啦!
      iso9660           :光碟機的檔案格式
      nfs, ntfs, ufs    :Windows 2000 使用 NTFS 格式呀!
-o  :這個參數後面接的咚咚可多了!可用的資料可不少呢!
   rw   :讓 mount 的磁區為可讀寫
   suid   :允許該磁區可以設定檔案為 SUID 的狀態!
   exec   :允許該磁區可以執行 binary 的檔案!
   auto   :允許該磁區可以使用 mount -a 的參數設定!
    nouser :禁止其他人(非 root 之使用者)使用掛載功能!這是預設值!
    async :允許磁區可以進行非同步記錄(記憶體與硬碟不同步!最常用!)
    defaults:同時具有 rw, suid, dev, exec, auto, nouser, async 這些功能的設定值!
    nosuid :不許該磁區具有 SUID 的檔案屬性!
   ro   :設定為唯讀屬性!
    remount :讓系統本來掛載的磁區重新被掛載!
      iocharset=big5,codepage=950』這種額外的功能參數以啟動中文編碼的支援
      defaults 同時具有 rw, suid, dev, exec, auto, nouser, async 這些功能,所以預設情況中,使用這個即可!  
範例:
[root @test /root]# mount -a
[root @test /root]# mount -t iso9660 /dev/cdrom /mnt/cdrom<==掛上光碟
[root @test /root]# mount -t vfat /dev/fd0 /mnt/floppy   <==掛上 windows 檔案系統的軟碟
[root @test /root]# mount -t ext2 /dev/fd0 /mnt/floppy   <==掛上 Linux   檔案系統的軟碟
[root @test /root]# mount -t ext2 /dev/hdc6 /home        <==掛上 Linux 檔案格式硬碟
[root @test /root]# mount -o remount,rw /          <==讓根目錄重新掛載為可讀!

#掛載軟碟
mount -t ext2 /dev/fd0 /mnt/floppy<==Linux 格式  
mount -t vfat /dev/fd0 /mnt/floppy<==Windows 格式  
umount /mnt/floppy<==將軟碟機卸載

#掛載光碟
modprobe cdrom
modprobe ide-cd  
mount -t iso9660 /dev/cdrom /mnt/cdrom  
umount /mnt/cdrom

#安裝新硬碟
fdisk /dev/hdb  
....... (以下省略!直接以 fdisk 分割好硬碟啦!)  
mke2fs /dev/hdb1  
在 Linux 中的 format 是 mke2fs 這一個指令喔!  
上面的指令在將你的硬碟磁區格式化成 Linux 的 ext2 格式啦!  
mkdir /disk2  
建立一個目錄名稱為 /disk2 ,預計用來掛載你的新硬碟  
mount -t ext2 /dev/hdb1 /disk2  
將硬碟掛上 Linux 系統囉!
2007-3-28 11:52#1
查看資料  Blog  發短消息  Yahoo!  頂部
       


  可打印版本 | 推薦給朋友 | 訂閱主題 | 收藏主題  


 

   Powered by Discuz! 4.1.0  © 2001-2006 Transformed by wxxslt for HGIGA Inc. / Service Support
Processed in 0.013276 second(s), 7 queries , Gzip enabled

所有時間為 GMT+8, 現在時間是 2024-4-30 23:06