Add kernel option into preseed
According to suggestion, add the kernel option in the preseed file, leave it empty to get the lastest kernel, or specify the kernel number. Change-Id: Ie5b8f62a89ef9eb51954f0452becbaa9e81ee973
This commit is contained in:
parent
d388328465
commit
0df9b3dab1
@ -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:
|
Instruct the VM to use the selected image, eg. ubuntu xenial:
|
||||||
``DEFAULT_IMAGE=${DEFAULT_IMAGE:-16.04}``
|
``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
|
Re-kicking the VMs
|
||||||
------------------
|
------------------
|
||||||
|
@ -20,6 +20,15 @@ source functions.rc
|
|||||||
# The default image for VMs, change it to 16.04 if you want to use xenial as operation system.
|
# 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}')"}"
|
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
|
# Install cobbler
|
||||||
wget -qO - http://download.opensuse.org/repositories/home:/libertas-ict:/cobbler26/xUbuntu_14.04/Release.key | apt-key add -
|
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/ ./"
|
add-apt-repository "deb http://download.opensuse.org/repositories/home:/libertas-ict:/cobbler26/xUbuntu_14.04/ ./"
|
||||||
@ -83,6 +92,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|__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|__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_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
|
done
|
||||||
|
|
||||||
# Restart services again and configure autostart
|
# Restart services again and configure autostart
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
# Note: options passed to the installer will be added automatically.
|
# Note: options passed to the installer will be added automatically.
|
||||||
d-i debian-installer/add-kernel-opts string $kernel_options_post
|
d-i debian-installer/add-kernel-opts string $kernel_options_post
|
||||||
|
|
||||||
|
### Base system installation
|
||||||
|
d-i base-installer/kernel/image string __DEFAULT_KERNEL__
|
||||||
|
|
||||||
#############
|
#############
|
||||||
#
|
#
|
||||||
# Networking
|
# Networking
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
# Note: options passed to the installer will be added automatically.
|
# Note: options passed to the installer will be added automatically.
|
||||||
d-i debian-installer/add-kernel-opts string $kernel_options_post
|
d-i debian-installer/add-kernel-opts string $kernel_options_post
|
||||||
|
|
||||||
|
### Base system installation
|
||||||
|
d-i base-installer/kernel/image string __DEFAULT_KERNEL__
|
||||||
|
|
||||||
#############
|
#############
|
||||||
#
|
#
|
||||||
# Networking
|
# Networking
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
# Note: options passed to the installer will be added automatically.
|
# Note: options passed to the installer will be added automatically.
|
||||||
d-i debian-installer/add-kernel-opts string $kernel_options_post
|
d-i debian-installer/add-kernel-opts string $kernel_options_post
|
||||||
|
|
||||||
|
### Base system installation
|
||||||
|
d-i base-installer/kernel/image string __DEFAULT_KERNEL__
|
||||||
|
|
||||||
#############
|
#############
|
||||||
#
|
#
|
||||||
# Networking
|
# Networking
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
# Note: options passed to the installer will be added automatically.
|
# Note: options passed to the installer will be added automatically.
|
||||||
d-i debian-installer/add-kernel-opts string $kernel_options_post
|
d-i debian-installer/add-kernel-opts string $kernel_options_post
|
||||||
|
|
||||||
|
### Base system installation
|
||||||
|
d-i base-installer/kernel/image string __DEFAULT_KERNEL__
|
||||||
|
|
||||||
#############
|
#############
|
||||||
#
|
#
|
||||||
# Networking
|
# Networking
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
# Note: options passed to the installer will be added automatically.
|
# Note: options passed to the installer will be added automatically.
|
||||||
d-i debian-installer/add-kernel-opts string $kernel_options_post
|
d-i debian-installer/add-kernel-opts string $kernel_options_post
|
||||||
|
|
||||||
|
### Base system installation
|
||||||
|
d-i base-installer/kernel/image string __DEFAULT_KERNEL__
|
||||||
|
|
||||||
#############
|
#############
|
||||||
#
|
#
|
||||||
# Networking
|
# Networking
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
# Note: options passed to the installer will be added automatically.
|
# Note: options passed to the installer will be added automatically.
|
||||||
d-i debian-installer/add-kernel-opts string $kernel_options_post
|
d-i debian-installer/add-kernel-opts string $kernel_options_post
|
||||||
|
|
||||||
|
### Base system installation
|
||||||
|
d-i base-installer/kernel/image string __DEFAULT_KERNEL__
|
||||||
|
|
||||||
#############
|
#############
|
||||||
#
|
#
|
||||||
# Networking
|
# Networking
|
||||||
|
Loading…
x
Reference in New Issue
Block a user