2016年4月24日 星期日

不懂也來Arch Linux (1) ──RSA驗證與製作USB開機碟

前天放榜之後,目前處於有大學唸的狀態(野)
當然要乖乖找事做啦!
其中一項規畫就是學點Linux,想了想之後決定用小學畢業時談老送的古董小筆電來裝(主要是他現在Windows XP連文字處理起跑起來都有點困難XDD)
就是它,高端大氣上檔次的ASUS EeePC 1000H
那麼該裝哪一套系統呢?
以前就試過,這台裝Ubuntu的圖形介面是跑不動的。上網Google了一下,最省資源的兩個就是Fedora和Arch Linux了,又聽說Arch Linux不容易上手+安裝麻煩,可是Wiki資源豐富又可以學到不少東西,自虐心作祟的我就決定裝Arch Linux玩玩。



連計算機概論什麼的都一概不懂,只碰過一咪咪C/C++的我也只知道Command Line看起來很專業很潮。所以乖乖的去Google了安裝流程,出乎意了的找到了不少中文資源:

Beginner's Guide/Installation
https://wiki.archlinux.org/index.php/Beginners%27_Guide/Installation_(%E6%AD%A3%E9%AB%94%E4%B8%AD%E6%96%87)
官方Arch Linux Wiki資源

鳥哥的Linux私房菜
http://linux.vbird.org/new_linux.php
一直都知道的很棒的可是都沒在用的中文資源(笑)
http://linux.vbird.org/linux_basic/redhat6.1/linux_06command.php
Linux基本指令介紹

NetAdmin網管人的技術專欄
http://www.netadmin.com.tw/article_content.aspx?sn=1411110002&jump=3

不寫下來會忘記:Arch Linux安裝血淚
http://joshralin.blogspot.tw/2012/11/arch-linux_15.html
標題有讓我嚇到R

還有一些是嵌入式硬體(Raspberry Pi)的紀錄

All Of Me Raspberry Pi 教學
http://hatemegalaxy.blogspot.tw/2014/01/play-raspberry-pi-3-set-usb-wi-fi.html

MIS腳印
http://www.smalljacky.com/linux/arch-linux/install-setup-arch-linux-for-raspberry-pi-2/

一開始聽從Beginner's Guide的建議抓了主程式,這種古董小筆電當然沒有光碟機,因此必須用USB開機。
正好看到Wiki上提到了gpg2驗證這回事,想說玩玩看,就搞了兩天晚上,不過順便認識了RSA加密跟GPG的基本操作

1
2
3
4
5
6
7
8
9
D:\Fantasilm\Arch Linux>gpg2 --verify iso-file.sig
gpg: can't open `iso-file.sig': No such file or directory
gpg: verify signatures failed: No such file or directory

D:\Fantasilm\Arch Linux>gpg2 --verify archlinux-2016.04.01-dual.iso.sig
gpg: assuming signed data in 'archlinux-2016.04.01-dual.iso'
gpg: Signature made 04/02/16 04:40:18 台北標準時間 using RSA key ID 9741E8AC
gpg: Can't check signature: No public key

明明按照官網上下載了.sig,又去找教學用cmd驗證了,怎麼無法驗證呢?
再去找了幾篇文。網路真偉大!

使用GPG驗證檔案
http://fvalinux.pixnet.net/blog/post/27793225-%E4%BD%BF%E7%94%A8gpg%E9%A9%97%E8%AD%89%E6%AA%94%E6%A1%88%E7%9A%84%E6%96%B9%E6%B3%95
GPG使用教學
http://www.ruanyifeng.com/blog/2013/07/gpg.html

才知道原來是要去公開key server去抓public key下來驗證啊!
因為key server並沒有上傳的審核機制,無法確定真的是那個作者提供的,所以跳出了WARNING,不過就不理他了。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
D:\Fantasilm\Arch Linux>gpg --keyserver pgpkeys.mit.edu --recv-key 9741E8AC

gpg: requesting key 9741E8AC from hkp server pgpkeys.mit.edu
gpg: key 9741E8AC: public key "Pierre Schmitz <pierre@archlinux.de>" imported
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

D:\Fantasilm\Arch Linux>gpg --verify archlinux-2016.04.01-dual.iso.sig
gpg: assuming signed data in 'archlinux-2016.04.01-dual.iso'
gpg: Signature made 04/02/16 04:40:18 台北標準時間 using RSA key ID 9741E8AC
gpg: Good signature from "Pierre Schmitz <pierre@archlinux.de>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 4AA4 767B BC9C 4B1D 18AE  28B7 7F2D 434B 9741 E8AC


按照Wiki的USB安裝步驟,裝了Cypwin
也練習了一下gpg2驗證

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
D:\Fantasilm\Arch Linux>gpg --verify setup-x86_64.exe.sig
gpg: assuming signed data in 'setup-x86_64.exe'
gpg: Signature made 10/19/15 03:38:02 台北標準時間 using DSA key ID 676041BA
gpg: Can't check signature: No public key

D:\Fantasilm\Arch Linux>gpg --keyserver pgpkeys.mit.edu --recv-key 676041BA
gpg: requesting key 676041BA from hkp server pgpkeys.mit.edu
gpg: key 676041BA: public key "Cygwin <cygwin@cygwin.com>" imported
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   2  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 2u
gpg: Total number processed: 1
gpg:               imported: 1

D:\Fantasilm\Arch Linux>gpg --verify setup-x86_64.exe.sig
gpg: assuming signed data in 'setup-x86_64.exe'
gpg: Signature made 10/19/15 03:38:02 台北標準時間 using DSA key ID 676041BA
gpg: Good signature from "Cygwin <cygwin@cygwin.com>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 1169 DF9F 2273 4F74 3AA5  9232 A9A2 62FF 6760 41BA


用Cypwin製作USB UFTI開機碟

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$ dd if=archlinux-2016.04.01-dual.iso of=\\.\F: bs=4M

$ cat /proc/partitions
major minor  #blocks  name   win-mounts

    8     0 976762584 sda
    8     1    102400 sda1
    8     2    921600 sda2
    8     3    131072 sda3
    8     4 390703104 sda4   C:\
    8     5 563920896 sda5   D:\
    8     6  20981760 sda6
    8    16   7864320 sdb
    8    17   7863296 sdb1   F:\

Euglius@Fantasilm /cygdrive/c/cygwin64/home/Fantasilm
$ dd if=archlinux-2016.04.01-dual.iso of=/dev/sdb1 bs=4M
181+0 records in
181+0 records out
759169024 bytes (759 MB, 724 MiB) copied, 98.856 s, 7.7 MB/s


沒想到裝上USB後EeePC無法用它的UFEI開機......又是拜了Google大神才找到替代方案。USBWriter直接把ISO寫進去USB,簡單粗暴!

終於準備好檔案,可以開始安裝啦!

沒有留言:

張貼留言