add new commentaries

correct unchrooted paths
This commit is contained in:
lukas 2021-11-10 09:45:28 +01:00
parent dbbdd443bc
commit 1bc0231260
4 changed files with 99 additions and 73 deletions

View File

@ -8,19 +8,25 @@
# What ? This kickstart file bootstraps a live desktop machine. # What ? This kickstart file bootstraps a live desktop machine.
# 'l' for live, 'd' for desktop # 'l' for live, 'd' for desktop
# ATTENTION : this kickstart file will automatically DESTROY the main disk and all of its contents.
# Bye bye!
# In order to be fed to virt-install or software like livecd-creator, this file needs to be flatten or merged into one. # In order to be fed to virt-install or software like livecd-creator, this file needs to be flatten or merged into one.
# Here is how you can do it with the ksflatten tool provided by the pykickstart package on Fedora : # Here is how you can do it with the ksflatten tool provided by the pykickstart package on Fedora :
# ksflatten -c ld.cfg -o ../flat/flat-ld.cfg # ksflatten -c ld.cfg -o ../flat/flat-ld.cfg
# IMPORTANT : Weak dependencies to be destroyed in the resulting ks
# Instructions for livecd-creator (about to be deprecated)
# An ISO file can be created using the following command as *root*: # An ISO file can be created using the following command as *root*:
# livecd-creator -c flat-ld.cfg --fslabel=ld # livecd-creator -c ../flat/flat-ld.cfg --fslabel=ld
# livecd-creator is part of the livecd-tools package # livecd-creator is part of the livecd-tools package
# The resulting ISO can be tested with qemu-kvm, using the following command as *root*: # Instructions for livemedia-creator
# qemu-kvm -bios /usr/share/edk2/ovmf/OVMF_CODE.fd -m 2048 -vga virtio -display gtk,gl=on ld.iso # An ISO file can be created using the following command as *root*:
# livemedia-creator --make-iso --ks flat-ld.cfg --no-virt --iso-only --iso-name phyllome-live-d-x86_64.iso --releasever 35
# The resulting ISO can be tested with qemu-kvm, using the following these two commands, as *root*:
# UEFI test:
# qemu-kvm -bios /usr/share/edk2/ovmf/OVMF_CODE.fd -m 2048 -vga qxl phyllome-live-d-x86_64.iso
# BIOS test:
# qemu-kvm -m 2048 -vga qxl phyllome-live-d-x86_64.iso
%include bl.cfg # A base for a minimal live machine %include bl.cfg # A base for a minimal live machine
%include bd.cfg # A base for a desktop environment %include bd.cfg # A base for a desktop environment
@ -30,62 +36,64 @@
cat >> /etc/rc.d/init.d/livesys << EOF cat >> /etc/rc.d/init.d/livesys << EOF
# disable gnome-software automatically downloading updates # disable gnome-software automatically downloading updates
# cat >> /usr/share/glib-2.0/schemas/org.gnome.software.gschema.override << FOE cat >> /usr/share/glib-2.0/schemas/org.gnome.software.gschema.override << FOE
# [org.gnome.software] [org.gnome.software]
# download-updates=false download-updates=false
# FOE FOE
# don't autostart gnome-software session service # don't autostart gnome-software session service
# rm -f /etc/xdg/autostart/gnome-software-service.desktop rm -f /etc/xdg/autostart/gnome-software-service.desktop
# disable the gnome-software shell search provider # disable the gnome-software shell search provider
# FOE cat >> /usr/share/gnome-shell/search-providers/org.gnome.Software-search-provider.ini << FOE
DefaultDisabled=true
FOE
# don't run gnome-initial-setup # don't run gnome-initial-setup
mkdir ~liveuser/.config mkdir ~liveuser/.config
touch ~liveuser/.config/gnome-initial-setup-done touch ~liveuser/.config/gnome-initial-setup-done
# suppress anaconda spokes redundant with gnome-initial-setup # suppress anaconda spokes redundant with gnome-initial-setup
# cat >> /etc/sysconfig/anaconda << FOE cat >> /etc/sysconfig/anaconda << FOE
# [NetworkSpoke] [NetworkSpoke]
# visited=1 visited=1
# [PasswordSpoke] [PasswordSpoke]
# visited=1 visited=1
# [UserSpoke] [UserSpoke]
# visited=1 visited=1
# FOE FOE
# make the installer show up # make the installer show up
#if [ -f /usr/share/applications/liveinst.desktop ]; then if [ -f /usr/share/applications/liveinst.desktop ]; then
# Show harddisk install in shell dash # Show harddisk install in shell dash
# sed -i -e 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop "" sed -i -e 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop ""
# need to move it to anaconda.desktop to make shell happy # need to move it to anaconda.desktop to make shell happy
# mv /usr/share/applications/liveinst.desktop /usr/share/applications/anaconda.desktop mv /usr/share/applications/liveinst.desktop /usr/share/applications/anaconda.desktop
# cat >> /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override << FOE cat >> /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override << FOE
#[org.gnome.shell] [org.gnome.shell]
#favorite-apps=['firefox.desktop', 'org.gnome.Calendar.desktop', 'rhythmbox.desktop', 'org.gnome.Photos.desktop', 'org.gnome.Nautilus.desktop', 'anaconda.desktop'] favorite-apps=['firefox.desktop', 'org.gnome.Calendar.desktop', 'rhythmbox.desktop', 'org.gnome.Photos.desktop', 'org.gnome.Nautilus.desktop', 'anaconda.desktop']
#FOE FOE
# Make the welcome screen show up # Make the welcome screen show up
# if [ -f /usr/share/anaconda/gnome/fedora-welcome.desktop ]; then if [ -f /usr/share/anaconda/gnome/fedora-welcome.desktop ]; then
# mkdir -p ~liveuser/.config/autostart mkdir -p ~liveuser/.config/autostart
# cp /usr/share/anaconda/gnome/fedora-welcome.desktop /usr/share/applications/ cp /usr/share/anaconda/gnome/fedora-welcome.desktop /usr/share/applications/
# cp /usr/share/anaconda/gnome/fedora-welcome.desktop ~liveuser/.config/autostart/ cp /usr/share/anaconda/gnome/fedora-welcome.desktop ~liveuser/.config/autostart/
# fi fi
# Disable GNOME welcome tour so it doesn't overlap with Fedora welcome screen # Disable GNOME welcome tour so it doesn't overlap with Fedora welcome screen
# cat >> /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override << FOE cat >> /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override << FOE
#welcome-dialog-last-shown-version='4294967295' welcome-dialog-last-shown-version='4294967295'
#FOE FOE
# Copy Anaconda branding in place # Copy Anaconda branding in place
# if [ -d /usr/share/lorax/product/usr/share/anaconda ]; then if [ -d /usr/share/lorax/product/usr/share/anaconda ]; then
# cp -a /usr/share/lorax/product/* / cp -a /usr/share/lorax/product/* /
# fi fi
#fi fi
# rebuild schema cache with any overrides we installed # rebuild schema cache with any overrides we installed
glib-compile-schemas /usr/share/glib-2.0/schemas glib-compile-schemas /usr/share/glib-2.0/schemas
@ -108,4 +116,4 @@ restorecon -R /home/liveuser/
EOF EOF
%end # End of the %post section %end

View File

@ -8,22 +8,28 @@
# What ? This kickstart file bootstraps a live desktop hypervisor machine. # What ? This kickstart file bootstraps a live desktop hypervisor machine.
# 'l' for live, 'h' for hypervisor, 'd' for desktop # 'l' for live, 'h' for hypervisor, 'd' for desktop
# ATTENTION : this kickstart file will automatically DESTROY the main disk and all of its contents.
# Bye bye!
# In order to be fed to virt-install or software like livecd-creator, this file needs to be flatten or merged into one. # In order to be fed to virt-install or software like livecd-creator, this file needs to be flatten or merged into one.
# Here is how you can do it with the ksflatten tool provided by the pykickstart package on Fedora : # Here is how you can do it with the ksflatten tool provided by the pykickstart package on Fedora :
# ksflatten -c ldh.cfg -o ../flat/flat-ldh.cfg # ksflatten -c ldh.cfg -o ../flat/flat-ldh.cfg
# IMPORTANT : Weak dependencies to be destroyed in the resulting ks
# Instructions for livecd-creator (about to be deprecated)
# An ISO file can be created using the following command as *root*: # An ISO file can be created using the following command as *root*:
# livecd-creator -c ../flat/flat-ldh.cfg --fslabel=ldh # livecd-creator -c ../flat/flat-ldh.cfg --fslabel=ldh
# livecd-creator is part of the livecd-tools package # livecd-creator is part of the livecd-tools package
# The resulting ISO can be tested with qemu-kvm, using the following command as *root*: # Instructions for livemedia-creator
# qemu-kvm -bios /usr/share/edk2/ovmf/OVMF_CODE.fd -m 2048 -vga virtio -display gtk,gl=on ldh.iso # An ISO file can be created using the following command as *root*:
# livemedia-creator --make-iso --ks flat-ldh.cfg --no-virt --iso-only --iso-name phyllome-live-dh-x86_64.iso --releasever 35
# The resulting ISO can be tested with qemu-kvm, using the following these two commands, as *root*:
# UEFI test:
# qemu-kvm -bios /usr/share/edk2/ovmf/OVMF_CODE.fd -m 2048 -vga qxl phyllome-live-dh-x86_64.iso
# BIOS test:
# qemu-kvm -m 2048 -vga qxl phyllome-live-dh-x86_64.iso
%include ld.cfg # A base for a live desktop minimal machine %include ld.cfg # A base for a live desktop minimal machine
%include bh.cfg # A base hypervisor %include bhl.cfg # A base hypervisor
%packages --exclude-weakdeps # Beginning of the packages section. Do not include weak dependencies. %packages --exclude-weakdeps # Beginning of the packages section. Do not include weak dependencies.
@ -31,14 +37,14 @@ virt-manager # Install virt-manager, the graphical front-end for QEMU/KVM
%end # End of the packages section %end # End of the packages section
%post --nochroot --log=/mnt/sysimage/root/ldh.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging. %post --log=/root/ldh.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. 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 chown liveuser:liveuser /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 chown liveuser:liveuser /var/lib/libvirt/images # Make the user "test" the owner of this directory
# Create a file to autostart virt-manager # Create a file to autostart virt-manager
cat > /mnt/sysimage/etc/xdg/autostart/virt-manager.desktop << EOF cat > /etc/xdg/autostart/virt-manager.desktop << EOF
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Name=Virtual Machine Manager Name=Virtual Machine Manager

View File

@ -8,23 +8,29 @@
# What ? This kickstart file bootstraps a live desktop hypervisor configured for AMD (tm) CPUs. # What ? This kickstart file bootstraps a live desktop hypervisor configured for AMD (tm) CPUs.
# 'l' for live, 'd' for desktop, 'h' for hypervisor', 'a' for amd # 'l' for live, 'd' for desktop, 'h' for hypervisor', 'a' for amd
# ATTENTION : this kickstart file will automatically DESTROY the main disk and all of its contents.
# Bye bye!
# In order to be fed to virt-install or software like livecd-creator, this file needs to be flatten or merged into one. # In order to be fed to virt-install or software like livecd-creator, this file needs to be flatten or merged into one.
# Here is how you can do it with the ksflatten tool provided by the pykickstart package on Fedora : # Here is how you can do it with the ksflatten tool provided by the pykickstart package on Fedora :
# ksflatten -c ldha.cfg -o ../flat/flat-ldha.cfg # ksflatten -c ldha.cfg -o ../flat/flat-ldha.cfg
# IMPORTANT : Weak dependencies to be destroyed in the resulting ks
# Instructions for livecd-creator (about to be deprecated)
# An ISO file can be created using the following command as *root*: # An ISO file can be created using the following command as *root*:
# livecd-creator -c ../flat/flat-ldha.cfg --fslabel=ldha # livecd-creator -c ../flat/flat-ldha.cfg --fslabel=ldha
# livecd-creator is part of the livecd-tools package # livecd-creator is part of the livecd-tools package
# The resulting ISO can be tested with qemu-kvm, using the following command as *root*: # Instructions for livemedia-creator
# qemu-kvm -bios /usr/share/edk2/ovmf/OVMF_CODE.fd -m 2048 -vga virtio -display gtk,gl=on ldha.iso # An ISO file can be created using the following command as *root*:
# livemedia-creator --make-iso --ks flat-ldha.cfg --no-virt --iso-only --iso-name phyllome-live-dha-x86_64.iso --releasever 35
# The resulting ISO can be tested with qemu-kvm, using the following these two commands, as *root*:
# UEFI test:
# qemu-kvm -bios /usr/share/edk2/ovmf/OVMF_CODE.fd -m 2048 -vga qxl phyllome-live-dha-x86_64.iso
# BIOS test:
# qemu-kvm -m 2048 -vga qxl phyllome-live-dha-x86_64.iso
%include ld.cfg # A base for a live desktop minimal machine %include ld.cfg # A base for a live desktop minimal machine
%include bh.cfg # A base hypervisor %include bhl.cfg # A base hypervisor
%include bha.cfg # Specific virtualization configuration for AMD (tm) CPUs %include bhla.cfg # Specific virtualization configuration for AMD (tm) CPUs
%packages --exclude-weakdeps # Beginning of the packages section. Do not include weak dependencies. %packages --exclude-weakdeps # Beginning of the packages section. Do not include weak dependencies.
@ -32,14 +38,14 @@ virt-manager # Install virt-manager, the graphical front-end for QEMU/KVM
%end # End of the packages section %end # End of the packages section
%post --nochroot --log=/mnt/sysimage/root/ldha.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging. %post --log=/root/ldha.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. 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 chown liveuser:liveuser /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 chown liveuser:liveuser /var/lib/libvirt/images # Make the user "test" the owner of this directory
# Create a file to autostart virt-manager # Create a file to autostart virt-manager
cat > /mnt/sysimage/etc/xdg/autostart/virt-manager.desktop << EOF cat > /etc/xdg/autostart/virt-manager.desktop << EOF
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Name=Virtual Machine Manager Name=Virtual Machine Manager

View File

@ -8,23 +8,29 @@
# What ? This kickstart file bootstraps a live desktop hypervisor configured for Intel(tm) CPU and Intel(tm) graphic cards. # What ? This kickstart file bootstraps a live desktop hypervisor configured for Intel(tm) CPU and Intel(tm) graphic cards.
# 'l' for live, 'd' for desktop, 'h' for hypervisor, 'i' for intel # 'l' for live, 'd' for desktop, 'h' for hypervisor, 'i' for intel
# ATTENTION : this kickstart file will automatically DESTROY the main disk and all of its contents.
# Bye bye!
# In order to be fed to virt-install or software like livecd-creator, this file needs to be flatten or merged into one. # In order to be fed to virt-install or software like livecd-creator, this file needs to be flatten or merged into one.
# Here is how you can do it with the ksflatten tool provided by the pykickstart package on Fedora : # Here is how you can do it with the ksflatten tool provided by the pykickstart package on Fedora :
# ksflatten -c ldhi.cfg -o ../flat/flat-ldhi.cfg # ksflatten -c ldhi.cfg -o ../flat/flat-ldhi.cfg
# IMPORTANT : Weak dependencies to be destroyed in the resulting ks
# Instructions for livecd-creator (about to be deprecated)
# An ISO file can be created using the following command as *root*: # An ISO file can be created using the following command as *root*:
# livecd-creator -c ../flat/flat-ldhi.cfg --fslabel=ldhi # livecd-creator -c ../flat/flat-ldhi.cfg --fslabel=ldhi
# on Fedora, livecd-creator is part of the livecd-tools package # livecd-creator is part of the livecd-tools package
# The resulting ISO can be tested with qemu-kvm, using the following command as *root*: # Instructions for livemedia-creator
# qemu-kvm -bios /usr/share/edk2/ovmf/OVMF_CODE.fd -m 2048 -vga virtio -display gtk,gl=on ldhi.iso # An ISO file can be created using the following command as *root*:
# livemedia-creator --make-iso --ks flat-ldhi.cfg --no-virt --iso-only --iso-name phyllome-live-ldhi-x86_64.iso --releasever 35
# The resulting ISO can be tested with qemu-kvm, using the following these two commands, as *root*:
# UEFI test:
# qemu-kvm -bios /usr/share/edk2/ovmf/OVMF_CODE.fd -m 2048 -vga qxl phyllome-live-ldhi-x86_64.iso
# BIOS test:
# qemu-kvm -m 2048 -vga qxl phyllome-live-ldhi-x86_64.iso
%include ld.cfg # A base for a live desktop minimal machine %include ld.cfg # A base for a live desktop minimal machine
%include bh.cfg # A base hypervisor %include bhl.cfg # A base hypervisor
%include bhi.cfg # Specific virtualization configuration for Intel(tm) CPU and Intel(tm) graphic cards %include bhli.cfg # Specific virtualization configuration for Intel(tm) CPU and Intel(tm) graphic cards
%packages --exclude-weakdeps # Beginning of the packages section. Do not include weak dependencies. %packages --exclude-weakdeps # Beginning of the packages section. Do not include weak dependencies.
@ -32,14 +38,14 @@ virt-manager # Install virt-manager, the graphical front-end for QEMU/KVM
%end # End of the packages section %end # End of the packages section
%post --nochroot --log=/mnt/sysimage/root/ldhi.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging. %post --log=/root/ldhi.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. 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 chown liveuser:liveuser /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 chown liveuser:liveuser /var/lib/libvirt/images # Make the user "test" the owner of this directory
# Create a file to autostart virt-manager # Create a file to autostart virt-manager
cat > /mnt/sysimage/etc/xdg/autostart/virt-manager.desktop << EOF cat > /etc/xdg/autostart/virt-manager.desktop << EOF
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Name=Virtual Machine Manager Name=Virtual Machine Manager