From da277e4a51db02e38bd9c0cde11aa40bebaef5fc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Fri, 18 Dec 2020 20:20:02 +0100 Subject: [PATCH] examples files for live media --- live-cd.mk | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++ live-dvd.mk | 6 +++ 2 files changed, 128 insertions(+) create mode 100644 live-cd.mk create mode 100644 live-dvd.mk diff --git a/live-cd.mk b/live-cd.mk new file mode 100644 index 0000000..24cd8a9 --- /dev/null +++ b/live-cd.mk @@ -0,0 +1,122 @@ +## Choose only on of the possible target types +# image=disk.img +# squash=rootfs.squash +iso=live-cd.iso + +## Image size in MB. Needs to be able to hold all software. +# imagesize=3072 + +## Additional packages +packages=alsa-utils,aqemu,debian-installer-launcher,debootstrap,dnsutils,dosfstools,exfat-fuse,exfat-utils,firefox-esr,firefox-esr-l10n-de,git,gparted,gwenview,make,man-db,manpages-de,mousepad,ncat,network-manager-gnome,ntfs-3g,okular,pavucontrol,pulseaudio,qemu-kvm,qemu-system-gui,qemu-utils,rdesktop,ssh,synaptic,telnet,tmux,vlc +packages+=linux-image-4.19.0-11-amd64 +packages+=firmware-atheros,firmware-brcm80211,firmware-iwlwifi,firmware-misc-nonfree +# packages+=firmware-ipw2x00 + +## Debian release, so far only stretch has been tested +release=buster + +## Comma separated list of config modules from modules/ directory +modules=nodm,xfce,live,approx + +define SOURCES := +deb http://cdn.debian.net/debian ${release} main non-free +endef + +## Hostname for the generated machine +hostname=live + +## Root password will be salted and encrypted in image +rootpass=root + +## The corresponding .pub file for the given rootkey will be applied as +## SSH login file for the root user. +## If the pub file is not found, a new key pair will be generated +# rootkey=image_ssh + +## Comma separated list of users to be set up. +## User logins will start out with an empty password +## If the live module is in use, users will also be added to the sudo group +# users=adam,steve +users=live + +## Wifi configuration, if a Wifi password is given, WPA encryption will be used +## without the password, the system will try to connect to an open wifi +#wifi=berlin.freifunk.net +# wifi=MyWiFi +# wifipass=P4ssW0rD + +## Timezone as offered by Debians tzdata selection +timezone=Europe/Berlin + +## Comma separated list of locales, first one will become default locale +locales=de_DE.UTF-8 #,en_US.UTF-8 + +keyboard=de + +## If nodm is installed, you can choose a user to login automatically +## If no user is given here, then nodm will default to root +nodm_user=live + +## In nodm, use full screen chromium web browser as session +# webui=http://localhost/ + +## When using NIS modules the directory server should be given +# nis_server=nismaster + +## If the approxmodule is enabled, then one (and only one) apt-source +## can be choosen to install packages from +## See modules/approx.mk if you need more flexibility +approx=http://localhost:9000/debian + +.PHONY: _live_initrd _favorites _bootmount +_config: _live_initrd _favorites +_isosquash: _bootmount +_live_initrd: cfg_root _live_modules + # printf '%s\n' "isofs" "squashfs" "ata_generic" "usb_storage" "sr_mod" "mmc_block" >>"$${CFGROOT}/etc/initramfs-tools/modules" + sed -i 's;^MODULES=.*$$;MODULES=most;' "$${CFGROOT}/etc/initramfs-tools/initramfs.conf" + +_config: cfg_root/usr/share/kxmlgui5/dolphin/dolphinui.rc +_config: cfg_root/usr/local/bin/gksu + +cfg_root/usr/share/kxmlgui5/dolphin/dolphinui.rc: cfg_root _xfce + mkdir -p "$(dir $@)" + printf '%s\n' '' \ + '' \ + '' \ + '' \ + '' \ + '' \ + >$@ + +cfg_root/usr/local/bin/gksu: + ln -s /usr/bin/sudo $@ + ln -s /usr/bin/sudo $@do + +_favorites: _xfce + printf 'favorites=debian-installer-launcher.desktop,libreoffice-startcenter.desktop,firefox-esr.desktop,xfce4-terminal.desktop,org.kde.dolphin.desktop,mousepad.desktop,synaptic.desktop,aqemu.desktop,gparted.desktop' \ + >"$${CFGROOT}/etc/xdg/xfce4/panel/whiskermenu-10.rc" + +_iso_image: iso_root/install/gtk/initrd.gz +iso_root/install/gtk/initrd.gz: /usr/lib/debian-installer/images/10/amd64/gtk/debian-installer/amd64/initrd.gz + mkdir -p "$(dir $@)" + cp "$<" "$@" + +_config: cfg_root/home/live/.bash_history +cfg_root/home/live/.bash_history: cfg_root _users + mkdir "$${CFGROOT}/home/live" + printf '%s\n' \ + "sudo git clone https://git.plutz.net/git/blast /mnt/blast" \ + "for m in /proc /sys /dev /run; do sudo mount -o rbind $$m /mnt/$$m; done" \ + >$@ + chroot "$${CFGROOT}" chown live:live -R /home/live + +_bootmount: cfg_root _config + # mkdir -m 1730 "$${CFGROOT}/var/spool/cron/crontabs/" + # chroot "$${CFGROOT}" chgrp crontab "/var/spool/cron/crontabs/" + printf '@reboot mkdir -m755 /boot\n' >>"$${CFGROOT}/var/spool/cron/crontabs/root" + chmod 600 "$${CFGROOT}/var/spool/cron/crontabs/root" + printf '%s 0 0\n' \ + '/run/live/medium /boot/ bind auto,bind' \ + '/run/live/medium /lib/live/mount/medium bind auto,bind' \ + >"$${CFGROOT}/etc/fstab" + diff --git a/live-dvd.mk b/live-dvd.mk new file mode 100644 index 0000000..9f798a3 --- /dev/null +++ b/live-dvd.mk @@ -0,0 +1,6 @@ +include live-cd.mk + +iso=live-dvd.iso + +packages+=audacity,chromium,chromium-sandbox,chromium-l10n,dolphin,dvdauthor,dvd+rw-tools,ffmpeg,frei0r-plugins,gambas3,gcc,genisoimage,growisofs,hunspell-de-de-frami,hyphen-de,ipython3,k3b-i18n,kdenlive,konsole,krita,lazarus,libc-dev,libk3b7-extracodecs,libreoffice-calc,libreoffice-gnome,libreoffice-l10n-de,libreoffice-writer,marble,mencoder,mplayer,mypaint,normalize-audio,obs-studio,osspd,php-cli,recordmydesktop,scribus,sox,xfce4-power-manager-plugins +packages+=,extremetuxracer,hedgewars,frozen-bubble,gnome-2048,kpat,supertuxkart,torus-trooper -- 2.39.2