在 ArchLinux 製作給 BerryBoot 使用的 ArchLinux Image

因為之前是在 Raspbian 下製作的,但一直沒有成功,想會不會是系統的關係,所以改用 ArchLinux 來製作。

安裝所須套件
# pacman -S squashfs-tools kpartx
error: target not found: kpartx

但發現系統沒有 kpartx 這一個套件,在 Creating Arch Linux disk image – ArchWiki 這一篇中找到了解答,原來 kpartx 是屬於 multipath-tools-git 套件,而且是要以 AUR 的方式來安裝。
[@more@]
AUR 是 Arch User Repository 的縮寫,是由 ArchLinux 社群所維護的套件儲庫,每一個套件都包含 PKGBUILD,讓使用者可以使用 makepkg 指令把程式的始碼編譯成套件。

安裝編譯時所須套件
# pacman -S –needed base-devel
:: There are 25 members in group base-devel:
:: Repository core
   1) autoconf  2) automake  3) binutils  4) bison  5) fakeroot  6) file  7) findutils  8) flex  9) gawk  10) gcc
   11) gettext  12) grep  13) groff  14) gzip  15) libtool  16) m4  17) make  18) pacman  19) patch
   20) pkg-config  21) sed  22) sudo  23) texinfo  24) util-linux  25) which

Enter a selection (default=all):

連線到 AUR (en) – Home:https://aur.archlinux.org/
安裝 wget 來下載 Source Code
# pacman -S wget

安裝編譯 multipath-tools-git 所需套件
# pacman -S setconf

切換到一般使用者身份,因為系統不建議使用 root 身份來進行編譯
# su bananapi

下載 multipath-tools-git
$ wget https://aur.archlinux.org/packages/mu/multipath-tools-git/multipath-tools-git.tar.gz

解壓縮
$ tar xvzf multipath-tools-git.tar.gz

切換目錄
$ cd multipath-tools-git

進行編譯
$ makepkg
==> Tidying install…
  -> Purging unwanted files…
  -> Removing libtool files…
  -> Removing static library files…
  -> Removing empty directories…
  -> Compressing man and info pages…
  -> Stripping unneeded symbols from binaries and libraries…
==> Creating package “multipath-tools-git”…
  -> Generating .PKGINFO file…
  -> Generating .MTREE file…
  -> Compressing package…
==> Leaving fakeroot environment.
==> Finished making: multipath-tools-git 1397.aec68ab-1 (Sat Oct  4 16:48:36 CST 2014)

切換回 root 身份
$ exit

安裝 multipath-tools-git
# pacman -U /home/bananapi/multipath-tools-git/multipath-tools-git-1397.aec68ab-1-armv7h.pkg.tar.xz

# which kpartx
/usr/bin/kpartx

重新在 AcrhLinux 上製作給 BerryBoot 使用的 Image,還是失敗

不知道是什麼原因,但只好暫且先放棄了!