Ubuntu PXE 환경 구축 및 Pressed 로 입력없이 한방에 설치 하기.

죠짱   
   조회 89331   추천 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 을 해주는 명령어를 넣었습니다.
눈빛마음 2014-05
핫... 한참 삽질 하고 났더니 이제서야 이 팁을 봤네요. +_+a


제목Page 27/28
2023-06   58394   정무현
2023-08   58537   딥러닝서버
2023-08   59888   딥러닝서버
2014-01   62374   binary
2012-06   62536   안형곤
2013-09   62668   채선일
2023-06   64117   딥러닝서버
2023-07   64888   딥러닝서버
2023-09   65379   딥러닝서버
2013-04   70029   엠브리오
2013-01   70851   이지포토
2023-06   72040   딥러닝서버
2013-03   78128   안형곤
2013-04   78397   MikroTik이진
2013-10   83620   죠짱
2013-06   87713   황진우
2013-10   88919   죠짱
2013-10   89332   죠짱
2012-11   90043   두포리
2013-05   90497   황진우