2014-08-27

win8 + ubuntu 14 雙系統




environment: windows 8.1 + ubuntu 14.04 LTS 雙系統


  • 安裝:
    • 安裝好 windows 8 後,接著安裝 ubuntu。
      • 由於在 windows 中,C, D 都設成了 primary disk。
      • 壓縮 C 切出一個空的 partition。
      • 以致於 ubuntu 再切時,/ 可以設成 primary disk,但不能再新增 swap。很有可能是因為已經有了4個 primary disk 了。改將 / 設成 logic disk,就可以新增 swap 了。
      • 不過,很有可能因為上述,變成開機直接進入 windows 而沒有 boot menu 可以選擇進入 ubuntu。
    • 開機進入 windows 8 後,下載使用 EasyBCD 軟體:
      • Add New Entry: Linux/BSD, type: Grub 2, partition 選擇安裝的 ubuntu partition。儲存套用,重開機後,boot menu 就出現可以選擇 windows 或是 自定的名稱了。
    • 故障排除:
      • 安裝時,如果出現 "The installer encountered an unrecoverable error. A desktop session will now be run so that you may investigate the problem or try installing again." 這樣子的錯誤訊息,在一開始就無法安裝了。
        檢查了 iso MD5,試了 ubuntu 14.01 光碟、14.10 USB 開機安裝,都是這樣的錯誤訊息。網路上也有人認為關閉安裝的介紹(slide show)可以解決,但我都不行。(不過,linux Mint 是可以的)
        解法:不要啟動無線網路,也不要安裝時更新,直接就光碟內容安裝即可進行下去

  • 中文:
    • 字型:
    • ibus 中文輸入法的設定畫面:
      • > ibus-setup
      • ref: http://www.pinyinjoe.com/linux/ubuntu-12-chinese-setup.htm
        http://www.pinyinjoe.com/linux/ubuntu-10-chinese-input-pinyin-chewing.htm
      • http://wiki.linux.org.hk/w/Configure_IBus
    • 安裝 gnome classic version 後,language support icon 不見了:
      • sudo apt-get install language-selector-gnome
      • 改選 gcin 輸入法
      • 倉頡:可使用五四三倉頡。

  • HDMI 聲音輸出:
    • 接 HDMI 時,從 偏好設定 - 顯示器 選定輸出到電視或螢幕之模式。
    • 而聲音,預設只有 NB ,而到 偏好設定 - 音效 中,選擇 HDMI 輸出。
    • 拔掉 HDMI 後,有點 NB 會沒有畫面。目前只有重開機解決。而播放影片的聲音卻不見了,但播放 MP3 卻有聲音。
      此時,再接 HDMI 播影片,聲音會從電視出來,再切回 NB 聲音輸出,拔掉 HDMI,再播影片即正常。
      亦即,聲音的部份無法自動切換。而影像的部份,有時自動切換失敗。
    • 接 HDMI 時,預設為 延伸桌面模式。
  • NVIDIA GeForce driver (ref this):
    • To add PPA for Ubuntu 14.04 / 13.10 / 13.04 / 12.10:
      • sudo apt-add-repository ppa:xorg-edgers/ppa
    • sudo apt-get update
    • sudo apt-get install nvidia-current
      sudo apt-get install nvidia-current nvidia-settings
    • to verify using driver:
       $ lspci -vnn | grep -i VGA -A 12

  • 設定 wins 以認得 windows host name:
    1. /etc/nsswitch.conf: (在dns前加入wins)
      1. hosts: files wins dns
      2. 有時是:
        hosts: files dns wins
    2. sudo apt-get install winbind
    3. sudo apt-get install libnss-winbind
    4. 至此,windows 機器應該可以 ping 到這台 ubuntu 機器。
    5. sudo apt-get install samba   (可能預設已經安裝)
    6. 設定 wins server :
      1. /etc/samba/smb.conf
      2. wins server = 192.168.65.xxx
    7. sudo service smbd restart
  • ubuntu 14 預設使用 unity 桌面,如果想要使用 browse application menu:
    • sudo apt-get install classicmenu-indicator
    • 安裝完,再重新登入 unity 桌面,即出現熟悉的 menu list.
    • 如果 unity 掛了:
      • CTRL+ALT+F1
      • type "unity --reset" : reset Unity to the "out of the box" settings. 
      • CTRL-ALT-F7 : 回到桌面。
  • install gnome classic version:
    • reference this.
    • sudo apt-get update; 
    • sudo apt-get install gnome-session-fallback

  • ibus 中文輸入法的設定畫面:
    • > ibus-setup
    • ref: http://www.pinyinjoe.com/linux/ubuntu-12-chinese-setup.htm
      http://www.pinyinjoe.com/linux/ubuntu-10-chinese-input-pinyin-chewing.htm
    • http://wiki.linux.org.hk/w/Configure_IBus
  • 安裝 gnome classic version 後,language support icon 不見了:
    • sudo apt-get install language-selector-gnome
    • 改選 gcin 輸入法

  • 安裝 ubuntu 後,boot 順序預設為 ubuntu 開機。若要修改預設為 windows 開機:
    • sudo vi /boot/grub/grub.cfg
      • set default="0"
      • set timeout=15
  • unity desktop 的 icon side bar, status bar 突然都不見了:
    • unity 圖示、功能表都出不來了,這時需要 reset,動作如下:
    • for unity 14.04 LTS -- run in GNOME Flashback (Compiz)
    • sudo apt-get install unity-tweak-tool
    • To reset Unity, do
    • unity-tweak-tool --reset-unity
  • ubuntu 15: network icon 不見了,沒有出現在 status bar:
    • sudo apt-get install indicator-applet-complete
  • uninstall xubuntu-desktop:
    • The following command will remove 95% of Xubuntu and XFCE -- instead of the other commands mentioned that remove only 50% ... 60% ... of the packages.
    • sudo apt-get autoremove --purge xubuntu-* && sudo apt-get autoremove --purge xfce*
    • If you're willing to be more radical... You can run the following command. This one remove almost everything about xubuntu/xfce:
    • sudo apt-get autoremove --purge $( dpkg-query -l *xubuntu* | grep ii | tr -s " " | cut -d" " -f2; dpkg-query -l *xfce* | grep 'ii' | tr -s " " | cut -d" " -f2 )
    • from : http://askubuntu.com/questions/92084/how-to-remove-xubuntu-desktop
  • remove apt repository:
    • sudo add-apt-repository --remove xxxx

  • VPN setting:
    • 如果使用公司的 VPN, 但只想要讓公司的 IP 導向 公司(VPN)的 gateway(ex: 192.168.10.1)
      • VPN -- "IPV4" -- "路由(R)..." -- 勾選 "只在使用這個連線的網路資源時,才使用此連線"
      • 連上 VPN 後,執行: sudo ./run_cmd  
        • #!/bin/bash
        • sudo route add -net 192.168.65.0 netmask 255.255.255.0 gw 192.168.10.1
        • sudo route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.10.1 
  • system tools:
    • about battery life
      •   Improve battery life and reduce overheating:

        Overheating of laptops is a common issue, not only in Ubuntu but in any operating systems. Overheating also affects the battery life. Until Ubuntu 12.10, Jupiter was the best tool to reduce overheating, but since its development has stopped, you can use TLP or CPUFREQ instead of Jupiter. Install TLP using the following command:

        sudo add-apt-repository ppa:linrunner/tlp
        sudo apt-get update
        sudo apt-get install tlp tlp-rdw
        sudo tlp start

        And that’s it. No configuration is required for using TLP. For CPUFREQ, read this article on how to use CPUFREQ to reduce overheating in Ubuntu.


tools
  • gparted 分割區編輯器
    • sudo apt-get install gparted
--------------------
20150830

在 win 10 下,安裝 ubtuntu 14(後來改試 ubuntu 15),並且利用 EasyBCD 新增 grub2 boot menu item。
但是,開機時選擇 ubuntu boot menu,卻無法進入 ubuntu system,出現了 \NST\AutoNeoGrub0.mbr 找不到的錯誤訊息。
這個檔案是由 EasyBCD 產生的,檢查了 C 下有這個檔案,但就是無法開機進入。

試了 ubuntu 15,也不行。重灌改用 logical disk,也不行。利用 ubuntu live 開機,安裝 boot-repair,執行後也不行。

最後,試到了:
1. 安裝 ubuntu 15 後。
2. 在 win 10 下,利用 EasyBCD 將新增的 ubuntu boot menu 刪除 (或是不要以 EasyBCD 新增 ubuntu 開機選單)
3. 以 ubuntu livd 開機,下載安裝並執行 boot-repair 後,重開機,出現:
    window 唯一選單 -> ESC -> 選 unknown device -> 出現 ubuntu 多選單 -> 選第一個 ubuntu 
    如此,就可以進入 ubuntu 了。

NB: Acer Aspire E 13  ES1-311-P2YW

為何會想要在 13吋 Acer NB 上安裝 ubuntu 呢?
因為在 win 8 & win 10, 觸控版有時會無法移動滑鼠,但仍可以左右鍵。因此想試看看 ubuntu。
ubuntu 順利開機後,update, upgrade 後,居然出現了滑鼠上下大幅擺動,有時會搭配左右。關閉觸控版後再開啟,會恢復正常一段時間。
在 "軟體更新" ,換撰第 3 方 drive,重開機後,似乎仍會大幅亂飄。
後來,到"滑鼠觸控板"設定,調了 觸控板-指標速度 後,似乎就正常了!!! 再試用看看。

Acer 這款 NB 的觸控板 HW or driver,應該是有蠻大的問題的。

1 意見:

  1. I always enjoy reading quality articles by an individual who is obviously knowledgeable on their chosen subject. Ill be watching this post with much interest. Keep up the great work, I will be back
    Best software Training institute in Bangalore
    Best Linux Training institute in Bangalore
    Best Data Science Training institute in Bangalore
    Best Android Training institute in Bangalore



    回覆刪除