Here is how to make an unattended installation ISO of Ubuntu 14.04 Server.
Reference
http://pricklytech.wordpress.com/2013/04/21/ubuntu-server-unattended-installation-custom-cd/
make automatic installation ISO
mount the ISO
# mount -o loop /home/hattori/ISO_files/ubuntu-14.04-server-amd64.iso /home/hattori/iso
|
copy files to /home/hattori/serveriso directory
# cp -rT /home/hattori/iso /home/hattori/serveriso
# chmod -R 777 /home/hattori/serveriso/
|
configure language ( in my case, use japanese )
first search supported language from langlist file and configure language you want to use
# cd /home/hattori/serveriso/isolinux/
# grep ^ja langlist
ja
# echo ja > langlist
# cat langlist
ja
|
install system-config-kickstart to make a kickstart file.
# apt-get install system-config-kickstart
|
start.
error.
# system-config-kickstart
Traceback (most recent call last):
File "/usr/share/system-config-kickstart/system-config-kickstart.py", line 92, in <module>
kickstartGui.kickstartGui(file)
File "/usr/share/system-config-kickstart/kickstartGui.py", line 131, in __init__
self.X_class = xconfig.xconfig(xml, self.kickstartData)
File "/usr/share/system-config-kickstart/xconfig.py", line 80, in __init__
self.fill_driver_list()
File "/usr/share/system-config-kickstart/xconfig.py", line 115, in fill_driver_list
raise RuntimeError, (_("Could not read video driver database"))
RuntimeError: ビデオドライバーのデータベースを読み込むことができませんでした
|
Googling this, this seems to be a bug.
follow the instructions.
# apt-get remove hwdata -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
localechooser-data
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
hwdata system-config-kickstart
# wget ftp://mirror.ovh.net/mirrors/ftp.debian.org/debian/pool/main/h/hwdata/hwdata_0.234-1_all.deb
# dpkg -i hwdata_0.234-1_all.deb
# apt-get install system-config-kickstart -y
|
start. Okay.
# system-config-kickstart
make a kickstart file with GUI
Here is the ks.cfg I made.
# grep -v ^# /home/hattori/ks.cfg
lang en_US
langsupport en_US
keyboard us
mouse
timezone America/New_York
rootpw --iscrypted $1$XQbTzRQH$bL76vvwsL6USTxmS7C4tz1
user hattori --fullname "hattori" --iscrypted --password $1$E/m3UF5k$iqR.lTy44xcWqHJI23M9s.
reboot
text
install
cdrom
bootloader --location=mbr
zerombr yes
clearpart --all --initlabel
part / --fstype ext4 --size 1 --grow
part swap --recommended
auth --useshadow --enablemd5
network --bootproto=dhcp --device=eth0
firewall --disabled --ssh
skipx
|
add following lines at the end of ks.cfg
%packages
nano openssh-server |
# grep -v ^# /home/hattori/ks.cfg
lang ja_JP
langsupport ja_JP
keyboard jp
mouse
timezone Asia/Tokyo
rootpw --iscrypted $1$WQ7m.az5$EAgrglOCZsH2vtRRO.I8e0
user hattori --fullname "hattori" --iscrypted --password $1$cWaRngQ0$VXnCiRAKUe4SvoihCVTtB.
reboot
text
install
cdrom
bootloader --location=mbr
zerombr yes
clearpart --all --initlabel
part / --fstype ext4 --size 1 --grow
part swap --recommended
auth --useshadow --enablemd5
network --bootproto=dhcp --device=eth0
firewall --disabled --ssh
skipx
%packages
nano
openssh-server
|
copy the ks file to the /home/hattori/serveriso
# cp /home/hattori/ks.cfg /home/hattori/serveriso/
# ls /home/hattori/serveriso/
EFI boot doc isolinux md5sum.txt pool ubuntu
README.diskdefines dists install ks.cfg pics preseed
|
edit txt.cfg
add “ks=cdrom:ks.cfg”
remove vga=788 and quiet --
before
# less /home/hattori/txt.cfg.org
default install
label install
menu label ^Install Ubuntu Server
kernel /install/vmlinuz
append file=/cdrom/preseed/ubuntu-server.seed vga=788 initrd=/install/initrd.gz quiet --
|
after editing
# pwd
/home/hattori/serveriso/isolinux
# cat txt.cfg
default install
label install
menu label ^Install Ubuntu Server
kernel /install/vmlinuz
append file=/cdrom/preseed/ubuntu-server.seed initrd=/install/initrd.gz ks=cdrom:/ks.cfg
|
make an ISO
# cd /home/hattori/serveriso/
# mkisofs -D -r -V "auto install" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o /home/hattori/ubuntu1404_auto.iso /home/hattori/serveriso
# file /home/hattori/ubuntu1404_auto.iso
/home/hattori/ubuntu1404_auto.iso: # ISO 9660 CD-ROM filesystem data 'auto install' (bootable)
|
install ubuntu by using this ISO.
I confirmed that the the installation succeeds within KVM.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.