Merge "Add kernel option into preseed"
This commit is contained in:
commit
9d9580d091
@ -145,6 +145,8 @@ Instruct the system to run the OSA playbooks, if you want to deploy other OSA po
|
||||
Instruct the VM to use the selected image, eg. ubuntu xenial:
|
||||
``DEFAULT_IMAGE=${DEFAULT_IMAGE:-16.04}``
|
||||
|
||||
Install the specified kernel, eg 3.13.0-34 if you want to deploy Juno release.
|
||||
``DEFAULT_KERNEL=${DEFAULT_KERNEL:-3.13.0-34}``
|
||||
|
||||
Re-kicking the VMs
|
||||
------------------
|
||||
|
@ -23,6 +23,15 @@ source functions.rc
|
||||
# The default image for VMs, change it to 16.04 if you want to use xenial as operation system.
|
||||
DEFAULT_IMAGE="${DEFAULT_IMAGE:-"$(lsb_release -sd | awk '{print $2}')"}"
|
||||
|
||||
# The default kernel for Image, leave it empty will install the lastest kernel.
|
||||
DEFAULT_KERNEL="${DEFAULT_KERNEL:-}"
|
||||
|
||||
if [ -z "$DEFAULT_KERNEL" ]; then
|
||||
DEFAULT_KERNEL=linux-image-generic
|
||||
else
|
||||
DEFAULT_KERNEL="linux-image-$DEFAULT_KERNEL-generic"
|
||||
fi
|
||||
|
||||
# Install cobbler
|
||||
wget -qO - http://download.opensuse.org/repositories/home:/libertas-ict:/cobbler26/xUbuntu_14.04/Release.key | apt-key add -
|
||||
add-apt-repository "deb http://download.opensuse.org/repositories/home:/libertas-ict:/cobbler26/xUbuntu_14.04/ ./"
|
||||
@ -88,6 +97,7 @@ for seed_file in $(ls -1 templates/pre-seeds); do
|
||||
sed -i "s|__DEVICE_NAME__|${DEVICE_NAME}|g" "/var/lib/cobbler/kickstarts/${seed_file#*'/'}"
|
||||
sed -i "s|__SSHKEY__|${SSHKEY}|g" "/var/lib/cobbler/kickstarts/${seed_file#*'/'}"
|
||||
sed -i "s|__DEFAULT_NETWORK__|${DEFAULT_NETWORK}|g" "/var/lib/cobbler/kickstarts/${seed_file#*'/'}"
|
||||
sed -i "s|__DEFAULT_KERNEL__|${DEFAULT_KERNEL}|g" "/var/lib/cobbler/kickstarts/${seed_file#*'/'}"
|
||||
done
|
||||
|
||||
# Restart services again and configure autostart
|
||||
|
@ -22,6 +22,9 @@
|
||||
# Note: options passed to the installer will be added automatically.
|
||||
d-i debian-installer/add-kernel-opts string $kernel_options_post
|
||||
|
||||
### Base system installation
|
||||
d-i base-installer/kernel/image string __DEFAULT_KERNEL__
|
||||
|
||||
#############
|
||||
#
|
||||
# Networking
|
||||
@ -290,4 +293,4 @@ d-i preseed/late_command string \
|
||||
#############
|
||||
|
||||
# Reboot after the install is finished.
|
||||
finish-install finish-install/reboot_in_progress note
|
||||
finish-install finish-install/reboot_in_progress note
|
||||
|
@ -22,6 +22,9 @@
|
||||
# Note: options passed to the installer will be added automatically.
|
||||
d-i debian-installer/add-kernel-opts string $kernel_options_post
|
||||
|
||||
### Base system installation
|
||||
d-i base-installer/kernel/image string __DEFAULT_KERNEL__
|
||||
|
||||
#############
|
||||
#
|
||||
# Networking
|
||||
@ -284,4 +287,4 @@ d-i preseed/late_command string \
|
||||
#############
|
||||
|
||||
# Reboot after the install is finished.
|
||||
finish-install finish-install/reboot_in_progress note
|
||||
finish-install finish-install/reboot_in_progress note
|
||||
|
@ -22,6 +22,9 @@
|
||||
# Note: options passed to the installer will be added automatically.
|
||||
d-i debian-installer/add-kernel-opts string $kernel_options_post
|
||||
|
||||
### Base system installation
|
||||
d-i base-installer/kernel/image string __DEFAULT_KERNEL__
|
||||
|
||||
#############
|
||||
#
|
||||
# Networking
|
||||
@ -285,4 +288,4 @@ d-i preseed/late_command string \
|
||||
#############
|
||||
|
||||
# Reboot after the install is finished.
|
||||
finish-install finish-install/reboot_in_progress note
|
||||
finish-install finish-install/reboot_in_progress note
|
||||
|
@ -22,6 +22,9 @@
|
||||
# Note: options passed to the installer will be added automatically.
|
||||
d-i debian-installer/add-kernel-opts string $kernel_options_post
|
||||
|
||||
### Base system installation
|
||||
d-i base-installer/kernel/image string __DEFAULT_KERNEL__
|
||||
|
||||
#############
|
||||
#
|
||||
# Networking
|
||||
@ -284,4 +287,4 @@ d-i preseed/late_command string \
|
||||
#############
|
||||
|
||||
# Reboot after the install is finished.
|
||||
finish-install finish-install/reboot_in_progress note
|
||||
finish-install finish-install/reboot_in_progress note
|
||||
|
@ -22,6 +22,9 @@
|
||||
# Note: options passed to the installer will be added automatically.
|
||||
d-i debian-installer/add-kernel-opts string $kernel_options_post
|
||||
|
||||
### Base system installation
|
||||
d-i base-installer/kernel/image string __DEFAULT_KERNEL__
|
||||
|
||||
#############
|
||||
#
|
||||
# Networking
|
||||
@ -292,4 +295,4 @@ d-i preseed/late_command string \
|
||||
#############
|
||||
|
||||
# Reboot after the install is finished.
|
||||
finish-install finish-install/reboot_in_progress note
|
||||
finish-install finish-install/reboot_in_progress note
|
||||
|
@ -22,6 +22,9 @@
|
||||
# Note: options passed to the installer will be added automatically.
|
||||
d-i debian-installer/add-kernel-opts string $kernel_options_post
|
||||
|
||||
### Base system installation
|
||||
d-i base-installer/kernel/image string __DEFAULT_KERNEL__
|
||||
|
||||
#############
|
||||
#
|
||||
# Networking
|
||||
@ -309,4 +312,4 @@ d-i preseed/late_command string \
|
||||
#############
|
||||
|
||||
# Reboot after the install is finished.
|
||||
finish-install finish-install/reboot_in_progress note
|
||||
finish-install finish-install/reboot_in_progress note
|
||||
|
Loading…
x
Reference in New Issue
Block a user