硬碟 - 分割和啟動
前一頁
下一頁

硬碟 - 分割和啟動

圖形化分割區編輯器

  1. Install the qtparted package (refer to the Adding Applications documentation for more help on installing applications).

  2. Once installed, open QtParted by going to KMenuSystemQtParted.

檢查磁碟空間和檢視硬碟分割表

  1. Open System Settings by going to KMenuSystem Settings. Select the Advanced tab and then select Disks & Filesystems.

  2. Each partition will be listed under Available Disks and Filesystems details of each partition.

在終端裡顯示已掛載的裝置

  1. Open Konsole by going to KMenuSystemKonsole - Terminal Program.

  2. To list the mounted devices type the following and then press the Enter key:

    mount

這個清單顯示裝置(如一個硬碟分割區)、掛載點(您可以存取檔案的地方)、檔案系統類型和一些 mount 命令選項。

這個例子顯示出 hda2 硬碟分區掛載點是「/」,檔案系統類型是 ext3。這個分割區被掛載時有兩個選項,一個是允許以讀寫方式存取這個裝置,另一個就是當有錯誤發生時以只讀方式重新掛載這個裝置。


/dev/hda2 on / type ext3 (rw,errors=remount-ro)

掛載/卸載 Windows 分割區

NTFS 或 FAT32

關於 NTFS 磁碟可參考第四步驟。而 FAT32 磁碟可參考步驟五。NTFS 只可唯讀 然而 FAT32 則可以

  1. 參看 “檢查磁碟空間和檢視硬碟分割表”

  2. Open Konsole by going to KMenuSystemKonsole - Terminal Program.

  3. 首先,新增一個可用來掛載分割區的目錄。你可以在命令列鍵入以下命令緊接著按下 Enter 鍵(如果有要求密碼,輸入你的使用者密碼再按 Enter 鍵):

     
    sudo mkdir /media/windows
    
  4. 接著,鍵入以下命令來掛載一個 NTFS Windows 分割區和使其可唯讀。你可以在命令列鍵入以下命令緊接著按下 Enter 鍵(如果有要求密碼,輸入你的使用者密碼再按 Enter 鍵):

    sudo mount /dev/hdaX /media/windows/ -t ntfs -o ro,umask=0222
    
  5. 如果你的 Windows 分割區是用 FAT32 檔案系統,開啟該分割區的讀寫功能較安全。你可以在命令列鍵入以下命令緊接著按下 Enter 鍵(如果有要求密碼,輸入你的使用者密碼再按 Enter 鍵):

    sudo mount /dev/hdaX /media/windows/ -t vfat -o umask=0000
    

    用您分割區正確的名稱代替 /dev/hdaX

  6. 要卸載分割區,您可以在命令列鍵入以下命令緊接著按下 Enter 鍵(如果有要求密碼,輸入您的使用者密碼再按 Enter 鍵):

    sudo umount /media/windows/
    

開機時掛載 Windows 分割區

  1. 參看 “檢查磁碟空間和檢視硬碟分割表”

  2. Open Konsole by going to KMenuSystemKonsole - Terminal Program.

  3. 首先,新增一個可用來掛載分割區的目錄。你可以在命令列鍵入以下命令緊接著按下 Enter 鍵(如果有要求密碼,輸入你的使用者密碼再按 Enter 鍵):

     
    sudo mkdir /media/windows
    
  4. 接著,備份你即將要掛載的設定檔案然後用管理員權限開啟文字編輯器打開該檔案。你可以在命令列鍵入以下命令緊接著按下 Enter 鍵(如果有要求密碼,輸入你的使用者密碼再按 Enter 鍵):

    sudo cp /etc/fstab /etc/fstab_backup
    
  5. 為了要編輯你的 /etc/fstab,按下Alt+F2然後在執行程式的對話框中輸入 kdesu kate /etc/fstab 然後按 OK 按鈕。

  6. 假如你的 Windows 分割區用的是 NTFS 檔案系統,在檔案的尾端加入以下文字:

    /dev/hdaX /media/windows ntfs ro,umask=0222 0 0
    

    假如你的 Windows 分割區用的是 FAT32 檔案系統,最好開啟該分割區讀寫功能。在檔案尾端加入以下文字:

    /dev/hdaX /media/windows vfat umask=0000 0 0

    而不是上面說的。

    用您分割區正確的名稱代替 /dev/hdaX

  7. 存檔接著關閉離開剛編輯的檔案。

  8. 參閱“無須重開機而重新掛載 /etc/fstab”

無須重開機而重新掛載 /etc/fstab

  1. Open Konsole by going to KMenuSystemKonsole - Terminal Program.

  2. At the prompt, type the following and then press the Enter key (if asked for a password, enter your user password and press the Enter key):

    sudo mount -a
    

啟動時自動執行系統命令

有時候在啟動程序增加慣用命令讓你的電腦在每次啟動時執行該命令是實用的。你可以閱讀以下程序來設定這個。

  1. Open Konsole by going to KMenuSystemKonsole - Terminal Program.

  2. Edit the crontab with administrative privileges. To do so, type the following at the command prompt followed by the Enter key (if asked for a password, enter your user password and press the Enter key):

    sudo crontab -e
    

  3. Insert the following line:

    @reboot /home/user/command
    

    /home/user/command換成您的命令的全路徑。

  4. Save the file and exit. If using Nano as the default command line editor, press Ctrl+X followed by Y for Yes and then the Enter key.

更改開機時的預設操作系統

  1. Open Konsole by going to KMenuSystemKonsole - Terminal Program.

  2. Make a backup of your boot configuration file. To do so, type the following at the command prompt followed by the Enter key (if asked for a password, enter your user password and press the Enter key):

    sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
    

  3. Edit the menu.lst file by pressing Alt+F2 and then typing kdesu kwrite /boot/grub/menu.lst followed by pressing the OK button.

  4. Locate the following line:

    ...
    default 0
    ...
    

    and replace it with the following line:

    預設 X_sequence

  5. 存檔接著關閉離開剛編輯的檔案。

使開機選單可見

預設下,啟動選單是隱藏的,你需要按Esc鍵查看開機選單。但當我們設定後,開機選單預設為顯示的。

  1. Open Konsole by going to KMenuSystemKonsole - Terminal Program.

  2. Make a backup of your boot configuration file. To do so, type the following at the command prompt followed by the Enter key (if asked for a password, enter your user password and press the Enter key):

    sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
    

  3. Edit the menu.lst file by pressing Alt+F2 and then typing kdesu kwrite /boot/grub/menu.lst in the Run Command dialog followed by pressing the OK button.

  4. Locate the following line:

    # hiddenmenu
    

    and uncomment it by removing the # in front of the line so that it looks like:

    hiddenmenu
    

  5. 存檔接著關閉離開剛編輯的檔案。

改變開機選單的逾時等待

  1. Open Konsole by going to KMenuSystemKonsole - Terminal Program.

  2. Make a backup of your boot configuration file. To do so, type the following at the command prompt followed by the Enter key (if asked for a password, enter your user password and press the Enter key):

    sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
    

  3. Edit the menu.lst file by pressing Alt+F2 and then typing kdesu kwrite /boot/grub/menu.lst in the Run Command dialog followed by pressing the OK button.

  4. Locate the following line:

    ...
    timeout 3
    ...
    

    and replace it with the following line:

    timeout X_seconds
    

  5. 存檔接著關閉離開剛編輯的檔案。

前一頁
下一頁
內容