[devel-distro] Q: virt-install vs vm/builder qcow2

Konstantin Lepikhov lakostis at unsafe.ru
Fri Dec 3 16:07:20 MSK 2021


Hi Konstantin!

On 12/03/2021, at 12:04:05 PM you wrote:

<skip>
> (тут должна появиться текстовая консоль grub но ничего не происходит и
> висит)
Сам нашел, сам и исправил )

diff --git a/conf.d/vm.mk b/conf.d/vm.mk
index 82c991e7..ef774f22 100644
--- a/conf.d/vm.mk
+++ b/conf.d/vm.mk
@@ -24,12 +24,13 @@ vm/systemd-net: vm/systemd use/net-eth/networkd-dhcp use/net-ssh \
 # vm/net or vm/systemd-net
 vm/cloud-systemd: vm/systemd-net mixin/cloud-init use/vmguest/kvm use/tty/S0 \
 	use/net/networkd/resolved
+	@$(call set,KFLAVOURS,centos)
 	@$(call add,THE_KMODULES,drm)
 	@$(call add,VM_INITRDMODULES,sr_mod)
 	@$(call add,BASE_PACKAGES,update-kernel)
 	@$(call add,BASE_PACKAGES,apt-scripts)
 	@$(call add,BASE_PACKAGES,systemd-settings-disable-kill-user-processes)
-	@$(call add,DEFAULT_SERVICES_ENABLE,getty at tty1 getty at ttyS0)
+	@$(call add,DEFAULT_SERVICES_ENABLE,getty at tty0 getty at ttyS0)
 	@$(call add,DEFAULT_SERVICES_DISABLE,consolesaver)
 
 vm/cloud-sysv: vm/net mixin/cloud-init use/vmguest/kvm use/power/acpi/button; @:
diff --git a/features.in/tty/config.mk b/features.in/tty/config.mk
index adca3ae1..252e4174 100644
--- a/features.in/tty/config.mk
+++ b/features.in/tty/config.mk
@@ -14,4 +14,4 @@ use/tty/S0 use/tty/SIF0 use/tty/AMA0: use/tty/%: use/tty
 	@$(call add,TTY_DEV,tty$*)
 	@$(call set,TTY_RATE,115200)
 	@$(call add,SYSLINUX_CFG,tty$*)
-	@$(call add,BASE_BOOTARGS,console=tty1 console=$$(TTY_DEV)$(comma)$$(TTY_RATE)n8)
+	@$(call add,BASE_BOOTARGS,console=tty0 console=$$(TTY_DEV)$(comma)$$(TTY_RATE))
diff --git a/features.in/tty/rootfs/image-scripts.d/50-serial b/features.in/tty/rootfs/image-scripts.d/50-serial
index 411fbc18..320f93b6 100755
--- a/features.in/tty/rootfs/image-scripts.d/50-serial
+++ b/features.in/tty/rootfs/image-scripts.d/50-serial
@@ -4,6 +4,7 @@
 BIN=/sbin/agetty
 CFG=/etc/inittab
 SEC=/etc/securetty
+GRUB=/etc/default/grub
 
 [ -n "$GLOBAL_TTY_DEV" -a -n "$GLOBAL_TTY_RATE" ] || exit 0
 [ -s "$CFG" -a -x "$BIN" ] || exit 0
@@ -16,3 +17,8 @@ if ! grep -q "$BIN" "$CFG"; then
 		n=$(($n+1))
 	done
 fi
+
+if [ -s "$GRUB" ]; then
+	echo 'GRUB_TERMINAL="serial console"' >> "$GRUB"
+	echo "GRUB_SERIAL_COMMAND=\"serial --speed=$GLOBAL_TTY_RATE --unit=0 --word=8 --parity=no --stop=1\"" >> "$GRUB"
+fi

^ вот это исправление в features.in/tty/rootfs/image-scripts.d/50-serial
для GRUB_TERMINAL и RUB_SERIAL_COMMAND помогло.

-- 
WBR et al.


More information about the devel-distro mailing list