Debian: ks-addon.cfg behaviour changes from centos (r8, dsr8)
- Updated the update-iso.sh and ks-addon.cfg scripts.
- Minor update.
- Added new command lines
Change-Id: I82f2f86599e3b80f33301c74d944b9b1b59e8845
Signed-off-by: Elaine Fonaro <elaine.fonaro@windriver.com>
(cherry picked from commit cab181eb85)
This commit is contained in:
committed by
Elaine A Fonaro Antonio
parent
8e78c28855
commit
0c0b35ff81
@@ -95,14 +95,11 @@ subcloud, the subcloud installation process has two phases:
|
|||||||
-o <file>: Specify output ISO file
|
-o <file>: Specify output ISO file
|
||||||
-a <file>: Specify ks-addon.cfg file
|
-a <file>: Specify ks-addon.cfg file
|
||||||
--initial-password <password>: Specify the initial login password for sysadmin user
|
--initial-password <password>: Specify the initial login password for sysadmin user
|
||||||
|
--no-force-password: Do not force password change on initial login (insecure)
|
||||||
|
|
||||||
-p <p=v>: Specify boot parameter
|
-p <p=v>: Specify boot parameter
|
||||||
Examples:
|
Examples:
|
||||||
-p rootfs_device=nvme0n1
|
-p instdev=/dev/disk/by-path/pci-0000:00:0d.0-ata-1.0
|
||||||
-p boot_device=nvme0n1
|
|
||||||
|
|
||||||
-p rootfs_device=/dev/disk/by-path/pci-0000:00:0d.0-ata-1.0
|
|
||||||
-p boot_device=/dev/disk/by-path/pci-0000:00:0d.0-ata-1.0
|
|
||||||
|
|
||||||
-d <default menu option>:
|
-d <default menu option>:
|
||||||
Specify default boot menu option:
|
Specify default boot menu option:
|
||||||
@@ -119,32 +116,62 @@ subcloud, the subcloud installation process has two phases:
|
|||||||
|
|
||||||
The following example ``ks-addon.cfg`` file, used with the -a option,
|
The following example ``ks-addon.cfg`` file, used with the -a option,
|
||||||
sets up an initial IP interface at boot time by defining a |VLAN| on an
|
sets up an initial IP interface at boot time by defining a |VLAN| on an
|
||||||
Ethernet interface and has it use |DHCP| to request an IP address:
|
Ethernet interface and has it use |DHCP| to request an IP address.
|
||||||
|
|
||||||
|
In Debian, by default the ``ks-addon.cfg`` script is executed outside of the
|
||||||
|
installing subcloud runtime (outside the chroot environment). As a result,
|
||||||
|
the script does not have access to the kernel runtime command shell. Instead,
|
||||||
|
the file system must be accessed via the provided ``$IMAGE_ROOTFS`` environment
|
||||||
|
variable.
|
||||||
|
|
||||||
|
If required, a chroot can be manually entered, allowing full access to the
|
||||||
|
installing subcloud's execution environment. See the ``ks-addon.cfg`` given
|
||||||
|
below for an example.
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
#### start ks-addon.cfg
|
#### start ks-addon.cfg
|
||||||
RAW_DEV=enp24s0f0
|
|
||||||
OAM_VLAN=103
|
|
||||||
|
|
||||||
cat << EOF > ${IMAGE_ROOTFS}/etc/network/interfaces.d/ifcfg-${RAW_DEV}
|
DEVICE=enp0s3
|
||||||
iface ${RAW_DEV} inet manual
|
OAM_VLAN=1234
|
||||||
|
OAM_ADDR="xxxx:xxxx:x:xxxx:xx:x:x:x"
|
||||||
|
|
||||||
|
# This section is run outside of the subcloud target runtime.
|
||||||
|
# The IMAGE_ROOTFS environment variable is set to the root of the target filesystem
|
||||||
|
|
||||||
|
cat << EOF > ${IMAGE_ROOTFS}/etc/network/interfaces.d/ifcfg-${DEVICE}
|
||||||
|
auto ${DEVICE}
|
||||||
|
iface ${DEVICE} inet6 manual
|
||||||
mtu 9000
|
mtu 9000
|
||||||
post-up echo 0 > /proc/sys/net/ipv6/conf/${RAW_DEV}/autoconf;\
|
post-up echo 0 > /proc/sys/net/ipv6/conf/${DEVICE}/autoconf;\
|
||||||
echo 0 > /proc/sys/net/ipv6/conf/${RAW_DEV}/accept_ra;\
|
echo 0 > /proc/sys/net/ipv6/conf/${DEVICE}/accept_ra;\
|
||||||
echo 0 > /proc/sys/net/ipv6/conf/${RAW_DEV}/accept_redirects
|
echo 0 > /proc/sys/net/ipv6/conf/${DEVICE}/accept_redirects
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat << EOF > ${IMAGE_ROOTFS}/etc/network/interfaces.d/ifcfg-vlan${OAM_VLAN}
|
cat << EOF > ${IMAGE_ROOTFS}/etc/network/interfaces.d/ifcfg-vlan${OAM_VLAN}
|
||||||
iface vlan${OAM_VLAN} inet6 dhcp
|
auto vlan${OAM_VLAN}
|
||||||
vlan-raw-device ${RAW_DEV}
|
iface vlan${OAM_VLAN} inet6 static
|
||||||
|
vlan-raw-device ${DEVICE}
|
||||||
|
address ${OAM_ADDR}
|
||||||
|
netmask 64
|
||||||
|
gateway ${OAM_GW_ADDR}
|
||||||
mtu 1500
|
mtu 1500
|
||||||
post-up /usr/sbin/ip link set dev vlan${OAM_VLAN} mtu 1500;\
|
post-up /usr/sbin/ip link set dev vlan${OAM_VLAN} mtu 1500;\
|
||||||
echo 0 > /proc/sys/net/ipv6/conf/vlan${OAM_VLAN}/autoconf;\
|
echo 0 > /proc/sys/net/ipv6/conf/vlan${OAM_VLAN}/autoconf;\
|
||||||
echo 0 > /proc/sys/net/ipv6/conf/vlan${OAM_VLAN}/accept_ra;\
|
echo 0 > /proc/sys/net/ipv6/conf/vlan${OAM_VLAN}/accept_ra;\
|
||||||
echo 0 > /proc/sys/net/ipv6/conf/vlan${OAM_VLAN}/accept_redirects
|
echo 0 > /proc/sys/net/ipv6/conf/vlan${OAM_VLAN}/accept_redirects
|
||||||
pre-up /sbin/modprobe -q 8021q
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# If execution is required inside the chroot environment, you can manually enter the
|
||||||
|
# chroot and run commands. Note: quotes around EOF are required:
|
||||||
|
cat << "EOF" | chroot "${IMAGE_ROOTFS}" /bin/bash -s
|
||||||
|
echo "ks-addon.cfg: inside chroot"
|
||||||
|
|
||||||
|
# chrooted commands go here.
|
||||||
|
# Commands are executed in the context of the installing subcloud.
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
#### end ks-addon.cfg
|
#### end ks-addon.cfg
|
||||||
|
|
||||||
After updating the ISO image, create a bootable USB with the ISO or put the
|
After updating the ISO image, create a bootable USB with the ISO or put the
|
||||||
|
|||||||
Reference in New Issue
Block a user