diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-04-23 22:11:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-23 22:11:33 +0200 |
commit | 4e0f2e4c6a648343a8132f1eadc0cdb89bda8c4a (patch) | |
tree | 21b2dbe849d325099fd2e32418b56b7ddad23edc /roles/install-grub | |
parent | 88832a6324731f9357aa301adc70ef8448d6bc9f (diff) | |
parent | 6f037298fc0c48f2ffb4ba0780f1cfdbb1fa4acf (diff) | |
download | vyos-vm-images-4e0f2e4c6a648343a8132f1eadc0cdb89bda8c4a.tar.gz vyos-vm-images-4e0f2e4c6a648343a8132f1eadc0cdb89bda8c4a.zip |
Merge pull request #4 from zdc/fix-qemu-01
Multiple fixes and improvements in QEMU image building
Diffstat (limited to 'roles/install-grub')
-rw-r--r-- | roles/install-grub/tasks/main.yml | 2 | ||||
-rw-r--r-- | roles/install-grub/templates/boot/grub/grub.cfg.j2 | 28 |
2 files changed, 26 insertions, 4 deletions
diff --git a/roles/install-grub/tasks/main.yml b/roles/install-grub/tasks/main.yml index 2a20271..33a1049 100644 --- a/roles/install-grub/tasks/main.yml +++ b/roles/install-grub/tasks/main.yml @@ -20,7 +20,7 @@ - name: Install GRUB in the boot sector of {{ vyos_target_drive }} become: true - command: chroot {{ vyos_install_root }} grub-install --no-floppy --root-directory=/boot {{ vyos_target_drive }} --force + command: chroot {{ vyos_install_root }} grub-install --no-floppy --root-directory=/boot {{ vyos_target_drive }} --force --target=i386-pc args: creates: "{{ vyos_install_root }}/boot/grub/grubenv" diff --git a/roles/install-grub/templates/boot/grub/grub.cfg.j2 b/roles/install-grub/templates/boot/grub/grub.cfg.j2 index 45f48ab..6cfea8f 100644 --- a/roles/install-grub/templates/boot/grub/grub.cfg.j2 +++ b/roles/install-grub/templates/boot/grub/grub.cfg.j2 @@ -1,7 +1,29 @@ +{% if grub_console == "kvm" %} set default=0 -set timeout=0 +{% elif grub_console == "serial" %} +set default=1 +{% endif %} +set timeout=5 +serial --unit=0 +terminal_output --append serial +terminal_input serial console -menuentry "VyOS {{ vyos_platform }} Image {{ vyos_version }}" { - linux /boot/{{ vyos_version }}/vmlinuz boot=live selinux=0 vyos-union=/boot/{{ vyos_version }} console=tty1 +menuentry "VyOS {{ vyos_version }} for {{ vyos_platform }} (KVM console)" { + linux /boot/{{ vyos_version }}/vmlinuz boot=live rootdelay=5 noautologin net.ifnames=0 biosdevname=0 vyos-union=/boot/{{ vyos_version }} console=ttyS0 console=tty0 + initrd /boot/{{ vyos_version }}/initrd.img +} + +menuentry "VyOS {{ vyos_version }} for {{ vyos_platform }} (Serial console)" { + linux /boot/{{ vyos_version }}/vmlinuz boot=live rootdelay=5 noautologin net.ifnames=0 biosdevname=0 vyos-union=/boot/{{ vyos_version }} console=tty0 console=ttyS0 + initrd /boot/{{ vyos_version }}/initrd.img +} + +menuentry "VyOS {{ vyos_version }} for {{ vyos_platform }} - password reset (KVM console)" { + linux /boot/{{ vyos_version }}/vmlinuz boot=live rootdelay=5 noautologin net.ifnames=0 biosdevname=0 vyos-union=/boot/{{ vyos_version }} console=ttyS0 console=tty0 init=/opt/vyatta/sbin/standalone_root_pw_reset + initrd /boot/{{ vyos_version }}/initrd.img +} + +menuentry "VyOS {{ vyos_version }} for {{ vyos_platform }} - password reset (Serial console)" { + linux /boot/{{ vyos_version }}/vmlinuz boot=live rootdelay=5 noautologin net.ifnames=0 biosdevname=0 vyos-union=/boot/{{ vyos_version }} console=tty0 console=ttyS0 init=/opt/vyatta/sbin/standalone_root_pw_reset initrd /boot/{{ vyos_version }}/initrd.img } |