Try   HackMD

升級筆電的HDD硬碟到SSD,與灌Ubuntu 20.04

簡介

我筆電的型號是UX303UB大概於2016/2017年間購入,當初選購的時候有兩種規格可以選擇,一個是1TB HD,另一個是256GB SSD,那時候覺得256GB容量實在太小了,因此容量取向就選擇了HDD,但是殊不知其開機速度,程式操作等等都大受影響,到後來基本上開機就要數十到半小時之久,整體操作反應非常緩慢,因此後來這台電腦就很少使用,而最近覺得放著也是放著,不如自己來更換SSD硬碟,看是否能夠大幅提升使用體驗,恢復這台筆電的工作產值XD

其實一度有想拿去給電腦維修店的人做更換,比較省事而且也比較安心,畢竟自己沒操作過,也會擔心是否操作不當而造成元件損壞等等情況發生,但有點懶而且也不確定哪一間店家值得信任,最終還是自己挑選SSD,讓自己嘗試做更換囉。

流程

整理流程可分為兩部份:第一部份是做硬碟(硬體)的更換,第二部份是做重灌系統到新的硬碟。

更換硬碟

需要準備:

  1. 一隻T5的星型的起子

  2. 一般十字型螺絲起子(3.0 or 2.5大小的 有點忘記了)

  3. 需要換上的SSD,我準備的是 美光Micron Crucial MX500 500GB SATAⅢ SSD

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    硬碟可以於Crucial官網上做查詢是否適用你的筆電規格,我在PCHome上訂購,差不多十二小時就到,晚上訂早上起來就到貨了,真的神速!

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

灌新系統 Ubuntu 20.04

  1. Download the ISO file from Ubuntu Website

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  2. Download Rsfus to make a boot disk by your USB.

  3. T5星型螺絲起子

  4. Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →


接著,我們把USB插到要灌系統的電腦上,開機之後按照Ubunut的步驟點一點就可以完成安裝和初步設定。

緊接著,讓我介紹一些設定Ubuntu 20.04的基本環境安裝。

sudo apt update
sudo apt-get update

### install ifconfig
sudo apt install net-tools 

### install ssh-server
sudo apt install -y openssh-server
sudo systemctl status ssh
sudo ufw allow ssh

### install git
sudo apt install -y git

### install vim
sudo apt install -y vim

### install certificates
sudo apt install -y ca-certificates

### install pip3
sudo apt-get install -y python3-pip

### Set up zsh 
sudo apt install -y zsh autojump fonts-powerline
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
chsh -s /bin/zsh

git clone git://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/plugins/zsh-autosuggestions

git clone https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/themes/powerlevel10k

sed -i -e 's/# DISABLE_UNTRACKED_FILES_DIRTY="true"/DISABLE_UNTRACKED_FILES_DIRTY="true"/1' ~/.zshrc
sed -i 's/plugins=(git)/plugins=(git autojump zsh-autosuggestions)/1' ~/.zshrc
sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="powerlevel10k\/powerlevel10k" # ZSH_THEME="robbyrussell"/g' ~/.zshrc
sed -i '$a\POWERLEVEL9K_MODE="awesome-patched"' ~/.zshrc

For setup powerlevel theme: n n n n 1 2 3 1 2 1 n 1 y

  • For install NVIDIA GPU driver: please follow here
  • For install docker: please follow here

調整提昇swap容量

https://www.astralweb.com.tw/how-to-manually-add-swap-to-ubuntu/