iT邦幫忙

11

單獨一人的Ubuntu 10.04

單獨一人??就是single user。可是這有什麼好講的,大家都知道的,就是在開機時的grub內的開機指令裡面找到載入kernel中加個single就行了。可是在Ubuntu 10.04中卻有另一個作法。
因為我喜歡嚐鮮,所以前幾天我就在現在在用的Ubuntu 10.04中安裝unity,結果整個畫面變成空白,其他的Terminal也無法出現。這種情形以前遇到的時候就是進single user mode移除剛剛安裝的套件。我就在開機的Grub選單中選擇要用的kernel版本那一行,然後在載入kernel那一行的最後打上"single"然後繼續開機,但是還是無法正常顯示terminal。弄了幾次以後還是不行,只好再上網找其他的方法,後來找到這篇Boot to single user mode in Ubuntu 10.04 Lucid Lynx

This is symptomatic of how often I break X.org but I often need to boot my Ubuntu 10.04 machine into single user mode and fix some configuration file before rebooting into the GUI. I forget how to do it every time so here is how:
   1. Hold the Shift key at boot to display the Grub boot menu.
   2. Select the top Grub entry, it will be similar to:
      Ubuntu, with Linux 2.6.32-22-generic-pae
   3. Hit e to edit the the Grub entry.
   4. Find the line that looks like this:
      linux /boot/vmlinuz-2.6.32-22-generic-pae
      root=UUID=xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx
      ro vga=794 quiet splash
   5. Change the line to:
      linux /boot/vmlinuz-2.6.32-22-generic-pae
      root=UUID=xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx
      init=/bin/sh rw
   6. Hit crtl+x to boot
Your machine will now do a one time boot into single user mode. Once you reboot the changes you just made to Grub will be reverted. 

原來還有這招,就把它拿來試試,可是出現了類似single user mode的terminal但是卻沒看到常見的提示符號prompt像是#之類,那現在到底可不可以下指令了?在沒招的的情形下,我就打了ls,居然出現output。喔,原來這是不會出現prompt符號的single user mode。我就把剛裝的unity移除後就正常了。看來對於Ubuntu還不是很了解,為了怕以後忘記,特此紀錄。


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言