From b712d96fc8e07fb36f5a77add2a17d1013c1257f Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 19 Aug 2021 22:18:23 +0200 Subject: [PATCH] reboot kexec, correct paths shorten log file name --- leaves/bdmd.cfg | 2 +- leaves/bhmd.cfg | 2 +- leaves/blmd.cfg | 2 +- leaves/bmd.cfg | 2 +- leaves/bnd.cfg | 2 +- leaves/dhamd.cfg | 2 ++ leaves/dhimd.cfg | 2 ++ leaves/dhmd.cfg | 2 +- leaves/ldhamd.cfg | 6 +++--- leaves/ldhimd.cfg | 6 +++--- leaves/ldhmd.cfg | 2 +- leaves/ldmd.cfg | 2 +- leaves/lmd.cfg | 2 +- 13 files changed, 19 insertions(+), 15 deletions(-) diff --git a/leaves/bdmd.cfg b/leaves/bdmd.cfg index 41ef020..787359a 100644 --- a/leaves/bdmd.cfg +++ b/leaves/bdmd.cfg @@ -22,7 +22,7 @@ nano # Minimal GNOME shell or desktop environment plus the nano text editor %end -%post --nochroot --log=/mnt/sysimage/root/bdmd-post.log # Beginning of %post section. Those commands are executed outside the chroot environment +%post --nochroot --log=/mnt/sysimage/root/bdmd.log # Beginning of %post section. Those commands are executed outside the chroot environment # set new default background (doesn't work. Would have to call a script on first boot or something) gsettings set org.gnome.desktop.background picture-uri file:///usr/share/backgrounds/elementary/'Morskie Oko.jpg' diff --git a/leaves/bhmd.cfg b/leaves/bhmd.cfg index eb1a85d..7393a3d 100644 --- a/leaves/bhmd.cfg +++ b/leaves/bhmd.cfg @@ -22,7 +22,7 @@ guestfs-tools # Complementary tools useful for interacting with vith guest syste %end # End of the packages section -%post --nochroot --log=/mnt/sysimage/root/bhmd-post.log # Beginning of %post section. Those commands are executed outside the chroot environment +%post --nochroot --log=/mnt/sysimage/root/bhmd.log # Beginning of %post section. Those commands are executed outside the chroot environment mkdir /mnt/sysimage/var/lib/libvirt/iso # Create a directory to store iso images virsh pool-create-as --name iso --type dir --target /mnt/sysimage/var/lib/libvirt/iso # Make libvirt aware of this new directory by creating a so-called 'pool' diff --git a/leaves/blmd.cfg b/leaves/blmd.cfg index 15270a2..03c19cf 100644 --- a/leaves/blmd.cfg +++ b/leaves/blmd.cfg @@ -111,7 +111,7 @@ generic-release-notes # "Release Notes" %end # End of the packages section -%post --log=/root/blmd-post.log # Beginning of the post-installation section. Add logging. +%post --log=/root/blmd.log # Beginning of the post-installation section. Add logging. # FIXME: it'd be better to get this installed from a package cat > /etc/rc.d/init.d/livesys << EOF #!/bin/bash diff --git a/leaves/bmd.cfg b/leaves/bmd.cfg index dffdd33..e84eb49 100644 --- a/leaves/bmd.cfg +++ b/leaves/bmd.cfg @@ -60,7 +60,7 @@ generic-release-notes # "Release Notes" %end # End of the packages section -%post --log=/root/bmd-post.log # Beginning of the post-installation section. Add logging. +%post --log=/root/bmd.log # Beginning of the post-installation section. Add logging. localectl set-keymap ch-fr # Set keymap to `ch-fr`. Alternatively, `us` can be picked. dnf update -y # Update the system diff --git a/leaves/bnd.cfg b/leaves/bnd.cfg index 20c7062..a564c4c 100644 --- a/leaves/bnd.cfg +++ b/leaves/bnd.cfg @@ -73,7 +73,7 @@ generic-release-notes # "Release Notes" %end # End of the packages section -%post --log=/root/bnd-post.log # Beginning of the post-installation section. Add logging. +%post --log=/root/bnd.log # Beginning of the post-installation section. Add logging. localectl set-keymap ch-fr # Set keymap to `ch-fr`. Alternatively, `us` can be picked. dnf update -y # Update the system diff --git a/leaves/dhamd.cfg b/leaves/dhamd.cfg index 5374393..5e16a8c 100644 --- a/leaves/dhamd.cfg +++ b/leaves/dhamd.cfg @@ -20,6 +20,8 @@ %include bhmd.cfg # A base hypervisor %include bhamd.cfg # Specific virtualization configuration for AMD (tm) CPUs +reboot --kexec # Reboot straight into the system after a successfull installation + %packages --exclude-weakdeps # Beginning of the packages section. Do not include weak dependencies. virt-manager # Install virt-manager, the graphical front-end for QEMU/KVM diff --git a/leaves/dhimd.cfg b/leaves/dhimd.cfg index 72ba039..8cc1961 100644 --- a/leaves/dhimd.cfg +++ b/leaves/dhimd.cfg @@ -20,6 +20,8 @@ %include bhmd.cfg # A base hypervisor %include bhimd.cfg # Specific virtualization configuration for Intel(tm) CPU and Intel(tm) graphic cards +reboot --kexec # Reboot straight into the system after a successfull installation + %packages --exclude-weakdeps # Beginning of the packages section. Do not include weak dependencies. virt-manager # Install virt-manager, the graphical front-end for QEMU/KVM diff --git a/leaves/dhmd.cfg b/leaves/dhmd.cfg index 0374ad1..c16b92d 100644 --- a/leaves/dhmd.cfg +++ b/leaves/dhmd.cfg @@ -28,7 +28,7 @@ gnome-initial-setup # Add GNOME initial setup too to let user create local accou %end # End of the packages section -%post --nochroot --log=/mnt/sysimage/root/dhmd-post.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging. +%post --nochroot --log=/mnt/sysimage/root/dhmd.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging. # Create a file to autostart virt-manager cat > /mnt/sysimage/etc/xdg/autostart/virt-manager.desktop << EOF diff --git a/leaves/ldhamd.cfg b/leaves/ldhamd.cfg index 5c1395c..b425028 100644 --- a/leaves/ldhamd.cfg +++ b/leaves/ldhamd.cfg @@ -32,10 +32,10 @@ virt-manager # Install virt-manager, the graphical front-end for QEMU/KVM %end # End of the packages section -%post --nochroot --log=/mnt/sysimage/root/ldhamd-post.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging. +%post --nochroot --log=/mnt/sysimage/root/ldhamd.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging. usermod -a -G libvirt liveuser # Make user "liveuser" part of the existing libvirt group to allow it to interact with the guest-hypervisor. -chown liveuser:liveuser /var/lib/libvirt/iso # Make the user "liveuser" the owner of this directory -chown liveuser:liveuser /var/lib/libvirt/images # Make the user "test" the owner of this directory +chown liveuser:liveuser /mnt/sysimage/var/lib/libvirt/iso # Make the user "liveuser" the owner of this directory +chown liveuser:liveuser /mnt/sysimage/var/lib/libvirt/images # Make the user "test" the owner of this directory %end # End of the %post section diff --git a/leaves/ldhimd.cfg b/leaves/ldhimd.cfg index bb06e31..ca0d533 100644 --- a/leaves/ldhimd.cfg +++ b/leaves/ldhimd.cfg @@ -32,10 +32,10 @@ virt-manager # Install virt-manager, the graphical front-end for QEMU/KVM %end # End of the packages section -%post --nochroot --log=/mnt/sysimage/root/ldhimd-post.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging. +%post --nochroot --log=/mnt/sysimage/root/ldhimd.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging. usermod -a -G libvirt liveuser # Make user "liveuser" part of the existing libvirt group to allow it to interact with the guest-hypervisor. -chown liveuser:liveuser /var/lib/libvirt/iso # Make the user "liveuser" the owner of this directory -chown liveuser:liveuser /var/lib/libvirt/images # Make the user "test" the owner of this directory +chown liveuser:liveuser /mnt/sysimage/var/lib/libvirt/iso # Make the user "liveuser" the owner of this directory +chown liveuser:liveuser /mnt/sysimage/var/lib/libvirt/images # Make the user "test" the owner of this directory %end # End of the %post section \ No newline at end of file diff --git a/leaves/ldhmd.cfg b/leaves/ldhmd.cfg index 1d28f03..09f5c85 100644 --- a/leaves/ldhmd.cfg +++ b/leaves/ldhmd.cfg @@ -31,7 +31,7 @@ virt-manager # Install virt-manager, the graphical front-end for QEMU/KVM %end # End of the packages section -%post --nochroot --log=/mnt/sysimage/root/ldhmd-post.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging. +%post --nochroot --log=/mnt/sysimage/root/ldhmd.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging. usermod -a -G libvirt liveuser # Make user "liveuser" part of the existing libvirt group to allow it to interact with the guest-hypervisor. chown liveuser:liveuser /mnt/sysimage/var/lib/libvirt/iso # Make the user "liveuser" the owner of this directory diff --git a/leaves/ldmd.cfg b/leaves/ldmd.cfg index 7d5fecd..a03cd5b 100644 --- a/leaves/ldmd.cfg +++ b/leaves/ldmd.cfg @@ -34,7 +34,7 @@ %include blmd.cfg # A base for a minimal live machine %include bdmd.cfg # A base for a desktop environment -%post --log=/root/ldmd-post.log # Beginning of %post section. The following commands are executed inside a chroot environment. Add logging +%post --log=/root/ldmd.log # Beginning of %post section. The following commands are executed inside a chroot environment. Add logging cat >> /etc/rc.d/init.d/livesys << EOF diff --git a/leaves/lmd.cfg b/leaves/lmd.cfg index 589cfa1..3f79a9a 100644 --- a/leaves/lmd.cfg +++ b/leaves/lmd.cfg @@ -23,7 +23,7 @@ %end # End of the packages section -%post --log=/root/lmd-post.log # Beginning of %post section. The following commands are executed inside a chroot environment. Add logging. +%post --log=/root/lmd.log # Beginning of %post section. The following commands are executed inside a chroot environment. Add logging. cat >> /etc/rc.d/init.d/livesys << EOF