2012-11-21

install arch64 for hard driver

以前弄ubuntu的似乎是比較簡單,arch設定有點不同,今天終於弄成功了,很棒!

  • 另外得知pacstrap、genfstab、arch-chroot,只要安裝arch-install-scripts就能執行了,這樣應該能在原有系統進行安裝囉。



我們要先取得存放裝置的_id與iso檔案的archisolabel

  • _id
sudo blkid|grep total
/dev/sdb2: LABEL="total" UUID="b7d0b427-8963-4e09-a5cd-93d703b9ff9f" TYPE="ext4"

  • archisolabel
iso-info /mnt/total/iso/arch/archlinux-2012.11.01-dual.iso
iso-info version 0.83 x86_64-unknown-linux-gnu
ISO 9660 image: /mnt/total/iso/arch/archlinux-2012.11.01-dual.iso
Application: ARCH LINUX LIVE/RESCUE CD
Preparer : PREPARED BY MKARCHISO
Publisher : ARCH LINUX
Volume : ARCH_201211

完成後新建一個檔案,內容請自行修改。
sudo vim /etc/grub.d/60_Arch

#!/bin/bash
exec tail -n +3 $0
menuentry "Archlinux-2012.11.01 uuid" {
 _id=b7d0b427-8963-4e09-a5cd-93d703b9ff9f
 insmod loopback
 insmod iso9660
 search --fs-uuid --no-floppy --set=root $_id
 set isofile="/iso/arch/archlinux-2012.11.01-dual.iso"
 loopback loop $isofile
 linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=ARCH_201211 img_dev=/dev/disk/by-uuid/$_id  img_loop=$isofile
 initrd (loop)/arch/boot/x86_64/archiso.img
}

再來就是寫入grub.cfg,最後重新開機測試囉
sudo chmod +x /etc/grub.d/60_Arch
sudo grub-mkconfig -o /boot/grub/grub.cfg

附上Installation Guide (正體中文)

參考資料: GRUB2 (正體中文)