Skip to content

Commit

Permalink
boot: update the bootargs.cfg
Browse files Browse the repository at this point in the history
    - we need to update the /proc/cmdline for looks cos_state as root
    - use latest sle-micro baseOS image as dev branch
    - change some oem files that depend on the old root label

Signed-off-by: Vicente Cheng <[email protected]>
  • Loading branch information
Vicente-Cheng committed Jun 30, 2023
1 parent 73619b4 commit b7c704b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions package/harvester-os/files/etc/cos/bootargs.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
set console_params="console=tty1"
set kernel=/boot/vmlinuz
set crash_kernel_params="crashkernel=219M,high crashkernel=72M,low"
if [ -n "$recoverylabel" ]; then
set kernelcmd="$console_params root=live:LABEL=$recoverylabel rd.live.dir=/ rd.live.squashimg=$img panic=0 net.ifnames=1 rd.cos.oemtimeout=120"
if [ "${img}" == "/cOS/recovery.img" ]; then
set kernelcmd="$console_params root=LABEL=$recovery_label cos-img/filename=$img rd.neednet=1 rd.cos.oemlabel=$oem_label rd.cos.mount=LABEL=$oem_label:/oem rd.cos.oemtimeout=120"
else
set kernelcmd="$console_params root=LABEL=$label cos-img/filename=$img panic=0 net.ifnames=1 rd.cos.oemtimeout=120 rd.cos.oemlabel=COS_OEM audit=1 audit_backlog_limit=8192 intel_iommu=on amd_iommu=on iommu=pt"
set kernelcmd="$console_params root=LABEL=$state_label cos-img/filename=$img panic=0 net.ifnames=1 rd.cos.oemlabel=$oem_label rd.cos.mount=LABEL=$oem_label:/oem rd.cos.mount=LABEL=$persistent_label:/usr/local rd.cos.oemtimeout=120 audit=1 audit_backlog_limit=8192 intel_iommu=on amd_iommu=on iommu=pt"
fi

set initramfs=/boot/initrd
2 changes: 1 addition & 1 deletion package/harvester-os/files/system/oem/91_installer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ stages:
HARVESTER_DASHBOARD: "true"
KUBECONFIG: /etc/rancher/rke2/rke2.yaml
PATH: /var/lib/rancher/rke2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
if: 'grep -q root=LABEL=COS_ACTIVE /proc/cmdline && [ -n "$(blkid -L COS_ACTIVE)" ]'
if: 'grep -q root=LABEL=COS_STATE /proc/cmdline && [ -n "$(blkid -L COS_STATE)" ]'
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ name: "Enable RKE2 shutdown service"
stages:
initramfs:
- name: "enable rke2-shutdown.service"
if: 'grep -q root=LABEL=COS_ACTIVE /proc/cmdline && [ -n "$(blkid -L COS_ACTIVE)" ]'
if: 'grep -q root=LABEL=COS_STATE /proc/cmdline && [ -n "$(blkid -L COS_STATE)" ]'
commands:
- systemctl enable rke2-shutdown.service
2 changes: 1 addition & 1 deletion package/harvester-os/files/usr/sbin/harv-install
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ get_crashkernel_params()

add_debug_grub_entry()
{
cat > "${STATEDIR}/grubmenu" << "EOF"
cat > "${STATEDIR}/grubcustom" << "EOF"
menuentry "${display_name} (debug)" --id debug {
search --no-floppy --set=root --label COS_STATE
set img=/cOS/active.img
Expand Down
2 changes: 1 addition & 1 deletion scripts/package-harvester-os
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ source ${SCRIPTS_DIR}/version-harvester ${TOP_DIR}/../harvester
source ${SCRIPTS_DIR}/version-monitoring
source ${SCRIPTS_DIR}/version-logging

BASE_OS_IMAGE="rancher/harvester-os:20230615"
BASE_OS_IMAGE="rancher/harvester-os:sle-micro-head"
HARVESTER_OS_IMAGE=rancher/harvester-os:$VERSION

cd ${PACKAGE_HARVESTER_OS_DIR}
Expand Down

0 comments on commit b7c704b

Please sign in to comment.