Skip to content

Instantly share code, notes, and snippets.

@CliffLin
Created February 17, 2016 08:24
Show Gist options
  • Save CliffLin/df989dbf85a3ccc10e33 to your computer and use it in GitHub Desktop.
Save CliffLin/df989dbf85a3ccc10e33 to your computer and use it in GitHub Desktop.

#前言 感謝小飛機掏出一台主機借我玩

ACCTON SAF4121I

原本想說裝個archlinux應該不難

殊不知這台只有console port 並沒有vga

#Trace Config

首先,嘗試archlinux wiki上各種燒usb方式

都會開到一半console無畫面

測到後來發現可能是boot menu不是送到console

開始研究usb內的東西應該要有所更動

首先,usb會先執行 syslinux.cfg

DEFAULT loadconfig

LABEL loadconfig
  CONFIG /isolinux/isolinux.cfg
  APPEND /isolinux/

接著執行isolinux/isolinux.cfg

PATH /arch/boot/syslinux/
DEFAULT loadconfig

LABEL loadconfig
  CONFIG /arch/boot/syslinux/archiso.cfg
  APPEND /arch/

接著執行/arch/boot/syslinux/archiso.cfg

DEFAULT select

LABEL select
COM32 boot/syslinux/whichsys.c32
APPEND -pxe- pxe -sys- sys -iso- sys

LABEL pxe
CONFIG boot/syslinux/archiso_pxe_choose.cfg

LABEL sys
CONFIG boot/syslinux/archiso_sys_choose.cfg

這邊他是選單 那我們不適用pxe開機,故

執行boot/syslinux/archiso_sys_choose.cfg

DEFAULT choose

LABEL choose
COM32 boot/syslinux/ifcpu64.c32
APPEND have64 -- nohave64

LABEL have64
CONFIG boot/syslinux/archiso_sys_both_inc.cfg

LABEL nohave64
CONFIG boot/syslinux/archiso_sys_32_inc.cfg

這邊是選擇32或64位元 我們選擇64故執行boot/syslinux/archiso_sys_both_inc.cfg

INCLUDE boot/syslinux/archiso_head.cfg
INCLUDE boot/syslinux/archiso_sys64.cfg
INCLUDE boot/syslinux/archiso_sys32.cfg
INCLUDE boot/syslinux/archiso_tail.cfg

最可怕的是在boot/syslinux/archiso_head.cfg load了一張圖片,重點在console無法顯示 在load圖片後就會開始load img進來安裝

結論

綜合以上,將中間的剔除留下需要的東西

故,直接在第一個檔案就直接改寫

/syslinux.cfg

DEFAULT bootarch

LABEL bootarch
  SERIAL 0 115200
  LINUX /arch/boot/x86_64/vmlinuz
  INITRD /arch/boot/x86_64/archiso.img
  APPEND archisobasedir=arch archisolabel=ARCH_201510 console=ttyS0,115200n8

直接把img拉進來 並設定console

@pichuang
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment