Network Installation of Minimal Debian GNU/Linux 10

Network Installation of Minimal Debian GNU/Linux 10

【摘要】下載來的 mini.iso 檔加入 non-free firmware 後,才複製到隨身碟;然後以此安裝陽春 Debian GNU/Linux 10。


【目錄】


    【前言
    【準備工作
    【加入 non-free firmware
    【安裝到隨身碟
    【安裝陽春系統
    【截圖
    【後語


【前言】

一、本文半年多以前曾在 Google 的 Blogger 發表過,當時還是 10.0 版。近日重新安裝,更新內容,記錄於此。


二、為了方便截圖,本例是安裝在 VirtualBox 中。中文版、英文版各安裝了一次,將相關步驟的圖放在一起,以利對照。

安裝在虛擬和實體硬碟的差別是目標分割區。下面在選要安裝的分割區時,請自行更改。


三、本例使用的作業系統是 Debian GNU/Linux 10。


【準備工作】

一、先去 Debian 網站下載網路安裝工具 mini.iso。

如果找不到檔案,可能是版本更新的關係,請從 …/dists/ 目錄開始找最新的。


二、再下載 non-free firmware – firmware.cpio.gz

Debian 官方準備的 firmware 只有 free 版,而每個人的電腦配備不盡相同,很有可能要用到 non-free 版。以本例所使用的筆電為例,若不加入 non-free firmware,就無法使用 Wifi,所以最好要有。


三、將 non-free firmware 加入 initramfs 中。

所有的 firmware 最好在安裝陽春系統時就一併安裝,所以必需在安裝前就加入。Debian 官網僅略述其法,詳細方法在下一節


四、將安裝檔安裝到隨身碟(假設是 sdb)。

如果不用 non-free firmware,直接用下載的 mini.iso,可用的指令是:

sudo dd if=mini.iso of=/dev/sdb bs=1M status=progress

但若要用,因步驟較多,所以詳述於後

註:很多人說此處 dd 要有 oflag=sync,但本人從來不用,所得到的隨身碟一樣可以拿來安裝系統,各位可以比較看看。


【加入 non-free firmware】

ISO 檔是壓縮檔,必需先解開才能修改其中的檔案。本例是用 7Zip 解壓縮。


一、解開 mini.iso。

先在 mini.iso 所在的目錄新增一目錄,假設是 Mini,然後執行:

7z x -oMini mini.iso

二、將原檔更名。

進入 Mini 目錄,將原有的 initrd.gz 改為 initrd.gz.orig。


三、合併 firmware.cpio.gz 和 initrd.gz.orig。

將下載的 firmware.cpio.gz 移入 Mini 目錄,用以下的指令合併:

cat initrd.gz.orig firmware.cpio.gz > initrd.gz

四、移走 initrd.gz.orig 和 firmware.cpio.gz。


【安裝到隨身碟】

一、複製檔案。

隨身碟假設是 sdb,先將 sdb1 格式化(只要 150M 就夠用了);掛載後將 Mini 目錄中的檔案全部複製或移動到 sdb1。在上述的 Mini 目錄中執行:

sudo mount /dev/sdb1 /mnt && sudo cp -r * /mnt

sdb1 如果有 lost+found 目錄,可以刪除:

sudo rm -r /mnt/lost+found

二、安裝 Grub。

要拿來開機,一定要有開機程式。執行:

sudo grub-install --boot-directory=/mnt/boot /dev/sdb

好了,可以用隨身碟開機安裝陽春作業系統了。


【安裝陽春系統】

整個過程大致如下:

選擇語言
Choose language

使用視障者點字程式
Access software for a blind person using a braille display

設定鍵盤
Configure the keyboard

偵測網路硬體
Detect network hardware

網路設定
Configure the network

選擇 Debian 檔案鏡像站
Choose a mirror of the Debian archive

下載安裝程式的元件
Download installer components

設定使用者及密碼
Set up users and passwords

設置時鐘
Configure the clock

偵測磁碟
Detect disks

磁碟分割
Partition disks

安裝基本系統
Install the base system

設定套件管理程式
Configure the package manager

選擇並安裝軟體
Select and install software

將 GRUB 開機程式安裝至硬碟上
Install the GRUB boot loader on a hard disk

結束安裝
Finish the installation


【截圖】

起始畫面

01-starting-menu

選擇語言 / Choose language

02-select-language 03-select-area 04-select-region 05-select-country 06-選擇位置 07-configure-locales

設定鍵盤 / Configure the keyboard

08-configure-keyboard

偵測網路硬體 / Detect network hardware
網路設定 / Configure the network

09-configure-network 10-設定網路

選擇 Debian 檔案鏡像站 / Choose a mirror of the Debian archive

11-choose-mirror-location 12-choose-mirror-site 13-proxy

設定使用者及密碼 / Set up users and passwords

14-root-password 15-confirm-password 16-user-name 17-account-name 18-user-password 19-confirm-password

磁碟分割 / Partition disks

20-partition-method 21-partition-disk 22-partition-scheme 23-分割磁碟 24-磁碟分割

安裝基本系統 / Install the base system

25-popularity-contest

選擇並安裝軟體 / Select and install software

26-select-software

將 GRUB 開機程式安裝至硬碟上 / Install the GRUB boot loader on a hard disk

27-install-grub 28-boot-device

結束安裝 / Finish the installation

29-finish-installation

【後語】

一、上述的安裝大約費時 15 到 20 分鐘。

二、後續幾篇先介紹相關程式的設定,然後是圖形界面與應用程式的安裝

發表留言