Ubuntu PXE ȯ°æ ±¸Ãà ¹× Pressed ·Î ÀԷ¾øÀÌ Çѹ濡 ¼³Ä¡ Çϱâ.

ÁÒ¯   
   Á¶È¸ 87817   Ãßõ 0    

가상머신을 쓰면 계속 프로비저닝을 하면서 썼다가 지웠다가 하는 작업이  있습니다.
이거 꽤 귀찮아서 자동으로 해버리는게 엄청 편합니다..

먼저 DHCPd 가 PXE 환경으로 세팅 되었다고 가정합니다.
Mikrotik 같은 경우에는 next 서버인가 설정 해주고 부트 이미지 설정 하면 됩니다.

먼저 이미지를 받습니다.
OS_TYPE="amd64"
DIST_VER="precise"
MIRROR_HOST="ftp.daum.net"
MIRROR_PATH="/ubuntu/dists/${DIST_VER}/main/installer-${OS_TYPE}/current/images/netboot/ubuntu-installer/${OS_TYPE}/"



default configure 는 다음과 같이 설정합니다.
pxelinux 는 tftp 서버로 세팅해야 하고 ipxe/gpxe 는 웹(HTTP)으로 부팅이 됩니다.
주소는 적절히 웹서버로 바꿔줍니다.

# ipxe/gpxe
:ubuntu
imgargs linux auto=true fb=false url=http://foo.bar/xxxxx/preseed.cfg locale=en_US console-setup/ask_detect=false debian-installer/keymap=us netcfg/choose_interface=eth0 netcfg/get_hostname=ubuntu ipv6.disable=1
boot || goto failed
goto start

#pxelinux.0
prompt 0
timeout 0

default 12.04-amd64

LABEL 12.04-amd64
        MENU LABEL Auto Ubuntu 12.04 preseed (64-bit)
        TEXT HELP
        Automatic installation using preseed. Please tab to set hostname.
        ENDTEXT
        KERNEL linux
        APPEND initrd=initrd.gz auto=true locale=en_US console-setup/ask_detect=false debian-installer/keymap=us netcfg/choose_interface=eth0 netcfg/get_hostname=ubuntu ipv6.disable=1


다음 Preseed 를 참고하여 생성합니다.
(코드가 길기 때문에 링크로 대체 합니다)

코드 안에  d-i passwd/user-password-crypted password 뒤에 부분은 Password hash 를 생성 해야 하는데, 다음 명령어로 생성 할수 있습니다.


password 는 적절히 치환해서 나온 결과를 붙여주면 됩니다.

그리고 d-i preseed/late_command string 에 적절한 명령어를 넣어 주셔도 됩니다.
저는 저기에 ssh key 를 복사 해두고, sudoer 를 풀고 locale-gen 을 해주는 명령어를 넣었습니다.
ÇÖ... ÇÑÂü »ðÁú ÇÏ°í ³µ´õ´Ï ÀÌÁ¦¼­¾ß ÀÌ ÆÁÀ» ºÃ³×¿ä. +_+a


Á¦¸ñPage 14/28
2018-11   13625   ¼ÛÁÖȯ
2018-11   9323   user
2018-10   12429   ¹Ì³ª¸®³ª¹°
2018-09   20428   ÇϾá°í´Ï
2018-09   16137   ¾ç½Ã¿­
2018-09   20343   ±èȲÁß
2018-08   18712   ¾îÂÞ
2018-08   17165   ¾îÂÞ
2018-08   11711   °õÅÊÀ̾ƺü
2018-08   16031   ±èÇö¸°
2018-07   20573   À¾³»³ë´Â¿Àºü
2018-06   21620   TLaJ3KtYGr
2018-05   22533   TRUE
2018-05   22049   俵Áø
2018-05   20371   ¼ÛÁÖȯ
2018-05   21768   ºü½Ã¿Â
2018-04   20386   RedEye
2018-04   17866   ¼ÛÁÖȯ
2018-04   21753   inquisitive
2018-04   23680   ȲÁø¿ì