diff --git a/README.md b/README.md index 5f5a817..bf4ac35 100644 --- a/README.md +++ b/README.md @@ -33,18 +33,6 @@ ./install build_iso ./install - -**!!!Сборка с помощью докера пока не работает!!!** +Для сборки с помошью докера создайте в домашней папке папку build, поместите туда minios-slax, запустите 01-runme.sh из папки docker. Данное действие установит необходимые программы и создаст образ. Для запуска сборки отредактируйте под себя и запустите 02-build.sh. Пример содержимого файла: -Для сборки с помошью докера создайте в домашней папке папку build, поместите туда скрипты сборки minios и используйте команду для автоматической установки: - -`sudo docker run -it --rm --cap-add SYS_ADMIN -v /home/user/build:/build ubuntu:trusty /build/minios/autoinstall -` - -либо для установки в ручном режиме: - -`sudo docker run -it --rm --cap-add SYS_ADMIN -v /home/user/build:/build ubuntu:trusty /build/minios/install -` - -Для использования сборки в специально подготовленном контейнере используйте следующие примеры команд: - -`sudo docker run -it --rm --cap-add SYS_ADMIN -v /home/user/build:/build crims0n/minios-container` - пример сборки с выводом информации в консоль - -`sudo docker run -d --name=minios-build --cap-add SYS_ADMIN -v /home/user/build:/build crims0n/minios-container` - пример сборки в фоне без удаления контейнера по окончании сборки +`docker run --rm -it --name mlc --privileged -v /home/user/build:/build local/mlc` diff --git a/autoinstall b/autoinstall deleted file mode 100755 index cab225a..0000000 --- a/autoinstall +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash - -set -e # exit on error -set -o pipefail # exit on pipeline error -set -u # treat unset variable as error - -SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" -PARENT_DIR="$(dirname "$SCRIPT_DIR")" -ISO_DIR="$(dirname "$SCRIPT_DIR")"/iso - -set +u -if [ -z $OUTPUT ]; then - . $SCRIPT_DIR/linux-live/buildconfig || exit 1 -fi -set -u -. $SCRIPT_DIR/linux-live/minioslib || exit 1 -. $SCRIPT_DIR/linux-live/config || exit 1 - -# don't change! use ./install instead -UNATTENDED="1" - -CMD=(setup_host build_bootstrap build_chroot build_live build_modules build_iso) - -# ============= main ================ - -BUILD_DIR="" - -common_variables - -if [ -f /.dockerenv ] || [ "$container" = "podman" ]; then - new_run -fi - -console_colours - -allow_root_only - -create_livekitname_install_symlink - -create_completion - -create_backup - -# check number of args -if [[ $# == 0 || $# > 3 ]]; then help; fi - -# loop through args -dash_flag=false -start_index=0 -end_index=${#CMD[*]} -for ii in "$@"; do - if [[ $ii == "-" ]]; then - dash_flag=true - continue - fi - find_index $ii - if [[ $dash_flag == false ]]; then - start_index=$index - else - end_index=$(($index + 1)) - fi -done -if [[ $dash_flag == false ]]; then - end_index=$(($start_index + 1)) -fi - -#loop through the commands -for ((ii = $start_index; ii < $end_index; ii++)); do - setup_build_dir - ${CMD[ii]} -done - -echo -e "${BOLD}${LIGHTYELLOW}$0${ENDCOLOUR} - ${LIGHTGREEN}Command completed successfully!${ENDCOLOUR}" diff --git a/docker/01-runme.sh b/docker/01-runme.sh index 26f3e22..81e50b8 100755 --- a/docker/01-runme.sh +++ b/docker/01-runme.sh @@ -1,9 +1,8 @@ #!/bin/bash # Several packages need to be installed to use Dockerfile.py # It creates a local container that you can use to build minios-live -apt install -y docker.io +apt update && apt install -y docker.io python3-pip systemctl start docker systemctl enable docker -apt install -y python3-pip pip3 install pydocker python3 ./Dockerfile.py \ No newline at end of file diff --git a/docker/02-build.sh b/docker/02-build.sh index 7cc6b0a..9b80e7c 100755 --- a/docker/02-build.sh +++ b/docker/02-build.sh @@ -1,6 +1,3 @@ #!/bin/bash -#docker run -d --name mlc --privileged -v /build:/build local/mlc /build/slax/autoinstall - -#docker run --rm -it --privileged -v /build:/build local/mlc /build/slax/autoinstall - -#docker run --rm -it --privileged -v /build:/build local/mlc /build/slax/autoinstall build_modules_chroot - -docker run -it --name mlc --privileged -v /build:/build local/mlc /build/minios-xfce/autoinstall build_modules - -#docker run -d --name mlc --privileged -v /build:/build local/mlc \ No newline at end of file +docker run -d --name mlc --privileged -v /build:/build local/mlc +#docker run --rm -it --name mlc --privileged -v /build:/build local/mlc /build/minios-slax/install build_modules - diff --git a/docker/Dockerfile.py b/docker/Dockerfile.py index ee2a22b..2944c37 100755 --- a/docker/Dockerfile.py +++ b/docker/Dockerfile.py @@ -8,13 +8,12 @@ import pydocker # github.com/jen-soft/pydocker logging.getLogger('').setLevel(logging.INFO) logging.root.addHandler(logging.StreamHandler(sys.stdout)) - class DockerFile(pydocker.DockerFile): """ add here your custom features """ -d = DockerFile(base_img='ubuntu:focal', name='local/mlc:latest') +#d = DockerFile(base_img='ubuntu:focal', name='local/mlc:latest') #d = DockerFile(base_img='ubuntu:bionic', name='local/mlc:latest') -#d = DockerFile(base_img='debian:buster', name='local/mlc:latest') +d = DockerFile(base_img='debian:buster', name='local/mlc:latest') d.RUN_bash_script('/opt/install.sh', r''' touch /.minios-live-container @@ -63,7 +62,6 @@ rm -f /var/lib/dpkg/*-old d.VOLUME = '/build' d.WORKDIR = '/build/minios-slax' -# d.ENTRYPOINT = ["/opt/www-data/entrypoint.sh"] -d.CMD = ["/build/minios-slax/autoinstall", "-"] +d.CMD = ["/build/minios-slax/install", "-"] d.build_img() diff --git a/install b/install index 45a9407..f8f9845 100755 --- a/install +++ b/install @@ -16,8 +16,8 @@ set -u . $SCRIPT_DIR/linux-live/minioslib || exit 1 . $SCRIPT_DIR/linux-live/config || exit 1 -# don't change! use ./autoinstall instead -UNATTENDED="0" +# change this for unattended installation +UNATTENDED="1" CMD=(setup_host build_bootstrap build_chroot build_live build_modules build_iso) diff --git a/linux-live/basesystem/01-core/cloud.list b/linux-live/basesystem/01-core/cloud.list new file mode 100644 index 0000000..31fa192 --- /dev/null +++ b/linux-live/basesystem/01-core/cloud.list @@ -0,0 +1,19 @@ +mc +bash-completion +zip +unzip +xz-utils +zstd +#liblz4-tool +lz4 +bzip2 +net-tools +psmisc +netcat +ssh +dnsmasq +wget +curl +openssh-server +#network-manager +cloud-init \ No newline at end of file diff --git a/linux-live/basesystem/01-core/install b/linux-live/basesystem/01-core/install index 15d4863..7ed2685 100644 --- a/linux-live/basesystem/01-core/install +++ b/linux-live/basesystem/01-core/install @@ -6,34 +6,63 @@ set -u # treat unset variable as error SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" -$APT_CMD update >>$OUTPUT 2>&1 && - $APT_CMD install $APT_OPTIONS $APT_OPTIONS2 linux-image-$KERNEL_ARCH >>$OUTPUT 2>&1 - echo "davfs2 davfs2/suid_file boolean true" | debconf-set-selections +if [ $PACKAGE_VARIANT != "cloud" ]; then + if [ $DISTRIBUTION_TYPE = "debian" ]; then + #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ + $APT_CMD install $APT_OPTIONS \ + acpi-support-base + elif [ $DISTRIBUTION_TYPE = "ubuntu" ]; then + #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ + $APT_CMD install $APT_OPTIONS --no-install-suggests \ + acpi-support + fi +fi + # install packages if [ -f $SCRIPT_DIR/$PACKAGE_VARIANT.list ]; then #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD update >>$OUTPUT 2>&1 && - #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD install $APT_OPTIONS $APT_OPTIONS2 \ - $(grep -vE "^\s*#" $SCRIPT_DIR/$PACKAGE_VARIANT.list | tr "\n" " ") >>$OUTPUT 2>&1 + $APT_CMD install $APT_OPTIONS \ + $(grep -vE "^\s*#" $SCRIPT_DIR/$PACKAGE_VARIANT.list | tr "\n" " ") >>$OUTPUT 2>&1 fi # install packages -if [ $DISTRIBUTION != "stretch" ] && [ $PACKAGE_VARIANT = "standard" ]; then +if [ $PACKAGE_VARIANT = "standard" ]; then #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD update >>$OUTPUT 2>&1 && + $APT_CMD install $APT_OPTIONS \ + zstd >>$OUTPUT 2>&1 + if [ $DISTRIBUTION != "stretch" ] || [ $DISTRIBUTION != "xenial" ]; then #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD install $APT_OPTIONS $APT_OPTIONS2 \ - lz4 zstd >>$OUTPUT 2>&1 + $APT_CMD install $APT_OPTIONS \ + lz4 >>$OUTPUT 2>&1 + else + $APT_CMD install $APT_OPTIONS \ + liblz4-tool >>$OUTPUT 2>&1 + fi fi if [ $DISTRIBUTION = "bullseye" ]; then #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD update >>$OUTPUT 2>&1 && - #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD install $APT_OPTIONS $APT_OPTIONS2 \ - selinux-policy-default >>$OUTPUT 2>&1 + $APT_CMD install $APT_OPTIONS \ + selinux-policy-default >>$OUTPUT 2>&1 sed -i "s,SELINUX=permissive,SELINUX=disabled,g" /etc/selinux/config fi + +if [ $DISTRIBUTION_TYPE = "debian" ]; then + if [ $PACKAGE_VARIANT = "cloud" ]; then + KERNEL_IMAGE="linux-image-$KERNEL_ARCH" + else + KERNEL_IMAGE="linux-image-$KERNEL_ARCH" + fi +elif [ $DISTRIBUTION_TYPE = "ubuntu" ]; then + KERNEL_IMAGE="linux-image-5.11.0-27-generic" + #KERNEL_IMAGE="linux-image-generic" +fi + +$APT_CMD update >>$OUTPUT 2>&1 && + $APT_CMD install $APT_OPTIONS $KERNEL_IMAGE >>$OUTPUT 2>&1 + +if [ $DISTRIBUTION_TYPE = "ubuntu" ]; then + $APT_CMD autoremove $APT_OPTIONS linux-modules-extra-* linux-firmware +fi diff --git a/linux-live/basesystem/01-core/postinstall b/linux-live/basesystem/01-core/postinstall index 941dd1c..6e63ef6 100644 --- a/linux-live/basesystem/01-core/postinstall +++ b/linux-live/basesystem/01-core/postinstall @@ -2,14 +2,17 @@ apt-get remove --yes vim* grub* debconf-i18n installation-report >>$OUTPUT 2>&1 -cd /tmp -apt -y update >>$OUTPUT 2>&1 -apt-get download acpi-support >>$OUTPUT 2>&1 -dpkg -x acpi-support*.deb /tmp/acpisupport >>$OUTPUT 2>&1 -if [ -L "/lib" ]; then - mkdir -p /tmp/acpisupport/usr/lib - (cd /tmp/acpisupport/lib && cp --parents -afr * /tmp/acpisupport/usr/lib) - rm -rf /tmp/acpisupport/lib +if [[ $DISTRIBUTION_TYPE != "ubuntu" ]]; then + + cd /tmp + apt -y update >>$OUTPUT 2>&1 + apt-get download acpi-support >>$OUTPUT 2>&1 + dpkg -x acpi-support*.deb /tmp/acpisupport >>$OUTPUT 2>&1 + if [ -L "/lib" ]; then + mkdir -p /tmp/acpisupport/usr/lib + (cd /tmp/acpisupport/lib && cp --parents -afr * /tmp/acpisupport/usr/lib) + rm -rf /tmp/acpisupport/lib + fi + cd /tmp/acpisupport + cp -aR * / >>$OUTPUT 2>&1 fi -cd /tmp/acpisupport -cp -aR * / >>$OUTPUT 2>&1 diff --git a/linux-live/basesystem/01-core/rootcopy-install/etc/apt/apt.conf.d/000Slax b/linux-live/basesystem/01-core/rootcopy-install/etc/apt/apt.conf.d/000Slax deleted file mode 100644 index e197a86..0000000 --- a/linux-live/basesystem/01-core/rootcopy-install/etc/apt/apt.conf.d/000Slax +++ /dev/null @@ -1,3 +0,0 @@ -APT::Install-Recommends "0"; -APT::Install-Suggests "0"; -Acquire::Languages { "none"; } diff --git a/linux-live/basesystem/01-core/rootcopy-install/home/live/.bashrc b/linux-live/basesystem/01-core/rootcopy-install/home/live/.bashrc deleted file mode 100644 index b0879e6..0000000 --- a/linux-live/basesystem/01-core/rootcopy-install/home/live/.bashrc +++ /dev/null @@ -1,140 +0,0 @@ -# ~/.bashrc: executed by bash(1) for non-login shells. -# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) -# for examples - -# If not running interactively, don't do anything -case $- in - *i*) ;; - *) return;; -esac - -# don't put duplicate lines or lines starting with space in the history. -# See bash(1) for more options -HISTCONTROL=ignoreboth - -# append to the history file, don't overwrite it -shopt -s histappend - -# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) -HISTSIZE=1000 -HISTFILESIZE=2000 - -# check the window size after each command and, if necessary, -# update the values of LINES and COLUMNS. -shopt -s checkwinsize - -# If set, the pattern "**" used in a pathname expansion context will -# match all files and zero or more directories and subdirectories. -#shopt -s globstar - -# make less more friendly for non-text input files, see lesspipe(1) -[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" - -# set variable identifying the chroot you work in (used in the prompt below) -if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then - debian_chroot=$(cat /etc/debian_chroot) -fi - -# set a fancy prompt (non-color, unless we know we "want" color) -case "$TERM" in - xterm-color|*-256color) color_prompt=yes;; -esac - -# uncomment for a colored prompt, if the terminal has the capability; turned -# off by default to not distract the user: the focus in a terminal window -# should be on the output of commands, not on the prompt -#force_color_prompt=yes - -if [ -n "$force_color_prompt" ]; then - if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then - # We have color support; assume it's compliant with Ecma-48 - # (ISO/IEC-6429). (Lack of such support is extremely rare, and such - # a case would tend to support setf rather than setaf.) - color_prompt=yes - else - color_prompt= - fi -fi - -if [ "$color_prompt" = yes ]; then - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' -else - PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' -fi -unset color_prompt force_color_prompt - -# If this is an xterm set the title to user@host:dir -case "$TERM" in -xterm*|rxvt*) - PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" - ;; -*) - ;; -esac - -# enable color support of ls and also add handy aliases -if [ -x /usr/bin/dircolors ]; then - test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" - alias ls='ls --color=auto' - #alias dir='dir --color=auto' - #alias vdir='vdir --color=auto' - - alias grep='grep --color=auto' - alias fgrep='fgrep --color=auto' - alias egrep='egrep --color=auto' -fi - -# colored GCC warnings and errors -#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' - -# some more ls aliases -alias ll='ls -alF' -alias la='ls -A' -alias l='ls -CF' - -# Add an "alert" alias for long running commands. Use like so: -# sleep 10; alert -alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' - -# Alias definitions. -# You may want to put all your additions into a separate file like -# ~/.bash_aliases, instead of adding them here directly. -# See /usr/share/doc/bash-doc/examples in the bash-doc package. - -if [ -f ~/.bash_aliases ]; then - . ~/.bash_aliases -fi - -# enable programmable completion features (you don't need to enable -# this, if it's already enabled in /etc/bash.bashrc and /etc/profile -# sources /etc/bash.bashrc). -if ! shopt -oq posix; then - if [ -f /usr/share/bash-completion/bash_completion ]; then - . /usr/share/bash-completion/bash_completion - elif [ -f /etc/bash_completion ]; then - . /etc/bash_completion - fi -fi - -apt-get() -{ - if [ -e /var/cache/apt/pkgcache.bin ]; then - /usr/bin/apt-get "$@" - else - /usr/bin/apt-get update - /usr/bin/apt-get "$@" - fi -} - -apt() -{ - if [ -e /var/cache/apt/pkgcache.bin ]; then - /usr/bin/apt "$@" - else - /usr/bin/apt update - /usr/bin/apt "$@" - fi -} - -export -f apt-get -export -f apt \ No newline at end of file diff --git a/linux-live/basesystem/01-core/rootcopy-install/usr/bin/apt2sb b/linux-live/basesystem/01-core/rootcopy-install/usr/bin/apt2sb new file mode 100755 index 0000000..1f8a237 --- /dev/null +++ b/linux-live/basesystem/01-core/rootcopy-install/usr/bin/apt2sb @@ -0,0 +1,54 @@ +#!/bin/bash + +TMP=/tmp/tmpfs$$ +CHANGES=$TMP/changes +UNION=$TMP/union +BUNDLES=/run/initramfs/memory/bundles/ +INSTALL="$1" +[ -n "$INSTALL" ] || exit +# In case multiple packages were specified on the command line. +INSTALL_ALL="$@" + + +mkdir -p $TMP +mount -t tmpfs tmpfs $TMP +mkdir -p $CHANGES +mkdir -p $UNION + +#Changed from aufs to overlay mounts for Slax 10. +#mount -t aufs -o xino=$TMP/.xino,trunc_xino,br=$CHANGES aufs $UNION +## I don't use chromium so filter it out. +#\ls -1d $BUNDLES[0-1]* | grep -v chromium | while read MOD; do +#mount -o remount,add:1:$BUNDLES/$(basename $MOD)=ro aufs $UNION +#done +LOWERS=$(\ls -1dr $BUNDLES[0-1]* | grep -v chromium | tr '\n' ':') +LOWERS=${LOWERS/%:/} +rm -rf $TMP/xino ; mkdir $TMP/xino +mount -t overlay -o lowerdir=$LOWERS,upperdir=$CHANGES,workdir=$TMP/xino overlay $UNION + +for d in boot dev proc sys tmp media mnt run; do + mkdir -p $UNION/$d +done + +chmod ugo+rwx $UNION/tmp + +mount --bind /dev $UNION/dev +mount --bind /proc $UNION/proc +mount --bind /sys $UNION/sys + +echo "apt-get update; apt-get install --yes $INSTALL_ALL" >$UNION/doit +chmod ugo+x $UNION/doit +cp /etc/resolv.conf $UNION/etc/ +chroot $UNION /doit + +umount $UNION/sys +umount $UNION/proc +umount $UNION/dev +rm $CHANGES/doit +rmdir $CHANGES/* 2>/dev/null +#cleanup.sh $CHANGES +savechanges /"$INSTALL".sb $CHANGES + +umount $UNION +umount $TMP +rmdir $TMP diff --git a/linux-live/basesystem/01-core/standard.list b/linux-live/basesystem/01-core/standard.list index 632b033..f8c9cc5 100644 --- a/linux-live/basesystem/01-core/standard.list +++ b/linux-live/basesystem/01-core/standard.list @@ -14,7 +14,6 @@ xz-utils ca-certificates openssl acpid -acpi-support-base powermgmt-base bzip2 gpart diff --git a/linux-live/bootfiles-grub/EFI/boot/bootx64.efi b/linux-live/bootfiles-grub/EFI/boot/bootx64.efi new file mode 100644 index 0000000..d9f3214 Binary files /dev/null and b/linux-live/bootfiles-grub/EFI/boot/bootx64.efi differ diff --git a/linux-live/bootfiles-grub/EFI/boot/efiboot.img b/linux-live/bootfiles-grub/EFI/boot/efiboot.img new file mode 100644 index 0000000..3ce07a3 Binary files /dev/null and b/linux-live/bootfiles-grub/EFI/boot/efiboot.img differ diff --git a/linux-live/bootfiles-grub/EFI/boot/grubx64.efi b/linux-live/bootfiles-grub/EFI/boot/grubx64.efi new file mode 100644 index 0000000..8ac6d89 Binary files /dev/null and b/linux-live/bootfiles-grub/EFI/boot/grubx64.efi differ diff --git a/linux-live/bootfiles-grub/boot/grub/bootlogo.png b/linux-live/bootfiles-grub/boot/grub/bootlogo.png new file mode 100644 index 0000000..3a2aa64 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/bootlogo.png differ diff --git a/linux-live/bootfiles-grub/boot/grub/grub.cfg b/linux-live/bootfiles-grub/boot/grub/grub.cfg new file mode 100644 index 0000000..421042a --- /dev/null +++ b/linux-live/bootfiles-grub/boot/grub/grub.cfg @@ -0,0 +1,42 @@ +set default="0" +set timeout="4" +set hidden_timeout_quiet=false +set gfxmode=auto +insmod efi_gop +insmod efi_uga +insmod gfxterm +terminal_output gfxterm +set color_normal=white/black +set color_highlight=black/white +loadfont /boot/grub/unicode.pf2 +background_image /boot/grub/bootlogo.png + +set default_settings="load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 consoleblank=0 apparmor=0 net.ifnames=0 biosdevname=0 quiet" +set perch_settings="minios.flags=perch" +set live_settings="minios.flags= " +set ram_settings="minios.flags=toram" +set console_settings="console=tty0 console=ttyS0,115200" +set debug_settings="load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 apparmor=0 debug net.ifnames=0 biosdevname=0" +set linux_64="/minios/boot/vmlinuz" +set initrd_img="/minios/boot/initrfs.img" +set default=0 +set message="Loading kernel and ramdisk..." + +menuentry "Run MiniOS (Persistent changes)"{ + echo $message + search --set -f $linux_64 + linux $linux_64 $default_settings $perch_settings + initrd $initrd_img +} +menuentry "Run MiniOS (Fresh start)"{ + echo $message + search --set -f $linux_64 + linux $linux_64 $default_settings $live_settings + initrd $initrd_img +} +menuentry "Run MiniOS (Copy to RAM)"{ + echo $message + search --set -f $linux_64 + linux $linux_64 $default_settings $ram_settings + initrd $initrd_img +} \ No newline at end of file diff --git a/linux-live/bootfiles-grub/boot/grub/grub.cfg.2 b/linux-live/bootfiles-grub/boot/grub/grub.cfg.2 new file mode 100644 index 0000000..6182b4c --- /dev/null +++ b/linux-live/bootfiles-grub/boot/grub/grub.cfg.2 @@ -0,0 +1,31 @@ +set default="0" +set timeout="3" +set hidden_timeout_quiet=false +set gfxmode=auto +insmod efi_gop +insmod efi_uga +insmod gfxterm +terminal_output gfxterm +set color_normal=black/black +set color_highlight=black/white +loadfont /boot/grub/unicode.pf2 +background_image /boot/grub/bootlogo.png + +set default_settings="load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 consoleblank=0 apparmor=0 net.ifnames=0 biosdevname=0 quiet" +set perch_settings="slax.flags=perch,automount" +set live_settings="slax.flags=automount" +set ram_settings="slax.flags=toram" +set http_settings="from=http://ch2.crims0n.ru:8080/minios-cloud-loader.iso" +set console_settings="console=tty0 console=ttyS0,115200" +set debug_settings="load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 apparmor=0 debug net.ifnames=0 biosdevname=0" +set linux_64="/minios/boot/vmlinuz" +set initrd_img="/minios/boot/initrfs.img" +set default=0 +set message="Loading kernel and ramdisk..." + +menuentry "MiniOS (Copy to RAM)"{ + echo $message + search --set -f $linux_64 + linux $linux_64 $default_settings $ram_settings $http_settings $console_settings + initrd $initrd_img +} \ No newline at end of file diff --git a/linux-live/bootfiles-grub/boot/grub/unicode.pf2 b/linux-live/bootfiles-grub/boot/grub/unicode.pf2 new file mode 100644 index 0000000..d955ce5 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/unicode.pf2 differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/acpi.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/acpi.mod new file mode 100644 index 0000000..27b1418 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/acpi.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/adler32.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/adler32.mod new file mode 100644 index 0000000..107384f Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/adler32.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ahci.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ahci.mod new file mode 100644 index 0000000..fc6e13a Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ahci.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/all_video.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/all_video.mod new file mode 100644 index 0000000..100483f Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/all_video.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/aout.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/aout.mod new file mode 100644 index 0000000..f0d437b Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/aout.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/appleldr.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/appleldr.mod new file mode 100644 index 0000000..902d072 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/appleldr.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/archelp.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/archelp.mod new file mode 100644 index 0000000..d9f62c5 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/archelp.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/at_keyboard.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/at_keyboard.mod new file mode 100644 index 0000000..b8de502 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/at_keyboard.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ata.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ata.mod new file mode 100644 index 0000000..5e7638a Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ata.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/backtrace.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/backtrace.mod new file mode 100644 index 0000000..317091b Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/backtrace.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/bfs.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/bfs.mod new file mode 100644 index 0000000..27688ef Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/bfs.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/bitmap.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/bitmap.mod new file mode 100644 index 0000000..a345af5 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/bitmap.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/bitmap_scale.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/bitmap_scale.mod new file mode 100644 index 0000000..f28c72e Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/bitmap_scale.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/blocklist.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/blocklist.mod new file mode 100644 index 0000000..d674d6b Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/blocklist.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/boot.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/boot.mod new file mode 100644 index 0000000..b50031a Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/boot.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/bsd.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/bsd.mod new file mode 100644 index 0000000..bcc36c9 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/bsd.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/bswap_test.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/bswap_test.mod new file mode 100644 index 0000000..25d9cf1 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/bswap_test.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/btrfs.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/btrfs.mod new file mode 100644 index 0000000..ccfd41a Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/btrfs.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/bufio.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/bufio.mod new file mode 100644 index 0000000..8d9b551 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/bufio.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cat.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cat.mod new file mode 100644 index 0000000..a2f5fdd Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cat.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cbfs.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cbfs.mod new file mode 100644 index 0000000..229b7bd Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cbfs.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cbls.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cbls.mod new file mode 100644 index 0000000..f40f5e3 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cbls.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cbmemc.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cbmemc.mod new file mode 100644 index 0000000..3c7ee9f Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cbmemc.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cbtable.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cbtable.mod new file mode 100644 index 0000000..faf8c9f Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cbtable.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cbtime.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cbtime.mod new file mode 100644 index 0000000..f2214d9 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cbtime.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/chain.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/chain.mod new file mode 100644 index 0000000..6d7a282 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/chain.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cmdline_cat_test.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cmdline_cat_test.mod new file mode 100644 index 0000000..3fa3772 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cmdline_cat_test.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cmp.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cmp.mod new file mode 100644 index 0000000..fc21ad8 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cmp.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cmp_test.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cmp_test.mod new file mode 100644 index 0000000..09c5364 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cmp_test.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/command.lst b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/command.lst new file mode 100644 index 0000000..d7814a8 --- /dev/null +++ b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/command.lst @@ -0,0 +1,190 @@ +*acpi: acpi +*all_functional_test: functional_test +*background_image: gfxterm_background +*cat: cat +*cpuid: cpuid +*crc: hashsum +*cryptomount: cryptodisk +*echo: echo +*extract_syslinux_entries_configfile: syslinuxcfg +*extract_syslinux_entries_source: syslinuxcfg +*file: file +*functional_test: functional_test +*gettext: gettext +*hashsum: hashsum +*hdparm: hdparm +*hello: hello +*help: help +*hexdump: hexdump +*inb: iorw +*inl: iorw +*inw: iorw +*keystatus: keystatus +*kfreebsd: bsd +*knetbsd: bsd +*kopenbsd: bsd +*list_env: loadenv +*load_env: loadenv +*loopback: loopback +*ls: ls +*lsacpi: lsacpi +*lspci: lspci +*md5sum: hashsum +*menuentry: normal +*pcidump: pcidump +*probe: probe +*read_byte: memrw +*read_dword: memrw +*read_word: memrw +*regexp: regexp +*save_env: loadenv +*search: search +*serial: serial +*setpci: setpci +*sha1sum: hashsum +*sha256sum: hashsum +*sha512sum: hashsum +*sleep: sleep +*submenu: normal +*syslinux_configfile: syslinuxcfg +*syslinux_source: syslinuxcfg +*terminfo: terminfo +*test_blockarg: test_blockarg +*testspeed: testspeed +*tr: tr +*trust: verify +*verify_detached: verify +*xnu_splash: xnu +*zfskey: zfscrypt +.: configfile +[: test +appleloader: appleldr +authenticate: normal +background_color: gfxterm_background +backtrace: backtrace +badram: mmap +blocklist: blocklist +boot: boot +break: normal +cat: minicmd +cbmemc: cbmemc +chainloader: chain +clear: normal +cmp: cmp +configfile: configfile +continue: normal +coreboot_boottime: cbtime +cutmem: mmap +date: date +distrust: verify +dump: minicmd +eval: eval +exit: minicmd +export: normal +extract_entries_configfile: configfile +extract_entries_source: configfile +extract_legacy_entries_configfile: legacycfg +extract_legacy_entries_source: legacycfg +fakebios: loadbios +false: true +fix_video: fixvideo +fwsetup: efifwsetup +gptsync: gptsync +halt: halt +help: minicmd +hexdump_random: random +initrd16: linux16 +initrd: linux +initrdefi: linuxefi +keymap: keylayouts +kfreebsd_loadenv: bsd +kfreebsd_module: bsd +kfreebsd_module_elf: bsd +knetbsd_module: bsd +knetbsd_module_elf: bsd +kopenbsd_ramdisk: bsd +legacy_check_password: legacycfg +legacy_configfile: legacycfg +legacy_initrd: legacycfg +legacy_initrd_nounzip: legacycfg +legacy_kernel: legacycfg +legacy_password: legacycfg +legacy_source: legacycfg +linux16: linux16 +linux: linux +linuxefi: linuxefi +list_trusted: verify +loadbios: loadbios +loadfont: font +lscoreboot: cbls +lsefi: lsefi +lsefimmap: lsefimmap +lsefisystab: lsefisystab +lsfonts: font +lsmmap: lsmmap +lsmod: minicmd +lssal: lssal +macppcbless: macbless +mactelbless: macbless +module2: multiboot2 +module: multiboot +multiboot2: multiboot2 +multiboot: multiboot +nativedisk: nativedisk +net_add_addr: net +net_add_dns: net +net_add_route: net +net_bootp6: net +net_bootp: net +net_del_addr: net +net_del_dns: net +net_del_route: net +net_get_dhcp_option: net +net_ipv6_autoconf: net +net_ls_addr: net +net_ls_cards: net +net_ls_dns: net +net_ls_routes: net +net_nslookup: net +normal: normal +normal_exit: normal +outb: iorw +outl: iorw +outw: iorw +parttool: parttool +password: password +password_pbkdf2: password_pbkdf2 +play: play +read: read +reboot: reboot +return: normal +rmmod: minicmd +search.file: search_fs_file +search.fs_label: search_label +search.fs_uuid: search_fs_uuid +setparams: normal +shift: normal +source: configfile +terminal_input: terminal +terminal_output: terminal +test: test +testload: testload +time: time +true: true +usb: usbtest +videoinfo: videoinfo +videotest: videotest +write_byte: memrw +write_dword: memrw +write_word: memrw +xnu_devprop_load: xnu +xnu_kernel64: xnu +xnu_kernel: xnu +xnu_kext: xnu +xnu_kextdir: xnu +xnu_mkext: xnu +xnu_ramdisk: xnu +xnu_resume: xnu +xnu_uuid: xnu_uuid +zfs-bootfs: zfsinfo +zfsinfo: zfsinfo diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cpio.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cpio.mod new file mode 100644 index 0000000..8eb3ef2 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cpio.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cpio_be.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cpio_be.mod new file mode 100644 index 0000000..928825e Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cpio_be.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cpuid.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cpuid.mod new file mode 100644 index 0000000..effabd1 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cpuid.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/crc64.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/crc64.mod new file mode 100644 index 0000000..63f6923 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/crc64.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/crypto.lst b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/crypto.lst new file mode 100644 index 0000000..77d9efc --- /dev/null +++ b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/crypto.lst @@ -0,0 +1,45 @@ +RIJNDAEL: gcry_rijndael +RIJNDAEL192: gcry_rijndael +RIJNDAEL256: gcry_rijndael +AES128: gcry_rijndael +AES-128: gcry_rijndael +AES-192: gcry_rijndael +AES-256: gcry_rijndael +ADLER32: adler32 +CRC64: crc64 +ARCFOUR: gcry_arcfour +BLOWFISH: gcry_blowfish +CAMELLIA128: gcry_camellia +CAMELLIA192: gcry_camellia +CAMELLIA256: gcry_camellia +CAST5: gcry_cast5 +CRC32: gcry_crc +CRC32RFC1510: gcry_crc +CRC24RFC2440: gcry_crc +DES: gcry_des +3DES: gcry_des +DSA: gcry_dsa +IDEA: gcry_idea +MD4: gcry_md4 +MD5: gcry_md5 +RFC2268_40: gcry_rfc2268 +AES: gcry_rijndael +AES192: gcry_rijndael +AES256: gcry_rijndael +RIPEMD160: gcry_rmd160 +RSA: gcry_rsa +SEED: gcry_seed +SERPENT128: gcry_serpent +SERPENT192: gcry_serpent +SERPENT256: gcry_serpent +SHA1: gcry_sha1 +SHA224: gcry_sha256 +SHA256: gcry_sha256 +SHA512: gcry_sha512 +SHA384: gcry_sha512 +TIGER192: gcry_tiger +TIGER: gcry_tiger +TIGER2: gcry_tiger +TWOFISH: gcry_twofish +TWOFISH128: gcry_twofish +WHIRLPOOL: gcry_whirlpool diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/crypto.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/crypto.mod new file mode 100644 index 0000000..663c824 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/crypto.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cryptodisk.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cryptodisk.mod new file mode 100644 index 0000000..8a351ef Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cryptodisk.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cs5536.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cs5536.mod new file mode 100644 index 0000000..05f54db Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/cs5536.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ctz_test.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ctz_test.mod new file mode 100644 index 0000000..4806997 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ctz_test.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/date.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/date.mod new file mode 100644 index 0000000..c37e4c5 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/date.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/datehook.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/datehook.mod new file mode 100644 index 0000000..0f69b27 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/datehook.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/datetime.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/datetime.mod new file mode 100644 index 0000000..14fe14f Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/datetime.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/disk.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/disk.mod new file mode 100644 index 0000000..eed4f2d Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/disk.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/diskfilter.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/diskfilter.mod new file mode 100644 index 0000000..4945cc8 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/diskfilter.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/div.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/div.mod new file mode 100644 index 0000000..7876367 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/div.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/div_test.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/div_test.mod new file mode 100644 index 0000000..24cd597 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/div_test.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/dm_nv.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/dm_nv.mod new file mode 100644 index 0000000..f3d6854 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/dm_nv.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/echo.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/echo.mod new file mode 100644 index 0000000..a269e30 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/echo.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/efi_gop.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/efi_gop.mod new file mode 100644 index 0000000..5509d26 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/efi_gop.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/efi_uga.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/efi_uga.mod new file mode 100644 index 0000000..55f8d22 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/efi_uga.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/efifwsetup.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/efifwsetup.mod new file mode 100644 index 0000000..c034c64 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/efifwsetup.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/efinet.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/efinet.mod new file mode 100644 index 0000000..41830d4 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/efinet.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ehci.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ehci.mod new file mode 100644 index 0000000..121335a Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ehci.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/elf.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/elf.mod new file mode 100644 index 0000000..e899c47 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/elf.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/eval.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/eval.mod new file mode 100644 index 0000000..59c05cf Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/eval.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/exfat.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/exfat.mod new file mode 100644 index 0000000..1ff744c Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/exfat.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/exfctest.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/exfctest.mod new file mode 100644 index 0000000..ff59bd0 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/exfctest.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ext2.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ext2.mod new file mode 100644 index 0000000..74c6cdc Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ext2.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/fat.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/fat.mod new file mode 100644 index 0000000..cf81950 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/fat.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/file.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/file.mod new file mode 100644 index 0000000..9cd5d54 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/file.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/fixvideo.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/fixvideo.mod new file mode 100644 index 0000000..dbeba02 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/fixvideo.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/font.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/font.mod new file mode 100644 index 0000000..307c988 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/font.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/fs.lst b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/fs.lst new file mode 100644 index 0000000..a069ccc --- /dev/null +++ b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/fs.lst @@ -0,0 +1,36 @@ +affs +afs +bfs +btrfs +cbfs +cpio +cpio_be +exfat +ext2 +fat +hfs +hfsplus +iso9660 +jfs +minix +minix2 +minix2_be +minix3 +minix3_be +minix_be +newc +nilfs2 +ntfs +odc +procfs +reiserfs +romfs +sfs +squash4 +tar +udf +ufs1 +ufs1_be +ufs2 +xfs +zfs diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_arcfour.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_arcfour.mod new file mode 100644 index 0000000..44f6ca0 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_arcfour.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_blowfish.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_blowfish.mod new file mode 100644 index 0000000..f2ef820 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_blowfish.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_camellia.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_camellia.mod new file mode 100644 index 0000000..618f52b Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_camellia.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_cast5.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_cast5.mod new file mode 100644 index 0000000..a36adfe Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_cast5.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_crc.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_crc.mod new file mode 100644 index 0000000..9761777 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_crc.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_des.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_des.mod new file mode 100644 index 0000000..36c99d6 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_des.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_dsa.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_dsa.mod new file mode 100644 index 0000000..86e27f2 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_dsa.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_idea.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_idea.mod new file mode 100644 index 0000000..9e344d1 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_idea.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_md4.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_md4.mod new file mode 100644 index 0000000..ba801ad Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_md4.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_md5.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_md5.mod new file mode 100644 index 0000000..3709dc4 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_md5.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_rfc2268.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_rfc2268.mod new file mode 100644 index 0000000..9817025 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_rfc2268.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_rijndael.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_rijndael.mod new file mode 100644 index 0000000..b986011 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_rijndael.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_rmd160.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_rmd160.mod new file mode 100644 index 0000000..bb173da Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_rmd160.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_rsa.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_rsa.mod new file mode 100644 index 0000000..13c700f Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_rsa.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_seed.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_seed.mod new file mode 100644 index 0000000..176fb94 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_seed.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_serpent.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_serpent.mod new file mode 100644 index 0000000..132d406 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_serpent.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_sha1.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_sha1.mod new file mode 100644 index 0000000..f3a72a5 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_sha1.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_sha256.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_sha256.mod new file mode 100644 index 0000000..326b1bb Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_sha256.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_sha512.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_sha512.mod new file mode 100644 index 0000000..aa40e15 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_sha512.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_tiger.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_tiger.mod new file mode 100644 index 0000000..3dacb86 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_tiger.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_twofish.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_twofish.mod new file mode 100644 index 0000000..d15c86f Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_twofish.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_whirlpool.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_whirlpool.mod new file mode 100644 index 0000000..b2bdc09 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gcry_whirlpool.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/geli.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/geli.mod new file mode 100644 index 0000000..6762c88 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/geli.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gettext.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gettext.mod new file mode 100644 index 0000000..d899660 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gettext.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gfxmenu.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gfxmenu.mod new file mode 100644 index 0000000..6cc6029 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gfxmenu.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gfxterm.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gfxterm.mod new file mode 100644 index 0000000..5ee8d67 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gfxterm.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gfxterm_background.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gfxterm_background.mod new file mode 100644 index 0000000..e275f7f Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gfxterm_background.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gfxterm_menu.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gfxterm_menu.mod new file mode 100644 index 0000000..621c435 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gfxterm_menu.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gptsync.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gptsync.mod new file mode 100644 index 0000000..ac2c9dc Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gptsync.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/grub.cfg b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/grub.cfg new file mode 100644 index 0000000..1f498ce --- /dev/null +++ b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/grub.cfg @@ -0,0 +1,12 @@ +insmod part_acorn +insmod part_amiga +insmod part_apple +insmod part_bsd +insmod part_dfly +insmod part_dvh +insmod part_gpt +insmod part_msdos +insmod part_plan +insmod part_sun +insmod part_sunpc +configfile /boot/grub/grub.cfg diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gzio.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gzio.mod new file mode 100644 index 0000000..fe876da Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/gzio.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/halt.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/halt.mod new file mode 100644 index 0000000..916c9ba Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/halt.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/hashsum.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/hashsum.mod new file mode 100644 index 0000000..28c9348 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/hashsum.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/hdparm.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/hdparm.mod new file mode 100644 index 0000000..a47c9f5 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/hdparm.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/help.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/help.mod new file mode 100644 index 0000000..8885eac Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/help.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/hexdump.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/hexdump.mod new file mode 100644 index 0000000..103342c Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/hexdump.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/hfs.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/hfs.mod new file mode 100644 index 0000000..fb1c2f0 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/hfs.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/hfsplus.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/hfsplus.mod new file mode 100644 index 0000000..e49db4b Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/hfsplus.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/hfspluscomp.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/hfspluscomp.mod new file mode 100644 index 0000000..ea4ecde Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/hfspluscomp.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/http.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/http.mod new file mode 100644 index 0000000..5b110be Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/http.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/iorw.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/iorw.mod new file mode 100644 index 0000000..03fa816 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/iorw.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/jfs.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/jfs.mod new file mode 100644 index 0000000..750913b Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/jfs.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/jpeg.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/jpeg.mod new file mode 100644 index 0000000..8f64c41 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/jpeg.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/keylayouts.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/keylayouts.mod new file mode 100644 index 0000000..fb5c5f7 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/keylayouts.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/keystatus.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/keystatus.mod new file mode 100644 index 0000000..c3277df Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/keystatus.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ldm.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ldm.mod new file mode 100644 index 0000000..901dd2c Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ldm.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/legacy_password_test.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/legacy_password_test.mod new file mode 100644 index 0000000..eb8ad7a Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/legacy_password_test.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/legacycfg.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/legacycfg.mod new file mode 100644 index 0000000..047f2d5 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/legacycfg.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/linux.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/linux.mod new file mode 100644 index 0000000..8da36bb Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/linux.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/linux16.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/linux16.mod new file mode 100644 index 0000000..1729b44 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/linux16.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/linuxefi.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/linuxefi.mod new file mode 100644 index 0000000..795d69f Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/linuxefi.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/loadbios.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/loadbios.mod new file mode 100644 index 0000000..cc8684d Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/loadbios.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/loadenv.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/loadenv.mod new file mode 100644 index 0000000..58b517a Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/loadenv.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/loopback.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/loopback.mod new file mode 100644 index 0000000..9a81553 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/loopback.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ls.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ls.mod new file mode 100644 index 0000000..cd6c691 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ls.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lsacpi.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lsacpi.mod new file mode 100644 index 0000000..347d3c7 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lsacpi.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lsefi.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lsefi.mod new file mode 100644 index 0000000..dc75396 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lsefi.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lsefimmap.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lsefimmap.mod new file mode 100644 index 0000000..52796db Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lsefimmap.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lsefisystab.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lsefisystab.mod new file mode 100644 index 0000000..ebe26de Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lsefisystab.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lsmmap.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lsmmap.mod new file mode 100644 index 0000000..4d78f6e Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lsmmap.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lspci.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lspci.mod new file mode 100644 index 0000000..7c890e6 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lspci.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lssal.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lssal.mod new file mode 100644 index 0000000..3e8e131 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lssal.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/luks.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/luks.mod new file mode 100644 index 0000000..aa259b8 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/luks.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lvm.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lvm.mod new file mode 100644 index 0000000..509ab11 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lvm.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lzopio.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lzopio.mod new file mode 100644 index 0000000..b8cdb82 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/lzopio.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/macbless.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/macbless.mod new file mode 100644 index 0000000..08414f5 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/macbless.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/macho.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/macho.mod new file mode 100644 index 0000000..9436050 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/macho.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/mdraid09.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/mdraid09.mod new file mode 100644 index 0000000..ddd837e Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/mdraid09.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/mdraid09_be.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/mdraid09_be.mod new file mode 100644 index 0000000..bb178e9 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/mdraid09_be.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/mdraid1x.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/mdraid1x.mod new file mode 100644 index 0000000..d1464ee Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/mdraid1x.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/memrw.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/memrw.mod new file mode 100644 index 0000000..30fe8e3 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/memrw.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/minicmd.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/minicmd.mod new file mode 100644 index 0000000..14dc4dd Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/minicmd.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/minix2.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/minix2.mod new file mode 100644 index 0000000..22a2953 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/minix2.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/minix2_be.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/minix2_be.mod new file mode 100644 index 0000000..d27f9bd Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/minix2_be.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/minix3.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/minix3.mod new file mode 100644 index 0000000..4bd937f Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/minix3.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/minix3_be.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/minix3_be.mod new file mode 100644 index 0000000..1d48e2e Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/minix3_be.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/minix_be.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/minix_be.mod new file mode 100644 index 0000000..7b6ecd6 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/minix_be.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/mmap.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/mmap.mod new file mode 100644 index 0000000..aa7cad4 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/mmap.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/moddep.lst b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/moddep.lst new file mode 100644 index 0000000..093b1a6 --- /dev/null +++ b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/moddep.lst @@ -0,0 +1,257 @@ +squash4: xzio gzio lzopio fshelp +search_fs_uuid: +lssal: +legacycfg: gcry_md5 crypto password normal +date: datetime normal +bfs: fshelp +uhci: usb +multiboot2: boot video net acpi relocator mmap +gcry_twofish: crypto +cpio_be: archelp +priority_queue: +gcry_rijndael: crypto +echo: extcmd +cpio: archelp +xzio: crypto +part_sun: +hfspluscomp: gzio hfsplus +gcry_sha512: crypto +gcry_cast5: crypto +efi_gop: video video_fb +ctz_test: functional_test +boot: +setjmp_test: setjmp functional_test +odc: archelp +ls: extcmd normal +gzio: +cbmemc: cbtable terminfo normal +video: +test_blockarg: extcmd normal +linuxefi: boot +gfxterm: video font +cbtable: +mul_test: functional_test +gcry_tiger: crypto +gcry_serpent: crypto +aout: +macbless: disk +gcry_blowfish: crypto +appleldr: boot +trig: +extcmd: +at_keyboard: boot keylayouts +videoinfo: video +testspeed: extcmd normal +minix: +keylayouts: +xnu_uuid: gcry_md5 +usbtest: usb +usbms: usb scsi +reboot: +morse: +help: extcmd normal +part_msdos: +http: net +gcry_rsa: mpi verify +cbtime: cbtable +blocklist: +probe: extcmd +pbkdf2: crypto +lsefisystab: +gcry_rfc2268: crypto +ufs1_be: +nativedisk: +gcry_camellia: crypto +fat: fshelp +exfctest: functional_test +parttool: normal +lzopio: crypto +linux: boot video relocator mmap +gcry_md4: crypto +zfsinfo: zfs +usb_keyboard: keylayouts usb +gcry_md5: crypto +fshelp: +ehci: boot usb cs5536 +datetime: +bitmap_scale: bitmap +ata: scsi +usbserial_common: usb serial +syslinuxcfg: extcmd normal +net: priority_queue boot datetime bufio +gcry_des: crypto +div_test: div functional_test +time: +reiserfs: fshelp +dm_nv: diskfilter +datehook: datetime normal +mdraid09_be: diskfilter +cmp_test: functional_test +backtrace: +ahci: boot ata +kernel: +video_cirrus: video video_fb +part_plan: +gcry_seed: crypto +minix_be: +crypto: +video_colors: +test: +terminal: +part_dvh: +lsacpi: extcmd acpi +jpeg: bufio bitmap +bsd: boot video aout extcmd gcry_md5 crypto cpuid elf relocator serial mmap +memdisk: +gfxmenu: video gfxterm trig bitmap_scale video_colors bitmap normal font +cmp: +acpi: extcmd mmap +xfs: fshelp +elf: +div: +cpuid: extcmd +affs: fshelp +usb: +videotest: video gfxmenu font +tr: extcmd +testload: +relocator: mmap +play: +gfxterm_menu: video_fb functional_test procfs normal font +cbfs: archelp +adler32: crypto +progress: normal +password: crypto normal +part_sunpc: +video_fb: +tftp: priority_queue net +sleep: extcmd normal +serial: extcmd terminfo +search_fs_file: +gcry_sha256: crypto +gcry_rmd160: crypto +exfat: fshelp +search: search_fs_uuid extcmd search_fs_file search_label +mdraid09: diskfilter +chain: boot net efinet +mpi: crypto +memrw: extcmd +cs5536: +password_pbkdf2: gcry_sha512 pbkdf2 crypto normal +mdraid1x: diskfilter +linux16: boot video relocator mmap +gcry_crc: crypto +configfile: normal +zfscrypt: gcry_rijndael extcmd pbkdf2 crypto zfs gcry_sha1 +signature_test: functional_test procfs +raid5rec: diskfilter +pcidump: extcmd +gcry_arcfour: crypto +part_dfly: +minix2_be: +gettext: +pbkdf2_test: pbkdf2 gcry_sha1 functional_test +hello: extcmd +usbserial_pl2303: usbserial_common usb serial +hashsum: extcmd crypto normal +xnu_uuid_test: functional_test +regexp: extcmd normal +part_gpt: +ohci: boot usb cs5536 +gptsync: disk +zfs: gzio +part_apple: +hdparm: extcmd +bufio: +btrfs: gzio lzopio +bitmap: +true: +terminfo: extcmd +romfs: fshelp +ntfscomp: ntfs +lsefi: +hfs: fshelp +gcry_dsa: mpi verify +cmdline_cat_test: video_fb functional_test procfs normal font +ufs1: +offsetio: +legacy_password_test: legacycfg functional_test +setjmp: +ufs2: +nilfs2: fshelp +lsmmap: mmap +gcry_sha1: crypto +mmap: +tar: archelp +png: bufio bitmap +lspci: extcmd +hfsplus: fshelp +cbls: cbtable +tga: bufio bitmap +random: hexdump +minix2: +setpci: extcmd +scsi: +pata: ata +minix3: +lvm: diskfilter +functional_test: video extcmd video_fb btrfs +eval: normal +iso9660: fshelp +crc64: crypto +udf: fshelp +search_label: +raid6rec: diskfilter +msdospart: parttool disk +archelp: +procfs: archelp +minix3_be: +halt: acpi +xnu: boot video extcmd bitmap_scale relocator bitmap mmap random macho +read: +multiboot: boot video net relocator mmap +keystatus: extcmd +cryptodisk: extcmd crypto procfs +shift_test: functional_test +normal: boot extcmd crypto terminal gettext bufio +lsefimmap: +loadbios: +geli: gcry_sha512 pbkdf2 crypto gcry_sha256 cryptodisk +spkmodem: terminfo +gcry_idea: crypto +bswap_test: functional_test +video_bochs: video video_fb +verify: extcmd crypto mpi gcry_sha1 +sfs: fshelp +part_amiga: +luks: pbkdf2 crypto cryptodisk +loopback: extcmd +jfs: +gfxterm_background: gfxterm video extcmd bitmap_scale video_colors bitmap +efifwsetup: reboot +usbserial_usbdebug: usbserial_common usb serial +part_acorn: +newc: archelp +macho: +iorw: extcmd +cat: extcmd +afs: fshelp +sleep_test: datetime functional_test +ldm: part_msdos part_gpt diskfilter +hexdump: extcmd +efinet: net +disk: +usbserial_ftdi: usbserial_common usb serial +minicmd: +loadenv: extcmd disk +gcry_whirlpool: crypto +fixvideo: +part_bsd: part_msdos +font: video bufio +ext2: fshelp +diskfilter: +videotest_checksum: video_fb functional_test font +file: extcmd elf offsetio macho +ntfs: fshelp +efi_uga: video video_fb +all_video: efi_gop efi_uga video_bochs video_cirrus diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/morse.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/morse.mod new file mode 100644 index 0000000..fb2d81e Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/morse.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/mpi.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/mpi.mod new file mode 100644 index 0000000..01c05f7 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/mpi.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/msdospart.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/msdospart.mod new file mode 100644 index 0000000..34e4925 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/msdospart.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/mul_test.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/mul_test.mod new file mode 100644 index 0000000..c110ab0 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/mul_test.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/multiboot.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/multiboot.mod new file mode 100644 index 0000000..8c02770 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/multiboot.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/multiboot2.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/multiboot2.mod new file mode 100644 index 0000000..4446e62 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/multiboot2.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/nativedisk.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/nativedisk.mod new file mode 100644 index 0000000..44dc31e Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/nativedisk.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/net.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/net.mod new file mode 100644 index 0000000..afdefce Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/net.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/newc.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/newc.mod new file mode 100644 index 0000000..592f687 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/newc.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ntfs.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ntfs.mod new file mode 100644 index 0000000..a3fa4c6 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ntfs.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ntfscomp.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ntfscomp.mod new file mode 100644 index 0000000..877bf8b Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ntfscomp.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/odc.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/odc.mod new file mode 100644 index 0000000..d842cc2 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/odc.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/offsetio.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/offsetio.mod new file mode 100644 index 0000000..338e33e Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/offsetio.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ohci.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ohci.mod new file mode 100644 index 0000000..3ca9738 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ohci.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_acorn.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_acorn.mod new file mode 100644 index 0000000..86728e6 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_acorn.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_amiga.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_amiga.mod new file mode 100644 index 0000000..33e5830 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_amiga.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_apple.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_apple.mod new file mode 100644 index 0000000..768ae83 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_apple.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_bsd.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_bsd.mod new file mode 100644 index 0000000..9db236c Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_bsd.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_dfly.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_dfly.mod new file mode 100644 index 0000000..9be813c Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_dfly.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_dvh.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_dvh.mod new file mode 100644 index 0000000..5e3717b Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_dvh.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_gpt.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_gpt.mod new file mode 100644 index 0000000..c310512 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_gpt.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_msdos.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_msdos.mod new file mode 100644 index 0000000..7751112 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_msdos.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_plan.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_plan.mod new file mode 100644 index 0000000..40d3d96 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_plan.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_sun.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_sun.mod new file mode 100644 index 0000000..769cb42 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_sun.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_sunpc.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_sunpc.mod new file mode 100644 index 0000000..5355b7f Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/part_sunpc.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/partmap.lst b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/partmap.lst new file mode 100644 index 0000000..761233a --- /dev/null +++ b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/partmap.lst @@ -0,0 +1,11 @@ +part_acorn +part_amiga +part_apple +part_bsd +part_dfly +part_dvh +part_gpt +part_msdos +part_plan +part_sun +part_sunpc diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/parttool.lst b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/parttool.lst new file mode 100644 index 0000000..68b4b5c --- /dev/null +++ b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/parttool.lst @@ -0,0 +1 @@ +msdos: msdospart diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/parttool.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/parttool.mod new file mode 100644 index 0000000..4fc5de4 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/parttool.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/password.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/password.mod new file mode 100644 index 0000000..9a1b890 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/password.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/password_pbkdf2.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/password_pbkdf2.mod new file mode 100644 index 0000000..61b6357 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/password_pbkdf2.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/pata.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/pata.mod new file mode 100644 index 0000000..37a8f3f Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/pata.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/pbkdf2.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/pbkdf2.mod new file mode 100644 index 0000000..e869b6a Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/pbkdf2.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/pbkdf2_test.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/pbkdf2_test.mod new file mode 100644 index 0000000..9f120dc Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/pbkdf2_test.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/pcidump.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/pcidump.mod new file mode 100644 index 0000000..5ac1412 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/pcidump.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/play.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/play.mod new file mode 100644 index 0000000..2c1e523 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/play.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/png.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/png.mod new file mode 100644 index 0000000..1da4f6d Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/png.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/priority_queue.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/priority_queue.mod new file mode 100644 index 0000000..3b81d33 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/priority_queue.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/probe.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/probe.mod new file mode 100644 index 0000000..c0aad07 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/probe.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/procfs.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/procfs.mod new file mode 100644 index 0000000..ce1865d Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/procfs.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/progress.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/progress.mod new file mode 100644 index 0000000..a64f20b Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/progress.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/raid5rec.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/raid5rec.mod new file mode 100644 index 0000000..dba4408 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/raid5rec.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/raid6rec.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/raid6rec.mod new file mode 100644 index 0000000..711ae62 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/raid6rec.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/random.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/random.mod new file mode 100644 index 0000000..61b9e89 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/random.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/read.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/read.mod new file mode 100644 index 0000000..c55b43d Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/read.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/reboot.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/reboot.mod new file mode 100644 index 0000000..c1fe0e6 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/reboot.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/regexp.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/regexp.mod new file mode 100644 index 0000000..b2f61f2 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/regexp.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/reiserfs.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/reiserfs.mod new file mode 100644 index 0000000..e266a7a Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/reiserfs.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/relocator.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/relocator.mod new file mode 100644 index 0000000..5d7a350 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/relocator.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/romfs.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/romfs.mod new file mode 100644 index 0000000..936cdc4 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/romfs.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/scsi.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/scsi.mod new file mode 100644 index 0000000..5c6de13 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/scsi.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/serial.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/serial.mod new file mode 100644 index 0000000..259ad61 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/serial.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/setjmp.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/setjmp.mod new file mode 100644 index 0000000..a0b4e57 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/setjmp.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/setjmp_test.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/setjmp_test.mod new file mode 100644 index 0000000..d68d55d Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/setjmp_test.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/setpci.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/setpci.mod new file mode 100644 index 0000000..01bf189 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/setpci.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/shift_test.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/shift_test.mod new file mode 100644 index 0000000..e9ffd08 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/shift_test.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/signature_test.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/signature_test.mod new file mode 100644 index 0000000..a60fbf6 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/signature_test.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/sleep.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/sleep.mod new file mode 100644 index 0000000..18fd278 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/sleep.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/sleep_test.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/sleep_test.mod new file mode 100644 index 0000000..5ba82db Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/sleep_test.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/spkmodem.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/spkmodem.mod new file mode 100644 index 0000000..f856a41 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/spkmodem.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/squash4.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/squash4.mod new file mode 100644 index 0000000..c8bde21 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/squash4.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/syslinuxcfg.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/syslinuxcfg.mod new file mode 100644 index 0000000..d23f673 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/syslinuxcfg.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/terminal.lst b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/terminal.lst new file mode 100644 index 0000000..3c9a5a3 --- /dev/null +++ b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/terminal.lst @@ -0,0 +1,9 @@ +iat_keyboard: at_keyboard +iserial: serial +iserial_*: serial +oaudio: morse +ocbmemc: cbmemc +ogfxterm: gfxterm +oserial: serial +oserial_*: serial +ospkmodem: spkmodem diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/terminal.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/terminal.mod new file mode 100644 index 0000000..7f4de6f Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/terminal.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/terminfo.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/terminfo.mod new file mode 100644 index 0000000..e3e71a7 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/terminfo.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/test.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/test.mod new file mode 100644 index 0000000..7add04f Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/test.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/test_blockarg.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/test_blockarg.mod new file mode 100644 index 0000000..0eb1e3e Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/test_blockarg.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/testload.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/testload.mod new file mode 100644 index 0000000..ec90e09 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/testload.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/testspeed.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/testspeed.mod new file mode 100644 index 0000000..e0b44f0 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/testspeed.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/tftp.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/tftp.mod new file mode 100644 index 0000000..d63c608 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/tftp.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/tga.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/tga.mod new file mode 100644 index 0000000..be0bbc6 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/tga.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/time.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/time.mod new file mode 100644 index 0000000..6405047 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/time.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/tr.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/tr.mod new file mode 100644 index 0000000..fb511d0 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/tr.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/trig.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/trig.mod new file mode 100644 index 0000000..3b8a51c Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/trig.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/true.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/true.mod new file mode 100644 index 0000000..253c5e2 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/true.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/udf.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/udf.mod new file mode 100644 index 0000000..e8d9619 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/udf.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ufs1.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ufs1.mod new file mode 100644 index 0000000..ae9747a Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ufs1.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ufs1_be.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ufs1_be.mod new file mode 100644 index 0000000..b3acc19 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ufs1_be.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ufs2.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ufs2.mod new file mode 100644 index 0000000..e3e6436 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/ufs2.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/uhci.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/uhci.mod new file mode 100644 index 0000000..30b3028 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/uhci.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usb.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usb.mod new file mode 100644 index 0000000..377497d Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usb.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usb_keyboard.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usb_keyboard.mod new file mode 100644 index 0000000..3338013 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usb_keyboard.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usbms.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usbms.mod new file mode 100644 index 0000000..8287fef Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usbms.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usbserial_common.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usbserial_common.mod new file mode 100644 index 0000000..83203c2 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usbserial_common.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usbserial_ftdi.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usbserial_ftdi.mod new file mode 100644 index 0000000..2fc43b1 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usbserial_ftdi.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usbserial_pl2303.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usbserial_pl2303.mod new file mode 100644 index 0000000..a4aa4d2 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usbserial_pl2303.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usbserial_usbdebug.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usbserial_usbdebug.mod new file mode 100644 index 0000000..9ef4513 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usbserial_usbdebug.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usbtest.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usbtest.mod new file mode 100644 index 0000000..5fb6b55 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/usbtest.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/verify.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/verify.mod new file mode 100644 index 0000000..e8a94ec Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/verify.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/video.lst b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/video.lst new file mode 100644 index 0000000..ae9ba23 --- /dev/null +++ b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/video.lst @@ -0,0 +1,4 @@ +efi_gop +efi_uga +video_bochs +video_cirrus diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/video.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/video.mod new file mode 100644 index 0000000..64efcba Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/video.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/video_bochs.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/video_bochs.mod new file mode 100644 index 0000000..f9b477b Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/video_bochs.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/video_cirrus.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/video_cirrus.mod new file mode 100644 index 0000000..2388562 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/video_cirrus.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/video_colors.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/video_colors.mod new file mode 100644 index 0000000..efe09cc Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/video_colors.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/video_fb.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/video_fb.mod new file mode 100644 index 0000000..1afccc5 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/video_fb.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/videoinfo.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/videoinfo.mod new file mode 100644 index 0000000..308a252 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/videoinfo.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/videotest.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/videotest.mod new file mode 100644 index 0000000..e3ee09d Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/videotest.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/videotest_checksum.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/videotest_checksum.mod new file mode 100644 index 0000000..b4382b6 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/videotest_checksum.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/xfs.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/xfs.mod new file mode 100644 index 0000000..259c9c3 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/xfs.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/xnu.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/xnu.mod new file mode 100644 index 0000000..339bd8d Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/xnu.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/xnu_uuid.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/xnu_uuid.mod new file mode 100644 index 0000000..5ad6dc4 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/xnu_uuid.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/xnu_uuid_test.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/xnu_uuid_test.mod new file mode 100644 index 0000000..207c524 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/xnu_uuid_test.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/xzio.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/xzio.mod new file mode 100644 index 0000000..fef83d5 Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/xzio.mod differ diff --git a/linux-live/bootfiles-grub/boot/grub/x86_64-efi/zfscrypt.mod b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/zfscrypt.mod new file mode 100644 index 0000000..25aff7d Binary files /dev/null and b/linux-live/bootfiles-grub/boot/grub/x86_64-efi/zfscrypt.mod differ diff --git a/linux-live/bootfiles/boot/EFI/Boot/bootx64.efi b/linux-live/bootfiles/boot/EFI/Boot/bootx64.efi old mode 100755 new mode 100644 diff --git a/linux-live/bootfiles/boot/EFI/Boot/efiboot.img b/linux-live/bootfiles/boot/EFI/Boot/efiboot.img new file mode 100644 index 0000000..09f0b30 Binary files /dev/null and b/linux-live/bootfiles/boot/EFI/Boot/efiboot.img differ diff --git a/linux-live/bootfiles/boot/EFI/Boot/libcom32.c32 b/linux-live/bootfiles/boot/EFI/Boot/libcom32.c32 old mode 100755 new mode 100644 diff --git a/linux-live/bootfiles/boot/EFI/Boot/syslinux.cfg b/linux-live/bootfiles/boot/EFI/Boot/syslinux.cfg index 4f30e71..07d442c 100644 --- a/linux-live/bootfiles/boot/EFI/Boot/syslinux.cfg +++ b/linux-live/bootfiles/boot/EFI/Boot/syslinux.cfg @@ -27,16 +27,16 @@ MENU AUTOBOOT Press Esc for options, automatic boot in # second{,s} ... MENU TABMSG [F1] help [Tab] cmdline > LABEL default -MENU LABEL Run MiniOS Slax (Persistent changes) +MENU LABEL Run MiniOS (Persistent changes) KERNEL /minios/boot/vmlinuz APPEND vga=normal initrd=/minios/boot/initrfs.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 consoleblank=0 slax.flags=perch,automount net.ifnames=0 biosdevname=0 quiet LABEL live -MENU LABEL Run MiniOS Slax (Fresh start) +MENU LABEL Run MiniOS (Fresh start) KERNEL /minios/boot/vmlinuz APPEND vga=normal initrd=/minios/boot/initrfs.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 consoleblank=0 slax.flags=automount net.ifnames=0 biosdevname=0 quiet LABEL toram -MENU LABEL Run MiniOS Slax (Copy to RAM) +MENU LABEL Run MiniOS (Copy to RAM) KERNEL /minios/boot/vmlinuz APPEND vga=normal initrd=/minios/boot/initrfs.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 consoleblank=0 slax.flags=toram net.ifnames=0 biosdevname=0 quiet diff --git a/linux-live/bootfiles/boot/EFI/Boot/syslinux.efi b/linux-live/bootfiles/boot/EFI/Boot/syslinux.efi old mode 100755 new mode 100644 diff --git a/linux-live/bootfiles/boot/EFI/Boot/vesamenu.c32 b/linux-live/bootfiles/boot/EFI/Boot/vesamenu.c32 old mode 100755 new mode 100644 diff --git a/linux-live/bootfiles/boot/isohdpfx.bin b/linux-live/bootfiles/boot/isohdpfx.bin new file mode 100644 index 0000000..8937173 Binary files /dev/null and b/linux-live/bootfiles/boot/isohdpfx.bin differ diff --git a/linux-live/bootfiles/boot/syslinux.cfg b/linux-live/bootfiles/boot/syslinux.cfg index b922a0b..70b0f5e 100644 --- a/linux-live/bootfiles/boot/syslinux.cfg +++ b/linux-live/bootfiles/boot/syslinux.cfg @@ -27,16 +27,16 @@ MENU AUTOBOOT Press Esc for options, automatic boot in # second{,s} ... MENU TABMSG [F1] help [Tab] cmdline > LABEL default -MENU LABEL Run MiniOS Slax (Persistent changes) +MENU LABEL Run MiniOS (Persistent changes) KERNEL /minios/boot/vmlinuz APPEND vga=normal initrd=/minios/boot/initrfs.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 consoleblank=0 apparmor=0 selinux=0 minios.flags=perch net.ifnames=0 biosdevname=0 quiet LABEL live -MENU LABEL Run MiniOS Slax (Fresh start) +MENU LABEL Run MiniOS (Fresh start) KERNEL /minios/boot/vmlinuz APPEND vga=normal initrd=/minios/boot/initrfs.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 consoleblank=0 apparmor=0 selinux=0 minios.flags= net.ifnames=0 biosdevname=0 quiet LABEL toram -MENU LABEL Run MiniOS Slax (Copy to RAM) +MENU LABEL Run MiniOS (Copy to RAM) KERNEL /minios/boot/vmlinuz APPEND vga=normal initrd=/minios/boot/initrfs.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 consoleblank=0 apparmor=0 selinux=0 minios.flags=toram net.ifnames=0 biosdevname=0 quiet diff --git a/linux-live/bootinfo.txt b/linux-live/bootinfo.txt deleted file mode 100644 index a860f52..0000000 --- a/linux-live/bootinfo.txt +++ /dev/null @@ -1,24 +0,0 @@ -# This file gets copied to LiveKit ZIP build, in order to provide -# some basic information for the user - mostly hints to encourage -# the user to run /mylinux/boot/bootinst.sh(bat). -# -# Lines containing # are ignored -# -Thank you for using mylinux! -If you are reading this from a CD, it is already bootable. -Steps to make it bootable from your USB device are following: - -1) Copy the entire /mylinux/ directory to your USB drive. - If you are using Windows, you will get for example E:\mylinux\ - You probably already did this - just make sure you are on your - USB drive now and not on your local harddisk. - -2) Now navigate to directory /mylinux/boot/ on your USB drive. - In Windows, it will be E:\mylinux\boot\ for example. - Use explorer or any other file manager for this task. - -3) While you're in the boot directory, locate file bootinst.bat - Run it by doubleclicking it. It will setup your USB to boot. - --- That's it. Your USB device is now ready to boot mylinux. --- You can safely delete this file (readme.txt), it's not needed. diff --git a/linux-live/buildconfig b/linux-live/buildconfig index d647faf..57991e2 100644 --- a/linux-live/buildconfig +++ b/linux-live/buildconfig @@ -6,10 +6,12 @@ DISTRIBUTION_TYPE="debian" # distribution # дистрибутив -DISTRIBUTION="bullseye" +DISTRIBUTION="stretch" # distribution arch +# note: stretch only works with amd64 # архитектура дистрибутива +# для заметки: stretch работает только с amd64 DISTRIBUTION_ARCH="amd64" # bootstrap variant (used to build Ubuntu) @@ -17,12 +19,13 @@ DISTRIBUTION_ARCH="amd64" DISTRIBUTION_VARIANT="minbase" # -DISTRIBUTION_URL="http://ftp.ru.debian.org/debian/" +# если core, то выполнение скриптов не будет собирать модули. +#SYSTEM_TYPE="core" -# +# вариант системы, указывает на используемый список пакетов в модулях PACKAGE_VARIANT="standard" -# +# путь файла лога LOGPATH="/var/log" # default is output to log. you can use OUTPUT="/dev/stdout" if you want to route events to standard output. @@ -50,23 +53,35 @@ DEBIAN_FRONTEND_TYPE="noninteractive" #DEBIAN_FRONTEND_TYPE="text" APT_CMD="apt-get" +APT_OPTIONS="-y" -APT_OPTIONS="-y" -APT_OPTIONS2="--no-install-recommends" - +# не используется #LIVE_TYPE="casper" LIVE_TYPE="livekit" +# тип iso BOOT_TYPE="hybrid" #BOOT_TYPE="" +# тип union, используемый для сборки системы UNION_BUILD_TYPE="overlayfs" #UNION_BUILD_TYPE="aufs" -INSTALL_OPTIONAL="1" +# не используется? +#INSTALL_OPTIONAL="1" # Used when assigned to the ISO name when building Minios-Live SYSTEMNAME="MiniOS" -# +# Не используется? SYSTEMVER="2021" + +# использование готового файла bootstrap при установке. Если отсутствует, то скачивается и упаковывается. При последующих сборках распаковывается существующий файл bootstrap. +USE_BOOTSTRAP="1" +# использование готового файла rootfs при установке. Если отсутствует, то скачивается и упаковывается. При последующих сборках распаковывается существующий файл rootfs. +USE_ROOTFS="1" + +#ROOT_PASSWORD="uG5TYt5sIzHe" +ROOT_PASSWORD="toor" +USER_NAME="live" +USER_PASSWORD="evil" \ No newline at end of file diff --git a/linux-live/config b/linux-live/config index c430619..28eb0e9 100644 --- a/linux-live/config +++ b/linux-live/config @@ -14,8 +14,8 @@ # and you're done. LIVEKITNAME="minios" -# -COMP_TYPE="zstd" +# note: stretch only works with xz +COMP_TYPE="xz" # Kernel file, will be copied to your Live Kit # Your kernel must support aufs and squashfs. Debian Jessie's kernel is ready @@ -43,6 +43,12 @@ MKMOD="bin etc home lib lib64 opt root sbin srv usr var" # To enable, set to true NETWORK=true +# If you need support for VM drivers at boot time (QEMU KVM, VMware +# ESXi), you can enable it here. +# This is disabled by default since most people won't need it. +# To enable, set to true +CLOUD=false + # Temporary directory to store livekit filesystem LIVEKITDATA=/tmp/$LIVEKITNAME-data-$$ diff --git a/linux-live/initramfs/init b/linux-live/initramfs/init index 9098bcf..1e49867 100644 --- a/linux-live/initramfs/init +++ b/linux-live/initramfs/init @@ -26,6 +26,9 @@ init_devs init_aufs init_zram +# +modprobe_cloud + # modprobe all devices excluding network drivers modprobe_everything -v /drivers/net/ diff --git a/linux-live/initramfs/init.bak b/linux-live/initramfs/init.bak new file mode 100644 index 0000000..9098bcf --- /dev/null +++ b/linux-live/initramfs/init.bak @@ -0,0 +1,61 @@ +#!/bin/sh +# Initial script for Linux Live Kit +# Author: Tomas M + +export PATH=.:/:/usr/sbin:/usr/bin:/sbin:/bin + +. /lib/config +. /lib/livekitlib + +transfer_initramfs + +MEMORY=/memory +CHANGES=$MEMORY/changes +UNION=$MEMORY/union +DATAMNT=$MEMORY/data +BUNDLES=$MEMORY/bundles + +header "Live Kit init " + +init_proc_sysfs + +debug_start + debug_shell +# load some modules manually first, then modprobe everything we have +init_devs +init_aufs +init_zram + +# modprobe all devices excluding network drivers +modprobe_everything -v /drivers/net/ + +# find data dir with filesystem bundles +DATA="$(find_data 45 "$DATAMNT")" +check_data_found "$DATA" + debug_shell +# setup persistent changes, if possible +persistent_changes "$DATA" "$CHANGES" + debug_shell +# copy to RAM if needed +DATA="$(copy_to_ram "$DATA" "$CHANGES")" + +# mount bundles +mount_bundles "$DATA" "$BUNDLES" + debug_shell +# init aufs union, or setup overlayfs union +init_union "$CHANGES" "$UNION" "$BUNDLES" + +# add data to aufs union +union_append_bundles "$BUNDLES" "$UNION" + debug_shell +# rootcopy +copy_rootcopy_content "$DATA" "$UNION" + +# create fstab +fstab_create "$UNION" "$DATAMNT" + debug_shell +header "Live Kit done, starting $LIVEKITNAME" +change_root "$UNION" + +header "!!ERROR occured, you shouldn't be here.!!" +/bin/sh diff --git a/linux-live/initramfs/initramfs_create b/linux-live/initramfs/initramfs_create index da724e2..5c1a007 100755 --- a/linux-live/initramfs/initramfs_create +++ b/linux-live/initramfs/initramfs_create @@ -99,6 +99,34 @@ copy_including_deps /$LMK/kernel/drivers/staging/zsmalloc # needed by zram copy_including_deps /$LMK/kernel/drivers/block/zram copy_including_deps /$LMK/kernel/drivers/block/loop.* +: 'copy_including_deps /$LMK/kernel/drivers/block + copy_including_deps /$LMK/kernel/drivers/hv/hv_vmbus.* + copy_including_deps /$LMK/kernel/drivers/md/dm-mod.* + #copy_including_deps /$LMK/kernel/drivers/net/hyperv + #copy_including_deps /$LMK/kernel/drivers/net/ipvlan + copy_including_deps /$LMK/kernel/drivers/net/vmxnet3 + #copy_including_deps /$LMK/kernel/drivers/net/wireguard + #copy_including_deps /$LMK/kernel/drivers/net/eql.* + #copy_including_deps /$LMK/kernel/drivers/net/geneve.* + #copy_including_deps /$LMK/kernel/drivers/net/macsec.* + copy_including_deps /$LMK/kernel/drivers/net/net_failover.* + copy_including_deps /$LMK/kernel/drivers/net/netconsole.* + copy_including_deps /$LMK/kernel/drivers/net/nlmon.* + copy_including_deps /$LMK/kernel/drivers/net/tap.* + copy_including_deps /$LMK/kernel/drivers/net/virtio_net.* + copy_including_deps /$LMK/kernel/drivers/net/vrf.* + copy_including_deps /$LMK/kernel/drivers/net/vsockmon.* + copy_including_deps /$LMK/kernel/drivers/net/vxlan.* + #copy_including_deps /$LMK/kernel/drivers/net/xen-netfront.* + copy_including_deps /$LMK/kernel/drivers/pci/controller + copy_including_deps /$LMK/kernel/drivers/pps/pps_core.* + copy_including_deps /$LMK/kernel/drivers/ptp/ptp.* + copy_including_deps /$LMK/kernel/drivers/scsi + copy_including_deps /$LMK/kernel/drivers/virtio/virtio.* + copy_including_deps /$LMK/kernel/drivers/virtio/virtio_mmio.* + copy_including_deps /$LMK/kernel/drivers/virtio/virtio_pci.* + copy_including_deps /$LMK/kernel/drivers/virtio/virtio_ring.*' + # usb drivers copy_including_deps /$LMK/kernel/drivers/usb/storage/usb-storage.* copy_including_deps /$LMK/kernel/drivers/usb/host @@ -115,14 +143,28 @@ copy_including_deps /$LMK/kernel/drivers/scsi/sr_mod.* copy_including_deps /$LMK/kernel/drivers/scsi/sd_mod.* copy_including_deps /$LMK/kernel/drivers/scsi/scsi_mod.* copy_including_deps /$LMK/kernel/drivers/scsi/sg.* + +if [ "$CLOUD" = "true" ]; then + copy_including_deps /$LMK/kernel/drivers/virtio/virtio.* + copy_including_deps /$LMK/kernel/drivers/virtio/virtio_mmio.* + copy_including_deps /$LMK/kernel/drivers/virtio/virtio_pci.* + copy_including_deps /$LMK/kernel/drivers/virtio/virtio_ring.* + copy_including_deps /$LMK/kernel/drivers/scsi/vmw_pvscsi.* + copy_including_deps /$LMK/kernel/drivers/scsi/virtio_scsi.* + copy_including_deps /$LMK/kernel/drivers/block/virtio_blk.* +fi + copy_including_deps /$LMK/kernel/drivers/ata copy_including_deps /$LMK/kernel/drivers/nvme copy_including_deps /$LMK/kernel/drivers/mmc # network support drivers if [ "$NETWORK" = "true" ]; then - # add all known ethernet drivers copy_including_deps /$LMK/kernel/drivers/net/ethernet + if [ "$CLOUD" = "true" ]; then + copy_including_deps /$LMK/kernel/drivers/net/vmxnet3 + copy_including_deps /$LMK/kernel/drivers/net/virtio_net.* + fi fi # copy all custom-built modules diff --git a/linux-live/initramfs/initramfs_create.bak b/linux-live/initramfs/initramfs_create.bak new file mode 100755 index 0000000..da724e2 --- /dev/null +++ b/linux-live/initramfs/initramfs_create.bak @@ -0,0 +1,162 @@ +#!/bin/bash +# Create initramfs image +# Author: Tomas M +# + +. ../config + +INITRAMFS=/tmp/$LIVEKITNAME-initramfs-$$ + +# copy file to initramfs tree, including +# all library dependencies (as shown by ldd) +# $1 = file to copy (full path) +copy_including_deps() { + # if source doesn't exist or target exists, do nothing + if [ ! -e "$1" -o -e "$INITRAMFS"/"$1" ]; then + return + fi + + cp -R --parents "$1" "$INITRAMFS" + if [ -L "$1" ]; then + DIR="$(dirname "$1")" + LNK="$(readlink "$1")" + copy_including_deps "$( + cd "$DIR" + realpath -s "$LNK" + )" + fi + + ldd "$1" 2>/dev/null | sed -r "s/.*=>|[(].*//g" | sed -r "s/^\\s+|\\s+\$//" | + while read LIB; do + copy_including_deps "$LIB" + done + + for MOD in $(find "$1" -type f | grep .ko); do + for DEP in $(cat /$LMK/modules.dep | fgrep /$(basename $MOD):); do + copy_including_deps "/$LMK/$DEP" + done + done + + shift + if [ "$1" != "" ]; then + copy_including_deps "$@" + fi +} + +rm -Rf $INITRAMFS +mkdir -p $INITRAMFS/{bin,dev,etc,lib,lib64,mnt,proc,root,run,sys,tmp,usr,var/log} +ln -s bin $INITRAMFS/sbin + +cp static/busybox $INITRAMFS/bin +cp static/eject $INITRAMFS/bin +cp static/mount.dynfilefs $INITRAMFS/bin/@mount.dynfilefs +cp static/mount.httpfs2 $INITRAMFS/bin/@mount.httpfs2 +cp static/mount.ntfs-3g $INITRAMFS/bin/@mount.ntfs-3g +cp static/blkid $INITRAMFS/bin +chmod a+x $INITRAMFS/bin/* + +$INITRAMFS/bin/busybox | grep , | grep -v Copyright | tr "," " " | while read LINE; do + for TOOL in $LINE; do + if [ ! -e $INITRAMFS/bin/$TOOL ]; then + ln -s busybox $INITRAMFS/bin/$TOOL + fi + done +done +rm -f $INITRAMFS/{s,}bin/init + +mknod $INITRAMFS/dev/console c 5 1 +mknod $INITRAMFS/dev/null c 1 3 +mknod $INITRAMFS/dev/ram0 b 1 0 +mknod $INITRAMFS/dev/tty1 c 4 1 +mknod $INITRAMFS/dev/tty2 c 4 2 +mknod $INITRAMFS/dev/tty3 c 4 3 +mknod $INITRAMFS/dev/tty4 c 4 4 + +#copy_including_deps /usr/bin/strace +#copy_including_deps /usr/bin/lsof + +copy_including_deps /$LMK/kernel/fs/aufs +copy_including_deps /$LMK/kernel/fs/overlayfs +copy_including_deps /$LMK/kernel/fs/ext2 +copy_including_deps /$LMK/kernel/fs/ext3 +copy_including_deps /$LMK/kernel/fs/ext4 +copy_including_deps /$LMK/kernel/fs/fat +copy_including_deps /$LMK/kernel/fs/nls +copy_including_deps /$LMK/kernel/fs/fuse +copy_including_deps /$LMK/kernel/fs/isofs +copy_including_deps /$LMK/kernel/fs/ntfs +#copy_including_deps /$LMK/kernel/fs/reiserfs +copy_including_deps /$LMK/kernel/fs/squashfs +copy_including_deps /$LMK/kernel/fs/btrfs +copy_including_deps /$LMK/kernel/fs/xfs + +# crc32c is needed for ext4, but I don't know which one, add them all, they are small +find /$LMK/kernel/ | grep crc32c | while read LINE; do + copy_including_deps $LINE +done + +copy_including_deps /$LMK/kernel/drivers/staging/zsmalloc # needed by zram +copy_including_deps /$LMK/kernel/drivers/block/zram +copy_including_deps /$LMK/kernel/drivers/block/loop.* + +# usb drivers +copy_including_deps /$LMK/kernel/drivers/usb/storage/usb-storage.* +copy_including_deps /$LMK/kernel/drivers/usb/host +copy_including_deps /$LMK/kernel/drivers/usb/common +copy_including_deps /$LMK/kernel/drivers/usb/core +copy_including_deps /$LMK/kernel/drivers/hid/usbhid +copy_including_deps /$LMK/kernel/drivers/hid/hid.* +copy_including_deps /$LMK/kernel/drivers/hid/uhid.* +copy_including_deps /$LMK/kernel/drivers/hid/hid-generic.* + +# disk and cdrom drivers +copy_including_deps /$LMK/kernel/drivers/cdrom +copy_including_deps /$LMK/kernel/drivers/scsi/sr_mod.* +copy_including_deps /$LMK/kernel/drivers/scsi/sd_mod.* +copy_including_deps /$LMK/kernel/drivers/scsi/scsi_mod.* +copy_including_deps /$LMK/kernel/drivers/scsi/sg.* +copy_including_deps /$LMK/kernel/drivers/ata +copy_including_deps /$LMK/kernel/drivers/nvme +copy_including_deps /$LMK/kernel/drivers/mmc + +# network support drivers +if [ "$NETWORK" = "true" ]; then + # add all known ethernet drivers + copy_including_deps /$LMK/kernel/drivers/net/ethernet +fi + +# copy all custom-built modules +copy_including_deps /$LMK/updates + +copy_including_deps /$LMK/modules.* + +find $INITRAMFS -name "*.ko.gz" -exec gunzip {} \; + +# trim modules.order file. Perhaps we could remove it entirely +MODULEORDER="$( + cd "$INITRAMFS/$LMK/" + find -name "*.ko" | sed -r "s:^./::g" | tr "\n" "|" | sed -r "s:[.]:.:g" +)" +cat $INITRAMFS/$LMK/modules.order | sed -r "s/.ko.gz\$/.ko/" | grep -E "$MODULEORDER"/foo/bar >$INITRAMFS/$LMK/_ +mv $INITRAMFS/$LMK/_ $INITRAMFS/$LMK/modules.order + +depmod -b $INITRAMFS $KERNEL + +echo "root::0:0::/root:/bin/bash" >$INITRAMFS/etc/passwd +touch $INITRAMFS/etc/{m,fs}tab + +cp init $INITRAMFS +chmod a+x $INITRAMFS/init +cp shutdown $INITRAMFS +chmod a+x $INITRAMFS/shutdown +ln -s ../init $INITRAMFS/bin/init +cp ../livekitlib $INITRAMFS/lib/ +cp ../config $INITRAMFS/lib/ +cp ../buildconfig $INITRAMFS/lib/ + +cd $INITRAMFS +find . -print | cpio -o -H newc 2>/dev/null | xz -f --extreme --check=crc32 >$INITRAMFS.img +echo $INITRAMFS.img + +cd .. +rm -Rf $INITRAMFS diff --git a/linux-live/initrfs b/linux-live/initrfs old mode 100755 new mode 100644 diff --git a/linux-live/livekitlib b/linux-live/livekitlib index 2c4aba7..fea9bbf 100644 --- a/linux-live/livekitlib +++ b/linux-live/livekitlib @@ -133,6 +133,16 @@ init_proc_sysfs() { ln -sf /proc/mounts /etc/mtab } +# +modprobe_cloud() { + modprobe virtio 2>/dev/null + modprobe virtio_ring 2>/dev/null + modprobe virtio_pci 2>/dev/null + modprobe virtio_blk 2>/dev/null + modprobe virtio_scsi 2>/dev/null + modprobe vmw_pvscsi 2>/dev/null +} + # modprobe all modules found in initial ramdisk # $1 = -e for match, -v for negative match # $2 = regex pattern @@ -335,7 +345,8 @@ init_network_dev() { for MODULE in 3c59x acenic e1000 e1000e e100 epic100 hp100 ne2k-pci \ pcnet32 8139too 8139cp tulip via-rhine r8169 atl1e yellowfin tg3 \ - dl2k ns83820 atl1 b44 bnx2 skge sky2 tulip forcedeth sb1000 sis900; do + dl2k ns83820 atl1 b44 bnx2 skge sky2 tulip forcedeth sb1000 sis900 \ + vmxnet3 virtio_net; do modprobe $MODULE 2>/dev/null ETH="$(network_device)" if [ "$ETH" != "" ]; then @@ -477,6 +488,7 @@ find_data_try() { mkdir -p "$1" # patch from Jeff Baitis: Problem is that livekitlib's blkid command cannot detect /dev/nvme devices. blkid /dev/* | sort | cut -d: -f 1 | grep -E -v "/loop|/ram|/zram" | while read DEVICE; do + #blkid | sort | cut -d: -f 1 | grep -E -v "/loop|/ram|/zram" | while read DEVICE; do FROM="$2" FS="$(device_bestfs "$DEVICE")" OPTIONS="$(fs_options $FS)" @@ -752,6 +764,7 @@ fstab_create() { # patch from Jeff Baitis: Problem is that livekitlib's blkid command cannot detect /dev/nvme devices. blkid /dev/* | grep -v "^/dev/loop" | grep -v "^/dev/zram" | cut -d: -f 1 | while read DEVICE; do + #blkid | grep -v "^/dev/loop" | grep -v "^/dev/zram" | cut -d: -f 1 | while read DEVICE; do FS="$(device_bestfs $DEVICE)" LABEL="$(basename $DEVICE)" OPTS="defaults,noatime,nofail,x-systemd.device-timeout=10" @@ -773,7 +786,9 @@ change_root() { # accessible on union without any further lookup down, else httpfs locks if [ "$(network_device)" != "" ]; then touch "/net.up.flag" - touch "$1/etc/resolv.conf" + if [ ! -f $1/etc/resolv.conf ]; then + touch "$1/etc/resolv.conf" + fi touch "$1/etc/hosts" touch "$1/etc/gai.conf" fi diff --git a/linux-live/minioslib b/linux-live/minioslib index f3ecc11..71566d7 100644 --- a/linux-live/minioslib +++ b/linux-live/minioslib @@ -11,33 +11,50 @@ # ================================================================= function common_variables() { - # - CONTAINER_TYPE="0" - set +u - if [ -z $container ]; then - container="" - fi - set -u - : 'if [ -f /.dockerenv ] || [ "$container" = "podman" ]; then + # + CONTAINER_TYPE="0" + set +u + if [ -z $container ]; then + container="" + fi + if [ -z $SYSTEM_TYPE ]; then + SYSTEM_TYPE="" + fi + if [ -z $CLOUD ]; then + CLOUD=false + fi + set -u + : 'if [ -f /.dockerenv ] || [ "$container" = "podman" ]; then OUTPUT="/dev/stdout" #CONTAINER="docker" fi' - if [ -f /.dockerenv ] || [ "$container" = "podman" ] && [ ! -d /opt/minios-live ] && [ ! -f /.minios-live-container ]; then - CONTAINER_TYPE="1" - fi - if [[ (-f /.dockerenv || "$container" = "podman") && (-d /opt/minios-live || -f /.minios-live-container) ]]; then - CONTAINER_TYPE="2" - fi - - if [ $DISTRIBUTION_ARCH = "amd64" ]; then - KERNEL_ARCH="amd64" - #PACKAGE_VARIANT="standard" - elif [ $DISTRIBUTION_ARCH = "i386" ]; then - KERNEL_ARCH="686-pae" - PACKAGE_VARIANT="minimal" - elif [ $DISTRIBUTION_ARCH = "arm64" ]; then - KERNEL_ARCH="arm64" - fi + if [ -f /.dockerenv ] || [ "$container" = "podman" ] && [ ! -d /opt/minios-live ] && [ ! -f /.minios-live-container ]; then + CONTAINER_TYPE="1" + fi + if [[ (-f /.dockerenv || "$container" = "podman") && (-d /opt/minios-live || -f /.minios-live-container) ]]; then + CONTAINER_TYPE="2" + fi + + if [ $DISTRIBUTION_ARCH = "amd64" ]; then + KERNEL_ARCH="amd64" + #PACKAGE_VARIANT="standard" + elif [ $DISTRIBUTION_ARCH = "i386" ]; then + KERNEL_ARCH="686-pae" + PACKAGE_VARIANT="minimal" + elif [ $DISTRIBUTION_ARCH = "arm64" ]; then + KERNEL_ARCH="arm64" + fi + + if [ $CLOUD = "true" ]; then + PACKAGE_VARIANT="cloud" + fi + + if [ $DISTRIBUTION_TYPE = "debian" ]; then + DISTRIBUTION_URL="http://ftp.debian.org/debian" + elif [ $DISTRIBUTION_TYPE = "ubuntu" ]; then + DISTRIBUTION_URL="http://archive.ubuntu.com/ubuntu" + fi + } # ================================================================= @@ -47,7 +64,7 @@ function common_variables() { # ================================================================= function current_process() { - echo -e "${LIGHTYELLOW}=====> running ${CYAN}${CMD[ii]}${ENDCOLOUR}${LIGHTYELLOW} ...${ENDCOLOUR}" + echo -e "${LIGHTYELLOW}=====> running ${CYAN}${CMD[ii]}${ENDCOLOUR}${LIGHTYELLOW} ...${ENDCOLOUR}" } # ================================================================= @@ -55,27 +72,27 @@ function current_process() { # красивая консоль # ================================================================= function console_colours() { - RED="\e[31m" - GREEN="\e[32m" - YELLOW="\e[33m" - BLUE="\e[34m" - MAGENTA="\e[35m" - CYAN="\e[36m" - LIGHTGRAY="\e[37m" - DARKGRAY="\e[90m" - LIGHTRED="\e[91m" - LIGHTGREEN="\e[92m" - LIGHTYELLOW="\e[93m" - LIGHTBLUE="\e[94m" - LIGHTMAGENTA="\e[95m" - LIGHTCYAN="\e[96m" - BOLD="\e[1m" - DIM="\e[2m" - UNDERLINED="\e[4m" - BLINK="\e[5m" - REVERSE="\e[7m" - HIDDEN="\e[8m" - ENDCOLOUR="\e[0m" + RED="\e[31m" + GREEN="\e[32m" + YELLOW="\e[33m" + BLUE="\e[34m" + MAGENTA="\e[35m" + CYAN="\e[36m" + LIGHTGRAY="\e[37m" + DARKGRAY="\e[90m" + LIGHTRED="\e[91m" + LIGHTGREEN="\e[92m" + LIGHTYELLOW="\e[93m" + LIGHTBLUE="\e[94m" + LIGHTMAGENTA="\e[95m" + LIGHTCYAN="\e[96m" + BOLD="\e[1m" + DIM="\e[2m" + UNDERLINED="\e[4m" + BLINK="\e[5m" + REVERSE="\e[7m" + HIDDEN="\e[8m" + ENDCOLOUR="\e[0m" } # ================================================================= @@ -83,60 +100,60 @@ function console_colours() { # функции помощи # ================================================================= function help() { - # if $1 is set, use $1 as headline message in help() - if grep 'LANG="ru_RU.UTF-8"' /etc/default/locale >/dev/null 2>&1; then - if [ -z ${1+x} ]; then - echo -e "${LIGHTYELLOW}Этот скрипт собирает загружаемый ISO образ $SYSTEMNAME.${ENDCOLOUR}" - echo -e - else - echo -e $1 - echo - fi - echo -e "Поддерживаемые команды : ${CYAN}${CMD[*]}${ENDCOLOUR}" - echo -e - echo -e "Синтаксис: ${MAGENTA}$0${ENDCOLOUR} [start_cmd] [-] [end_cmd]" - if [ -L /usr/bin/$LIVEKITNAME-install ] && [ "$0" != "/usr/bin/$LIVEKITNAME-install" ]; then - echo -e "\t${CYAN}$LIVEKITNAME-install${ENDCOLOUR} [start_cmd] [-] [end_cmd]" - fi - echo -e "\tзапуск от start_cmd до end_cmd" - echo -e "\tесли start_cmd опущен, выполняются все команды, начиная с первой" - echo -e "\tесли end_cmd опущен, выполняются все команды до последней" - echo -e "\tвведите одну команду, чтобы запустить определенную команду" - echo -e "\tвведите '-' как единственный аргумент для запуска всех команд" - echo -e "\t" - echo -e "\tПримеры:${LIGHTYELLOW}$0 build_bootstrap - build_chroot${ENDCOLOUR}" - echo -e "\t\t${LIGHTYELLOW}$0 - build_chroot${ENDCOLOUR}" - echo -e "\t\t${LIGHTYELLOW}$0 build_bootstrap -${ENDCOLOUR}" - echo -e "\t\t${LIGHTYELLOW}$0 build_iso${ENDCOLOUR}" - echo -e "\t\t${LIGHTYELLOW}$0 -${ENDCOLOUR}" - exit 0 - else - if [ -z ${1+x} ]; then - echo -e "${LIGHTYELLOW}This script builds bootable $SYSTEMNAME ISO image.${ENDCOLOUR}" - echo -e - else - echo -e $1 - echo - fi - echo -e "Supported commands : ${CYAN}${CMD[*]}${ENDCOLOUR}" - echo -e - echo -e "Syntax: ${MAGENTA}$0${ENDCOLOUR} [start_cmd] [-] [end_cmd]" - if [ -L /usr/bin/$LIVEKITNAME-install ] && [ "$0" != "/usr/bin/$LIVEKITNAME-install" ]; then - echo -e "\t${CYAN}$LIVEKITNAME-install${ENDCOLOUR} [start_cmd] [-] [end_cmd]" - fi - echo -e "\trun from start_cmd to end_cmd" - echo -e "\tif start_cmd is omitted, start from first command" - echo -e "\tif end_cmd is omitted, end with last command" - echo -e "\tenter single cmd to run the specific command" - echo -e "\tenter '-' as only argument to run all commands" - echo -e "\t" - echo -e "\tExamples:${LIGHTYELLOW}$0 build_bootstrap - build_chroot${ENDCOLOUR}" - echo -e "\t\t${LIGHTYELLOW}$0 - build_chroot${ENDCOLOUR}" - echo -e "\t\t${LIGHTYELLOW}$0 build_bootstrap -${ENDCOLOUR}" - echo -e "\t\t${LIGHTYELLOW}$0 build_iso${ENDCOLOUR}" - echo -e "\t\t${LIGHTYELLOW}$0 -${ENDCOLOUR}" - exit 0 - fi + # if $1 is set, use $1 as headline message in help() + if grep 'LANG="ru_RU.UTF-8"' /etc/default/locale >/dev/null 2>&1; then + if [ -z ${1+x} ]; then + echo -e "${LIGHTYELLOW}Этот скрипт собирает загружаемый ISO образ $SYSTEMNAME.${ENDCOLOUR}" + echo -e + else + echo -e $1 + echo + fi + echo -e "Поддерживаемые команды : ${CYAN}${CMD[*]}${ENDCOLOUR}" + echo -e + echo -e "Синтаксис: ${MAGENTA}$0${ENDCOLOUR} [start_cmd] [-] [end_cmd]" + if [ -L /usr/bin/$LIVEKITNAME-install ] && [ "$0" != "/usr/bin/$LIVEKITNAME-install" ]; then + echo -e "\t${CYAN}$LIVEKITNAME-install${ENDCOLOUR} [start_cmd] [-] [end_cmd]" + fi + echo -e "\tзапуск от start_cmd до end_cmd" + echo -e "\tесли start_cmd опущен, выполняются все команды, начиная с первой" + echo -e "\tесли end_cmd опущен, выполняются все команды до последней" + echo -e "\tвведите одну команду, чтобы запустить определенную команду" + echo -e "\tвведите '-' как единственный аргумент для запуска всех команд" + echo -e "\t" + echo -e "\tПримеры:${LIGHTYELLOW}$0 build_bootstrap - build_chroot${ENDCOLOUR}" + echo -e "\t\t${LIGHTYELLOW}$0 - build_chroot${ENDCOLOUR}" + echo -e "\t\t${LIGHTYELLOW}$0 build_bootstrap -${ENDCOLOUR}" + echo -e "\t\t${LIGHTYELLOW}$0 build_iso${ENDCOLOUR}" + echo -e "\t\t${LIGHTYELLOW}$0 -${ENDCOLOUR}" + exit 0 + else + if [ -z ${1+x} ]; then + echo -e "${LIGHTYELLOW}This script builds bootable $SYSTEMNAME ISO image.${ENDCOLOUR}" + echo -e + else + echo -e $1 + echo + fi + echo -e "Supported commands : ${CYAN}${CMD[*]}${ENDCOLOUR}" + echo -e + echo -e "Syntax: ${MAGENTA}$0${ENDCOLOUR} [start_cmd] [-] [end_cmd]" + if [ -L /usr/bin/$LIVEKITNAME-install ] && [ "$0" != "/usr/bin/$LIVEKITNAME-install" ]; then + echo -e "\t${CYAN}$LIVEKITNAME-install${ENDCOLOUR} [start_cmd] [-] [end_cmd]" + fi + echo -e "\trun from start_cmd to end_cmd" + echo -e "\tif start_cmd is omitted, start from first command" + echo -e "\tif end_cmd is omitted, end with last command" + echo -e "\tenter single cmd to run the specific command" + echo -e "\tenter '-' as only argument to run all commands" + echo -e "\t" + echo -e "\tExamples:${LIGHTYELLOW}$0 build_bootstrap - build_chroot${ENDCOLOUR}" + echo -e "\t\t${LIGHTYELLOW}$0 - build_chroot${ENDCOLOUR}" + echo -e "\t\t${LIGHTYELLOW}$0 build_bootstrap -${ENDCOLOUR}" + echo -e "\t\t${LIGHTYELLOW}$0 build_iso${ENDCOLOUR}" + echo -e "\t\t${LIGHTYELLOW}$0 -${ENDCOLOUR}" + exit 0 + fi } # ================================================================= @@ -144,15 +161,15 @@ function help() { # разбор входных команд # ================================================================= function find_index() { - local ret - local i - for ((i = 0; i < ${#CMD[*]}; i++)); do - if [ "${CMD[i]}" == "$1" ]; then - index=$i - return - fi - done - help "Command not found : $1" + local ret + local i + for ((i = 0; i < ${#CMD[*]}; i++)); do + if [ "${CMD[i]}" == "$1" ]; then + index=$i + return + fi + done + help "Command not found : $1" } # ================================================================= @@ -162,36 +179,36 @@ function find_index() { # использования автодополнения в командной строке # ================================================================= function create_livekitname_install_symlink() { - if [ -L /usr/bin/$LIVEKITNAME-install ]; then - if [ "$(readlink /usr/bin/$LIVEKITNAME-install)" != "$SCRIPT_DIR/install" ]; then - rm -f /usr/bin/$LIVEKITNAME-install - ln -s $SCRIPT_DIR/install /usr/bin/$LIVEKITNAME-install - if grep 'LANG="ru_RU.UTF-8"' /etc/default/locale >/dev/null 2>&1; then - echo -e "Символическая ссылка ${MAGENTA}/usr/bin/$LIVEKITNAME-install${ENDCOLOUR} была обновлена." - echo -e "Теперь она указывает на ${MAGENTA}$SCRIPT_DIR/install${ENDCOLOUR}." - else - echo -e "The ${MAGENTA}/usr/bin/$LIVEKITNAME-install${ENDCOLOUR} symbolic link has been updated." - echo -e "It now points to ${MAGENTA}$SCRIPT_DIR/install${ENDCOLOUR}." - fi - fi - if [ "$0" != "/usr/bin/$LIVEKITNAME-install" ]; then - if grep 'LANG="ru_RU.UTF-8"' /etc/default/locale >/dev/null 2>&1; then - echo -e "Вы можете использовать команду ${CYAN}$LIVEKITNAME-install${ENDCOLOUR} для запуска этой программы." - else - echo -e "You can use the ${CYAN}$LIVEKITNAME-install${ENDCOLOUR} command to run this program." - fi - fi - else - ln -s $SCRIPT_DIR/install /usr/bin/$LIVEKITNAME-install - if grep 'LANG="ru_RU.UTF-8"' /etc/default/locale >/dev/null 2>&1; then - echo -e "Символическая ссылка ${MAGENTA}/usr/bin/$LIVEKITNAME-install${ENDCOLOUR} была добавлена" - echo -e "для ${MAGENTA}$SCRIPT_DIR/install${ENDCOLOUR}." - - else - echo -e "The ${MAGENTA}/usr/bin/$LIVEKITNAME-install${ENDCOLOUR} symbolic link has been added" - echo -e "for ${MAGENTA}$SCRIPT_DIR/install${ENDCOLOUR}." - fi - fi + if [ -L /usr/bin/$LIVEKITNAME-install ]; then + if [ "$(readlink /usr/bin/$LIVEKITNAME-install)" != "$SCRIPT_DIR/install" ]; then + rm -f /usr/bin/$LIVEKITNAME-install + ln -s $SCRIPT_DIR/install /usr/bin/$LIVEKITNAME-install + if grep 'LANG="ru_RU.UTF-8"' /etc/default/locale >/dev/null 2>&1; then + echo -e "Символическая ссылка ${MAGENTA}/usr/bin/$LIVEKITNAME-install${ENDCOLOUR} была обновлена." + echo -e "Теперь она указывает на ${MAGENTA}$SCRIPT_DIR/install${ENDCOLOUR}." + else + echo -e "The ${MAGENTA}/usr/bin/$LIVEKITNAME-install${ENDCOLOUR} symbolic link has been updated." + echo -e "It now points to ${MAGENTA}$SCRIPT_DIR/install${ENDCOLOUR}." + fi + fi + if [ "$0" != "/usr/bin/$LIVEKITNAME-install" ]; then + if grep 'LANG="ru_RU.UTF-8"' /etc/default/locale >/dev/null 2>&1; then + echo -e "Вы можете использовать команду ${CYAN}$LIVEKITNAME-install${ENDCOLOUR} для запуска этой программы." + else + echo -e "You can use the ${CYAN}$LIVEKITNAME-install${ENDCOLOUR} command to run this program." + fi + fi + else + ln -s $SCRIPT_DIR/install /usr/bin/$LIVEKITNAME-install + if grep 'LANG="ru_RU.UTF-8"' /etc/default/locale >/dev/null 2>&1; then + echo -e "Символическая ссылка ${MAGENTA}/usr/bin/$LIVEKITNAME-install${ENDCOLOUR} была добавлена" + echo -e "для ${MAGENTA}$SCRIPT_DIR/install${ENDCOLOUR}." + + else + echo -e "The ${MAGENTA}/usr/bin/$LIVEKITNAME-install${ENDCOLOUR} symbolic link has been added" + echo -e "for ${MAGENTA}$SCRIPT_DIR/install${ENDCOLOUR}." + fi + fi } # ================================================================= @@ -199,23 +216,23 @@ function create_livekitname_install_symlink() { # создание автодополнения в командной строке # ================================================================= function create_completion() { - if [ -d /etc/bash_completion.d ]; then - if [ ! -f /etc/bash_completion.d/$LIVEKITNAME-install ] || ! grep "${CMD[*]}" /etc/bash_completion.d/$LIVEKITNAME-install >/dev/null 2>&1; then - cat </etc/bash_completion.d/$LIVEKITNAME-install + if [ -d /etc/bash_completion.d ]; then + if [ ! -f /etc/bash_completion.d/$LIVEKITNAME-install ] || ! grep "${CMD[*]}" /etc/bash_completion.d/$LIVEKITNAME-install >/dev/null 2>&1; then + cat </etc/bash_completion.d/$LIVEKITNAME-install #/usr/bin/env bash complete -W "${CMD[*]}" $LIVEKITNAME-install EOF - fi - if [ "$0" != "/usr/bin/$LIVEKITNAME-install" ]; then - if grep 'LANG="ru_RU.UTF-8"' /etc/default/locale >/dev/null 2>&1; then - echo -e "Дополнение команд работает только при использовании команды ${CYAN}$LIVEKITNAME-install${ENDCOLOUR}." - echo -e - else - echo -e "Command completion only works when using the ${CYAN}$LIVEKITNAME-install${ENDCOLOUR} command." - echo -e - fi - fi - fi + fi + if [ "$0" != "/usr/bin/$LIVEKITNAME-install" ]; then + if grep 'LANG="ru_RU.UTF-8"' /etc/default/locale >/dev/null 2>&1; then + echo -e "Дополнение команд работает только при использовании команды ${CYAN}$LIVEKITNAME-install${ENDCOLOUR}." + echo -e + else + echo -e "Command completion only works when using the ${CYAN}$LIVEKITNAME-install${ENDCOLOUR} command." + echo -e + fi + fi + fi } # ================================================================= @@ -224,13 +241,13 @@ EOF # ================================================================= function allow_root_only() { - if [ $(id -u) -ne 0 ]; then - echo -e "${BOLD}${RED}This script should be run as 'root'!${ENDCOLOUR}" - exit 1 - fi + if [ $(id -u) -ne 0 ]; then + echo -e "${BOLD}${RED}This script should be run as 'root'!${ENDCOLOUR}" + exit 1 + fi - export HOME=/root - export LC_ALL=C + export HOME=/root + export LC_ALL=C } # ================================================================= @@ -239,10 +256,10 @@ function allow_root_only() { # ================================================================= function check_is_in_chroot() { - if [ $(stat -c %i /)="2" ]; then - echo -e "${BOLD}${RED}This script should be run inside chroot only!${ENDCOLOUR}" - exit 1 - fi + if [ $(stat -c %i /)="2" ]; then + echo -e "${BOLD}${RED}This script should be run inside chroot only!${ENDCOLOUR}" + exit 1 + fi } # ================================================================= @@ -251,21 +268,21 @@ function check_is_in_chroot() { # ================================================================= function check_mounted() { - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - if grep -qs "$BUILD_DIR/dev" /proc/mounts || grep -qs "$BUILD_DIR/run" /proc/mounts || grep -qs "$BUILD_DIR/proc" /proc/mounts || grep -qs "$BUILD_DIR/sys" /proc/mounts || grep -qs "$BUILD_DIR/dev/pts" /proc/mounts || grep -qs "$BUILD_DIR/tmp" /proc/mounts; then - echo -e "${BOLD}${LIGHTYELLOW}Сhroot contains mounted filesystems.${ENDCOLOUR}" - if [ "$UNATTENDED" = "1" ]; then - chroot_umount_fs - else - read -r -p "$(echo -e ""Do you want to ${GREEN}unmount them${ENDCOLOUR}? [${BOLD}${GREEN}Y${ENDCOLOUR}/n])" response - response=${response,,} - if [[ "$response" =~ ^(no|n)$ ]]; then - exit 1 - else - chroot_umount_fs - fi - fi - fi + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + if grep -qs "$BUILD_DIR/dev" /proc/mounts || grep -qs "$BUILD_DIR/run" /proc/mounts || grep -qs "$BUILD_DIR/proc" /proc/mounts || grep -qs "$BUILD_DIR/sys" /proc/mounts || grep -qs "$BUILD_DIR/dev/pts" /proc/mounts || grep -qs "$BUILD_DIR/tmp" /proc/mounts; then + echo -e "${BOLD}${LIGHTYELLOW}Сhroot contains mounted filesystems.${ENDCOLOUR}" + if [ "$UNATTENDED" = "1" ]; then + chroot_umount_fs + else + read -r -p "$(echo -e ""Do you want to ${GREEN}unmount them${ENDCOLOUR}? [${BOLD}${GREEN}Y${ENDCOLOUR}/n])" response + response=${response,,} + if [[ "$response" =~ ^(no|n)$ ]]; then + exit 1 + else + chroot_umount_fs + fi + fi + fi } # ================================================================= @@ -274,41 +291,41 @@ function check_mounted() { # ================================================================= function check_build_dir() { - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - if [ "$UNATTENDED" = "1" ]; then - #echo -e "${RED}!!!Unattended installation!!!${ENDCOLOUR}" - BUILD_DIR="/build/$DISTRIBUTION" - echo -e "The working directory is ${MAGENTA}$BUILD_DIR${ENDCOLOUR}." - if [ "$(ls -A $BUILD_DIR)" != "" ]; then - cleanup - check_mounted - fi - else - # ▼ должно быть только перенаправление ошибки! - if [ "$(ls -A $BUILD_DIR)" != "" ]; then - echo -e "${MAGENTA}$BUILD_DIR${ENDCOLOUR} is not empty." - cleanup - check_mounted - if [ ! -d "$BUILD_DIR" ]; then - mkdir -p $BUILD_DIR - fi - BUILD_DIR="$( - cd $BUILD_DIR - pwd - )" - echo $BUILD_DIR >$SCRIPT_DIR/.build_dir && chmod 644 $SCRIPT_DIR/.build_dir - echo -e "The working directory is ${MAGENTA}$BUILD_DIR${ENDCOLOUR}." - else - mkdir -p $BUILD_DIR - check_mounted - BUILD_DIR="$( - cd $BUILD_DIR - pwd - )" - echo $BUILD_DIR >$SCRIPT_DIR/.build_dir && chmod 644 $SCRIPT_DIR/.build_dir - echo -e "The working directory is ${MAGENTA}$BUILD_DIR${ENDCOLOUR}." - fi - fi + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + if [ "$UNATTENDED" = "1" ]; then + #echo -e "${RED}!!!Unattended installation!!!${ENDCOLOUR}" + BUILD_DIR="/build/$DISTRIBUTION" + echo -e "The working directory is ${MAGENTA}$BUILD_DIR${ENDCOLOUR}." + if [ "$(ls -A $BUILD_DIR)" != "" ]; then + cleanup + check_mounted + fi + else + # ▼ должно быть только перенаправление ошибки! + if [ "$(ls -A $BUILD_DIR)" != "" ]; then + echo -e "${MAGENTA}$BUILD_DIR${ENDCOLOUR} is not empty." + cleanup + check_mounted + if [ ! -d "$BUILD_DIR" ]; then + mkdir -p $BUILD_DIR + fi + BUILD_DIR="$( + cd $BUILD_DIR + pwd + )" + echo $BUILD_DIR >$SCRIPT_DIR/.build_dir && chmod 644 $SCRIPT_DIR/.build_dir + echo -e "The working directory is ${MAGENTA}$BUILD_DIR${ENDCOLOUR}." + else + mkdir -p $BUILD_DIR + check_mounted + BUILD_DIR="$( + cd $BUILD_DIR + pwd + )" + echo $BUILD_DIR >$SCRIPT_DIR/.build_dir && chmod 644 $SCRIPT_DIR/.build_dir + echo -e "The working directory is ${MAGENTA}$BUILD_DIR${ENDCOLOUR}." + fi + fi } # ================================================================= @@ -317,40 +334,40 @@ function check_build_dir() { # ================================================================= function setup_build_dir() { - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - if [ "$UNATTENDED" = "1" ] && [ "$BUILD_DIR" = "" ]; then - BUILD_DIR="/build/$DISTRIBUTION" - check_build_dir - else - if [ "$BUILD_DIR" = "" ]; then - if [ ! -f "$SCRIPT_DIR/.build_dir" ]; then - echo "Enter the address of the working directory where we will build the system" - read -r -p "$(echo -e "(Default is ${MAGENTA}$PARENT_DIR/$DISTRIBUTION${ENDCOLOUR}): ")" response - BUILD_DIR=${response,,} - if [ "$BUILD_DIR" = "" ]; then - BUILD_DIR=$PARENT_DIR/$DISTRIBUTION - fi - check_build_dir - else - LAST_BUILD_DIR=$(cat "$SCRIPT_DIR/.build_dir") - echo -e "Last time you used the build directory ${MAGENTA}$LAST_BUILD_DIR${ENDCOLOUR}." - read -r -p "$(echo -e ""Do you want to use it again? [${BOLD}${GREEN}Y${ENDCOLOUR}/n])" response - response=${response,,} - if [[ "$response" =~ ^(no|n)$ ]]; then - echo "Enter the address of the working directory where we will build the system" - read -r -p "$(echo -e "(Default is ${MAGENTA}$PARENT_DIR/$DISTRIBUTION${ENDCOLOUR}): ")" response - BUILD_DIR=${response,,} - if [ "$BUILD_DIR" = "" ]; then - BUILD_DIR=$PARENT_DIR/$DISTRIBUTION - fi - check_build_dir - else - BUILD_DIR="$LAST_BUILD_DIR" - check_build_dir - fi - fi - fi - fi + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + if [ "$UNATTENDED" = "1" ] && [ "$BUILD_DIR" = "" ]; then + BUILD_DIR="/build/$DISTRIBUTION" + check_build_dir + else + if [ "$BUILD_DIR" = "" ]; then + if [ ! -f "$SCRIPT_DIR/.build_dir" ]; then + echo "Enter the address of the working directory where we will build the system" + read -r -p "$(echo -e "(Default is ${MAGENTA}$PARENT_DIR/$DISTRIBUTION${ENDCOLOUR}): ")" response + BUILD_DIR=${response,,} + if [ "$BUILD_DIR" = "" ]; then + BUILD_DIR=$PARENT_DIR/$DISTRIBUTION + fi + check_build_dir + else + LAST_BUILD_DIR=$(cat "$SCRIPT_DIR/.build_dir") + echo -e "Last time you used the build directory ${MAGENTA}$LAST_BUILD_DIR${ENDCOLOUR}." + read -r -p "$(echo -e ""Do you want to use it again? [${BOLD}${GREEN}Y${ENDCOLOUR}/n])" response + response=${response,,} + if [[ "$response" =~ ^(no|n)$ ]]; then + echo "Enter the address of the working directory where we will build the system" + read -r -p "$(echo -e "(Default is ${MAGENTA}$PARENT_DIR/$DISTRIBUTION${ENDCOLOUR}): ")" response + BUILD_DIR=${response,,} + if [ "$BUILD_DIR" = "" ]; then + BUILD_DIR=$PARENT_DIR/$DISTRIBUTION + fi + check_build_dir + else + BUILD_DIR="$LAST_BUILD_DIR" + check_build_dir + fi + fi + fi + fi } # ================================================================= @@ -358,29 +375,29 @@ function setup_build_dir() { # очистка папки для сборки # ================================================================= function cleanup() { - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - if [ "${CMD[ii]}" = "setup_host" ] || [ "${CMD[ii]}" = "build_bootstrap" ] || [ "${CMD[ii]}" = "build_chroot" ]; then - if [ "$UNATTENDED" = "1" ]; then - check_mounted - rm -rf $BUILD_DIR - if [ -d "$BUILD_DIR" ]; then - cleanup - fi - else - read -r -p "$(echo -e ""Do you want to ${BOLD}${RED}completely remove content${ENDCOLOUR} of ${MAGENTA}$BUILD_DIR${ENDCOLOUR}? [y/${BOLD}${GREEN}N${ENDCOLOUR}])" response - response=${response,,} - if [[ "$response" =~ ^(yes|y)$ ]]; then - check_mounted - rm -rf $BUILD_DIR - if [ -d "$BUILD_DIR" ]; then - cleanup - fi - else - echo -e "${MAGENTA}$BUILD_DIR${ENDCOLOUR} should be empty to continue." - exit 1 - fi - fi - fi + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + if [ "${CMD[ii]}" = "setup_host" ] || [ "${CMD[ii]}" = "build_bootstrap" ] || [ "${CMD[ii]}" = "build_chroot" ]; then + if [ "$UNATTENDED" = "1" ]; then + check_mounted + rm -rf $BUILD_DIR + if [ -d "$BUILD_DIR" ]; then + cleanup + fi + else + read -r -p "$(echo -e ""Do you want to ${BOLD}${RED}completely remove content${ENDCOLOUR} of ${MAGENTA}$BUILD_DIR${ENDCOLOUR}? [y/${BOLD}${GREEN}N${ENDCOLOUR}])" response + response=${response,,} + if [[ "$response" =~ ^(yes|y)$ ]]; then + check_mounted + rm -rf $BUILD_DIR + if [ -d "$BUILD_DIR" ]; then + cleanup + fi + else + echo -e "${MAGENTA}$BUILD_DIR${ENDCOLOUR} should be empty to continue." + exit 1 + fi + fi + fi } # ================================================================= @@ -389,16 +406,27 @@ function cleanup() { # ================================================================= function chroot_mount_fs() { - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - - check_mounted - - mount --bind /dev $BUILD_DIR/dev - mount --bind /run $BUILD_DIR/run - mount none -t proc $BUILD_DIR/proc - mount none -t sysfs $BUILD_DIR/sys - mount none -t devpts $BUILD_DIR/dev/pts - mount none -t tmpfs $BUILD_DIR/tmp + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + + check_mounted + + if [ -f /.dockerenv ] || [ "$container" = "podman" ]; then + if [ -L $BUILD_DIR/etc/resolv.conf ]; then + mv $BUILD_DIR/etc/resolv.conf $BUILD_DIR/etc/resolv.conf.bak + echo "nameserver 8.8.8.8" >$BUILD_DIR/etc/resolv.conf + fi + fi + + mount --bind /dev $BUILD_DIR/dev + mount --bind /run $BUILD_DIR/run + if [ $DISTRIBUTION = "stretch" ]; then + mount --bind /proc $BUILD_DIR/proc + else + mount none -t proc $BUILD_DIR/proc + fi + mount none -t sysfs $BUILD_DIR/sys + mount none -t devpts $BUILD_DIR/dev/pts + mount none -t tmpfs $BUILD_DIR/tmp } # ================================================================= @@ -407,27 +435,35 @@ function chroot_mount_fs() { # ================================================================= function chroot_umount_fs() { - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - - set +e - if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then - umount $BUILD_DIR/proc - umount $BUILD_DIR/sys - umount $BUILD_DIR/dev/pts - umount $BUILD_DIR/tmp - umount $BUILD_DIR/dev - umount $BUILD_DIR/run - else - umount $BUILD_DIR/proc >>$OUTPUT 2>&1 - umount $BUILD_DIR/sys >>$OUTPUT 2>&1 - umount $BUILD_DIR/dev/pts >>$OUTPUT 2>&1 - umount $BUILD_DIR/tmp >>$OUTPUT 2>&1 - umount $BUILD_DIR/dev >>$OUTPUT 2>&1 - umount $BUILD_DIR/run >>$OUTPUT 2>&1 - fi - set -e - - check_mounted + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + + set +e + if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then + umount $BUILD_DIR/proc + umount $BUILD_DIR/sys + umount $BUILD_DIR/dev/pts + umount $BUILD_DIR/tmp + umount $BUILD_DIR/dev + umount $BUILD_DIR/run + else + umount $BUILD_DIR/proc >>$OUTPUT 2>&1 + umount $BUILD_DIR/sys >>$OUTPUT 2>&1 + umount $BUILD_DIR/dev/pts >>$OUTPUT 2>&1 + umount $BUILD_DIR/tmp >>$OUTPUT 2>&1 + umount $BUILD_DIR/dev >>$OUTPUT 2>&1 + umount $BUILD_DIR/run >>$OUTPUT 2>&1 + fi + if [ -f /.dockerenv ] || [ "$container" = "podman" ]; then + if [ -L $BUILD_DIR/etc/resolv.conf.bak ] && [ ! -L $BUILD_DIR/etc/resolv.conf ]; then + rm -f $BUILD_DIR/etc/resolv.conf + mv $BUILD_DIR/etc/resolv.conf.bak $BUILD_DIR/etc/resolv.conf + elif [ -L $BUILD_DIR/etc/resolv.conf.bak ] && [ -L $BUILD_DIR/etc/resolv.conf ]; then + rm -f $BUILD_DIR/etc/resolv.conf.bak + fi + fi + set -e + + check_mounted } # ================================================================= @@ -435,13 +471,13 @@ function chroot_umount_fs() { # удаляем лог # ================================================================= function remove_log_file() { - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - if [ -f $LOGPATH/$LIVEKITNAME.log ]; then - rm -f $LOGPATH/$LIVEKITNAME.log - fi - if [ -f $BUILD_DIR/$LIVEKITNAME.log ]; then - rm -f $BUILD_DIR/$LIVEKITNAME.log - fi + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + if [ -f $LOGPATH/$LIVEKITNAME.log ]; then + rm -f $LOGPATH/$LIVEKITNAME.log + fi + if [ -f $BUILD_DIR/$LIVEKITNAME.log ]; then + rm -f $BUILD_DIR/$LIVEKITNAME.log + fi } # ================================================================= @@ -451,41 +487,41 @@ function remove_log_file() { # переменную CREATE_BACKUP="1" в linux-live/buildconfig) # ================================================================= function create_backup() { - if [ $CREATE_BACKUP = "1" ]; then - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - if [ ! -f $SCRIPT_DIR/.script_version ]; then - cat "1" >$SCRIPT_DIR/.script_version >>$OUTPUT 2>&1 - chmod 644 $SCRIPT_DIR/.script_version >>$OUTPUT 2>&1 - fi - DATE=$(date +%Y%m%d_%H%M) - CHANGED="0" - rm -rf $SCRIPT_DIR/iso >>$OUTPUT 2>&1 - rm -f $SCRIPT_DIR/.build_dir >>$OUTPUT 2>&1 - rm -f $SCRIPT_DIR/*.log >>$OUTPUT 2>&1 - if [ ! -d $PARENT_DIR/minios-live-current ]; then - CHANGED="1" - mkdir -p $PARENT_DIR/minios-live-current - (cd $SCRIPT_DIR && cp --parents -afr * $PARENT_DIR/minios-live-current) - else - for file in $(find $SCRIPT_DIR -path $SCRIPT_DIR/.git -prune -false -o -type f | sed "s,$SCRIPT_DIR/,,g" | sed "s,.script_version,,g"); do - if ! cmp $SCRIPT_DIR/$file $PARENT_DIR/minios-live-current/$file >>$OUTPUT 2>&1; then - CHANGED="1" - echo -e "$file has been modified since last backup." >>$OUTPUT 2>&1 - echo -e "Copying $SCRIPT_DIR/$file to $PARENT_DIR/minios-live-current/$file..." >>$OUTPUT 2>&1 - cp -f "$SCRIPT_DIR/$file" "$PARENT_DIR/minios-live-current/$file" >>$OUTPUT 2>&1 - fi - done - fi - if [ $CHANGED = "1" ]; then - SCRIPT_VERSION=$(cat $SCRIPT_DIR/.script_version) - echo $(($SCRIPT_VERSION + 1)) >$SCRIPT_DIR/.script_version - echo $(($SCRIPT_VERSION + 1)) >$PARENT_DIR/minios-live-current/.script_version - cd $SCRIPT_DIR >>$OUTPUT 2>&1 - rm -f $PARENT_DIR/minios-live-current.tar.gz - tar -czf $PARENT_DIR/minios-live-current.tar.gz ./ >>$OUTPUT 2>&1 - cp $PARENT_DIR/minios-live-current.tar.gz $PARENT_DIR/minios-live-v$SCRIPT_VERSION-$DATE.tar.gz >>$OUTPUT 2>&1 - fi - fi + if [ $CREATE_BACKUP = "1" ]; then + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + if [ ! -f $SCRIPT_DIR/.script_version ]; then + cat "1" >$SCRIPT_DIR/.script_version >>$OUTPUT 2>&1 + chmod 644 $SCRIPT_DIR/.script_version >>$OUTPUT 2>&1 + fi + DATE=$(date +%Y%m%d_%H%M) + CHANGED="0" + rm -rf $SCRIPT_DIR/iso >>$OUTPUT 2>&1 + rm -f $SCRIPT_DIR/.build_dir >>$OUTPUT 2>&1 + rm -f $SCRIPT_DIR/*.log >>$OUTPUT 2>&1 + if [ ! -d $PARENT_DIR/minios-live-current ]; then + CHANGED="1" + mkdir -p $PARENT_DIR/minios-live-current + (cd $SCRIPT_DIR && cp --parents -afr * $PARENT_DIR/minios-live-current) + else + for file in $(find $SCRIPT_DIR -path $SCRIPT_DIR/.git -prune -false -o -type f | sed "s,$SCRIPT_DIR/,,g" | sed "s,.script_version,,g"); do + if ! cmp $SCRIPT_DIR/$file $PARENT_DIR/minios-live-current/$file >>$OUTPUT 2>&1; then + CHANGED="1" + echo -e "$file has been modified since last backup." >>$OUTPUT 2>&1 + echo -e "Copying $SCRIPT_DIR/$file to $PARENT_DIR/minios-live-current/$file..." >>$OUTPUT 2>&1 + cp -f "$SCRIPT_DIR/$file" "$PARENT_DIR/minios-live-current/$file" >>$OUTPUT 2>&1 + fi + done + fi + if [ $CHANGED = "1" ]; then + SCRIPT_VERSION=$(cat $SCRIPT_DIR/.script_version) + echo $(($SCRIPT_VERSION + 1)) >$SCRIPT_DIR/.script_version + echo $(($SCRIPT_VERSION + 1)) >$PARENT_DIR/minios-live-current/.script_version + cd $SCRIPT_DIR >>$OUTPUT 2>&1 + rm -f $PARENT_DIR/minios-live-current.tar.gz + tar -czf $PARENT_DIR/minios-live-current.tar.gz ./ >>$OUTPUT 2>&1 + cp $PARENT_DIR/minios-live-current.tar.gz $PARENT_DIR/minios-live-v$SCRIPT_VERSION-$DATE.tar.gz >>$OUTPUT 2>&1 + fi + fi } # ================================================================= @@ -495,19 +531,19 @@ function create_backup() { # в логах # ================================================================= function new_run() { - DATE=$(date +"%Y.%m.%d %H:%M") - echo "" - echo "=================================================================" >>$OUTPUT 2>&1 - echo "=================================================================" >>$OUTPUT 2>&1 - echo "============================ NEW RUN ============================" >>$OUTPUT 2>&1 - echo "======================== $DATE =======================" >>$OUTPUT 2>&1 - echo "=================================================================" >>$OUTPUT 2>&1 - echo "======= If during the installation you get an error that ========" >>$OUTPUT 2>&1 - echo "=== /dev/stdout is not available, try using a bionic or xenial ==" >>$OUTPUT 2>&1 - echo "================= based container to install. ===================" >>$OUTPUT 2>&1 - echo "=================================================================" >>$OUTPUT 2>&1 - echo "=================================================================" >>$OUTPUT 2>&1 - echo "" + DATE=$(date +"%Y.%m.%d %H:%M") + echo "" + echo "=================================================================" >>$OUTPUT 2>&1 + echo "=================================================================" >>$OUTPUT 2>&1 + echo "============================ NEW RUN ============================" >>$OUTPUT 2>&1 + echo "======================== $DATE =======================" >>$OUTPUT 2>&1 + echo "=================================================================" >>$OUTPUT 2>&1 + echo "======= If during the installation you get an error that ========" >>$OUTPUT 2>&1 + echo "=== /dev/stdout is not available, try using a bionic or xenial ==" >>$OUTPUT 2>&1 + echo "================= based container to install. ===================" >>$OUTPUT 2>&1 + echo "=================================================================" >>$OUTPUT 2>&1 + echo "=================================================================" >>$OUTPUT 2>&1 + echo "" } # ================================================================= @@ -521,12 +557,12 @@ function new_run() { # Создание списка пакетов из шаблона # ================================================================= function create_apt_list() { - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - if [ ! -f $SCRIPT_DIR/linux-live/aptsources/$DISTRIBUTION.list ] && [ $DISTRIBUTION_TYPE != "debian" ]; then - cp -f $SCRIPT_DIR/linux-live/aptsources/sources.list $SCRIPT_DIR/linux-live/aptsources/$DISTRIBUTION.list - sed -i "s,distro,$DISTRIBUTION,g" $SCRIPT_DIR/linux-live/aptsources/$DISTRIBUTION.list - sed -i "s,http://ru.archive.ubuntu.com/ubuntu,$DISTRIBUTION_URL,g" $SCRIPT_DIR/linux-live/aptsources/$DISTRIBUTION.list - fi + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + if [ ! -f $SCRIPT_DIR/linux-live/aptsources/$DISTRIBUTION.list ] && [ $DISTRIBUTION_TYPE != "debian" ]; then + cp -f $SCRIPT_DIR/linux-live/aptsources/sources.list $SCRIPT_DIR/linux-live/aptsources/$DISTRIBUTION.list + sed -i "s,distro,$DISTRIBUTION,g" $SCRIPT_DIR/linux-live/aptsources/$DISTRIBUTION.list + sed -i "s,http://ru.archive.ubuntu.com/ubuntu,$DISTRIBUTION_URL,g" $SCRIPT_DIR/linux-live/aptsources/$DISTRIBUTION.list + fi } # ================================================================= @@ -534,20 +570,259 @@ function create_apt_list() { # Установка базовой системы # ================================================================= function build_bootstrap() { - current_process - - if [ $CONTAINER_TYPE = "1" ]; then - if [ ! -f /.minios-live ]; then - setup_host - fi - fi - if [ $DISTRIBUTION_TYPE != "debian" ]; then - sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - debootstrap --arch=$DISTRIBUTION_ARCH --variant=$DISTRIBUTION_VARIANT $DISTRIBUTION $BUILD_DIR $DISTRIBUTION_URL >>$OUTPUT 2>>$OUTPUT - else - sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - debootstrap --arch=$DISTRIBUTION_ARCH $DISTRIBUTION $BUILD_DIR $DISTRIBUTION_URL >>$OUTPUT 2>>$OUTPUT - fi + current_process + + if [ $CONTAINER_TYPE = "1" ]; then + if [ ! -f /.minios-live ]; then + setup_host + fi + fi + if [ $USE_ROOTFS = "1" ] && [ ! -f $SCRIPT_DIR/bootstrap/$DISTRIBUTION-$DISTRIBUTION_ARCH-rootfs.tar.gz ]; then + if [ -f $SCRIPT_DIR/bootstrap/$DISTRIBUTION-$DISTRIBUTION_ARCH.tar.gz ]; then + if [ ! -d $BUILD_DIR ]; then + mkdir -p $BUILD_DIR + fi + tar -xzf $SCRIPT_DIR/bootstrap/$DISTRIBUTION-$DISTRIBUTION_ARCH.tar.gz -C $BUILD_DIR + else + # Раскомментировать для Ubuntu, но придётся вручную подбирать пакеты до соответсвия bootstrap Debian по пакетам. + #if [ $DISTRIBUTION_TYPE != "debian" ]; then + # sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ + # debootstrap --arch=$DISTRIBUTION_ARCH --variant=$DISTRIBUTION_VARIANT $DISTRIBUTION $BUILD_DIR $DISTRIBUTION_URL >>$OUTPUT 2>>$OUTPUT + #else + sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ + debootstrap --arch=$DISTRIBUTION_ARCH $DISTRIBUTION $BUILD_DIR $DISTRIBUTION_URL >>$OUTPUT 2>>$OUTPUT + #fi + if [ ! -d $SCRIPT_DIR/bootstrap ]; then + mkdir -p $SCRIPT_DIR/bootstrap + fi + tar -czf $SCRIPT_DIR/bootstrap/$DISTRIBUTION-$DISTRIBUTION_ARCH.tar.gz -C $BUILD_DIR . + fi + elif [ $USE_ROOTFS = "1" ] && [ -f $SCRIPT_DIR/bootstrap/$DISTRIBUTION-$DISTRIBUTION_ARCH-rootfs.tar.gz ]; then + if [ ! -d $BUILD_DIR ]; then + mkdir -p $BUILD_DIR + fi + tar -xzf $SCRIPT_DIR/bootstrap/$DISTRIBUTION-$DISTRIBUTION_ARCH-rootfs.tar.gz -C $BUILD_DIR + elif [ $USE_ROOTFS != "1" ] && [ $USE_BOOTSTRAP = "1" ]; then + if [ -f $SCRIPT_DIR/bootstrap/$DISTRIBUTION-$DISTRIBUTION_ARCH.tar.gz ]; then + if [ ! -d $BUILD_DIR ]; then + mkdir -p $BUILD_DIR + fi + tar -xzf $SCRIPT_DIR/bootstrap/$DISTRIBUTION-$DISTRIBUTION_ARCH.tar.gz -C $BUILD_DIR + else + # Раскомментировать для Ubuntu, но придётся вручную подбирать пакеты до соответсвия bootstrap Debian по пакетам. + #if [ $DISTRIBUTION_TYPE != "debian" ]; then + # sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ + # debootstrap --arch=$DISTRIBUTION_ARCH --variant=$DISTRIBUTION_VARIANT $DISTRIBUTION $BUILD_DIR $DISTRIBUTION_URL >>$OUTPUT 2>>$OUTPUT + #else + sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ + debootstrap --arch=$DISTRIBUTION_ARCH $DISTRIBUTION $BUILD_DIR $DISTRIBUTION_URL >>$OUTPUT 2>>$OUTPUT + #fi + if [ ! -d $SCRIPT_DIR/bootstrap ]; then + mkdir -p $SCRIPT_DIR/bootstrap + fi + tar -czf $SCRIPT_DIR/bootstrap/$DISTRIBUTION-$DISTRIBUTION_ARCH.tar.gz -C $BUILD_DIR . + fi + else + sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ + debootstrap --arch=$DISTRIBUTION_ARCH $DISTRIBUTION $BUILD_DIR $DISTRIBUTION_URL >>$OUTPUT 2>>$OUTPUT + fi + + build_rootfs + +} + +function build_rootfs() { + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + #current_process + + if [ $USE_ROOTFS = "1" ]; then + if [ ! -f $SCRIPT_DIR/bootstrap/$DISTRIBUTION-$DISTRIBUTION_ARCH-rootfs.tar.gz ]; then + if [ $CONTAINER_TYPE = "1" ]; then + if [ ! -f /.minios-live ]; then + setup_host + fi + fi + + chroot_mount_fs + + create_apt_list + + cp -f $SCRIPT_DIR/linux-live/aptsources/$DISTRIBUTION.list $BUILD_DIR/etc/apt/sources.list + cat <<'EOF' >$BUILD_DIR/etc/apt/apt.conf.d/000MiniOS +APT::Install-Recommends "0"; +APT::Install-Suggests "0"; +Acquire::Languages { "none"; } +EOF + + if [ -d /opt/minios-live ] || [ -f /.minios-live-container ]; then + if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then + chroot $BUILD_DIR /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + $APT_CMD update $APT_OPTIONS + else + chroot $BUILD_DIR /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + $APT_CMD update $APT_OPTIONS >>$OUTPUT 2>&1 + fi + else + chroot $BUILD_DIR $APT_CMD update $APT_OPTIONS >>$OUTPUT 2>&1 + fi + + if [ -d /opt/minios-live ] || [ -f /.minios-live-container ]; then + if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then + chroot $BUILD_DIR /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + $APT_CMD upgrade $APT_OPTIONS + else + chroot $BUILD_DIR /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + $APT_CMD upgrade $APT_OPTIONS >>$OUTPUT 2>&1 + fi + else + chroot $BUILD_DIR $APT_CMD upgrade $APT_OPTIONS >>$OUTPUT 2>&1 + fi + + if [ -f $SCRIPT_DIR/linux-live/pkglists/prereq.list ]; then + if [ -d /opt/minios-live ] || [ -f /.minios-live-container ]; then + if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then + chroot $BUILD_DIR /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + $APT_CMD install $APT_OPTIONS \ + $(grep -vE "^\s*#" $SCRIPT_DIR/linux-live/pkglists/prereq.list | tr "\n" " ") + else + chroot $BUILD_DIR /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + $APT_CMD install $APT_OPTIONS \ + $(grep -vE "^\s*#" $SCRIPT_DIR/linux-live/pkglists/prereq.list | tr "\n" " ") >>$OUTPUT 2>&1 + fi + else + chroot $BUILD_DIR $APT_CMD install $APT_OPTIONS \ + $(grep -vE "^\s*#" $SCRIPT_DIR/linux-live/pkglists/prereq.list | tr "\n" " ") >>$OUTPUT 2>&1 + fi + fi + + if [ -d /opt/minios-live ] || [ -f /.minios-live-container ]; then + if [ -d /opt/minios-live ] || [ -f /.minios-live-container ]; then + chroot $BUILD_DIR /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + $APT_CMD clean $APT_OPTIONS + else + chroot $BUILD_DIR /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + $APT_CMD clean $APT_OPTIONS >>$OUTPUT 2>&1 + fi + else + chroot $BUILD_DIR $APT_CMD clean $APT_OPTIONS >>$OUTPUT 2>&1 + fi + chroot_umount_fs + + tar -czf $SCRIPT_DIR/bootstrap/$DISTRIBUTION-$DISTRIBUTION_ARCH-rootfs.tar.gz -C $BUILD_DIR . + fi + fi } # ================================================================= @@ -555,45 +830,45 @@ function build_bootstrap() { # # ================================================================= function copy_build_scripts() { - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - if [ ! -d $BUILD_DIR/linux-live ]; then - mkdir -p $BUILD_DIR/linux-live - (cd $SCRIPT_DIR/linux-live && cp --parents -afr * $BUILD_DIR/linux-live) - else - find $SCRIPT_DIR/linux-live -type f -print0 | sed "s,$SCRIPT_DIR/linux-live/,,g" | while IFS= read -r -d '' file; do - if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then - if ! cmp $SCRIPT_DIR/linux-live/"$file" $BUILD_DIR/linux-live/"$file"; then - echo -e "$file has been modified since last build run." - echo -e "Copying $SCRIPT_DIR/linux-live/$file to $BUILD_DIR/linux-live/$file..." - cp -f $SCRIPT_DIR/linux-live/"$file" $BUILD_DIR/linux-live/"$file" - fi - else - if ! cmp $SCRIPT_DIR/linux-live/"$file" $BUILD_DIR/linux-live/"$file" >>$OUTPUT 2>&1; then - echo -e "$file has been modified since last build run." >>$OUTPUT 2>&1 - echo -e "Copying $SCRIPT_DIR/linux-live/$file to $BUILD_DIR/linux-live/$file..." >>$OUTPUT 2>&1 - cp -f $SCRIPT_DIR/linux-live/"$file" $BUILD_DIR/linux-live/"$file" >>$OUTPUT 2>&1 - fi - fi - done - fi - - #chmod +x $BUILD_DIR/linux-live/build - chmod +x $BUILD_DIR/linux-live/install_chroot - - if [ "$DEV_SYSTEM" = "1" ]; then - if [ ! -d $BUILD_DIR/opt/minios-live ]; then - mkdir -p $BUILD_DIR/opt/minios-live - (cd $SCRIPT_DIR && cp --parents -afr * $BUILD_DIR/opt/minios-live) - else - find $SCRIPT_DIR/linux-live -type f -print0 | sed "s,$SCRIPT_DIR/linux-live/,,g" | while IFS= read -r -d '' file; do - if ! cmp $SCRIPT_DIR/"$file" $BUILD_DIR/opt/minios-live/"$file" >>$OUTPUT 2>&1; then - echo -e "$file has been modified since last build run." >>$OUTPUT 2>&1 - echo -e "Copying $SCRIPT_DIR/$file to $BUILD_DIR/opt/minios-live/$file..." >>$OUTPUT 2>&1 - cp -f $SCRIPT_DIR/"$file" $BUILD_DIR/opt/minios-live/"$file" >>$OUTPUT 2>&1 - fi - done - fi - fi + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + if [ ! -d $BUILD_DIR/linux-live ]; then + mkdir -p $BUILD_DIR/linux-live + (cd $SCRIPT_DIR/linux-live && cp --parents -afr * $BUILD_DIR/linux-live) + else + find $SCRIPT_DIR/linux-live -type f -print0 | sed "s,$SCRIPT_DIR/linux-live/,,g" | while IFS= read -r -d '' file; do + if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then + if ! cmp $SCRIPT_DIR/linux-live/"$file" $BUILD_DIR/linux-live/"$file"; then + echo -e "$file has been modified since last build run." + echo -e "Copying $SCRIPT_DIR/linux-live/$file to $BUILD_DIR/linux-live/$file..." + cp -f $SCRIPT_DIR/linux-live/"$file" $BUILD_DIR/linux-live/"$file" + fi + else + if ! cmp $SCRIPT_DIR/linux-live/"$file" $BUILD_DIR/linux-live/"$file" >>$OUTPUT 2>&1; then + echo -e "$file has been modified since last build run." >>$OUTPUT 2>&1 + echo -e "Copying $SCRIPT_DIR/linux-live/$file to $BUILD_DIR/linux-live/$file..." >>$OUTPUT 2>&1 + cp -f $SCRIPT_DIR/linux-live/"$file" $BUILD_DIR/linux-live/"$file" >>$OUTPUT 2>&1 + fi + fi + done + fi + + #chmod +x $BUILD_DIR/linux-live/build + chmod +x $BUILD_DIR/linux-live/install_chroot + + if [ "$DEV_SYSTEM" = "1" ]; then + if [ ! -d $BUILD_DIR/opt/minios-live ]; then + mkdir -p $BUILD_DIR/opt/minios-live + (cd $SCRIPT_DIR && cp --parents -afr * $BUILD_DIR/opt/minios-live) + else + find $SCRIPT_DIR/linux-live -type f -print0 | sed "s,$SCRIPT_DIR/linux-live/,,g" | while IFS= read -r -d '' file; do + if ! cmp $SCRIPT_DIR/"$file" $BUILD_DIR/opt/minios-live/"$file" >>$OUTPUT 2>&1; then + echo -e "$file has been modified since last build run." >>$OUTPUT 2>&1 + echo -e "Copying $SCRIPT_DIR/$file to $BUILD_DIR/opt/minios-live/$file..." >>$OUTPUT 2>&1 + cp -f $SCRIPT_DIR/"$file" $BUILD_DIR/opt/minios-live/"$file" >>$OUTPUT 2>&1 + fi + done + fi + fi } # ================================================================= @@ -601,56 +876,62 @@ function copy_build_scripts() { # # ================================================================= function build_chroot() { - current_process - - if [ $CONTAINER_TYPE = "1" ]; then - if [ ! -f /.minios-live ]; then - setup_host - fi - fi - - chroot_mount_fs - - copy_build_scripts - - create_apt_list - - if [ "$OUTPUT"="$LOGPATH/$LIVEKITNAME.log" ] && [ -f /$LIVEKITNAME.log ]; then - mv -f /$LIVEKITNAME.log $BUILD_DIR/$LIVEKITNAME.log - fi - if [ "$OUTPUT"="$LOGPATH/$LIVEKITNAME.log" ] && [ -f $BUILD_DIR/$LIVEKITNAME.log ]; then - echo "===========================================" >>$BUILD_DIR/$LIVEKITNAME.log 2>&1 - echo "===========================================" >>$BUILD_DIR/$LIVEKITNAME.log 2>&1 - echo "=============== CHROOT LOG ================" >>$BUILD_DIR/$LIVEKITNAME.log 2>&1 - echo "===========================================" >>$BUILD_DIR/$LIVEKITNAME.log 2>&1 - echo "===========================================" >>$BUILD_DIR/$LIVEKITNAME.log 2>&1 - fi - - cp -f $SCRIPT_DIR/linux-live/aptsources/$DISTRIBUTION.list $BUILD_DIR/etc/apt/sources.list - - if [ -d /opt/minios-live ] || [ -f /.minios-live-container ]; then - chroot $BUILD_DIR /usr/bin/env \ - OUTPUT=$OUTPUT \ - LOGPATH=$LOGPATH \ - BUILD_TEST_ISO=$BUILD_TEST_ISO \ - CREATE_BACKUP=$CREATE_BACKUP \ - DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ - APT_CMD=$APT_CMD \ - APT_OPTIONS=$APT_OPTIONS \ - APT_OPTIONS2=$APT_OPTIONS2 \ - LIVE_TYPE=$LIVE_TYPE /linux-live/install_chroot - - else - chroot $BUILD_DIR /linux-live/install_chroot - - fi - - chroot_umount_fs - - if [ "$OUTPUT"="$LOGPATH/$LIVEKITNAME.log" ] && [ -f $BUILD_DIR/$LIVEKITNAME.log ]; then - mv -f $BUILD_DIR/$LIVEKITNAME.log $SCRIPT_DIR/$LIVEKITNAME.log - if [ -f $SCRIPT_DIR/$LIVEKITNAME.log ]; then - echo -e "Installation log was saved to ${MAGENTA}$SCRIPT_DIR/$LIVEKITNAME.log${ENDCOLOUR}" - fi - fi + current_process + + if [ $CONTAINER_TYPE = "1" ]; then + if [ ! -f /.minios-live ]; then + setup_host + fi + fi + + chroot_mount_fs + + copy_build_scripts + + create_apt_list + + if [ "$OUTPUT"="$LOGPATH/$LIVEKITNAME.log" ] && [ -f /$LIVEKITNAME.log ]; then + mv -f /$LIVEKITNAME.log $BUILD_DIR/$LIVEKITNAME.log + fi + if [ "$OUTPUT"="$LOGPATH/$LIVEKITNAME.log" ] && [ -f $BUILD_DIR/$LIVEKITNAME.log ]; then + echo "===========================================" >>$BUILD_DIR/$LIVEKITNAME.log 2>&1 + echo "===========================================" >>$BUILD_DIR/$LIVEKITNAME.log 2>&1 + echo "=============== CHROOT LOG ================" >>$BUILD_DIR/$LIVEKITNAME.log 2>&1 + echo "===========================================" >>$BUILD_DIR/$LIVEKITNAME.log 2>&1 + echo "===========================================" >>$BUILD_DIR/$LIVEKITNAME.log 2>&1 + fi + + cp -f $SCRIPT_DIR/linux-live/aptsources/$DISTRIBUTION.list $BUILD_DIR/etc/apt/sources.list + + if [ -d /opt/minios-live ] || [ -f /.minios-live-container ]; then + chroot $BUILD_DIR /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + LIVE_TYPE=$LIVE_TYPE /linux-live/install_chroot - + else + chroot $BUILD_DIR /linux-live/install_chroot - + fi + + chroot_umount_fs + + if [ "$OUTPUT"="$LOGPATH/$LIVEKITNAME.log" ] && [ -f $BUILD_DIR/$LIVEKITNAME.log ]; then + mv -f $BUILD_DIR/$LIVEKITNAME.log $SCRIPT_DIR/$LIVEKITNAME.log + if [ -f $SCRIPT_DIR/$LIVEKITNAME.log ]; then + echo -e "Installation log was saved to ${MAGENTA}$SCRIPT_DIR/$LIVEKITNAME.log${ENDCOLOUR}" + fi + fi } # ================================================================= @@ -658,157 +939,274 @@ function build_chroot() { # # ================================================================= function build_live() { - current_process - - if [ $CONTAINER_TYPE = "1" ]; then - if [ ! -f /.minios-live ]; then - setup_host - fi - fi - - remove_log_file - - copy_build_scripts - - check_build_dir - - chroot $BUILD_DIR mount none -t proc /proc - chroot $BUILD_DIR /linux-live/initrfs - chroot $BUILD_DIR umount /proc - - rm -rf $PARENT_DIR/image - mkdir -p $PARENT_DIR/image/$LIVEKITNAME/{boot,changes,modules} - - # copy kernel files - if [ $DISTRIBUTION_TYPE != "debian" ]; then - cp $BUILD_DIR/boot/vmlinuz-**-**-generic $PARENT_DIR/image/$LIVEKITNAME/boot/vmlinuz - else - cp $BUILD_DIR/boot/vmlinuz-**-**-$KERNEL_ARCH $PARENT_DIR/image/$LIVEKITNAME/boot/vmlinuz - fi - mv $BUILD_DIR/boot/initrfs.img $PARENT_DIR/image/$LIVEKITNAME/boot/initrfs.img - - cp -r $SCRIPT_DIR/linux-live/bootfiles/* $PARENT_DIR/image/$LIVEKITNAME - - if [ $PACKAGE_VARIANT = "minimal" ]; then - sed -i 's/minios.flags=perch/minios.flags=perch,automount/g' $PARENT_DIR/image/$LIVEKITNAME/boot/syslinux.cfg - sed -i 's/minios.flags= /minios.flags=automount /g' $PARENT_DIR/image/$LIVEKITNAME/boot/syslinux.cfg - fi - - # create compressed 01-core.sb - cd $BUILD_DIR - COREFS="" - for i in $MKMOD; do - if [ -d /$i ]; then - COREFS="$COREFS $i" - fi - done - if [ $COMP_TYPE = "zstd" ]; then - mksquashfs $COREFS $PARENT_DIR/image/$LIVEKITNAME/01-core-$COMP_TYPE.$BEXT -comp $COMP_TYPE -Xcompression-level 22 -b 1024K -always-use-fragments -keep-as-directory -noappend || exit - else - mksquashfs $COREFS $PARENT_DIR/image/$LIVEKITNAME/01-core-$COMP_TYPE.$BEXT -comp $COMP_TYPE -b 1024K -always-use-fragments -keep-as-directory -noappend || exit - fi + current_process + + if [ $CONTAINER_TYPE = "1" ]; then + if [ ! -f /.minios-live ]; then + setup_host + fi + fi + + remove_log_file + + copy_build_scripts + + check_build_dir + + rm -rf $PARENT_DIR/image + mkdir -p $PARENT_DIR/image/$LIVEKITNAME/{boot,changes,modules} + + build_boot + + # create compressed 01-core.sb + cd $BUILD_DIR + COREFS="" + for i in $MKMOD; do + if [ -d /$i ]; then + COREFS="$COREFS $i" + fi + done + + : 'if [ $COMP_TYPE = "zstd" ]; then + mksquashfs $COREFS $PARENT_DIR/image/$LIVEKITNAME/01-core-$COMP_TYPE.$BEXT -comp $COMP_TYPE -Xcompression-level 22 -b 1024K -always-use-fragments -keep-as-directory -noappend || exit + else + mksquashfs $COREFS $PARENT_DIR/image/$LIVEKITNAME/01-core-$COMP_TYPE.$BEXT -comp $COMP_TYPE -b 1024K -always-use-fragments -keep-as-directory -noappend || exit + fi' + + mksquashfs $COREFS $PARENT_DIR/image/$LIVEKITNAME/01-core-$COMP_TYPE.$BEXT -comp $COMP_TYPE -b 1024K -always-use-fragments -keep-as-directory -noappend || exit } +# ================================================================= +# +# +# ================================================================= +function build_boot() { + #current_process + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + + if [ $CONTAINER_TYPE = "1" ]; then + if [ ! -f /.minios-live ]; then + setup_host + fi + fi + + copy_build_scripts + + check_build_dir + + # initramfs generation + chroot $BUILD_DIR mount none -t proc /proc + chmod +x $BUILD_DIR/linux-live/initrfs + chroot $BUILD_DIR /linux-live/initrfs + chroot $BUILD_DIR umount /proc + + # copy kernel files + cp $BUILD_DIR/boot/vmlinuz-**-**-* $PARENT_DIR/image/$LIVEKITNAME/boot/vmlinuz + cp $BUILD_DIR/boot/initrfs.img $PARENT_DIR/image/$LIVEKITNAME/boot/initrfs.img + + #if [ $CLOUD != "true" ]; then + cp -r $SCRIPT_DIR/linux-live/bootfiles/* $PARENT_DIR/image/$LIVEKITNAME + #fi + + if [ $CLOUD = "true" ]; then + BOOT_TYPE="hybrid" + fi + if [ $BOOT_TYPE = "hybrid" ]; then + cp -r $SCRIPT_DIR/linux-live/bootfiles-grub/* $PARENT_DIR/image + #cp -r $SCRIPT_DIR/linux-live/bootfiles-hybrid/ $DIR + if [ ! -d $PARENT_DIR/image/.disk ]; then + mkdir -p $PARENT_DIR/image/.disk + fi + echo $SYSTEMNAME >$PARENT_DIR/image/.disk/info + fi + + if [ $CLOUD = "true" ]; then + cat <<'EOF' | iconv -f 'UTF-8' -t "CP866//TRANSLIT" >$PARENT_DIR/image/minios/boot/syslinux.cfg +UI /minios/boot/vesamenu.c32 + +PROMPT 0 +TIMEOUT 40 + +MENU CLEAR +MENU HIDDEN +MENU HIDDENKEY Enter default +MENU BACKGROUND /minios/boot/bootlogo.png + +MENU WIDTH 80 +MENU MARGIN 20 +MENU ROWS 5 +MENU TABMSGROW 9 +MENU CMDLINEROW 9 +MENU HSHIFT 0 +MENU VSHIFT 19 + +MENU COLOR BORDER 30;40 #00000000 #00000000 none +MENU COLOR SEL 47;30 #FF000000 #FFFFFFFF none +MENU COLOR UNSEL 37;40 #FFFFFFFF #FF000000 none +MENU COLOR TABMSG 32;40 #FF60CA00 #FF000000 none + +F1 help.txt /minios/boot/zblack.png + +MENU AUTOBOOT Press Esc for options, automatic boot in # second{,s} ... +MENU TABMSG [F1] help [Tab] cmdline > + +LABEL default +MENU LABEL Run MiniOS (Copy to RAM) +KERNEL /minios/boot/vmlinuz +APPEND vga=normal initrd=/minios/boot/initrfs.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 consoleblank=0 apparmor=0 selinux=0 minios.flags=toram net.ifnames=0 biosdevname=0 + +EOF + cat <<'EOF' >$PARENT_DIR/image/boot/grub/grub.cfg +set default="0" +set timeout="4" +set hidden_timeout_quiet=false +set gfxmode=auto +insmod efi_gop +insmod efi_uga +insmod gfxterm +terminal_output gfxterm +set color_normal=white/black +set color_highlight=black/white +loadfont /boot/grub/unicode.pf2 +#background_image /boot/grub/bootlogo.png + +set default_settings="load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 consoleblank=0 apparmor=0 net.ifnames=0 biosdevname=0" +set perch_settings="minios.flags=perch" +set live_settings="minios.flags= " +set ram_settings="minios.flags=toram" +set console_settings="console=tty0 console=ttyS0,115200" +set debug_settings="load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 apparmor=0 debug net.ifnames=0 biosdevname=0" +set linux_64="/minios/boot/vmlinuz" +set initrd_img="/minios/boot/initrfs.img" +set default=0 +set message="Loading kernel and ramdisk..." + +menuentry "Run MiniOS (Copy to RAM)"{ + echo $message + search --set -f $linux_64 + linux $linux_64 $default_settings $ram_settings $console_settings + initrd $initrd_img +} +EOF + fi + + if [ $PACKAGE_VARIANT = "minimal" ]; then + sed -i 's/minios.flags=perch/minios.flags=perch,automount/g' $PARENT_DIR/image/$LIVEKITNAME/boot/syslinux.cfg + sed -i 's/minios.flags= /minios.flags=automount /g' $PARENT_DIR/image/$LIVEKITNAME/boot/syslinux.cfg + if [ $BOOT_TYPE = "hybrid" ]; then + sed -i 's/minios.flags=perch/minios.flags=perch,automount/g' $PARENT_DIR/image/boot/grub/grub.cfg + sed -i 's/minios.flags= /minios.flags=automount /g' $PARENT_DIR/image/boot/grub/grub.cfg + fi + fi +} # ================================================================= # # # ================================================================= function build_iso() { - current_process - - if [ $CONTAINER_TYPE = "1" ]; then - if [ ! -f /.minios-live ]; then - setup_host - fi - fi - - check_build_dir - - if [ "$UNATTENDED" = "1" ]; then - BUILD_DIR="/build/$DISTRIBUTION" - fi - if [ "$BUILD_DIR" = "" ]; then - LAST_BUILD_DIR=$(cat "$SCRIPT_DIR/.build_dir") >>$OUTPUT 2>&1 - BUILD_DIR=$LAST_BUILD_DIR - fi - - cd $PARENT_DIR/image - if [ ! -d $ISO_DIR ]; then - mkdir -p $ISO_DIR - fi - - mkdir -p $ISO_DIR >>$OUTPUT 2>&1 - VER=$SYSTEMVER - DATE=$(date +%Y%m%d_%H%M) - - DIR=$PARENT_DIR/image - ISO=$ISO_DIR/$LIVEKITNAME-$DISTRIBUTION-$PACKAGE_VARIANT-$DISTRIBUTION_ARCH-$COMP_TYPE-$LIVE_TYPE-$DATE.iso - - B="-b $LIVEKITNAME/boot/isolinux.bin -c $LIVEKITNAME/boot/isolinux.boot" - - if [ $BOOT_TYPE = "hybrid" ]; then - C="-no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot" - else - C="-no-emul-boot -boot-load-size 4 -boot-info-table" - fi - - # ▼ должно быть только перенаправление ошибки! - - if [ -x "$(which xorriso 2>>$OUTPUT)" ] && [ $BOOT_TYPE = "hybrid" ]; then - M="xorriso -as mkisofs -isohybrid-mbr $DIR/$LIVEKITNAME/boot/syslinux/isohdpfx.bin" - D=" -isohybrid-gpt-basdat -e" - elif [ -x "$(which genisoimage 2>>$OUTPUT)" ]; then - M=genisoimage - if [ $BOOT_TYPE = "hybrid" ]; then - D="-efi-boot" - else - D="" - fi - fi - if [ $BOOT_TYPE = "hybrid" ]; then - E="EFI/boot/efiboot.img -no-emul-boot" - else - E="" - fi - - #VER="$SYSTEMNAME $VER" - VER="$SYSTEMNAME" - - if [ REMOVE_OLD_ISO = "1" ]; then - rm $ISO_DIR/$LIVEKITNAME-$DISTRIBUTION-$PACKAGE_VARIANT-$DISTRIBUTION_ARCH-$COMP_TYPE-$LIVE_TYPE-*.iso >>$OUTPUT 2>&1 - fi - - if [ $BOOT_TYPE = "hybrid" ]; then - if [ ! -d $DIR/EFI ]; then - cp -r $SCRIPT_DIR/linux-live/bootfiles/EFI $DIR - fi - if - ! $M -hide-rr-moved -f -r -J -l -V "$VER" -A "$VER" \ - $B $C $D $E -o $ISO $DIR - then - exit 1 - fi - else - if - ! $M -f -r -J -l -V "$VER" -A "$VER" \ - $B $C $D $E -o $ISO $DIR - then - exit 1 - fi - fi - - echo ">>> $ISO created" - - if [ $BUILD_TEST_ISO = "1" ]; then - if [ -L $ISO_DIR/$LIVEKITNAME.iso ]; then - rm $ISO_DIR/$LIVEKITNAME.iso - fi - if ln -s $LIVEKITNAME-$DISTRIBUTION-$PACKAGE_VARIANT-$DISTRIBUTION_ARCH-$COMP_TYPE-$LIVE_TYPE-$DATE.iso $ISO_DIR/$LIVEKITNAME.iso; then - echo ">>> $ISO_DIR/$LIVEKITNAME.iso created" - fi - fi - exit 0 + current_process + + if [ $CONTAINER_TYPE = "1" ]; then + if [ ! -f /.minios-live ]; then + setup_host + fi + fi + + check_build_dir + + if [ "$UNATTENDED" = "1" ]; then + BUILD_DIR="/build/$DISTRIBUTION" + fi + if [ "$BUILD_DIR" = "" ]; then + LAST_BUILD_DIR=$(cat "$SCRIPT_DIR/.build_dir") >>$OUTPUT 2>&1 + BUILD_DIR=$LAST_BUILD_DIR + fi + + ISO_DIR="/build/template/iso" + + cd $PARENT_DIR/image + if [ ! -d $ISO_DIR ]; then + mkdir -p $ISO_DIR + fi + + mkdir -p $ISO_DIR >>$OUTPUT 2>&1 + VER=$SYSTEMVER + DATE=$(date +%Y%m%d_%H%M) + + DIR=$PARENT_DIR/image + ISO=$ISO_DIR/$LIVEKITNAME-$DISTRIBUTION-$PACKAGE_VARIANT-$DISTRIBUTION_ARCH-$COMP_TYPE-$LIVE_TYPE-$DATE.iso + + B="-b $LIVEKITNAME/boot/isolinux.bin -c $LIVEKITNAME/boot/isolinux.boot" + + if [ $BOOT_TYPE = "hybrid" ]; then + C="-no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot" + else + C="-no-emul-boot -boot-load-size 4 -boot-info-table" + fi + + # ▼ должно быть только перенаправление ошибки! + + if [ -x "$(which xorriso 2>>$OUTPUT)" ] && [ $BOOT_TYPE = "hybrid" ]; then + M="xorriso -as mkisofs -isohybrid-mbr $DIR/$LIVEKITNAME/boot/isohdpfx.bin" + D=" -isohybrid-gpt-basdat -e" + elif [ -x "$(which genisoimage 2>>$OUTPUT)" ]; then + M=genisoimage + if [ $BOOT_TYPE = "hybrid" ]; then + D="-efi-boot" + else + D="" + fi + fi + if [ $BOOT_TYPE = "hybrid" ]; then + E="EFI/boot/efiboot.img -no-emul-boot" + else + E="" + fi + + #VER="$SYSTEMNAME $VER" + VER="$SYSTEMNAME" + + if [ REMOVE_OLD_ISO = "1" ]; then + rm $ISO_DIR/$LIVEKITNAME-$DISTRIBUTION-$PACKAGE_VARIANT-$DISTRIBUTION_ARCH-$COMP_TYPE-$LIVE_TYPE-*.iso >>$OUTPUT 2>&1 + while [ -f $ISO_DIR/$LIVEKITNAME.iso ]; do + rm $ISO_DIR/$LIVEKITNAME.iso >>$OUTPUT 2>&1 + sleep 1 + done + #rm -f $ISO_DIR/* + fi + + if [ $BOOT_TYPE = "hybrid" ]; then + if + ! $M -hide-rr-moved -f -r -J -l -V "$VER" -A "$VER" \ + $B $C $D $E -o $ISO $DIR + then + exit 1 + fi + else + if + ! $M -f -r -J -l -V "$VER" -A "$VER" \ + $B $C $D $E -o $ISO $DIR + then + exit 1 + fi + fi + + echo ">>> $ISO created" + + if [ $BUILD_TEST_ISO = "1" ]; then + if [ -L $ISO_DIR/$LIVEKITNAME.iso ]; then + rm $ISO_DIR/$LIVEKITNAME.iso + fi + while [ -f $ISO_DIR/$LIVEKITNAME.iso ]; do + rm $ISO_DIR/$LIVEKITNAME.iso >>$OUTPUT 2>&1 + sleep 1 + done + if ln $ISO_DIR/$LIVEKITNAME-$DISTRIBUTION-$PACKAGE_VARIANT-$DISTRIBUTION_ARCH-$COMP_TYPE-$LIVE_TYPE-$DATE.iso $ISO_DIR/$LIVEKITNAME.iso; then + echo ">>> $ISO_DIR/$LIVEKITNAME.iso created" + fi + fi + exit 0 } # ================================================================= @@ -822,11 +1220,11 @@ function build_iso() { # # ================================================================= function setup_host() { - current_process + current_process - if [ $CONTAINER_TYPE != "2" ]; then - hostreq_pkg_list - fi + if [ $CONTAINER_TYPE != "2" ]; then + hostreq_pkg_list + fi } # ================================================================= @@ -834,21 +1232,21 @@ function setup_host() { # # ================================================================= function chroot_setup_host() { - current_process + current_process - echo $LIVEKITNAME >/etc/hostname + echo $LIVEKITNAME >/etc/hostname - prereq_pkg_list + prereq_pkg_list - #configure machine id - dbus-uuidgen >/etc/machine-id >>$OUTPUT 2>&1 - ln -fs /etc/machine-id /var/lib/dbus/machine-id >>$OUTPUT 2>&1 + #configure machine id + dbus-uuidgen >/etc/machine-id >>$OUTPUT 2>&1 + ln -fs /etc/machine-id /var/lib/dbus/machine-id >>$OUTPUT 2>&1 - # don't understand why, but multiple sources indicate this - dpkg-divert --local --rename --add /sbin/initctl >>$OUTPUT 2>&1 - ln -s /bin/true /sbin/initctl >>$OUTPUT 2>&1 + # don't understand why, but multiple sources indicate this + dpkg-divert --local --rename --add /sbin/initctl >>$OUTPUT 2>&1 + ln -s /bin/true /sbin/initctl >>$OUTPUT 2>&1 - current_process + current_process } # ================================================================= @@ -856,105 +1254,105 @@ function chroot_setup_host() { # # ================================================================= function chroot_build_cleanup() { - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - - set +e - - rm -f /preinstall >>$OUTPUT 2>&1 - rm -f /install >>$OUTPUT 2>&1 - rm -f /install2 >>$OUTPUT 2>&1 - rm -f /cleanup >>$OUTPUT 2>&1 - rm -f /$PACKAGE_VARIANT.list >>$OUTPUT 2>&1 - rm -f /postinstall >>$OUTPUT 2>&1 - rm -rf /rootcopy-install >>$OUTPUT 2>&1 - rm -rf /patches >>$OUTPUT 2>&1 - - rm -f /etc/fstab >>$OUTPUT 2>&1 - rm -f /etc/mtab >>$OUTPUT 2>&1 - rm -f /etc/apt/sources.list~ >>$OUTPUT 2>&1 - rm -Rf /etc/systemd/system/timers.target.wants >>$OUTPUT 2>&1 - rm -f /etc/systemd/system/multi-user.target.wants/ssh.service >>$OUTPUT 2>&1 - rm -f /etc/systemd/system/multi-user.target.wants/dnsmasq.service >>$OUTPUT 2>&1 - - rm -f /etc/ssh/ssh_host* >>$OUTPUT 2>&1 - - rm -f /var/backups/* >>$OUTPUT 2>&1 - rm -f /var/cache/ldconfig/* >>$OUTPUT 2>&1 - rm -f /var/cache/debconf/* >>$OUTPUT 2>&1 - rm -f /var/cache/fontconfig/* >>$OUTPUT 2>&1 - rm -f /var/lib/apt/extended_states >>$OUTPUT 2>&1 - rm -f /var/lib/systemd/random-seed >>$OUTPUT 2>&1 - rm -f /var/lib/apt/lists/deb.* >>$OUTPUT 2>&1 - rm -Rf /root/.local/share/mc >>$OUTPUT 2>&1 - rm -Rf /root/.cache >>$OUTPUT 2>&1 - rm -f /root/.wget-hsts >>$OUTPUT 2>&1 - - rm -f /var/lib/dpkg/*-old >>$OUTPUT 2>&1 - rm -f /var/log/* >>$OUTPUT 2>&1 - rm -f /var/log/*/* >>$OUTPUT 2>&1 - rm -f /var/log/*/*/* >>$OUTPUT 2>&1 - rm -f /var/cache/apt/archives/*.deb >>$OUTPUT 2>&1 - rm -f /var/cache/apt/*.bin >>$OUTPUT 2>&1 - rm -f /var/cache/debconf/*-old >>$OUTPUT 2>&1 - rm -f /var/lib/dhcp/dhclient.leases >>$OUTPUT 2>&1 - rm -f /root/.bash_history >>$OUTPUT 2>&1 - rm -f /root/.wget-hsts >>$OUTPUT 2>&1 - rm -Rf /usr/share/doc/* >>$OUTPUT 2>&1 - rm -Rf /usr/share/info/* >>$OUTPUT 2>&1 - rm -f /usr/share/images/fluxbox/debian-squared.jpg >>$OUTPUT 2>&1 - rm -Rf /usr/share/fluxbox/nls/??* >>$OUTPUT 2>&1 - rm -Rf /usr/share/gnome/help >>$OUTPUT 2>&1 - - rm -Rf /usr/share/locale/?? >>$OUTPUT 2>&1 - rm -Rf /usr/share/locale/??_* >>$OUTPUT 2>&1 - rm -Rf /usr/share/locale/??@* >>$OUTPUT 2>&1 - rm -Rf /usr/share/locale/??? >>$OUTPUT 2>&1 - rm -Rf /usr/share/i18n/locales/*_* >>$OUTPUT 2>&1 - rm -Rf /usr/share/man/?? >>$OUTPUT 2>&1 - rm -Rf /usr/share/man/*_* >>$OUTPUT 2>&1 - - #rm -Rf /usr/share/icons/elementaryXubuntu-dark >>$OUTPUT 2>&1 - rm -Rf /usr/share/icons/gnome/256x256 >>$OUTPUT 2>&1 - - rm /usr/share/applications/compton.desktop >>$OUTPUT 2>&1 - rm /usr/share/applications/debian-uxterm.desktop >>$OUTPUT 2>&1 - rm /usr/share/applications/debian-xterm.desktop >>$OUTPUT 2>&1 - rm /usr/share/applications/htop.desktop >>$OUTPUT 2>&1 - rm /usr/share/applications/mc.desktop >>$OUTPUT 2>&1 - rm /usr/share/applications/mcedit.desktop >>$OUTPUT 2>&1 - rm /usr/share/applications/pcmanfm-desktop-pref.desktop >>$OUTPUT 2>&1 - rm /usr/share/applications/python2.7.desktop >>$OUTPUT 2>&1 - rm /usr/share/applications/python3.7.desktop >>$OUTPUT 2>&1 - rm /usr/share/applications/vim.desktop >>$OUTPUT 2>&1 - - # Unzip gzipped files (man pages), so LZMA can compress 2times better. - # First we fix symlinks, then uncompress files - # $1 = search directory - uncompress_files() { - local LINK LINE - - find "$1" -type l -name "*.gz" | while read LINE; do - LINK="$(readlink "$LINE" | sed -r 's/.gz$//')" - FILE="$(echo "$LINE" | sed -r 's/.gz$//')" - ln -sfn "$LINK" "$FILE" - rm -f "$LINE" - done - find "$1" -type f -name "*.gz" | xargs -r gunzip >>$OUTPUT 2>&1 - } - - uncompress_files /etc/alternatives >>$OUTPUT 2>&1 - uncompress_files /usr/share/man >>$OUTPUT 2>&1 - - # remove broken links - # $1 = search directory - remove_broken_links() { - find "$1" -type l -exec test ! -e {} \; -print | xargs rm -vf >>$OUTPUT 2>&1 - } - - remove_broken_links /etc/alternatives >>$OUTPUT 2>&1 - remove_broken_links /usr/share/man >>$OUTPUT 2>&1 - - set -e + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + + set +e + + rm -f /preinstall >>$OUTPUT 2>&1 + rm -f /install >>$OUTPUT 2>&1 + rm -f /install2 >>$OUTPUT 2>&1 + rm -f /cleanup >>$OUTPUT 2>&1 + rm -f /$PACKAGE_VARIANT.list >>$OUTPUT 2>&1 + rm -f /postinstall >>$OUTPUT 2>&1 + rm -rf /rootcopy-install >>$OUTPUT 2>&1 + rm -rf /patches >>$OUTPUT 2>&1 + + rm -f /etc/fstab >>$OUTPUT 2>&1 + rm -f /etc/mtab >>$OUTPUT 2>&1 + rm -f /etc/apt/sources.list~ >>$OUTPUT 2>&1 + rm -Rf /etc/systemd/system/timers.target.wants >>$OUTPUT 2>&1 + rm -f /etc/systemd/system/multi-user.target.wants/ssh.service >>$OUTPUT 2>&1 + rm -f /etc/systemd/system/multi-user.target.wants/dnsmasq.service >>$OUTPUT 2>&1 + + rm -f /etc/ssh/ssh_host* >>$OUTPUT 2>&1 + + rm -f /var/backups/* >>$OUTPUT 2>&1 + rm -f /var/cache/ldconfig/* >>$OUTPUT 2>&1 + rm -f /var/cache/debconf/* >>$OUTPUT 2>&1 + rm -f /var/cache/fontconfig/* >>$OUTPUT 2>&1 + rm -f /var/lib/apt/extended_states >>$OUTPUT 2>&1 + rm -f /var/lib/systemd/random-seed >>$OUTPUT 2>&1 + rm -f /var/lib/apt/lists/deb.* >>$OUTPUT 2>&1 + rm -Rf /root/.local/share/mc >>$OUTPUT 2>&1 + rm -Rf /root/.cache >>$OUTPUT 2>&1 + rm -f /root/.wget-hsts >>$OUTPUT 2>&1 + + rm -f /var/lib/dpkg/*-old >>$OUTPUT 2>&1 + rm -f /var/log/* >>$OUTPUT 2>&1 + rm -f /var/log/*/* >>$OUTPUT 2>&1 + rm -f /var/log/*/*/* >>$OUTPUT 2>&1 + rm -f /var/cache/apt/archives/*.deb >>$OUTPUT 2>&1 + rm -f /var/cache/apt/*.bin >>$OUTPUT 2>&1 + rm -f /var/cache/debconf/*-old >>$OUTPUT 2>&1 + rm -f /var/lib/dhcp/dhclient.leases >>$OUTPUT 2>&1 + rm -f /root/.bash_history >>$OUTPUT 2>&1 + rm -f /root/.wget-hsts >>$OUTPUT 2>&1 + rm -Rf /usr/share/doc/* >>$OUTPUT 2>&1 + rm -Rf /usr/share/info/* >>$OUTPUT 2>&1 + rm -f /usr/share/images/fluxbox/debian-squared.jpg >>$OUTPUT 2>&1 + rm -Rf /usr/share/fluxbox/nls/??* >>$OUTPUT 2>&1 + rm -Rf /usr/share/gnome/help >>$OUTPUT 2>&1 + + rm -Rf /usr/share/locale/?? >>$OUTPUT 2>&1 + rm -Rf /usr/share/locale/??_* >>$OUTPUT 2>&1 + rm -Rf /usr/share/locale/??@* >>$OUTPUT 2>&1 + rm -Rf /usr/share/locale/??? >>$OUTPUT 2>&1 + rm -Rf /usr/share/i18n/locales/*_* >>$OUTPUT 2>&1 + rm -Rf /usr/share/man/?? >>$OUTPUT 2>&1 + rm -Rf /usr/share/man/*_* >>$OUTPUT 2>&1 + + #rm -Rf /usr/share/icons/elementaryXubuntu-dark >>$OUTPUT 2>&1 + rm -Rf /usr/share/icons/gnome/256x256 >>$OUTPUT 2>&1 + + rm /usr/share/applications/compton.desktop >>$OUTPUT 2>&1 + rm /usr/share/applications/debian-uxterm.desktop >>$OUTPUT 2>&1 + rm /usr/share/applications/debian-xterm.desktop >>$OUTPUT 2>&1 + rm /usr/share/applications/htop.desktop >>$OUTPUT 2>&1 + rm /usr/share/applications/mc.desktop >>$OUTPUT 2>&1 + rm /usr/share/applications/mcedit.desktop >>$OUTPUT 2>&1 + rm /usr/share/applications/pcmanfm-desktop-pref.desktop >>$OUTPUT 2>&1 + rm /usr/share/applications/python2.7.desktop >>$OUTPUT 2>&1 + rm /usr/share/applications/python3.7.desktop >>$OUTPUT 2>&1 + rm /usr/share/applications/vim.desktop >>$OUTPUT 2>&1 + + # Unzip gzipped files (man pages), so LZMA can compress 2times better. + # First we fix symlinks, then uncompress files + # $1 = search directory + uncompress_files() { + local LINK LINE + + find "$1" -type l -name "*.gz" | while read LINE; do + LINK="$(readlink "$LINE" | sed -r 's/.gz$//')" + FILE="$(echo "$LINE" | sed -r 's/.gz$//')" + ln -sfn "$LINK" "$FILE" + rm -f "$LINE" + done + find "$1" -type f -name "*.gz" | xargs -r gunzip >>$OUTPUT 2>&1 + } + + uncompress_files /etc/alternatives >>$OUTPUT 2>&1 + uncompress_files /usr/share/man >>$OUTPUT 2>&1 + + # remove broken links + # $1 = search directory + remove_broken_links() { + find "$1" -type l -exec test ! -e {} \; -print | xargs rm -vf >>$OUTPUT 2>&1 + } + + remove_broken_links /etc/alternatives >>$OUTPUT 2>&1 + remove_broken_links /usr/share/man >>$OUTPUT 2>&1 + + set -e } @@ -963,23 +1361,23 @@ function chroot_build_cleanup() { # # ================================================================= function hostreq_pkg_list() { - echo -e "${YELLOW}=====> installing required software for host system ...${ENDCOLOUR}" - $APT_CMD update >>$OUTPUT 2>&1 - - if [ -f $SCRIPT_DIR/linux-live/pkglists/hostreq.list ]; then - $APT_CMD install -y \ - $(grep -vE "^\s*#" $SCRIPT_DIR/linux-live/pkglists/hostreq.list | tr "\n" " ") >>$OUTPUT 2>&1 - else - $APT_CMD install -y \ - sudo debootstrap genisoimage >>$OUTPUT 2>&1 - fi - if [ $DISTRIBUTION_ARCH = "arm64" ]; then - $APT_CMD install -y \ - grub-efi-arm64-bin >>$OUTPUT 2>&1 - else - $APT_CMD install -y \ - grub-efi-amd64-bin grub-pc-bin >>$OUTPUT 2>&1 - fi + echo -e "${YELLOW}=====> installing required software for host system ...${ENDCOLOUR}" + $APT_CMD update >>$OUTPUT 2>&1 + + if [ -f $SCRIPT_DIR/linux-live/pkglists/hostreq.list ]; then + $APT_CMD install -y \ + $(grep -vE "^\s*#" $SCRIPT_DIR/linux-live/pkglists/hostreq.list | tr "\n" " ") >>$OUTPUT 2>&1 + else + $APT_CMD install -y \ + sudo debootstrap genisoimage >>$OUTPUT 2>&1 + fi + if [ $DISTRIBUTION_ARCH = "arm64" ]; then + $APT_CMD install -y \ + grub-efi-arm64-bin >>$OUTPUT 2>&1 + else + $APT_CMD install -y \ + grub-efi-amd64-bin grub-pc-bin >>$OUTPUT 2>&1 + fi } # ================================================================= @@ -987,16 +1385,34 @@ function hostreq_pkg_list() { # # ================================================================= function prereq_pkg_list() { - echo -e "${YELLOW}=====> installing prerequested software for chroot system ...${ENDCOLOUR}" + echo -e "${YELLOW}=====> installing prerequested software for chroot system ...${ENDCOLOUR}" - if [ -f $SCRIPT_DIR/pkglists/prereq.list ]; then - $APT_CMD update >>$OUTPUT 2>&1 && - echo -e "${YELLOW}=====> upgrading chroot system ...${ENDCOLOUR}" && - $APT_CMD upgrade $APT_OPTIONS >>$OUTPUT 2>&1 && - echo -e "${YELLOW}=====> installing packages ...${ENDCOLOUR}" && - $APT_CMD install $APT_OPTIONS \ - $(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/prereq.list | tr "\n" " ") >>$OUTPUT 2>&1 - fi + if [ ! -f /etc/apt/apt.conf.d/000MiniOS ]; then + cat <<'EOF' >/etc/apt/apt.conf.d/000MiniOS +APT::Install-Recommends "0"; +APT::Install-Suggests "0"; +Acquire::Languages { "none"; } +EOF + fi + if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then + if [ -f $SCRIPT_DIR/pkglists/prereq.list ]; then + $APT_CMD update + echo -e "${YELLOW}=====> upgrading chroot system ...${ENDCOLOUR}" && + $APT_CMD upgrade $APT_OPTIONS >>$OUTPUT 2>&1 && + echo -e "${YELLOW}=====> installing packages ...${ENDCOLOUR}" && + $APT_CMD install $APT_OPTIONS \ + $(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/prereq.list | tr "\n" " ") + fi + else + if [ -f $SCRIPT_DIR/pkglists/prereq.list ]; then + $APT_CMD update >>$OUTPUT 2>&1 && + echo -e "${YELLOW}=====> upgrading chroot system ...${ENDCOLOUR}" && + $APT_CMD upgrade $APT_OPTIONS >>$OUTPUT 2>&1 && + echo -e "${YELLOW}=====> installing packages ...${ENDCOLOUR}" && + $APT_CMD install $APT_OPTIONS \ + $(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/prereq.list | tr "\n" " ") >>$OUTPUT 2>&1 + fi + fi } @@ -1005,54 +1421,72 @@ function prereq_pkg_list() { # # ================================================================= function main_pkg_list() { - echo -e "${YELLOW}=====> installing main packages for chroot system ...${ENDCOLOUR}" - - if [ -f /linux-live/basesystem/01-core/preinstall ]; then - chmod +x /linux-live/basesystem/01-core/preinstall - /usr/bin/env \ - OUTPUT=$OUTPUT \ - DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ - APT_CMD=$APT_CMD \ - APT_OPTIONS=$APT_OPTIONS \ - APT_OPTIONS2=$APT_OPTIONS2 \ - LIVE_TYPE=$LIVE_TYPE \ - DISTRIBUTION=$DISTRIBUTION \ - PACKAGE_VARIANT=$PACKAGE_VARIANT \ - /linux-live/basesystem/01-core/preinstall - fi - : ' if [ "$(ls -A /linux-live/basesystem/01-core/rootcopy-install)" != "" ]; then + echo -e "${YELLOW}=====> installing main packages for chroot system ...${ENDCOLOUR}" + + $APT_CMD update + + if [ -f /linux-live/basesystem/01-core/preinstall ]; then + chmod +x /linux-live/basesystem/01-core/preinstall + /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + /linux-live/basesystem/01-core/preinstall + fi + : ' if [ "$(ls -A /linux-live/basesystem/01-core/rootcopy-install)" != "" ]; then (cd /linux-live/basesystem/01-core/rootcopy-install && cp --parents -afr * /) fi' - if [ -f /linux-live/basesystem/01-core/install ]; then - chmod +x /linux-live/basesystem/01-core/install - /usr/bin/env \ - OUTPUT=$OUTPUT \ - DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ - APT_CMD=$APT_CMD \ - APT_OPTIONS=$APT_OPTIONS \ - APT_OPTIONS2=$APT_OPTIONS2 \ - KERNEL_ARCH=$KERNEL_ARCH \ - LIVE_TYPE=$LIVE_TYPE \ - DISTRIBUTION=$DISTRIBUTION \ - PACKAGE_VARIANT=$PACKAGE_VARIANT \ - COMP_TYPE=$COMP_TYPE \ - /linux-live/basesystem/01-core/install - fi - if [ -f /linux-live/basesystem/01-core/postinstall ]; then - chmod +x /linux-live/basesystem/01-core/postinstall - /usr/bin/env \ - OUTPUT=$OUTPUT \ - DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ - APT_CMD=$APT_CMD \ - APT_OPTIONS=$APT_OPTIONS \ - APT_OPTIONS2=$APT_OPTIONS2 \ - LIVE_TYPE=$LIVE_TYPE \ - DISTRIBUTION=$DISTRIBUTION \ - PACKAGE_VARIANT=$PACKAGE_VARIANT \ - /linux-live/basesystem/01-core/postinstall - fi - - chroot_build_cleanup + if [ -f /linux-live/basesystem/01-core/install ]; then + chmod +x /linux-live/basesystem/01-core/install + /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + /linux-live/basesystem/01-core/install + fi + if [ -f /linux-live/basesystem/01-core/postinstall ]; then + chmod +x /linux-live/basesystem/01-core/postinstall + /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + /linux-live/basesystem/01-core/postinstall + fi + + chroot_build_cleanup } # ================================================================= @@ -1060,15 +1494,15 @@ function main_pkg_list() { # # ================================================================= function chroot_pkg_install() { - current_process + current_process - main_pkg_list + main_pkg_list - # remove unused - $APT_CMD autoremove $APT_OPTIONS >>$OUTPUT 2>&1 + # remove unused + $APT_CMD autoremove $APT_OPTIONS >>$OUTPUT 2>&1 - # clean up apt cache - $APT_CMD clean $APT_OPTIONS >>$OUTPUT 2>&1 + # clean up apt cache + $APT_CMD clean $APT_OPTIONS >>$OUTPUT 2>&1 } # ================================================================= @@ -1076,37 +1510,42 @@ function chroot_pkg_install() { # Больше не используется, будет убрано после успешного тестирования. # ================================================================= function chroot_configure() { - current_process + current_process - echo "Set up password for user 'root'" >>$OUTPUT 2>&1 - echo root:toor | chpasswd >>$OUTPUT 2>&1 + if [ $CLOUD != "true" ]; then + (cd /linux-live/basesystem/01-core/rootcopy-install && cp --parents -afr * /) + echo "Set up password for user 'root'" >>$OUTPUT 2>&1 + echo root:$ROOT_PASSWORD | chpasswd >>$OUTPUT 2>&1 - echo "Set up user 'live'" >>$OUTPUT 2>&1 - adduser --gecos '' live --disabled-password >>$OUTPUT 2>&1 - echo "Set up password for user 'live'" >>$OUTPUT 2>&1 - echo live:evil | chpasswd >>$OUTPUT 2>&1 - #addgroup live adm >>$OUTPUT 2>&1 - #addgroup live sudo >>$OUTPUT 2>&1 - #addgroup live audio >>$OUTPUT 2>&1 - #addgroup live plugdev >>$OUTPUT 2>&1 - #addgroup live users >>$OUTPUT 2>&1 - #addgroup live live >>$OUTPUT 2>&1 - usermod -a -G sudo live + echo "Set up user '$USER_NAME'" >>$OUTPUT 2>&1 + adduser --uid 1000 --gecos '' $USER_NAME --disabled-password >>$OUTPUT 2>&1 + echo "Set up password for user '$USER_NAME'" >>$OUTPUT 2>&1 + echo $USER_NAME:$USER_PASSWORD | chpasswd >>$OUTPUT 2>&1 + usermod -a -G sudo $USER_NAME - (cd /linux-live/basesystem/01-core/rootcopy-install && cp --parents -afr * /) + : 'if [ ! -d /home/$USER_NAME ]; then + mkdir -p /home/$USER_NAME + fi + cp -r /etc/skel/* /home/$USER_NAME - chown live:live /home/live - chown -R live:live /home/live + chown $USER_NAME:$USER_NAME /home/$USER_NAME + chown -R $USER_NAME:$USER_NAME /home/$USER_NAME' - cat </etc/sudoers.d/90-minios + cat </etc/sudoers.d/90-minios # live user is default user in minios. # It needs passwordless sudo functionality. -live ALL=(ALL) NOPASSWD:ALL +$USER_NAME ALL=(ALL) NOPASSWD:ALL EOF + else + echo "Set up password for user 'root'" >>$OUTPUT 2>&1 + echo root:$ROOT_PASSWORD | chpasswd >>$OUTPUT 2>&1 + (cd /linux-live/basesystem/01-core/rootcopy-install && cp --parents -afr * /) + rm -rf /home/live + fi - if [ ! -d /etc/NetworkManager ]; then - echo "Enable dhclient.service autostart." >>$OUTPUT 2>&1 - cat </usr/lib/systemd/system/dhclient.service + if [ ! -d /etc/NetworkManager ]; then + echo "Enable dhclient.service autostart." >>$OUTPUT 2>&1 + cat </usr/lib/systemd/system/dhclient.service [Unit] Description=DHCP Client Documentation=man:dhclient(8) @@ -1124,17 +1563,36 @@ PIDFile=/run/dhclient.pid WantedBy=multi-user.target WantedBy=network-online.target EOF - systemctl enable dhclient >>$OUTPUT 2>&1 - fi + systemctl enable dhclient >>$OUTPUT 2>&1 + elif [ -d /etc/NetworkManager ] && [ $DISTRIBUTION_TYPE = "ubuntu" ]; then + cat </etc/netplan/01-netcfg.yaml +# This file describes the network interfaces available on your system +# For more information, see netplan(5). +# Set and change netplan renderer to NetworkManager GUI tool +network: + version: 2 + renderer: NetworkManager + +EOF + cat </etc/NetworkManager/NetworkManager.conf +[main] +rc-manager=resolvconf +plugins=ifupdown,keyfile +dns=dnsmasq +[ifupdown] +managed=false - if [ -f /etc/systemd/system/multi-user.target.wants/grub-initrd-fallback.service ]; then - echo "Disable grub-initrd-fallback.service autostart." - systemctl disable grub-initrd-fallback.service - fi +EOF + fi - if grep openssh-server $SCRIPT_DIR/basesystem/01-core/$PACKAGE_VARIANT.list >>$OUTPUT 2>&1; then - echo "Enable ssh.service autostart." >>$OUTPUT 2>&1 - cat </usr/lib/systemd/system/ssh-keygen.service + if [ -f /etc/systemd/system/multi-user.target.wants/grub-initrd-fallback.service ]; then + echo "Disable grub-initrd-fallback.service autostart." + systemctl disable grub-initrd-fallback.service + fi + + if grep openssh-server $SCRIPT_DIR/basesystem/01-core/$PACKAGE_VARIANT.list >>$OUTPUT 2>&1; then + echo "Enable ssh.service autostart." >>$OUTPUT 2>&1 + cat </usr/lib/systemd/system/ssh-keygen.service [Unit] Description=Generate sshd keys Before=ssh.service @@ -1148,14 +1606,16 @@ StandardOutput=journal [Install] WantedBy=multi-user.target EOF - sed -i 's,#PermitRootLogin prohibit-password,PermitRootLogin yes,g' /etc/ssh/sshd_config - sed -i 's,#PasswordAuthentication yes,PasswordAuthentication yes,g' /etc/ssh/sshd_config - systemctl enable ssh-keygen >>$OUTPUT 2>&1 - systemctl enable ssh >>$OUTPUT 2>&1 - fi - - if [ ! -f /usr/share/sudo ]; then - cat </usr/share/sudo + if [ $CLOUD != "true" ]; then + sed -i 's,#PermitRootLogin prohibit-password,PermitRootLogin yes,g' /etc/ssh/sshd_config + sed -i 's,#PasswordAuthentication yes,PasswordAuthentication yes,g' /etc/ssh/sshd_config + fi + systemctl enable ssh-keygen >>$OUTPUT 2>&1 + systemctl enable ssh >>$OUTPUT 2>&1 + fi + + if [ ! -f /usr/share/sudo ]; then + cat </usr/share/sudo #!/bin/bash if [ "$#" -lt 1 ]; then echo "Usage: sudo [command] [arguments]" @@ -1168,10 +1628,10 @@ fi echo "Sudo is not installed. Run the command as root or install sudo." EOF - fi + fi - if [ $DISTRIBUTION_TYPE = "debian" ]; then - cat </etc/issue + if [ $CLOUD != "true" ]; then + cat </etc/issue \l @@ -1180,32 +1640,63 @@ EOF - Thank you for using MiniOS. - Based on Debian GNU/Linux. - Powered by Slax. + Thank you for using MiniOS. + Based on Debian GNU/Linux. + Powered by Slax. + + :::: :::: ::::::::::: :::: ::: ::::::::::: :::::::: ::::::::  + +:+:+: :+:+:+ :+: :+:+: :+: :+: :+: :+: :+: :+:  + +:+ +:+:+ +:+ +:+ :+:+:+ +:+ +:+ +:+ +:+ +:+  + +#+ +:+ +#+ +#+ +#+ +:+ +#+ +#+ +#+ +:+ +#++:++#++  + +#+ +#+ +#+ +#+ +#+#+# +#+ +#+ +#+ +#+  + #+# #+# #+# #+# #+#+# #+# #+# #+# #+# #+#  + ### ### ########### ### #### ########### ######## ########  - :::: :::: ::::::::::: :::: ::: ::::::::::: :::::::: ::::::::  - +:+:+: :+:+:+ :+: :+:+: :+: :+: :+: :+: :+: :+:  - +:+ +:+:+ +:+ +:+ :+:+:+ +:+ +:+ +:+ +:+ +:+  - +#+ +:+ +#+ +#+ +#+ +:+ +#+ +#+ +#+ +:+ +#++:++#++  - +#+ +#+ +#+ +#+ +#+#+# +#+ +#+ +#+ +#+  - #+# #+# #+# #+# #+#+# #+# #+# #+# #+# #+#  - ### ### ########### ### #### ########### ######## ########  + Root login name: root + Password: $ROOT_PASSWORD + User login name: $USER_NAME + Password: $USER_PASSWORD - : : - : Root login name: root : - : Password: toor : - : User login name: live : - : Password: evil : +EOF + else + cat </etc/issue + + + \l + + + + + + Thank you for using MiniOS. + Based on Debian GNU/Linux. + Powered by Slax. + + :::: :::: ::::::::::: :::: ::: ::::::::::: :::::::: ::::::::  + +:+:+: :+:+:+ :+: :+:+: :+: :+: :+: :+: :+: :+:  + +:+ +:+:+ +:+ +:+ :+:+:+ +:+ +:+ +:+ +:+ +:+  + +#+ +:+ +#+ +#+ +#+ +:+ +#+ +#+ +#+ +:+ +#++:++#++  + +#+ +#+ +#+ +#+ +#+#+# +#+ +#+ +#+ +#+  + #+# #+# #+# #+# #+#+# #+# #+# #+# #+# #+#  + ### ### ########### ### #### ########### ######## ########  + + User login name set by + cloud-init. You must use + your ssh key to login. + Root login name: root + Password: $ROOT_PASSWORD + + + EOF - fi + fi } # ================================================================= @@ -1213,36 +1704,36 @@ EOF # # ================================================================= function chroot_finish_up() { - current_process - - # truncate machine id (why??) - truncate -s 0 /etc/machine-id >>$OUTPUT 2>&1 - - # remove diversion (why??) - rm /sbin/initctl >>$OUTPUT 2>&1 - dpkg-divert --rename --remove /sbin/initctl >>$OUTPUT 2>&1 - - # remove ssh config - #rm -f /etc/ssh/ssh_host* - - # clean up useless stuff - rm -rf /tmp/* ~/.bash_history >>$OUTPUT 2>&1 - rm -rf ~/.cache - find /var/log/ -type f | xargs rm -f >>$OUTPUT 2>&1 - rm -f /etc/ssh/ssh_host* - rm -f /var/backups/* >>$OUTPUT 2>&1 - rm -f /var/cache/ldconfig/* >>$OUTPUT 2>&1 - #rm -f /var/cache/debconf/* >>$OUTPUT 2>&1 - rm -f /var/cache/fontconfig/* >>$OUTPUT 2>&1 - rm -f /var/cache/apt/archives/*.deb >>$OUTPUT 2>&1 - rm -f /var/cache/apt/*.bin >>$OUTPUT 2>&1 - rm -f /var/cache/debconf/*-old >>$OUTPUT 2>&1 - rm -f /var/lib/apt/extended_states >>$OUTPUT 2>&1 - rm -f /var/lib/apt/lists/*Packages >>$OUTPUT 2>&1 - rm -f /var/lib/apt/lists/*Translation* >>$OUTPUT 2>&1 - rm -f /var/lib/apt/lists/*InRelease >>$OUTPUT 2>&1 - rm -f /var/lib/apt/lists/deb.* >>$OUTPUT 2>&1 - rm -f /var/lib/dpkg/*-old >>$OUTPUT 2>&1 + current_process + + # truncate machine id (why??) + truncate -s 0 /etc/machine-id >>$OUTPUT 2>&1 + + # remove diversion (why??) + rm /sbin/initctl >>$OUTPUT 2>&1 + dpkg-divert --rename --remove /sbin/initctl >>$OUTPUT 2>&1 + + # remove ssh config + #rm -f /etc/ssh/ssh_host* + + # clean up useless stuff + rm -rf /tmp/* ~/.bash_history >>$OUTPUT 2>&1 + rm -rf ~/.cache + find /var/log/ -type f | xargs rm -f >>$OUTPUT 2>&1 + rm -f /etc/ssh/ssh_host* + rm -f /var/backups/* >>$OUTPUT 2>&1 + rm -f /var/cache/ldconfig/* >>$OUTPUT 2>&1 + #rm -f /var/cache/debconf/* >>$OUTPUT 2>&1 + rm -f /var/cache/fontconfig/* >>$OUTPUT 2>&1 + rm -f /var/cache/apt/archives/*.deb >>$OUTPUT 2>&1 + rm -f /var/cache/apt/*.bin >>$OUTPUT 2>&1 + rm -f /var/cache/debconf/*-old >>$OUTPUT 2>&1 + rm -f /var/lib/apt/extended_states >>$OUTPUT 2>&1 + rm -f /var/lib/apt/lists/*Packages >>$OUTPUT 2>&1 + rm -f /var/lib/apt/lists/*Translation* >>$OUTPUT 2>&1 + rm -f /var/lib/apt/lists/*InRelease >>$OUTPUT 2>&1 + rm -f /var/lib/apt/lists/deb.* >>$OUTPUT 2>&1 + rm -f /var/lib/dpkg/*-old >>$OUTPUT 2>&1 } @@ -1257,21 +1748,21 @@ function chroot_finish_up() { # # ================================================================= function module_check_mounted() { - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - if grep -qs "$MODULE_MERGED_DIR" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/dev" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/run" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/proc" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/sys" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/dev/pts" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/tmp" /proc/mounts; then - echo -e "${BOLD}${LIGHTYELLOW}Сhroot contains mounted filesystems.${ENDCOLOUR}" - if [ "$UNATTENDED" = "1" ]; then - module_chroot_umount_fs - else - read -r -p "$(echo -e ""Do you want to ${GREEN}unmount them${ENDCOLOUR}? [${BOLD}${GREEN}Y${ENDCOLOUR}/n])" response - response=${response,,} - if [[ "$response" =~ ^(no|n)$ ]]; then - exit 1 - else - module_chroot_umount_fs - fi - fi - fi + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + if grep -qs "$MODULE_MERGED_DIR" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/dev" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/run" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/proc" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/sys" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/dev/pts" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/tmp" /proc/mounts; then + echo -e "${BOLD}${LIGHTYELLOW}Сhroot contains mounted filesystems.${ENDCOLOUR}" + if [ "$UNATTENDED" = "1" ]; then + module_chroot_umount_fs + else + read -r -p "$(echo -e ""Do you want to ${GREEN}unmount them${ENDCOLOUR}? [${BOLD}${GREEN}Y${ENDCOLOUR}/n])" response + response=${response,,} + if [[ "$response" =~ ^(no|n)$ ]]; then + exit 1 + else + module_chroot_umount_fs + fi + fi + fi } # ================================================================= @@ -1279,26 +1770,26 @@ function module_check_mounted() { # # ================================================================= function module_check_build_dir() { - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - if [ "$UNATTENDED" = "1" ]; then - #echo -e "${RED}!!!Unattended installation!!!${ENDCOLOUR}" - echo -e "The working directory is ${MAGENTA}$MODULE_UPPER_DIR${ENDCOLOUR}." - if [ "$(ls -A $MODULE_UPPER_DIR)" != "" ]; then - module_cleanup - module_check_mounted - fi - else - # ▼ должно быть только перенаправление ошибки! - if [ "$(ls -A $MODULE_UPPER_DIR)" != "" ]; then - echo -e "${MAGENTA}$MODULE_UPPER_DIR${ENDCOLOUR} is not empty." - module_cleanup - module_check_mounted - echo -e "The working directory is ${MAGENTA}$MODULE_MERGED_DIR${ENDCOLOUR}." - else - module_check_mounted - echo -e "The working directory is ${MAGENTA}$MODULE_MERGED_DIR${ENDCOLOUR}." - fi - fi + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + if [ "$UNATTENDED" = "1" ]; then + #echo -e "${RED}!!!Unattended installation!!!${ENDCOLOUR}" + echo -e "The working directory is ${MAGENTA}$MODULE_UPPER_DIR${ENDCOLOUR}." + if [ "$(ls -A $MODULE_UPPER_DIR)" != "" ]; then + module_cleanup + module_check_mounted + fi + else + # ▼ должно быть только перенаправление ошибки! + if [ "$(ls -A $MODULE_UPPER_DIR)" != "" ]; then + echo -e "${MAGENTA}$MODULE_UPPER_DIR${ENDCOLOUR} is not empty." + module_cleanup + module_check_mounted + echo -e "The working directory is ${MAGENTA}$MODULE_MERGED_DIR${ENDCOLOUR}." + else + module_check_mounted + echo -e "The working directory is ${MAGENTA}$MODULE_MERGED_DIR${ENDCOLOUR}." + fi + fi } # ================================================================= @@ -1306,70 +1797,77 @@ function module_check_build_dir() { # # ================================================================= function module_chroot_mount_fs() { - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - - local MODULES MODULE_LOWER_DIR - - module_check_mounted - - if [ $UNION_BUILD_TYPE = "overlayfs" ]; then - MODULES_LIST="" - MODULES=($PARENT_DIR/image/$LIVEKITNAME/*.$BEXT) - for ((i = ${#MODULES[@]} - 1; i >= 0; i--)); do - MODULE_LOWER_DIR=$(basename ${MODULES[$i]} .$BEXT) - mkdir -p $MODULES_DIR/lower/$MODULE_LOWER_DIR-lower - mount ${MODULES[$i]} $MODULES_DIR/lower/$MODULE_LOWER_DIR-lower - MODULES_LIST=$MODULES_LIST":""$MODULES_DIR/lower/$MODULE_LOWER_DIR-lower" - done - MODULES_LIST=${MODULES_LIST:1} - - mkdir -p $MODULE_UPPER_DIR $MODULE_WORK_DIR $MODULE_MERGED_DIR - - mount -t overlay overlay -o lowerdir=$MODULES_LIST,upperdir=$MODULE_UPPER_DIR,workdir=$MODULE_WORK_DIR $MODULE_MERGED_DIR - elif [ $UNION_BUILD_TYPE = "aufs" ]; then - MODULES_LIST="" - MODULES=($PARENT_DIR/image/$LIVEKITNAME/*.$BEXT) - for ((i = ${#MODULES[@]} - 1; i >= 0; i--)); do - MODULE_LOWER_DIR=$(basename ${MODULES[$i]} .$BEXT) - mkdir -p $MODULES_DIR/lower/$MODULE_LOWER_DIR-lower - mount ${MODULES[$i]} $MODULES_DIR/lower/$MODULE_LOWER_DIR-lower - MODULES_LIST=$MODULES_LIST":""$MODULES_DIR/lower/$MODULE_LOWER_DIR-lower""=ro" - done - MODULES_LIST=${MODULES_LIST:1} - - mkdir -p $MODULE_UPPER_DIR $MODULE_WORK_DIR $MODULE_MERGED_DIR - - mount -t aufs -o br:$MODULE_UPPER_DIR=rw:$MODULES_LIST aufs $MODULE_MERGED_DIR - fi - - if [ ! -d $MODULE_MERGED_DIR/dev ]; then - mkdir -p $MODULE_MERGED_DIR/dev - fi - if [ ! -d $MODULE_MERGED_DIR/run ]; then - mkdir -p $MODULE_MERGED_DIR/run - fi - if [ ! -d $MODULE_MERGED_DIR/proc ]; then - mkdir -p $MODULE_MERGED_DIR/proc - fi - if [ ! -d $MODULE_MERGED_DIR/sys ]; then - mkdir -p $MODULE_MERGED_DIR/sys - fi - if [ ! -d $MODULE_MERGED_DIR/tmp ]; then - mkdir -p $MODULE_MERGED_DIR/tmp - fi - - mount --bind /dev $MODULE_MERGED_DIR/dev - if [ -f /.dockerenv ] || [ "$container" = "podman" ]; then - mkdir -p $MODULE_MERGED_DIR/run/resolvconf - touch $MODULE_MERGED_DIR/run/resolvconf/resolv.conf - mount --bind /etc/resolv.conf $MODULE_MERGED_DIR/run/resolvconf/resolv.conf - else - mount --bind /run $MODULE_MERGED_DIR/run - fi - mount none -t proc $MODULE_MERGED_DIR/proc - mount none -t sysfs $MODULE_MERGED_DIR/sys - mount none -t devpts $MODULE_MERGED_DIR/dev/pts - mount none -t tmpfs $MODULE_MERGED_DIR/tmp + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + + local MODULES MODULE_LOWER_DIR + + module_check_mounted + + if [ $UNION_BUILD_TYPE = "overlayfs" ]; then + MODULES_LIST="" + MODULES=($PARENT_DIR/image/$LIVEKITNAME/*.$BEXT) + for ((i = ${#MODULES[@]} - 1; i >= 0; i--)); do + MODULE_LOWER_DIR=$(basename ${MODULES[$i]} .$BEXT) + mkdir -p $MODULES_DIR/lower/$MODULE_LOWER_DIR-lower + mount ${MODULES[$i]} $MODULES_DIR/lower/$MODULE_LOWER_DIR-lower + MODULES_LIST=$MODULES_LIST":""$MODULES_DIR/lower/$MODULE_LOWER_DIR-lower" + done + MODULES_LIST=${MODULES_LIST:1} + + mkdir -p $MODULE_UPPER_DIR $MODULE_WORK_DIR $MODULE_MERGED_DIR + + mount -t overlay overlay -o lowerdir=$MODULES_LIST,upperdir=$MODULE_UPPER_DIR,workdir=$MODULE_WORK_DIR $MODULE_MERGED_DIR + elif [ $UNION_BUILD_TYPE = "aufs" ]; then + MODULES_LIST="" + MODULES=($PARENT_DIR/image/$LIVEKITNAME/*.$BEXT) + for ((i = ${#MODULES[@]} - 1; i >= 0; i--)); do + MODULE_LOWER_DIR=$(basename ${MODULES[$i]} .$BEXT) + mkdir -p $MODULES_DIR/lower/$MODULE_LOWER_DIR-lower + mount ${MODULES[$i]} $MODULES_DIR/lower/$MODULE_LOWER_DIR-lower + MODULES_LIST=$MODULES_LIST":""$MODULES_DIR/lower/$MODULE_LOWER_DIR-lower""=ro" + done + MODULES_LIST=${MODULES_LIST:1} + + mkdir -p $MODULE_UPPER_DIR $MODULE_WORK_DIR $MODULE_MERGED_DIR + + mount -t aufs -o br:$MODULE_UPPER_DIR=rw:$MODULES_LIST aufs $MODULE_MERGED_DIR + fi + + if [ ! -d $MODULE_MERGED_DIR/dev ]; then + mkdir -p $MODULE_MERGED_DIR/dev + fi + if [ ! -d $MODULE_MERGED_DIR/run ]; then + mkdir -p $MODULE_MERGED_DIR/run + fi + if [ ! -d $MODULE_MERGED_DIR/proc ]; then + mkdir -p $MODULE_MERGED_DIR/proc + fi + if [ ! -d $MODULE_MERGED_DIR/sys ]; then + mkdir -p $MODULE_MERGED_DIR/sys + fi + if [ ! -d $MODULE_MERGED_DIR/tmp ]; then + mkdir -p $MODULE_MERGED_DIR/tmp + fi + + mount --bind /dev $MODULE_MERGED_DIR/dev + + if [ -f /.dockerenv ] || [ "$container" = "podman" ]; then + if [ -L $MODULE_MERGED_DIR/etc/resolv.conf ]; then + mv $MODULE_MERGED_DIR/etc/resolv.conf $MODULE_MERGED_DIR/etc/resolv.conf.bak + echo "nameserver 8.8.8.8" >$MODULE_MERGED_DIR/etc/resolv.conf + fi + : 'if [ ! -d $MODULE_MERGED_DIR/run/resolvconf ]; then + mkdir -p $MODULE_MERGED_DIR/run/resolvconf + touch $MODULE_MERGED_DIR/run/resolvconf/resolv.conf + mount --bind /etc/resolv.conf $MODULE_MERGED_DIR/run/resolvconf/resolv.conf + fi' + else + mount --bind /run $MODULE_MERGED_DIR/run + fi + mount none -t proc $MODULE_MERGED_DIR/proc + mount none -t sysfs $MODULE_MERGED_DIR/sys + mount none -t devpts $MODULE_MERGED_DIR/dev/pts + mount none -t tmpfs $MODULE_MERGED_DIR/tmp } # ================================================================= @@ -1377,50 +1875,77 @@ function module_chroot_mount_fs() { # # ================================================================= function module_chroot_umount_fs() { - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - - local MODULES MODULE_LOWER_DIR - - set +e - if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then - umount $MODULE_MERGED_DIR/proc - umount $MODULE_MERGED_DIR/sys - umount $MODULE_MERGED_DIR/dev/pts - umount $MODULE_MERGED_DIR/tmp - umount $MODULE_MERGED_DIR/dev - if [ -f /.dockerenv ] || [ "$container" = "podman" ]; then - umount $MODULE_MERGED_DIR/run/resolvconf/resolv.conf - rm -f $MODULE_MERGED_DIR/run/resolvconf/resolv.conf - rmdir $MODULE_MERGED_DIR/run/resolvconf - else - umount $MODULE_MERGED_DIR/run - fi - umount $MODULE_MERGED_DIR - else - umount $MODULE_MERGED_DIR/proc >>$OUTPUT 2>&1 - umount $MODULE_MERGED_DIR/sys >>$OUTPUT 2>&1 - umount $MODULE_MERGED_DIR/dev/pts >>$OUTPUT 2>&1 - umount $MODULE_MERGED_DIR/tmp >>$OUTPUT 2>&1 - umount $MODULE_MERGED_DIR/dev >>$OUTPUT 2>&1 - if [ -f /.dockerenv ] || [ "$container" = "podman" ]; then - umount $MODULE_MERGED_DIR/run/resolvconf/resolv.conf >>$OUTPUT 2>&1 - rm -f $MODULE_MERGED_DIR/run/resolvconf/resolv.conf - rmdir $MODULE_MERGED_DIR/run/resolvconf - else - umount $MODULE_MERGED_DIR/run >>$OUTPUT 2>&1 - fi - umount $MODULE_MERGED_DIR >>$OUTPUT 2>&1 - fi - - MODULES=($PARENT_DIR/image/$LIVEKITNAME/*.$BEXT) - for ((i = ${#MODULES[@]} - 1; i >= 0; i--)); do - MODULE_LOWER_DIR=$(basename ${MODULES[$i]} .$BEXT) - umount $MODULES_DIR/lower/$MODULE_LOWER_DIR-lower - done - - set -e - - module_check_mounted + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + + local MODULES MODULE_LOWER_DIR + + set +e + ls -la /dev/stdout + if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then + umount $MODULE_MERGED_DIR/proc + umount $MODULE_MERGED_DIR/sys + umount $MODULE_MERGED_DIR/dev/pts + umount $MODULE_MERGED_DIR/tmp + umount $MODULE_MERGED_DIR/dev + if [ -f /.dockerenv ] || [ "$container" = "podman" ]; then + ls -la $MODULE_MERGED_DIR/etc/resolv.* + if [ -L $MODULE_MERGED_DIR/etc/resolv.conf.bak ] && [ ! -L $MODULE_MERGED_DIR/etc/resolv.conf ]; then + ls -la $MODULE_MERGED_DIR/etc/resolv.* + rm -f $MODULE_MERGED_DIR/etc/resolv.conf + ls -la $MODULE_MERGED_DIR/etc/resolv.* + mv $MODULE_MERGED_DIR/etc/resolv.conf.bak $MODULE_MERGED_DIR/etc/resolv.conf + ls -la $MODULE_MERGED_DIR/etc/resolv.* + elif [ -L $MODULE_MERGED_DIR/etc/resolv.conf.bak ] && [ -L $MODULE_MERGED_DIR/etc/resolv.conf ]; then + rm -f $MODULE_MERGED_DIR/etc/resolv.conf.bak + fi + : 'umount $MODULE_MERGED_DIR/run/resolvconf/resolv.conf + rm -f $MODULE_MERGED_DIR/run/resolvconf/resolv.conf + rmdir $MODULE_MERGED_DIR/run/resolvconf' + else + umount $MODULE_MERGED_DIR/run + fi + umount $MODULE_MERGED_DIR + + if [ -f /.dockerenv ] || [ "$container" = "podman" ]; then + rm -f $MODULE_UPPER_DIR/etc/resolv.conf + rm -f $MODULE_UPPER_DIR/etc/resolv.conf.bak + fi + else + umount $MODULE_MERGED_DIR/proc >>$OUTPUT 2>&1 + umount $MODULE_MERGED_DIR/sys >>$OUTPUT 2>&1 + umount $MODULE_MERGED_DIR/dev/pts >>$OUTPUT 2>&1 + umount $MODULE_MERGED_DIR/tmp >>$OUTPUT 2>&1 + umount $MODULE_MERGED_DIR/dev >>$OUTPUT 2>&1 + if [ -f /.dockerenv ] || [ "$container" = "podman" ]; then + if [ -L $MODULE_MERGED_DIR/etc/resolv.conf.bak ] && [ ! -L $MODULE_MERGED_DIR/etc/resolv.conf ]; then + rm -f $MODULE_UPPER_DIR/etc/resolv.conf + mv $MODULE_MERGED_DIR/etc/resolv.conf.bak $MODULE_MERGED_DIR/etc/resolv.conf + elif [ -L $MODULE_MERGED_DIR/etc/resolv.conf.bak ] && [ -L $MODULE_MERGED_DIR/etc/resolv.conf ]; then + rm -f $MODULE_UPPER_DIR/etc/resolv.conf.bak + fi + : 'umount $MODULE_MERGED_DIR/run/resolvconf/resolv.conf >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/run/resolvconf/resolv.conf + rmdir $MODULE_UPPER_DIR/run/resolvconf' + else + umount $MODULE_MERGED_DIR/run >>$OUTPUT 2>&1 + fi + umount $MODULE_MERGED_DIR >>$OUTPUT 2>&1 + + if [ -f /.dockerenv ] || [ "$container" = "podman" ]; then + rm -f $MODULE_UPPER_DIR/etc/resolv.conf >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/etc/resolv.conf.bak >>$OUTPUT 2>&1 + fi + fi + + MODULES=($PARENT_DIR/image/$LIVEKITNAME/*.$BEXT) + for ((i = ${#MODULES[@]} - 1; i >= 0; i--)); do + MODULE_LOWER_DIR=$(basename ${MODULES[$i]} .$BEXT) + umount $MODULES_DIR/lower/$MODULE_LOWER_DIR-lower + done + + set -e + + module_check_mounted } # ================================================================= @@ -1428,27 +1953,27 @@ function module_chroot_umount_fs() { # # ================================================================= function module_cleanup() { - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - if [ "$UNATTENDED" = "1" ]; then - module_check_mounted - rm -rf $MODULE_UPPER_DIR - if [ -d "$MODULE_UPPER_DIR" ]; then - module_cleanup - fi - else - read -r -p "$(echo -e ""Do you want to ${BOLD}${RED}completely remove content${ENDCOLOUR} of ${MAGENTA}$MODULE_UPPER_DIR${ENDCOLOUR}? [y/${BOLD}${GREEN}N${ENDCOLOUR}])" response - response=${response,,} - if [[ "$response" =~ ^(yes|y)$ ]]; then - module_check_mounted - rm -rf $MODULE_UPPER_DIR - if [ -d "$MODULE_UPPER_DIR" ]; then - module_cleanup - fi - else - echo -e "${MAGENTA}$MODULE_UPPER_DIR${ENDCOLOUR} should be empty to continue." - exit 1 - fi - fi + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + if [ "$UNATTENDED" = "1" ]; then + module_check_mounted + rm -rf $MODULE_UPPER_DIR + if [ -d "$MODULE_UPPER_DIR" ]; then + module_cleanup + fi + else + read -r -p "$(echo -e ""Do you want to ${BOLD}${RED}completely remove content${ENDCOLOUR} of ${MAGENTA}$MODULE_UPPER_DIR${ENDCOLOUR}? [y/${BOLD}${GREEN}N${ENDCOLOUR}])" response + response=${response,,} + if [[ "$response" =~ ^(yes|y)$ ]]; then + module_check_mounted + rm -rf $MODULE_UPPER_DIR + if [ -d "$MODULE_UPPER_DIR" ]; then + module_cleanup + fi + else + echo -e "${MAGENTA}$MODULE_UPPER_DIR${ENDCOLOUR} should be empty to continue." + exit 1 + fi + fi } # ================================================================= @@ -1456,30 +1981,30 @@ function module_cleanup() { # # ================================================================= function module_chroot_finish_up() { - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - # truncate machine id (why??) - chroot $MODULE_MERGED_DIR /bin/bash -x <>$OUTPUT 2>&1 dpkg-divert --rename --remove /sbin/initctl >>$OUTPUT 2>&1 EOF - fi + fi - if [ -d $MODULE_UPPER_DIR/home/live ]; then - chown 1000:1000 $MODULE_UPPER_DIR/home/live - chown -R 1000:1000 $MODULE_UPPER_DIR/home/live - fi + if [ -d $MODULE_UPPER_DIR/home/live ]; then + chown 1000:1000 $MODULE_UPPER_DIR/home/live + chown -R 1000:1000 $MODULE_UPPER_DIR/home/live + fi } # ================================================================= @@ -1487,61 +2012,63 @@ EOF # # ================================================================= function module_chroot_cleanup() { - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - # clean up useless stuff - if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then - rm -rf $MODULE_UPPER_DIR/boot $MODULE_UPPER_DIR/dev $MODULE_UPPER_DIR/proc $MODULE_UPPER_DIR/sys $MODULE_UPPER_DIR/rmp $MODULE_UPPER_DIR/run - rm -f $MODULE_UPPER_DIR/root/.bash_history - rm -rf $MODULE_UPPER_DIR/.cache - find $MODULE_UPPER_DIR/var/log/ -type f | xargs rm -f - rm -f $MODULE_UPPER_DIR/etc/ssh/ssh_host* - rm -f $MODULE_UPPER_DIR/var/backups/* - rm -f $MODULE_UPPER_DIR/var/cache/ldconfig/* - #rm -f $MODULE_UPPER_DIR/var/cache/debconf/* - rm -f $MODULE_UPPER_DIR/var/cache/fontconfig/* - rm -f $MODULE_UPPER_DIR/var/cache/apt/archives/*.deb - rm -f $MODULE_UPPER_DIR/var/cache/apt/*.bin - rm -f $MODULE_UPPER_DIR/var/cache/debconf/*-old - rm -f $MODULE_UPPER_DIR/var/lib/apt/extended_states - rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/*Packages - rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/*Translation* - rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/*InRelease - rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/deb.* - rm -f $MODULE_UPPER_DIR/var/lib/dpkg/*-old - rm -f $MODULE_UPPER_DIR/preinstall - rm -f $MODULE_UPPER_DIR/install - rm -f $MODULE_UPPER_DIR/install2 - rm -f $MODULE_UPPER_DIR/cleanup - rm -f $MODULE_UPPER_DIR/$PACKAGE_VARIANT.list - rm -f $MODULE_UPPER_DIR/postinstall - rm -rf $MODULE_UPPER_DIR/rootcopy - else - rm -rf $MODULE_UPPER_DIR/boot $MODULE_UPPER_DIR/dev $MODULE_UPPER_DIR/proc $MODULE_UPPER_DIR/sys $MODULE_UPPER_DIR/rmp $MODULE_UPPER_DIR/run - rm -f $MODULE_UPPER_DIR/root/.bash_history >>$OUTPUT 2>&1 - rm -rf $MODULE_UPPER_DIR/.cache - find $MODULE_UPPER_DIR/var/log/ -type f | xargs rm -f >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/etc/ssh/ssh_host* - rm -f $MODULE_UPPER_DIR/var/backups/* >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/cache/ldconfig/* >>$OUTPUT 2>&1 - #rm -f $MODULE_UPPER_DIR/var/cache/debconf/* >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/cache/fontconfig/* >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/cache/apt/archives/*.deb >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/cache/apt/*.bin >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/cache/debconf/*-old >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/lib/apt/extended_states >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/*Packages >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/*Translation* >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/*InRelease >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/deb.* >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/lib/dpkg/*-old >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/preinstall >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/install >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/install2 >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/cleanup >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/$PACKAGE_VARIANT.list >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/postinstall >>$OUTPUT 2>&1 - rm -rf $MODULE_UPPER_DIR/rootcopy-install >>$OUTPUT 2>&1 - fi + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + # clean up useless stuff + if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then + rm -rf $MODULE_UPPER_DIR/boot $MODULE_UPPER_DIR/dev $MODULE_UPPER_DIR/proc $MODULE_UPPER_DIR/sys $MODULE_UPPER_DIR/rmp $MODULE_UPPER_DIR/run + rm -f $MODULE_UPPER_DIR/root/.bash_history + rm -rf $MODULE_UPPER_DIR/.cache + find $MODULE_UPPER_DIR/var/log/ -type f | xargs rm -f + rm -f $MODULE_UPPER_DIR/etc/ssh/ssh_host* + rm -f $MODULE_UPPER_DIR/var/backups/* + rm -f $MODULE_UPPER_DIR/var/cache/ldconfig/* + #rm -f $MODULE_UPPER_DIR/var/cache/debconf/* + rm -f $MODULE_UPPER_DIR/var/cache/fontconfig/* + rm -f $MODULE_UPPER_DIR/var/cache/apt/archives/*.deb + rm -f $MODULE_UPPER_DIR/var/cache/apt/*.bin + rm -f $MODULE_UPPER_DIR/var/cache/debconf/*-old + rm -f $MODULE_UPPER_DIR/var/lib/apt/extended_states + rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/*Packages + rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/*Translation* + rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/*InRelease + rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/deb.* + rm -f $MODULE_UPPER_DIR/var/lib/dpkg/*-old + rm -f $MODULE_UPPER_DIR/preinstall + rm -f $MODULE_UPPER_DIR/install + rm -f $MODULE_UPPER_DIR/install2 + rm -f $MODULE_UPPER_DIR/cleanup + rm -f $MODULE_UPPER_DIR/$PACKAGE_VARIANT.list + rm -f $MODULE_UPPER_DIR/postinstall + rm -rf $MODULE_UPPER_DIR/rootcopy + rm -f $MODULE_UPPER_DIR/machine-id + else + rm -rf $MODULE_UPPER_DIR/boot $MODULE_UPPER_DIR/dev $MODULE_UPPER_DIR/proc $MODULE_UPPER_DIR/sys $MODULE_UPPER_DIR/rmp $MODULE_UPPER_DIR/run + rm -f $MODULE_UPPER_DIR/root/.bash_history >>$OUTPUT 2>&1 + rm -rf $MODULE_UPPER_DIR/.cache + find $MODULE_UPPER_DIR/var/log/ -type f | xargs rm -f >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/etc/ssh/ssh_host* + rm -f $MODULE_UPPER_DIR/var/backups/* >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/cache/ldconfig/* >>$OUTPUT 2>&1 + #rm -f $MODULE_UPPER_DIR/var/cache/debconf/* >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/cache/fontconfig/* >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/cache/apt/archives/*.deb >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/cache/apt/*.bin >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/cache/debconf/*-old >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/lib/apt/extended_states >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/*Packages >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/*Translation* >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/*InRelease >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/deb.* >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/lib/dpkg/*-old >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/preinstall >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/install >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/install2 >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/cleanup >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/$PACKAGE_VARIANT.list >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/postinstall >>$OUTPUT 2>&1 + rm -rf $MODULE_UPPER_DIR/rootcopy-install >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/machine-id >>$OUTPUT 2>&1 + fi } # ================================================================= @@ -1549,201 +2076,201 @@ function module_chroot_cleanup() { # # ================================================================= function module_build_cleanup() { - echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." - - set +e - - if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then - rm -f $MODULE_UPPER_DIR/preinstall - rm -f $MODULE_UPPER_DIR/install - rm -f $MODULE_UPPER_DIR/install2 - rm -f $MODULE_UPPER_DIR/cleanup - rm -f $MODULE_UPPER_DIR/$PACKAGE_VARIANT.list - rm -f $MODULE_UPPER_DIR/postinstall - rm -rf $MODULE_UPPER_DIR/rootcopy - rm -rf $MODULE_UPPER_DIR/patches - - rm -f $MODULE_UPPER_DIR/etc/fstab - rm -f $MODULE_UPPER_DIR/etc/mtab - rm -f $MODULE_UPPER_DIR/etc/apt/sources.list~ - rm -Rf $MODULE_UPPER_DIR/etc/systemd/system/timers.target.wants - rm -f $MODULE_UPPER_DIR/etc/systemd/system/multi-user.target.wants/ssh.service - rm -f $MODULE_UPPER_DIR/etc/systemd/system/multi-user.target.wants/dnsmasq.service - - rm -f $MODULE_UPPER_DIR/etc/ssh/ssh_host* - - rm -f $MODULE_UPPER_DIR/var/backups/* - rm -f $MODULE_UPPER_DIR/var/cache/ldconfig/* - rm -f $MODULE_UPPER_DIR/var/cache/debconf/* - rm -f $MODULE_UPPER_DIR/var/cache/fontconfig/* - rm -f $MODULE_UPPER_DIR/var/lib/apt/extended_states - rm -f $MODULE_UPPER_DIR/var/lib/systemd/random-seed - rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/deb.* - rm -Rf $MODULE_UPPER_DIR/root/.local/share/mc - rm -Rf $MODULE_UPPER_DIR/root/.cache - rm -f $MODULE_UPPER_DIR/root/.wget-hsts - - rm -f $MODULE_UPPER_DIR/var/lib/dpkg/*-old - rm -f $MODULE_UPPER_DIR/var/log/* - rm -f $MODULE_UPPER_DIR/var/log/*/* - rm -f $MODULE_UPPER_DIR/var/log/*/*/* - rm -f $MODULE_UPPER_DIR/var/cache/apt/archives/*.deb - rm -f $MODULE_UPPER_DIR/var/cache/apt/*.bin - rm -f $MODULE_UPPER_DIR/var/cache/debconf/*-old - rm -f $MODULE_UPPER_DIR/var/lib/dhcp/dhclient.leases - rm -f $MODULE_UPPER_DIR/root/.bash_history - rm -f $MODULE_UPPER_DIR/root/.wget-hsts - rm -Rf $MODULE_UPPER_DIR/usr/share/doc/* - rm -Rf $MODULE_UPPER_DIR/usr/share/info/* - rm -f $MODULE_UPPER_DIR/usr/share/images/fluxbox/debian-squared.jpg - rm -Rf $MODULE_UPPER_DIR/usr/share/fluxbox/nls/??* - rm -Rf $MODULE_UPPER_DIR/usr/share/gnome/help - - rm -Rf $MODULE_UPPER_DIR/usr/share/locale/?? - rm -Rf $MODULE_UPPER_DIR/usr/share/locale/??_* - rm -Rf $MODULE_UPPER_DIR/usr/share/locale/??@* - rm -Rf $MODULE_UPPER_DIR/usr/share/locale/??? - rm -Rf $MODULE_UPPER_DIR/usr/share/i18n/locales/*_* - rm -Rf $MODULE_UPPER_DIR/usr/share/man/?? - rm -Rf $MODULE_UPPER_DIR/usr/share/man/*_* - - rm -Rf $MODULE_UPPER_DIR/usr/share/icons/elementaryXubuntu-dark - rm -Rf $MODULE_UPPER_DIR/usr/share/icons/gnome/256x256 - - rm $MODULE_UPPER_DIR/usr/share/applications/compton.desktop - rm $MODULE_UPPER_DIR/usr/share/applications/debian-uxterm.desktop - rm $MODULE_UPPER_DIR/usr/share/applications/debian-xterm.desktop - rm $MODULE_UPPER_DIR/usr/share/applications/htop.desktop - rm $MODULE_UPPER_DIR/usr/share/applications/mc.desktop - rm $MODULE_UPPER_DIR/usr/share/applications/mcedit.desktop - rm $MODULE_UPPER_DIR/usr/share/applications/pcmanfm-desktop-pref.desktop - rm $MODULE_UPPER_DIR/usr/share/applications/python2.7.desktop - rm $MODULE_UPPER_DIR/usr/share/applications/python3.7.desktop - rm $MODULE_UPPER_DIR/usr/share/applications/vim.desktop - - # Unzip gzipped files (man pages), so LZMA can compress 2times better. - # First we fix symlinks, then uncompress files - # $1 = search directory - uncompress_files() { - local LINK LINE - - find "$1" -type l -name "*.gz" | while read LINE; do - LINK="$(readlink "$LINE" | sed -r 's/.gz$//')" - FILE="$(echo "$LINE" | sed -r 's/.gz$//')" - ln -sfn "$LINK" "$FILE" - rm -f "$LINE" - done - find "$1" -type f -name "*.gz" | xargs -r gunzip - } - - uncompress_files $MODULE_UPPER_DIR/etc/alternatives - uncompress_files $MODULE_UPPER_DIR/usr/share/man - - # remove broken links - # $1 = search directory - remove_broken_links() { - find "$1" -type l -exec test ! -e {} \; -print | xargs rm -vf - } - - remove_broken_links $MODULE_UPPER_DIR/etc/alternatives - remove_broken_links $MODULE_UPPER_DIR/usr/share/man - else - rm -f $MODULE_UPPER_DIR/preinstall >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/install >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/install2 >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/cleanup >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/$PACKAGE_VARIANT.list >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/postinstall >>$OUTPUT 2>&1 - rm -rf $MODULE_UPPER_DIR/rootcopy-install >>$OUTPUT 2>&1 - rm -rf $MODULE_UPPER_DIR/patches >>$OUTPUT 2>&1 - - rm -f $MODULE_UPPER_DIR/etc/fstab >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/etc/mtab >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/etc/apt/sources.list~ >>$OUTPUT 2>&1 - rm -Rf $MODULE_UPPER_DIR/etc/systemd/system/timers.target.wants >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/etc/systemd/system/multi-user.target.wants/ssh.service >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/etc/systemd/system/multi-user.target.wants/dnsmasq.service >>$OUTPUT 2>&1 - - rm -f $MODULE_UPPER_DIR/etc/ssh/ssh_host* >>$OUTPUT 2>&1 - - rm -f $MODULE_UPPER_DIR/var/backups/* >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/cache/ldconfig/* >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/cache/debconf/* >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/cache/fontconfig/* >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/lib/apt/extended_states >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/lib/systemd/random-seed >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/deb.* >>$OUTPUT 2>&1 - rm -Rf $MODULE_UPPER_DIR/root/.local/share/mc >>$OUTPUT 2>&1 - rm -Rf $MODULE_UPPER_DIR/root/.cache >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/root/.wget-hsts >>$OUTPUT 2>&1 - - rm -f $MODULE_UPPER_DIR/var/lib/dpkg/*-old >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/log/* >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/log/*/* >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/log/*/*/* >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/cache/apt/archives/*.deb >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/cache/apt/*.bin >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/cache/debconf/*-old >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/var/lib/dhcp/dhclient.leases >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/root/.bash_history >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/root/.wget-hsts >>$OUTPUT 2>&1 - rm -Rf $MODULE_UPPER_DIR/usr/share/doc/* >>$OUTPUT 2>&1 - rm -Rf $MODULE_UPPER_DIR/usr/share/info/* >>$OUTPUT 2>&1 - rm -f $MODULE_UPPER_DIR/usr/share/images/fluxbox/debian-squared.jpg >>$OUTPUT 2>&1 - rm -Rf $MODULE_UPPER_DIR/usr/share/fluxbox/nls/??* >>$OUTPUT 2>&1 - rm -Rf $MODULE_UPPER_DIR/usr/share/gnome/help >>$OUTPUT 2>&1 - - rm -Rf $MODULE_UPPER_DIR/usr/share/locale/?? >>$OUTPUT 2>&1 - rm -Rf $MODULE_UPPER_DIR/usr/share/locale/??_* >>$OUTPUT 2>&1 - rm -Rf $MODULE_UPPER_DIR/usr/share/locale/??@* >>$OUTPUT 2>&1 - rm -Rf $MODULE_UPPER_DIR/usr/share/locale/??? >>$OUTPUT 2>&1 - rm -Rf $MODULE_UPPER_DIR/usr/share/i18n/locales/*_* >>$OUTPUT 2>&1 - rm -Rf $MODULE_UPPER_DIR/usr/share/man/?? >>$OUTPUT 2>&1 - rm -Rf $MODULE_UPPER_DIR/usr/share/man/*_* >>$OUTPUT 2>&1 - - rm -Rf $MODULE_UPPER_DIR/usr/share/icons/elementaryXubuntu-dark >>$OUTPUT 2>&1 - rm -Rf $MODULE_UPPER_DIR/usr/share/icons/gnome/256x256 >>$OUTPUT 2>&1 - - rm $MODULE_UPPER_DIR/usr/share/applications/compton.desktop >>$OUTPUT 2>&1 - rm $MODULE_UPPER_DIR/usr/share/applications/debian-uxterm.desktop >>$OUTPUT 2>&1 - rm $MODULE_UPPER_DIR/usr/share/applications/debian-xterm.desktop >>$OUTPUT 2>&1 - rm $MODULE_UPPER_DIR/usr/share/applications/htop.desktop >>$OUTPUT 2>&1 - rm $MODULE_UPPER_DIR/usr/share/applications/mc.desktop >>$OUTPUT 2>&1 - rm $MODULE_UPPER_DIR/usr/share/applications/mcedit.desktop >>$OUTPUT 2>&1 - rm $MODULE_UPPER_DIR/usr/share/applications/pcmanfm-desktop-pref.desktop >>$OUTPUT 2>&1 - rm $MODULE_UPPER_DIR/usr/share/applications/python2.7.desktop >>$OUTPUT 2>&1 - rm $MODULE_UPPER_DIR/usr/share/applications/python3.7.desktop >>$OUTPUT 2>&1 - rm $MODULE_UPPER_DIR/usr/share/applications/vim.desktop >>$OUTPUT 2>&1 - - # Unzip gzipped files (man pages), so LZMA can compress 2times better. - # First we fix symlinks, then uncompress files - # $1 = search directory - uncompress_files() { - local LINK LINE - - find "$1" -type l -name "*.gz" | while read LINE; do - LINK="$(readlink "$LINE" | sed -r 's/.gz$//')" - FILE="$(echo "$LINE" | sed -r 's/.gz$//')" - ln -sfn "$LINK" "$FILE" - rm -f "$LINE" - done - find "$1" -type f -name "*.gz" | xargs -r gunzip >>$OUTPUT 2>&1 - } - - uncompress_files $MODULE_UPPER_DIR/etc/alternatives >>$OUTPUT 2>&1 - uncompress_files $MODULE_UPPER_DIR/usr/share/man >>$OUTPUT 2>&1 - - # remove broken links - # $1 = search directory - remove_broken_links() { - find "$1" -type l -exec test ! -e {} \; -print | xargs rm -vf >>$OUTPUT 2>&1 - } - - remove_broken_links $MODULE_UPPER_DIR/etc/alternatives >>$OUTPUT 2>&1 - remove_broken_links $MODULE_UPPER_DIR/usr/share/man >>$OUTPUT 2>&1 - fi - - set -e + echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." + + set +e + + if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then + rm -f $MODULE_UPPER_DIR/preinstall + rm -f $MODULE_UPPER_DIR/install + rm -f $MODULE_UPPER_DIR/install2 + rm -f $MODULE_UPPER_DIR/cleanup + rm -f $MODULE_UPPER_DIR/$PACKAGE_VARIANT.list + rm -f $MODULE_UPPER_DIR/postinstall + rm -rf $MODULE_UPPER_DIR/rootcopy + rm -rf $MODULE_UPPER_DIR/patches + + rm -f $MODULE_UPPER_DIR/etc/fstab + rm -f $MODULE_UPPER_DIR/etc/mtab + rm -f $MODULE_UPPER_DIR/etc/apt/sources.list~ + rm -Rf $MODULE_UPPER_DIR/etc/systemd/system/timers.target.wants + rm -f $MODULE_UPPER_DIR/etc/systemd/system/multi-user.target.wants/ssh.service + rm -f $MODULE_UPPER_DIR/etc/systemd/system/multi-user.target.wants/dnsmasq.service + + rm -f $MODULE_UPPER_DIR/etc/ssh/ssh_host* + + rm -f $MODULE_UPPER_DIR/var/backups/* + rm -f $MODULE_UPPER_DIR/var/cache/ldconfig/* + rm -f $MODULE_UPPER_DIR/var/cache/debconf/* + rm -f $MODULE_UPPER_DIR/var/cache/fontconfig/* + rm -f $MODULE_UPPER_DIR/var/lib/apt/extended_states + rm -f $MODULE_UPPER_DIR/var/lib/systemd/random-seed + rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/deb.* + rm -Rf $MODULE_UPPER_DIR/root/.local/share/mc + rm -Rf $MODULE_UPPER_DIR/root/.cache + rm -f $MODULE_UPPER_DIR/root/.wget-hsts + + rm -f $MODULE_UPPER_DIR/var/lib/dpkg/*-old + rm -f $MODULE_UPPER_DIR/var/log/* + rm -f $MODULE_UPPER_DIR/var/log/*/* + rm -f $MODULE_UPPER_DIR/var/log/*/*/* + rm -f $MODULE_UPPER_DIR/var/cache/apt/archives/*.deb + rm -f $MODULE_UPPER_DIR/var/cache/apt/*.bin + rm -f $MODULE_UPPER_DIR/var/cache/debconf/*-old + rm -f $MODULE_UPPER_DIR/var/lib/dhcp/dhclient.leases + rm -f $MODULE_UPPER_DIR/root/.bash_history + rm -f $MODULE_UPPER_DIR/root/.wget-hsts + rm -Rf $MODULE_UPPER_DIR/usr/share/doc/* + rm -Rf $MODULE_UPPER_DIR/usr/share/info/* + rm -f $MODULE_UPPER_DIR/usr/share/images/fluxbox/debian-squared.jpg + rm -Rf $MODULE_UPPER_DIR/usr/share/fluxbox/nls/??* + rm -Rf $MODULE_UPPER_DIR/usr/share/gnome/help + + rm -Rf $MODULE_UPPER_DIR/usr/share/locale/?? + rm -Rf $MODULE_UPPER_DIR/usr/share/locale/??_* + rm -Rf $MODULE_UPPER_DIR/usr/share/locale/??@* + rm -Rf $MODULE_UPPER_DIR/usr/share/locale/??? + rm -Rf $MODULE_UPPER_DIR/usr/share/i18n/locales/*_* + rm -Rf $MODULE_UPPER_DIR/usr/share/man/?? + rm -Rf $MODULE_UPPER_DIR/usr/share/man/*_* + + rm -Rf $MODULE_UPPER_DIR/usr/share/icons/elementaryXubuntu-dark + rm -Rf $MODULE_UPPER_DIR/usr/share/icons/gnome/256x256 + + rm $MODULE_UPPER_DIR/usr/share/applications/compton.desktop + rm $MODULE_UPPER_DIR/usr/share/applications/debian-uxterm.desktop + rm $MODULE_UPPER_DIR/usr/share/applications/debian-xterm.desktop + rm $MODULE_UPPER_DIR/usr/share/applications/htop.desktop + rm $MODULE_UPPER_DIR/usr/share/applications/mc.desktop + rm $MODULE_UPPER_DIR/usr/share/applications/mcedit.desktop + rm $MODULE_UPPER_DIR/usr/share/applications/pcmanfm-desktop-pref.desktop + rm $MODULE_UPPER_DIR/usr/share/applications/python2.7.desktop + rm $MODULE_UPPER_DIR/usr/share/applications/python3.7.desktop + rm $MODULE_UPPER_DIR/usr/share/applications/vim.desktop + + # Unzip gzipped files (man pages), so LZMA can compress 2times better. + # First we fix symlinks, then uncompress files + # $1 = search directory + uncompress_files() { + local LINK LINE + + find "$1" -type l -name "*.gz" | while read LINE; do + LINK="$(readlink "$LINE" | sed -r 's/.gz$//')" + FILE="$(echo "$LINE" | sed -r 's/.gz$//')" + ln -sfn "$LINK" "$FILE" + rm -f "$LINE" + done + find "$1" -type f -name "*.gz" | xargs -r gunzip + } + + uncompress_files $MODULE_UPPER_DIR/etc/alternatives + uncompress_files $MODULE_UPPER_DIR/usr/share/man + + # remove broken links + # $1 = search directory + remove_broken_links() { + find "$1" -type l -exec test ! -e {} \; -print | xargs rm -vf + } + + remove_broken_links $MODULE_UPPER_DIR/etc/alternatives + remove_broken_links $MODULE_UPPER_DIR/usr/share/man + else + rm -f $MODULE_UPPER_DIR/preinstall >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/install >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/install2 >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/cleanup >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/$PACKAGE_VARIANT.list >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/postinstall >>$OUTPUT 2>&1 + rm -rf $MODULE_UPPER_DIR/rootcopy-install >>$OUTPUT 2>&1 + rm -rf $MODULE_UPPER_DIR/patches >>$OUTPUT 2>&1 + + rm -f $MODULE_UPPER_DIR/etc/fstab >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/etc/mtab >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/etc/apt/sources.list~ >>$OUTPUT 2>&1 + rm -Rf $MODULE_UPPER_DIR/etc/systemd/system/timers.target.wants >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/etc/systemd/system/multi-user.target.wants/ssh.service >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/etc/systemd/system/multi-user.target.wants/dnsmasq.service >>$OUTPUT 2>&1 + + rm -f $MODULE_UPPER_DIR/etc/ssh/ssh_host* >>$OUTPUT 2>&1 + + rm -f $MODULE_UPPER_DIR/var/backups/* >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/cache/ldconfig/* >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/cache/debconf/* >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/cache/fontconfig/* >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/lib/apt/extended_states >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/lib/systemd/random-seed >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/lib/apt/lists/deb.* >>$OUTPUT 2>&1 + rm -Rf $MODULE_UPPER_DIR/root/.local/share/mc >>$OUTPUT 2>&1 + rm -Rf $MODULE_UPPER_DIR/root/.cache >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/root/.wget-hsts >>$OUTPUT 2>&1 + + rm -f $MODULE_UPPER_DIR/var/lib/dpkg/*-old >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/log/* >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/log/*/* >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/log/*/*/* >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/cache/apt/archives/*.deb >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/cache/apt/*.bin >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/cache/debconf/*-old >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/var/lib/dhcp/dhclient.leases >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/root/.bash_history >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/root/.wget-hsts >>$OUTPUT 2>&1 + rm -Rf $MODULE_UPPER_DIR/usr/share/doc/* >>$OUTPUT 2>&1 + rm -Rf $MODULE_UPPER_DIR/usr/share/info/* >>$OUTPUT 2>&1 + rm -f $MODULE_UPPER_DIR/usr/share/images/fluxbox/debian-squared.jpg >>$OUTPUT 2>&1 + rm -Rf $MODULE_UPPER_DIR/usr/share/fluxbox/nls/??* >>$OUTPUT 2>&1 + rm -Rf $MODULE_UPPER_DIR/usr/share/gnome/help >>$OUTPUT 2>&1 + + rm -Rf $MODULE_UPPER_DIR/usr/share/locale/?? >>$OUTPUT 2>&1 + rm -Rf $MODULE_UPPER_DIR/usr/share/locale/??_* >>$OUTPUT 2>&1 + rm -Rf $MODULE_UPPER_DIR/usr/share/locale/??@* >>$OUTPUT 2>&1 + rm -Rf $MODULE_UPPER_DIR/usr/share/locale/??? >>$OUTPUT 2>&1 + rm -Rf $MODULE_UPPER_DIR/usr/share/i18n/locales/*_* >>$OUTPUT 2>&1 + rm -Rf $MODULE_UPPER_DIR/usr/share/man/?? >>$OUTPUT 2>&1 + rm -Rf $MODULE_UPPER_DIR/usr/share/man/*_* >>$OUTPUT 2>&1 + + rm -Rf $MODULE_UPPER_DIR/usr/share/icons/elementaryXubuntu-dark >>$OUTPUT 2>&1 + rm -Rf $MODULE_UPPER_DIR/usr/share/icons/gnome/256x256 >>$OUTPUT 2>&1 + + rm $MODULE_UPPER_DIR/usr/share/applications/compton.desktop >>$OUTPUT 2>&1 + rm $MODULE_UPPER_DIR/usr/share/applications/debian-uxterm.desktop >>$OUTPUT 2>&1 + rm $MODULE_UPPER_DIR/usr/share/applications/debian-xterm.desktop >>$OUTPUT 2>&1 + rm $MODULE_UPPER_DIR/usr/share/applications/htop.desktop >>$OUTPUT 2>&1 + rm $MODULE_UPPER_DIR/usr/share/applications/mc.desktop >>$OUTPUT 2>&1 + rm $MODULE_UPPER_DIR/usr/share/applications/mcedit.desktop >>$OUTPUT 2>&1 + rm $MODULE_UPPER_DIR/usr/share/applications/pcmanfm-desktop-pref.desktop >>$OUTPUT 2>&1 + rm $MODULE_UPPER_DIR/usr/share/applications/python2.7.desktop >>$OUTPUT 2>&1 + rm $MODULE_UPPER_DIR/usr/share/applications/python3.7.desktop >>$OUTPUT 2>&1 + rm $MODULE_UPPER_DIR/usr/share/applications/vim.desktop >>$OUTPUT 2>&1 + + # Unzip gzipped files (man pages), so LZMA can compress 2times better. + # First we fix symlinks, then uncompress files + # $1 = search directory + uncompress_files() { + local LINK LINE + + find "$1" -type l -name "*.gz" | while read LINE; do + LINK="$(readlink "$LINE" | sed -r 's/.gz$//')" + FILE="$(echo "$LINE" | sed -r 's/.gz$//')" + ln -sfn "$LINK" "$FILE" + rm -f "$LINE" + done + find "$1" -type f -name "*.gz" | xargs -r gunzip >>$OUTPUT 2>&1 + } + + uncompress_files $MODULE_UPPER_DIR/etc/alternatives >>$OUTPUT 2>&1 + uncompress_files $MODULE_UPPER_DIR/usr/share/man >>$OUTPUT 2>&1 + + # remove broken links + # $1 = search directory + remove_broken_links() { + find "$1" -type l -exec test ! -e {} \; -print | xargs rm -vf >>$OUTPUT 2>&1 + } + + remove_broken_links $MODULE_UPPER_DIR/etc/alternatives >>$OUTPUT 2>&1 + remove_broken_links $MODULE_UPPER_DIR/usr/share/man >>$OUTPUT 2>&1 + fi + + set -e } @@ -1752,273 +2279,314 @@ function module_build_cleanup() { # # ================================================================= function build_modules() { - current_process - - if [ $CONTAINER_TYPE = "1" ]; then - if [ ! -f /.minios-live ]; then - setup_host - fi - fi - - MODULES_DIR=$PARENT_DIR/modules - - cd $SCRIPT_DIR/linux-live/modules - - for MODULE in *; do - if (ls $PARENT_DIR/image/$LIVEKITNAME/*.$BEXT | grep -q $MODULE 2>/dev/null); then - echo -e "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${ENDCOLOUR}" - echo -e "Please remove ${MAGENTA}$PARENT_DIR/image/$LIVEKITNAME/$MODULE.$BEXT${ENDCOLOUR} if you want to build ${MAGENTA}$MODULE${ENDCOLOUR}." - echo -e "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${ENDCOLOUR}" - else - MODULE_UPPER_DIR="$MODULES_DIR/$MODULE-upper" - MODULE_WORK_DIR="$MODULES_DIR/$MODULE-work" - MODULE_MERGED_DIR="$MODULES_DIR/$MODULE-merged" - - module_check_build_dir - - module_chroot_mount_fs - - # run pre-install script - if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/preinstall ]; then - cp $SCRIPT_DIR/linux-live/modules/$MODULE/preinstall $MODULE_MERGED_DIR/preinstall - chmod +x $MODULE_MERGED_DIR/preinstall - chroot $MODULE_MERGED_DIR /usr/bin/env \ - OUTPUT=$OUTPUT \ - LOGPATH=$LOGPATH \ - BUILD_TEST_ISO=$BUILD_TEST_ISO \ - CREATE_BACKUP=$CREATE_BACKUP \ - DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ - APT_CMD=$APT_CMD \ - APT_OPTIONS=$APT_OPTIONS \ - APT_OPTIONS2=$APT_OPTIONS2 \ - LIVE_TYPE=$LIVE_TYPE \ - DISTRIBUTION=$DISTRIBUTION \ - PACKAGE_VARIANT=$PACKAGE_VARIANT \ - /preinstall >>$OUTPUT 2>&1 - fi - - # copy files - if [ ! -f $SCRIPT_DIR/linux-live/modules/$MODULE/is_internal_build ]; then - if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then - if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-install)" != "" ]; then - (cd $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-install && cp --parents -afr * $MODULE_MERGED_DIR/) - fi - else - if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-install)" != "" ] >>$OUTPUT 2>&1; then - (cd $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-install && cp --parents -afr * $MODULE_MERGED_DIR/) - fi - fi - else - if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then - if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-install)" != "" ]; then - mkdir $MODULE_MERGED_DIR/rootcopy-install - (cd $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-install && cp --parents -afr * $MODULE_MERGED_DIR/rootcopy-install/) - fi - else - if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-install)" != "" ] >>$OUTPUT 2>&1; then - mkdir $MODULE_MERGED_DIR/rootcopy-install - (cd $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-install && cp --parents -afr * $MODULE_MERGED_DIR/rootcopy-install/) - fi - fi - fi - - # run install script - if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/install ]; then - cp $SCRIPT_DIR/linux-live/modules/$MODULE/install $MODULE_MERGED_DIR/install - chmod +x $MODULE_MERGED_DIR/install - if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/cleanup ]; then - cp $SCRIPT_DIR/linux-live/modules/$MODULE/cleanup $MODULE_MERGED_DIR/cleanup - fi - if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/$PACKAGE_VARIANT.list ]; then - cp $SCRIPT_DIR/linux-live/modules/$MODULE/$PACKAGE_VARIANT.list $MODULE_MERGED_DIR/$PACKAGE_VARIANT.list - fi - if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then - chroot $MODULE_MERGED_DIR /usr/bin/env \ - OUTPUT=$OUTPUT \ - LOGPATH=$LOGPATH \ - BUILD_TEST_ISO=$BUILD_TEST_ISO \ - CREATE_BACKUP=$CREATE_BACKUP \ - DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ - APT_CMD=$APT_CMD \ - APT_OPTIONS=$APT_OPTIONS \ - APT_OPTIONS2=$APT_OPTIONS2 \ - LIVE_TYPE=$LIVE_TYPE \ - DISTRIBUTION=$DISTRIBUTION \ - PACKAGE_VARIANT=$PACKAGE_VARIANT \ - /install - else - chroot $MODULE_MERGED_DIR /usr/bin/env \ - OUTPUT=$OUTPUT \ - LOGPATH=$LOGPATH \ - BUILD_TEST_ISO=$BUILD_TEST_ISO \ - CREATE_BACKUP=$CREATE_BACKUP \ - DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ - APT_CMD=$APT_CMD \ - APT_OPTIONS=$APT_OPTIONS \ - APT_OPTIONS2=$APT_OPTIONS2 \ - LIVE_TYPE=$LIVE_TYPE \ - DISTRIBUTION=$DISTRIBUTION \ - PACKAGE_VARIANT=$PACKAGE_VARIANT \ - /install >>$OUTPUT 2>&1 - fi - fi - - if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/is_internal_build ]; then - module_chroot_umount_fs - - module_build_cleanup - - # run external actions - - if [ "$(ls -A $MODULE_UPPER_DIR)" != "" ]; then - mkdir -p $PARENT_DIR/modules/tmp >>$OUTPUT 2>&1 - mksquashfs $MODULE_UPPER_DIR $PARENT_DIR/modules/tmp/$MODULE-stock.$BEXT -comp lz4 -b 1024K -always-use-fragments -noappend >>$OUTPUT 2>&1 || exit - mv $PARENT_DIR/modules/tmp/$MODULE-stock.$BEXT $MODULE_UPPER_DIR/$MODULE-stock.$BEXT >>$OUTPUT 2>&1 - cd $MODULE_UPPER_DIR >>$OUTPUT 2>&1 - unsquashfs $MODULE-stock.$BEXT >>$OUTPUT 2>&1 - else - echo -e "${MAGENTA}$MODULE_UPPER_DIR${ENDCOLOUR} is empty. Nothing to do." - fi - - #module_check_build_dir - - module_chroot_mount_fs - fi - - # run install2 script - if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/install2 ]; then - cp $SCRIPT_DIR/linux-live/modules/$MODULE/install2 $MODULE_MERGED_DIR/install2 - chmod +x $MODULE_MERGED_DIR/install2 - if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/patches)" != "" ] >>$OUTPUT 2>&1; then - mkdir $MODULE_MERGED_DIR/patches - (cd $SCRIPT_DIR/linux-live/modules/$MODULE/patches && cp --parents -afr * $MODULE_MERGED_DIR/patches/) - fi - if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then - chroot $MODULE_MERGED_DIR /usr/bin/env \ - OUTPUT=$OUTPUT \ - LOGPATH=$LOGPATH \ - BUILD_TEST_ISO=$BUILD_TEST_ISO \ - CREATE_BACKUP=$CREATE_BACKUP \ - DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ - APT_CMD=$APT_CMD \ - APT_OPTIONS=$APT_OPTIONS \ - APT_OPTIONS2=$APT_OPTIONS2 \ - LIVE_TYPE=$LIVE_TYPE \ - DISTRIBUTION=$DISTRIBUTION \ - PACKAGE_VARIANT=$PACKAGE_VARIANT \ - /install2 - else - chroot $MODULE_MERGED_DIR /usr/bin/env \ - OUTPUT=$OUTPUT \ - LOGPATH=$LOGPATH \ - BUILD_TEST_ISO=$BUILD_TEST_ISO \ - CREATE_BACKUP=$CREATE_BACKUP \ - DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ - APT_CMD=$APT_CMD \ - APT_OPTIONS=$APT_OPTIONS \ - APT_OPTIONS2=$APT_OPTIONS2 \ - LIVE_TYPE=$LIVE_TYPE \ - DISTRIBUTION=$DISTRIBUTION \ - PACKAGE_VARIANT=$PACKAGE_VARIANT \ - /install2 >>$OUTPUT 2>&1 - fi - fi - - # copy files - if [ ! -f $SCRIPT_DIR/linux-live/modules/$MODULE/is_internal_build ]; then - if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then - if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-postinstall)" != "" ]; then - (cd $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-postinstall && cp --parents -afr * $MODULE_MERGED_DIR/) - fi - else - if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-postinstall)" != "" ] >>$OUTPUT 2>&1; then - (cd $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-postinstall && cp --parents -afr * $MODULE_MERGED_DIR/) - fi - fi - else - if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then - if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-postinstall)" != "" ]; then - mkdir $MODULE_MERGED_DIR/rootcopy-postinstall - (cd $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-postinstall && cp --parents -afr * $MODULE_MERGED_DIR/rootcopy-postinstall/) - fi - else - if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-postinstall)" != "" ] >>$OUTPUT 2>&1; then - mkdir $MODULE_MERGED_DIR/rootcopy-postinstall - (cd $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-postinstall && cp --parents -afr * $MODULE_MERGED_DIR/rootcopy-postinstall/) - fi - fi - fi - - # run post-install script - if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/postinstall ]; then - cp $SCRIPT_DIR/linux-live/modules/$MODULE/postinstall $MODULE_MERGED_DIR/postinstall - chmod +x $MODULE_MERGED_DIR/postinstall - if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then - chroot $MODULE_MERGED_DIR /usr/bin/env \ - OUTPUT=$OUTPUT \ - LOGPATH=$LOGPATH \ - BUILD_TEST_ISO=$BUILD_TEST_ISO \ - CREATE_BACKUP=$CREATE_BACKUP \ - DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ - APT_CMD=$APT_CMD \ - APT_OPTIONS=$APT_OPTIONS \ - APT_OPTIONS2=$APT_OPTIONS2 \ - LIVE_TYPE=$LIVE_TYPE \ - DISTRIBUTION=$DISTRIBUTION \ - PACKAGE_VARIANT=$PACKAGE_VARIANT \ - /postinstall - else - chroot $MODULE_MERGED_DIR /usr/bin/env \ - OUTPUT=$OUTPUT \ - LOGPATH=$LOGPATH \ - BUILD_TEST_ISO=$BUILD_TEST_ISO \ - CREATE_BACKUP=$CREATE_BACKUP \ - DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ - APT_CMD=$APT_CMD \ - APT_OPTIONS=$APT_OPTIONS \ - APT_OPTIONS2=$APT_OPTIONS2 \ - LIVE_TYPE=$LIVE_TYPE \ - DISTRIBUTION=$DISTRIBUTION \ - PACKAGE_VARIANT=$PACKAGE_VARIANT \ - /postinstall >>$OUTPUT 2>&1 - fi - fi - - # run external actions - if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/is_internal_build ]; then - cp $MODULE_UPPER_DIR/$MODULE.$BEXT $PARENT_DIR/image/$LIVEKITNAME/$MODULE-$COMP_TYPE.$BEXT >>$OUTPUT 2>&1 - fi - - module_chroot_finish_up - - module_chroot_umount_fs - - if [ ! -f $SCRIPT_DIR/linux-live/modules/$MODULE/is_internal_build ]; then - module_build_cleanup - fi - - module_chroot_cleanup - - if [ ! -f $SCRIPT_DIR/linux-live/modules/$MODULE/is_internal_build ]; then - if [ ! -f $PARENT_DIR/image/$LIVEKITNAME/$MODULE-$COMP_TYPE.$BEXT ]; then - if [ "$(ls -A $MODULE_UPPER_DIR)" != "" ]; then - if [ $COMP_TYPE = "zstd" ]; then - mksquashfs $MODULE_UPPER_DIR $PARENT_DIR/image/$LIVEKITNAME/$MODULE-$COMP_TYPE.$BEXT -comp $COMP_TYPE -Xcompression-level 22 -b 1024K -always-use-fragments -noappend || exit - else - mksquashfs $MODULE_UPPER_DIR $PARENT_DIR/image/$LIVEKITNAME/$MODULE-$COMP_TYPE.$BEXT -comp $COMP_TYPE -b 1024K -always-use-fragments -noappend || exit - fi - else - echo -e "${MAGENTA}$MODULE_UPPER_DIR${ENDCOLOUR} is empty. Nothing to do." - fi - else - echo -e "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${ENDCOLOUR}" - echo -e "Please remove ${MAGENTA}$PARENT_DIR/image/$LIVEKITNAME/$MODULE-$COMP_TYPE.$BEXT${ENDCOLOUR} if you want to build ${MAGENTA}$MODULE${ENDCOLOUR}." - echo -e "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${ENDCOLOUR}" - fi - fi - - fi - done + current_process + + if [[ $SYSTEM_TYPE != "core" ]]; then + + if [ $CONTAINER_TYPE = "1" ]; then + if [ ! -f /.minios-live ]; then + setup_host + fi + fi + + MODULES_DIR=$PARENT_DIR/modules + + cd $SCRIPT_DIR/linux-live/modules + + for MODULE in *; do + if (ls $PARENT_DIR/image/$LIVEKITNAME/*.$BEXT | grep -q $MODULE 2>/dev/null); then + echo -e "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${ENDCOLOUR}" + echo -e "Please remove ${MAGENTA}$PARENT_DIR/image/$LIVEKITNAME/$MODULE.$BEXT${ENDCOLOUR} if you want to build ${MAGENTA}$MODULE${ENDCOLOUR}." + echo -e "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${ENDCOLOUR}" + else + MODULE_UPPER_DIR="$MODULES_DIR/$MODULE-upper" + MODULE_WORK_DIR="$MODULES_DIR/$MODULE-work" + MODULE_MERGED_DIR="$MODULES_DIR/$MODULE-merged" + + module_check_build_dir + + module_chroot_mount_fs + + chroot $MODULE_MERGED_DIR /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + $APT_CMD update >>$OUTPUT 2>&1 + + # run pre-install script + if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/preinstall ]; then + cp $SCRIPT_DIR/linux-live/modules/$MODULE/preinstall $MODULE_MERGED_DIR/preinstall + chmod +x $MODULE_MERGED_DIR/preinstall + chroot $MODULE_MERGED_DIR /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + /preinstall >>$OUTPUT 2>&1 + fi + + # copy files + if [ ! -f $SCRIPT_DIR/linux-live/modules/$MODULE/is_internal_build ]; then + if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then + if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-install)" != "" ]; then + (cd $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-install && cp --parents -afr * $MODULE_MERGED_DIR/) + fi + else + if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-install)" != "" ] >>$OUTPUT 2>&1; then + (cd $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-install && cp --parents -afr * $MODULE_MERGED_DIR/) + fi + fi + else + if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then + if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-install)" != "" ]; then + mkdir $MODULE_MERGED_DIR/rootcopy-install + (cd $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-install && cp --parents -afr * $MODULE_MERGED_DIR/rootcopy-install/) + fi + else + if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-install)" != "" ] >>$OUTPUT 2>&1; then + mkdir $MODULE_MERGED_DIR/rootcopy-install + (cd $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-install && cp --parents -afr * $MODULE_MERGED_DIR/rootcopy-install/) + fi + fi + fi + + # run install script + if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/install ]; then + cp $SCRIPT_DIR/linux-live/modules/$MODULE/install $MODULE_MERGED_DIR/install + chmod +x $MODULE_MERGED_DIR/install + if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/cleanup ]; then + cp $SCRIPT_DIR/linux-live/modules/$MODULE/cleanup $MODULE_MERGED_DIR/cleanup + fi + if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/$PACKAGE_VARIANT.list ]; then + cp $SCRIPT_DIR/linux-live/modules/$MODULE/$PACKAGE_VARIANT.list $MODULE_MERGED_DIR/$PACKAGE_VARIANT.list + fi + if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then + chroot $MODULE_MERGED_DIR /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + /install + else + chroot $MODULE_MERGED_DIR /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + /install >>$OUTPUT 2>&1 + fi + fi + + if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/is_internal_build ]; then + module_chroot_umount_fs + + module_build_cleanup + + # run external actions + + if [ "$(ls -A $MODULE_UPPER_DIR)" != "" ]; then + mkdir -p $PARENT_DIR/modules/tmp >>$OUTPUT 2>&1 + mksquashfs $MODULE_UPPER_DIR $PARENT_DIR/modules/tmp/$MODULE-stock.$BEXT -comp lz4 -b 1024K -always-use-fragments -noappend >>$OUTPUT 2>&1 || exit + mv $PARENT_DIR/modules/tmp/$MODULE-stock.$BEXT $MODULE_UPPER_DIR/$MODULE-stock.$BEXT >>$OUTPUT 2>&1 + cd $MODULE_UPPER_DIR >>$OUTPUT 2>&1 + unsquashfs $MODULE-stock.$BEXT >>$OUTPUT 2>&1 + else + echo -e "${MAGENTA}$MODULE_UPPER_DIR${ENDCOLOUR} is empty. Nothing to do." + fi + + #module_check_build_dir + + module_chroot_mount_fs + fi + + # run install2 script + if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/install2 ]; then + cp $SCRIPT_DIR/linux-live/modules/$MODULE/install2 $MODULE_MERGED_DIR/install2 + chmod +x $MODULE_MERGED_DIR/install2 + if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/patches)" != "" ] >>$OUTPUT 2>&1; then + mkdir $MODULE_MERGED_DIR/patches + (cd $SCRIPT_DIR/linux-live/modules/$MODULE/patches && cp --parents -afr * $MODULE_MERGED_DIR/patches/) + fi + if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then + chroot $MODULE_MERGED_DIR /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + /install2 + else + chroot $MODULE_MERGED_DIR /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + /install2 >>$OUTPUT 2>&1 + fi + fi + + # copy files + if [ ! -f $SCRIPT_DIR/linux-live/modules/$MODULE/is_internal_build ]; then + if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then + if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-postinstall)" != "" ]; then + (cd $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-postinstall && cp --parents -afr * $MODULE_MERGED_DIR/) + fi + else + if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-postinstall)" != "" ] >>$OUTPUT 2>&1; then + (cd $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-postinstall && cp --parents -afr * $MODULE_MERGED_DIR/) + fi + fi + else + if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then + if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-postinstall)" != "" ]; then + mkdir $MODULE_MERGED_DIR/rootcopy-postinstall + (cd $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-postinstall && cp --parents -afr * $MODULE_MERGED_DIR/rootcopy-postinstall/) + fi + else + if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-postinstall)" != "" ] >>$OUTPUT 2>&1; then + mkdir $MODULE_MERGED_DIR/rootcopy-postinstall + (cd $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy-postinstall && cp --parents -afr * $MODULE_MERGED_DIR/rootcopy-postinstall/) + fi + fi + fi + + # run post-install script + if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/postinstall ]; then + cp $SCRIPT_DIR/linux-live/modules/$MODULE/postinstall $MODULE_MERGED_DIR/postinstall + chmod +x $MODULE_MERGED_DIR/postinstall + if [ $OUTPUT = "/dev/stdout" ] && [ ! -f /dev/stdout ]; then + chroot $MODULE_MERGED_DIR /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + /postinstall + else + chroot $MODULE_MERGED_DIR /usr/bin/env \ + OUTPUT=$OUTPUT \ + LOGPATH=$LOGPATH \ + BUILD_TEST_ISO=$BUILD_TEST_ISO \ + CREATE_BACKUP=$CREATE_BACKUP \ + DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ + APT_CMD=$APT_CMD \ + APT_OPTIONS=$APT_OPTIONS \ + LIVE_TYPE=$LIVE_TYPE \ + DISTRIBUTION=$DISTRIBUTION \ + DISTRIBUTION_TYPE=$DISTRIBUTION_TYPE \ + PACKAGE_VARIANT=$PACKAGE_VARIANT \ + COMP_TYPE=$COMP_TYPE \ + KERNEL_ARCH=$KERNEL_ARCH \ + USER_NAME=$USER_NAME \ + /postinstall >>$OUTPUT 2>&1 + fi + fi + + # run external actions + if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/is_internal_build ]; then + cp $MODULE_UPPER_DIR/$MODULE.$BEXT $PARENT_DIR/image/$LIVEKITNAME/$MODULE-$COMP_TYPE.$BEXT >>$OUTPUT 2>&1 + fi + + module_chroot_finish_up + + module_chroot_umount_fs + + if [ ! -f $SCRIPT_DIR/linux-live/modules/$MODULE/is_internal_build ]; then + module_build_cleanup + fi + + module_chroot_cleanup + + if [ ! -f $SCRIPT_DIR/linux-live/modules/$MODULE/is_internal_build ]; then + if [ ! -f $PARENT_DIR/image/$LIVEKITNAME/$MODULE-$COMP_TYPE.$BEXT ]; then + if [ "$(ls -A $MODULE_UPPER_DIR)" != "" ]; then + if [ $COMP_TYPE = "zstd" ]; then + mksquashfs $MODULE_UPPER_DIR $PARENT_DIR/image/$LIVEKITNAME/$MODULE-$COMP_TYPE.$BEXT -comp $COMP_TYPE -Xcompression-level 22 -b 1024K -always-use-fragments -noappend || exit + else + mksquashfs $MODULE_UPPER_DIR $PARENT_DIR/image/$LIVEKITNAME/$MODULE-$COMP_TYPE.$BEXT -comp $COMP_TYPE -b 1024K -always-use-fragments -noappend || exit + fi + else + echo -e "${MAGENTA}$MODULE_UPPER_DIR${ENDCOLOUR} is empty. Nothing to do." + fi + else + echo -e "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${ENDCOLOUR}" + echo -e "Please remove ${MAGENTA}$PARENT_DIR/image/$LIVEKITNAME/$MODULE-$COMP_TYPE.$BEXT${ENDCOLOUR} if you want to build ${MAGENTA}$MODULE${ENDCOLOUR}." + echo -e "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${ENDCOLOUR}" + fi + fi + + fi + done + fi } # ================================================================= @@ -2026,71 +2594,71 @@ function build_modules() { # # ================================================================= function build_modules_live() { - current_process - echo "here 2" - if [ $CONTAINER_TYPE = "1" ]; then - if [ ! -f /.minios-live ]; then - setup_host - fi - fi - - MODULES_DIR=$PARENT_DIR/modules - - cd $SCRIPT_DIR/linux-live/modules - - for MODULE in *; do - - if (ls $PARENT_DIR/image/$LIVEKITNAME/*.$BEXT | grep -q $MODULE 2>/dev/null); then - echo -e "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${ENDCOLOUR}" - echo -e "Please remove ${MAGENTA}$PARENT_DIR/image/$LIVEKITNAME/$MODULE.$BEXT${ENDCOLOUR} if you want to build ${MAGENTA}$MODULE${ENDCOLOUR}." - echo -e "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${ENDCOLOUR}" - else - - MODULE_UPPER_DIR="$MODULES_DIR/$MODULE-upper" - MODULE_WORK_DIR="$MODULES_DIR/$MODULE-work" - MODULE_MERGED_DIR="$MODULES_DIR/$MODULE-merged" - - if [ "$(ls -A $MODULE_UPPER_DIR)" != "" ]; then - if [ $COMP_TYPE = "zstd" ]; then - mksquashfs $MODULE_UPPER_DIR $PARENT_DIR/image/$LIVEKITNAME/$MODULE-$COMP_TYPE.$BEXT -comp $COMP_TYPE -Xcompression-level 22 -b 1024K -always-use-fragments -noappend || exit - else - mksquashfs $MODULE_UPPER_DIR $PARENT_DIR/image/$LIVEKITNAME/$MODULE-$COMP_TYPE.$BEXT -comp $COMP_TYPE -b 1024K -always-use-fragments -noappend || exit - fi - else - echo -e "${MAGENTA}$MODULE_UPPER_DIR${ENDCOLOUR} is empty. Nothing to do." - fi - fi - done + current_process + echo "here 2" + if [ $CONTAINER_TYPE = "1" ]; then + if [ ! -f /.minios-live ]; then + setup_host + fi + fi + + MODULES_DIR=$PARENT_DIR/modules + + cd $SCRIPT_DIR/linux-live/modules + + for MODULE in *; do + + if (ls $PARENT_DIR/image/$LIVEKITNAME/*.$BEXT | grep -q $MODULE 2>/dev/null); then + echo -e "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${ENDCOLOUR}" + echo -e "Please remove ${MAGENTA}$PARENT_DIR/image/$LIVEKITNAME/$MODULE.$BEXT${ENDCOLOUR} if you want to build ${MAGENTA}$MODULE${ENDCOLOUR}." + echo -e "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${ENDCOLOUR}" + else + + MODULE_UPPER_DIR="$MODULES_DIR/$MODULE-upper" + MODULE_WORK_DIR="$MODULES_DIR/$MODULE-work" + MODULE_MERGED_DIR="$MODULES_DIR/$MODULE-merged" + + if [ "$(ls -A $MODULE_UPPER_DIR)" != "" ]; then + if [ $COMP_TYPE = "zstd" ]; then + mksquashfs $MODULE_UPPER_DIR $PARENT_DIR/image/$LIVEKITNAME/$MODULE-$COMP_TYPE.$BEXT -comp $COMP_TYPE -Xcompression-level 22 -b 1024K -always-use-fragments -noappend || exit + else + mksquashfs $MODULE_UPPER_DIR $PARENT_DIR/image/$LIVEKITNAME/$MODULE-$COMP_TYPE.$BEXT -comp $COMP_TYPE -b 1024K -always-use-fragments -noappend || exit + fi + else + echo -e "${MAGENTA}$MODULE_UPPER_DIR${ENDCOLOUR} is empty. Nothing to do." + fi + fi + done } function repack_module() { - OLD_MODULE=$MODULE - MODULE=${MODULE%"-$OLD_COMP_TYPE.$BEXT"} - if [ $COMP_TYPE = $OLD_COMP_TYPE ]; then - echo "The module is already in the required compression format." && exit - fi - unsquashfs $OLD_MODULE + OLD_MODULE=$MODULE + MODULE=${MODULE%"-$OLD_COMP_TYPE.$BEXT"} + if [ $COMP_TYPE = $OLD_COMP_TYPE ]; then + echo "The module is already in the required compression format." && exit + fi + unsquashfs $OLD_MODULE - mksquashfs squashfs-root $MODULE-$COMP_TYPE.$BEXT -comp $COMP_TYPE -b 1024K -always-use-fragments -noappend || exit + mksquashfs squashfs-root $MODULE-$COMP_TYPE.$BEXT -comp $COMP_TYPE -b 1024K -always-use-fragments -noappend || exit - rm -rf squashfs-root - rm -f $OLD_MODULE + rm -rf squashfs-root + rm -f $OLD_MODULE } function repack_modules() { - current_process - - cd $PARENT_DIR/image/$LIVEKITNAME/ - for MODULE in *; do - if (ls ./*-xz.$BEXT | grep -q $MODULE >>/dev/null 2>&1); then - OLD_COMP_TYPE="xz" - repack_module - elif (ls ./*-lz4.$BEXT | grep -q $MODULE >>/dev/null 2>&1); then - OLD_COMP_TYPE="lz4" - repack_module - elif (ls ./*-zstd.$BEXT | grep -q $MODULE >>/dev/null 2>&1); then - OLD_COMP_TYPE="zstd" - repack_module - fi - done + current_process + + cd $PARENT_DIR/image/$LIVEKITNAME/ + for MODULE in *; do + if (ls ./*-xz.$BEXT | grep -q $MODULE >>/dev/null 2>&1); then + OLD_COMP_TYPE="xz" + repack_module + elif (ls ./*-lz4.$BEXT | grep -q $MODULE >>/dev/null 2>&1); then + OLD_COMP_TYPE="lz4" + repack_module + elif (ls ./*-zstd.$BEXT | grep -q $MODULE >>/dev/null 2>&1); then + OLD_COMP_TYPE="zstd" + repack_module + fi + done } diff --git a/linux-live/modules/01-firmware/install b/linux-live/modules/01-firmware/install index 0f7c28b..a3868b1 100644 --- a/linux-live/modules/01-firmware/install +++ b/linux-live/modules/01-firmware/install @@ -10,10 +10,14 @@ echo "firmware-ipw2x00 firmware-ipw2x00/license/accepted boolean true" | debconf echo "b43-fwcutter b43-fwcutter/install-unconditional boolean true" | debconf-set-selections # install packages -if [ -f $SCRIPT_DIR/$PACKAGE_VARIANT.list ]; then +if [ $DISTRIBUTION_TYPE = "ubuntu" ]; then #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD update >>$OUTPUT 2>&1 && + $APT_CMD install $APT_OPTIONS \ + linux-firmware firmware-b43-installer firmware-ath9k-htc >>$OUTPUT 2>&1 +else + if [ -f $SCRIPT_DIR/$PACKAGE_VARIANT.list ]; then #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD install $APT_OPTIONS $APT_OPTIONS2 \ + $APT_CMD install $APT_OPTIONS \ $(grep -vE "^\s*#" $SCRIPT_DIR/$PACKAGE_VARIANT.list | tr "\n" " ") >>$OUTPUT 2>&1 + fi fi diff --git a/linux-live/modules/02-xorg/install b/linux-live/modules/02-xorg/install index 6805c05..060c8a4 100644 --- a/linux-live/modules/02-xorg/install +++ b/linux-live/modules/02-xorg/install @@ -11,8 +11,24 @@ echo "keyboard-configuration keyboard-configuration/variant select English (US)" # install packages if [ -f $SCRIPT_DIR/$PACKAGE_VARIANT.list ]; then #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD update >>$OUTPUT 2>&1 && - #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD install $APT_OPTIONS $APT_OPTIONS2 \ - $(grep -vE "^\s*#" $SCRIPT_DIR/$PACKAGE_VARIANT.list | tr "\n" " ") >>$OUTPUT 2>&1 + $APT_CMD install $APT_OPTIONS \ + $(grep -vE "^\s*#" $SCRIPT_DIR/$PACKAGE_VARIANT.list | tr "\n" " ") >>$OUTPUT 2>&1 fi + +cat </usr/lib/systemd/system/xorg.service +[Unit] +Description=X-Window +ConditionKernelCommandLine=!text +After=systemd-user-sessions.service + +[Service] +ExecStart=/bin/su --login -c "/usr/bin/startx -- :0 vt7 -ac -nolisten tcp" $USER_NAME + +EOF + +cp -rT /etc/skel /home/$USER_NAME +cp -rT /etc/skel /root +chown 1000:1000 /home/$USER_NAME +chown -R 1000:1000 /home/$USER_NAME +chown 0:0 /root +chown -R 0:0 /root diff --git a/linux-live/modules/02-xorg/postinstall b/linux-live/modules/02-xorg/postinstall index 175edef..63486cf 100644 --- a/linux-live/modules/02-xorg/postinstall +++ b/linux-live/modules/02-xorg/postinstall @@ -1,5 +1,12 @@ #!/bin/bash +cp -rT /etc/skel /home/$USER_NAME +cp -rT /etc/skel /root +chown 1000:1000 /home/$USER_NAME +chown -R 1000:1000 /home/$USER_NAME +chown 0:0 /root +chown -R 0:0 /root + # Set setuid bit on xorg binary, so it can be started by guest user chmod u+s /usr/lib/xorg/Xorg @@ -19,4 +26,4 @@ dpkg -x x11-xserver-utils*.deb /tmp/x11utils >>$OUTPUT 2>&1 cd /tmp/x11utils cp -aR * / >>$OUTPUT 2>&1 -update-alternatives --set x-terminal-emulator /usr/bin/xterm >>$OUTPUT 2>&1 \ No newline at end of file +update-alternatives --set x-terminal-emulator /usr/bin/xterm >>$OUTPUT 2>&1 diff --git a/linux-live/modules/02-xorg/rootcopy-install/home/live/.Xresources b/linux-live/modules/02-xorg/rootcopy-install/home/live/.Xresources deleted file mode 100644 index a6d2cc5..0000000 --- a/linux-live/modules/02-xorg/rootcopy-install/home/live/.Xresources +++ /dev/null @@ -1,32 +0,0 @@ -! this are Xresources to make xterm look good -! put into ~/.Xresources -! after changing contents, run xrdb -merge .Xresources -! gentoo has a bug so that it doesnt read it when X starts, so add above -! command to /etc/xfce4/xinitrc (top) and be happy. - -XTerm*termName: xterm-256color -XTerm*foreground: white -XTerm*background: rgb:22/22/22 -XTerm*cursorColor: rgb:00/ff/00 -XTerm*borderColor: black -XTerm*scrollColor: black -XTerm*visualBell: true -XTerm*saveLines: 1000 -XTerm*allowSendEvents: true -XTerm*sessionMgt: false -XTerm*scrollBar: true -XTerm*rightScrollBar: true -XTerm*eightBitInput: false -XTerm*faceName: DejaVu Sans Mono: size=9 -XTerm*boldFont: DejaVu Sans Mono Bold: size=9 -XTerm*renderFont: true -XTerm*activeIcon: true -XTerm*iconPixmap: /usr/share/icons/locolor/16x16/apps/xterm.xbm -XTerm*fullscreen: never -XTerm*selectToClipboard: true -Xft.dpi: 96 -Xft.antialias: true -Xft.hinting: true -Xft.hintstyle: hintlight -Xft.lcdfilter: lcddefault -Xft.rgba: rgb \ No newline at end of file diff --git a/linux-live/modules/02-xorg/rootcopy-install/home/live/.blackbox-menu b/linux-live/modules/02-xorg/rootcopy-install/home/live/.blackbox-menu deleted file mode 100644 index 093ae2a..0000000 --- a/linux-live/modules/02-xorg/rootcopy-install/home/live/.blackbox-menu +++ /dev/null @@ -1,4 +0,0 @@ -[begin] ( Menu ) - [exec] (Terminal) { xterm -ls -title Terminal } - [exit] (Exit) -[end] diff --git a/linux-live/modules/02-xorg/rootcopy-install/home/live/.blackboxrc b/linux-live/modules/02-xorg/rootcopy-install/home/live/.blackboxrc deleted file mode 100644 index a39f965..0000000 --- a/linux-live/modules/02-xorg/rootcopy-install/home/live/.blackboxrc +++ /dev/null @@ -1,6 +0,0 @@ -session.screen0.toolbar.widthPercent: 100 -session.screen0.strftimeFormat: %H:%M -session.edgeSnapThreshold: 10 -session.menuFile: /root/.blackbox-menu -session.styleFile: /usr/share/blackbox/styles/Slax -session.changeWorkspaceWithMouseWheel: False diff --git a/linux-live/modules/02-xorg/rootcopy-install/home/live/.xinitrc b/linux-live/modules/02-xorg/rootcopy-install/home/live/.xinitrc deleted file mode 100644 index 5118998..0000000 --- a/linux-live/modules/02-xorg/rootcopy-install/home/live/.xinitrc +++ /dev/null @@ -1,2 +0,0 @@ -xrdb -merge .Xresources -blackbox \ No newline at end of file diff --git a/linux-live/modules/02-xorg/rootcopy-install/root/.Xresources b/linux-live/modules/02-xorg/rootcopy-install/root/.Xresources deleted file mode 100644 index a6d2cc5..0000000 --- a/linux-live/modules/02-xorg/rootcopy-install/root/.Xresources +++ /dev/null @@ -1,32 +0,0 @@ -! this are Xresources to make xterm look good -! put into ~/.Xresources -! after changing contents, run xrdb -merge .Xresources -! gentoo has a bug so that it doesnt read it when X starts, so add above -! command to /etc/xfce4/xinitrc (top) and be happy. - -XTerm*termName: xterm-256color -XTerm*foreground: white -XTerm*background: rgb:22/22/22 -XTerm*cursorColor: rgb:00/ff/00 -XTerm*borderColor: black -XTerm*scrollColor: black -XTerm*visualBell: true -XTerm*saveLines: 1000 -XTerm*allowSendEvents: true -XTerm*sessionMgt: false -XTerm*scrollBar: true -XTerm*rightScrollBar: true -XTerm*eightBitInput: false -XTerm*faceName: DejaVu Sans Mono: size=9 -XTerm*boldFont: DejaVu Sans Mono Bold: size=9 -XTerm*renderFont: true -XTerm*activeIcon: true -XTerm*iconPixmap: /usr/share/icons/locolor/16x16/apps/xterm.xbm -XTerm*fullscreen: never -XTerm*selectToClipboard: true -Xft.dpi: 96 -Xft.antialias: true -Xft.hinting: true -Xft.hintstyle: hintlight -Xft.lcdfilter: lcddefault -Xft.rgba: rgb \ No newline at end of file diff --git a/linux-live/modules/02-xorg/rootcopy-install/root/.blackbox-menu b/linux-live/modules/02-xorg/rootcopy-install/root/.blackbox-menu deleted file mode 100644 index 093ae2a..0000000 --- a/linux-live/modules/02-xorg/rootcopy-install/root/.blackbox-menu +++ /dev/null @@ -1,4 +0,0 @@ -[begin] ( Menu ) - [exec] (Terminal) { xterm -ls -title Terminal } - [exit] (Exit) -[end] diff --git a/linux-live/modules/02-xorg/rootcopy-install/root/.blackboxrc b/linux-live/modules/02-xorg/rootcopy-install/root/.blackboxrc deleted file mode 100644 index a39f965..0000000 --- a/linux-live/modules/02-xorg/rootcopy-install/root/.blackboxrc +++ /dev/null @@ -1,6 +0,0 @@ -session.screen0.toolbar.widthPercent: 100 -session.screen0.strftimeFormat: %H:%M -session.edgeSnapThreshold: 10 -session.menuFile: /root/.blackbox-menu -session.styleFile: /usr/share/blackbox/styles/Slax -session.changeWorkspaceWithMouseWheel: False diff --git a/linux-live/modules/02-xorg/rootcopy-install/root/.xinitrc b/linux-live/modules/02-xorg/rootcopy-install/root/.xinitrc deleted file mode 100644 index 5118998..0000000 --- a/linux-live/modules/02-xorg/rootcopy-install/root/.xinitrc +++ /dev/null @@ -1,2 +0,0 @@ -xrdb -merge .Xresources -blackbox \ No newline at end of file diff --git a/linux-live/modules/03-xfce-desktop/install b/linux-live/modules/03-xfce-desktop/install index 7fa1c29..e1a8694 100644 --- a/linux-live/modules/03-xfce-desktop/install +++ b/linux-live/modules/03-xfce-desktop/install @@ -10,10 +10,8 @@ GTKUI="2" if [ $DISTRIBUTION = "buster" ] && [ $GTKUI = "3" ]; then #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD update >>$OUTPUT 2>&1 && - #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD install $APT_OPTIONS $APT_OPTIONS2 \ - gnupg curl >>$OUTPUT 2>&1 + $APT_CMD install $APT_OPTIONS \ + gnupg curl >>$OUTPUT 2>&1 echo "deb http://mxrepo.com/mx/repo/ temp main" >>/etc/apt/sources.list curl -L https://cyber-x.ru/wp-content/upload/mx19/mx19.gpg | sudo apt-key add - fi @@ -26,7 +24,7 @@ if [ -f $SCRIPT_DIR/$PACKAGE_VARIANT.list ]; then #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ $APT_CMD update >>$OUTPUT 2>&1 && #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD install $APT_OPTIONS $APT_OPTIONS2 \ + $APT_CMD install $APT_OPTIONS \ $(grep -vE "^\s*#" $SCRIPT_DIR/$PACKAGE_VARIANT.list | tr "\n" " ") >>$OUTPUT 2>&1 fi @@ -36,14 +34,14 @@ if [ $DISTRIBUTION = "stretch" ]; then #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ $APT_CMD update >>$OUTPUT 2>&1 && #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD install $APT_OPTIONS $APT_OPTIONS2 \ + $APT_CMD install $APT_OPTIONS \ ./elementary-xfce-icon-theme_0.15.2-1_all.deb >>$OUTPUT 2>&1 rm -f ./elementary-xfce-icon-theme_0.15.2-1_all.deb >>$OUTPUT 2>&1 else #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ $APT_CMD update >>$OUTPUT 2>&1 && #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD install $APT_OPTIONS $APT_OPTIONS2 \ + $APT_CMD install $APT_OPTIONS \ elementary-xfce-icon-theme >>$OUTPUT 2>&1 fi @@ -53,19 +51,15 @@ fi if [ $DISTRIBUTION = "bullseye" ]; then #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD install $APT_OPTIONS $APT_OPTIONS2 \ + $APT_CMD install $APT_OPTIONS \ librsvg2-common >>$OUTPUT 2>&1 fi if grep xfce4-whiskermenu-plugin $SCRIPT_DIR/$PACKAGE_VARIANT.list >>$OUTPUT 2>&1; then if [ $DISTRIBUTION = "buster" ] || [ $DISTRIBUTION = "stretch" ]; then echo "favorites=exo-terminal-emulator.desktop,exo-file-manager.desktop,exo-mail-reader.desktop,exo-web-browser.desktop" >/etc/skel/.config/xfce4/panel/whiskermenu-1.rc - echo "favorites=exo-terminal-emulator.desktop,exo-file-manager.desktop,exo-mail-reader.desktop,exo-web-browser.desktop" >/root/.config/xfce4/panel/whiskermenu-1.rc - echo "favorites=exo-terminal-emulator.desktop,exo-file-manager.desktop,exo-mail-reader.desktop,exo-web-browser.desktop" >/home/live/.config/xfce4/panel/whiskermenu-1.rc elif [ $DISTRIBUTION = "bullseye" ]; then echo "favorites=xfce4-terminal-emulator.desktop,xfce4-file-manager.desktop,xfce4-web-browser.desktop,xfce4-mail-reader.desktop" >/etc/skel/.config/xfce4/panel/whiskermenu-1.rc - echo "favorites=xfce4-terminal-emulator.desktop,xfce4-file-manager.desktop,xfce4-web-browser.desktop,xfce4-mail-reader.desktop" >/root/.config/xfce4/panel/whiskermenu-1.rc - echo "favorites=xfce4-terminal-emulator.desktop,xfce4-file-manager.desktop,xfce4-web-browser.desktop,xfce4-mail-reader.desktop" >/home/live/.config/xfce4/panel/whiskermenu-1.rc fi cat <>/etc/skel/.config/xfce4/panel/whiskermenu-1.rc recent= @@ -149,175 +143,7 @@ regex=true EOF - cat <>/root/.config/xfce4/panel/whiskermenu-1.rc -recent= -button-icon=/usr/share/pixmaps/MiniOS-white.svg -button-single-row=false -show-button-title=false -show-button-icon=true -launcher-show-name=true -launcher-show-description=false -launcher-show-tooltip=true -item-icon-size=2 -hover-switch-category=false -category-show-name=true -category-icon-size=1 -load-hierarchy=false -view-as-icons=false -default-category=0 -recent-items-max=10 -favorites-in-recent=true -position-search-alternate=true -position-commands-alternate=false -position-categories-alternate=true -stay-on-focus-out=false -confirm-session-command=true -menu-width=450 -menu-height=500 -menu-opacity=100 -command-settings=xfce4-settings-manager -show-command-settings=false -command-lockscreen=xflock4 -show-command-lockscreen=false -command-switchuser=dm-tool switch-to-greeter -show-command-switchuser=false -command-logoutuser=xfce4-session-logout --logout --fast -show-command-logoutuser=false -command-restart=xfce4-session-logout --reboot --fast -show-command-restart=false -command-shutdown=xfce4-session-logout --halt --fast -show-command-shutdown=false -command-suspend=xfce4-session-logout --suspend -show-command-suspend=false -command-hibernate=xfce4-session-logout --hibernate -show-command-hibernate=false -command-logout=xfce4-session-logout -show-command-logout=true -command-menueditor=menulibre -show-command-menueditor=true -command-profile=mugshot -show-command-profile=false -search-actions=5 - -[action0] -name=Man Pages -pattern=# -command=exo-open --launch TerminalEmulator man %s -regex=false - -[action1] -name=Web Search -pattern=? -command=exo-open --launch WebBrowser https://duckduckgo.com/?q=%u -regex=false - -[action2] -name=Wikipedia -pattern=!w -command=exo-open --launch WebBrowser https://en.wikipedia.org/wiki/%u -regex=false - -[action3] -name=Run in Terminal -pattern=! -command=exo-open --launch TerminalEmulator %s -regex=false - -[action4] -name=Open URI -pattern=^(file|http|https):\\/\\/(.*)$ -command=exo-open \\0 -regex=true - - -EOF - cat <>/home/live/.config/xfce4/panel/whiskermenu-1.rc -recent= -button-icon=/usr/share/pixmaps/MiniOS-white.svg -button-single-row=false -show-button-title=false -show-button-icon=true -launcher-show-name=true -launcher-show-description=false -launcher-show-tooltip=true -item-icon-size=2 -hover-switch-category=false -category-show-name=true -category-icon-size=1 -load-hierarchy=false -view-as-icons=false -default-category=0 -recent-items-max=10 -favorites-in-recent=true -position-search-alternate=true -position-commands-alternate=false -position-categories-alternate=true -stay-on-focus-out=false -confirm-session-command=true -menu-width=450 -menu-height=500 -menu-opacity=100 -command-settings=xfce4-settings-manager -show-command-settings=false -command-lockscreen=xflock4 -show-command-lockscreen=false -command-switchuser=dm-tool switch-to-greeter -show-command-switchuser=false -command-logoutuser=xfce4-session-logout --logout --fast -show-command-logoutuser=false -command-restart=xfce4-session-logout --reboot --fast -show-command-restart=false -command-shutdown=xfce4-session-logout --halt --fast -show-command-shutdown=false -command-suspend=xfce4-session-logout --suspend -show-command-suspend=false -command-hibernate=xfce4-session-logout --hibernate -show-command-hibernate=false -command-logout=xfce4-session-logout -show-command-logout=true -command-menueditor=menulibre -show-command-menueditor=true -command-profile=mugshot -show-command-profile=false -search-actions=5 - -[action0] -name=Man Pages -pattern=# -command=exo-open --launch TerminalEmulator man %s -regex=false - -[action1] -name=Web Search -pattern=? -command=exo-open --launch WebBrowser https://duckduckgo.com/?q=%u -regex=false - -[action2] -name=Wikipedia -pattern=!w -command=exo-open --launch WebBrowser https://en.wikipedia.org/wiki/%u -regex=false - -[action3] -name=Run in Terminal -pattern=! -command=exo-open --launch TerminalEmulator %s -regex=false - -[action4] -name=Open URI -pattern=^(file|http|https):\\/\\/(.*)$ -command=exo-open \\0 -regex=true - - -EOF - #echo $WHISKERMENU >>/etc/skel/.config/xfce4/panel/whiskermenu-1.rc - #echo $WHISKERMENU >>/root/.config/xfce4/panel/whiskermenu-1.rc - #echo $WHISKERMENU >>/home/live/.config/xfce4/panel/whiskermenu-1.rc else - #read -r -d MINIMAL_PANEL '' </etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml @@ -409,191 +235,6 @@ else EOF - cat </root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -EOF - cat </home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -EOF - #echo $MINIMAL_PANEL >>/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml - #echo $MINIMAL_PANEL >>/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml - #echo $MINIMAL_PANEL >>/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml fi if [ $PACKAGE_VARIANT = "minimal" ]; then @@ -603,36 +244,11 @@ FileManager=pcmanfm WebBrowser= EOF - cat </home/live/.config/xfce4/helpers.rc -TerminalEmulator=xterm -FileManager=pcmanfm -WebBrowser= - -EOF - cat </root/.config/xfce4/helpers.rc -TerminalEmulator=xterm -FileManager=pcmanfm -WebBrowser= - -EOF - elif [ $PACKAGE_VARIANT = "standard" ]; then cat </etc/skel/.config/xfce4/helpers.rc TerminalEmulator=xterm FileManager=Thunar WebBrowser= -EOF - cat </home/live/.config/xfce4/helpers.rc -TerminalEmulator=xterm -FileManager=Thunar -WebBrowser= - -EOF - cat </root/.config/xfce4/helpers.rc -TerminalEmulator=xterm -FileManager=Thunar -WebBrowser= - EOF fi diff --git a/linux-live/modules/03-xfce-desktop/postinstall b/linux-live/modules/03-xfce-desktop/postinstall index 175d74a..3f42cf5 100644 --- a/linux-live/modules/03-xfce-desktop/postinstall +++ b/linux-live/modules/03-xfce-desktop/postinstall @@ -1,13 +1,18 @@ #!/bin/bash -#(cd /rootcopy-install && cp --parents -afr * /) - # create user directories for dir in Desktop Documents Downloads Music Pictures Public Templates Videos; do - mkdir -p /home/live/$dir >>$OUTPUT 2>&1 + mkdir -p /home/$USER_NAME/$dir >>$OUTPUT 2>&1 mkdir -p /root/$dir >>$OUTPUT 2>&1 done +cp -rT /etc/skel /home/$USER_NAME +cp -rT /etc/skel /root +chown 1000:1000 /home/$USER_NAME +chown -R 1000:1000 /home/$USER_NAME +chown 0:0 /root +chown -R 0:0 /root + rm -f /usr/share/backgrounds/xfce/* ln -s /usr/share/backgrounds/MiniOS-wallpaper.svg /usr/share/backgrounds/xfce/xfce-verticals.png ln -s /usr/share/backgrounds/MiniOS-wallpaper.svg /usr/share/backgrounds/xfce/xfce-teal.jpg @@ -22,7 +27,7 @@ if grep slim $SCRIPT_DIR/$PACKAGE_VARIANT.list >>$OUTPUT 2>&1; then if [ $PACKAGE_VARIANT = "minimal" ]; then sed -i 's,#default_user simone,default_user root,g' /etc/slim.conf else - sed -i 's,#default_user simone,default_user live,g' /etc/slim.conf + sed -i "s,#default_user simone,default_user $USER_NAME,g" /etc/slim.conf fi sed -i 's,#auto_login no,auto_login yes,g' /etc/slim.conf sed -i 's,current_theme debian-softwaves,current_theme minios,g' /etc/slim.conf diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml b/linux-live/modules/03-xfce-desktop/rootcopy-install/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml index 5dd9176..57cd866 100644 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml +++ b/linux-live/modules/03-xfce-desktop/rootcopy-install/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml @@ -10,6 +10,13 @@ + + + + + + + diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/chromium/Default/Preferences b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/chromium/Default/Preferences deleted file mode 100644 index 5bfddb0..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/chromium/Default/Preferences +++ /dev/null @@ -1,38 +0,0 @@ -{ - "AudioCaptureAllowed": false, - "account_id_migration_state": 2, - "account_tracker_service_last_update": "13154004704520013", - "alternate_error_pages": { - "enabled": false - }, - "bookmark_bar": { - "show_on_all_tabs": false - }, - "browser": { - "check_default_browser": false, - "has_seen_welcome_page": true, - "show_home_button": false, - "window_placement": { - "bottom": 10, - "left": 10, - "maximized": true, - "right": 10, - "top": 10 - } - }, - "extensions": { - "theme": { - "use_system": true - } - }, - "ntp": { - "most_visited_blacklist": { - "c8e0afd1da1d9e29511240861f795a5a": null, - "eacc8c3ad0b50bd698ef8752d5ee24b6": null - } - }, - "safebrowsing": { - "enabled": false, - "scout_group_selected": true - } -} \ No newline at end of file diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/chromium/First Run b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/chromium/First Run deleted file mode 100644 index e69de29..0000000 diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xarchiver/xarchiverrc b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xarchiver/xarchiverrc deleted file mode 100644 index f65e2a5..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xarchiver/xarchiverrc +++ /dev/null @@ -1,20 +0,0 @@ -[xarchiver] -preferred_format=0 -confirm_deletion=true -sort_filename_content=false -store_output=false -icon_size=0 -show_archive_comment=false -show_sidebar=false -show_location_bar=false -preferred_temp_dir=/tmp -allow_sub_dir=0 -overwrite=false -full_path=true -touch=false -freshen=false -update=false -store_path=false -recurse=true -solid_archive=false -remove_files=false diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/panel/battery-10.rc b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/panel/battery-10.rc deleted file mode 100644 index 170c036..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/panel/battery-10.rc +++ /dev/null @@ -1,20 +0,0 @@ -display_label=false -display_icon=false -display_power=false -display_percentage=false -display_bar=true -display_time=false -tooltip_display_percentage=true -tooltip_display_time=true -low_percentage=10 -critical_percentage=5 -action_on_low=1 -action_on_critical=1 -hide_when_full=-415324144 -colorA=rgb(136,136,255) -colorH=rgb(0,255,0) -colorL=rgb(255,255,0) -colorC=rgb(255,0,0) -command_on_low= -command_on_critical= - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/panel/launcher-3/TerminalEmulator.desktop b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/panel/launcher-3/TerminalEmulator.desktop deleted file mode 100644 index e51e56e..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/panel/launcher-3/TerminalEmulator.desktop +++ /dev/null @@ -1,13 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Exec=exo-open --launch TerminalEmulator -Icon=utilities-terminal -StartupNotify=true -Terminal=false -Categories=Utility;X-XFCE;X-Xfce-Toplevel; -OnlyShowIn=XFCE; -X-AppStream-Ignore=True -Name=Terminal Emulator -Comment=Use the command line -X-XFCE-Source=file:///usr/share/applications/exo-terminal-emulator.desktop diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/panel/launcher-4/FileManager.desktop b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/panel/launcher-4/FileManager.desktop deleted file mode 100644 index 598b0c9..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/panel/launcher-4/FileManager.desktop +++ /dev/null @@ -1,14 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Exec=exo-open --launch FileManager %u -Icon=system-file-manager -StartupNotify=true -Terminal=false -Categories=Utility;X-XFCE;X-Xfce-Toplevel; -OnlyShowIn=XFCE; -X-XFCE-MimeType=inode/directory;x-scheme-handler/trash; -X-AppStream-Ignore=True -Name=File Manager -Comment=Browse the file system -X-XFCE-Source=file:///usr/share/applications/exo-file-manager.desktop diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/panel/launcher-5/WebBrowser.desktop b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/panel/launcher-5/WebBrowser.desktop deleted file mode 100644 index 4662377..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/panel/launcher-5/WebBrowser.desktop +++ /dev/null @@ -1,14 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Exec=exo-open --launch WebBrowser %u -Icon=web-browser -StartupNotify=true -Terminal=false -Categories=Network;X-XFCE;X-Xfce-Toplevel; -OnlyShowIn=XFCE; -X-XFCE-MimeType=x-scheme-handler/http;x-scheme-handler/https; -X-AppStream-Ignore=True -Name=Web Browser -Comment=Browse the web -X-XFCE-Source=file:///usr/share/applications/exo-web-browser.desktop diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/panel/whiskermenu-1.rc b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/panel/whiskermenu-1.rc deleted file mode 100644 index be72781..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/panel/whiskermenu-1.rc +++ /dev/null @@ -1,80 +0,0 @@ -favorites=xfce4-terminal-emulator.desktop,xfce4-file-manager.desktop,xfce4-web-browser.desktop,xfce4-mail-reader.desktop -recent= -button-icon=/usr/share/pixmaps/MiniOS-white.svg -button-single-row=false -show-button-title=false -show-button-icon=true -launcher-show-name=true -launcher-show-description=false -launcher-show-tooltip=true -item-icon-size=2 -hover-switch-category=false -category-show-name=true -category-icon-size=1 -load-hierarchy=false -view-as-icons=false -default-category=0 -recent-items-max=10 -favorites-in-recent=true -position-search-alternate=true -position-commands-alternate=false -position-categories-alternate=true -stay-on-focus-out=false -confirm-session-command=true -menu-width=450 -menu-height=500 -menu-opacity=100 -command-settings=xfce4-settings-manager -show-command-settings=false -command-lockscreen=xflock4 -show-command-lockscreen=false -command-switchuser=dm-tool switch-to-greeter -show-command-switchuser=false -command-logoutuser=xfce4-session-logout --logout --fast -show-command-logoutuser=false -command-restart=xfce4-session-logout --reboot --fast -show-command-restart=false -command-shutdown=xfce4-session-logout --halt --fast -show-command-shutdown=false -command-suspend=xfce4-session-logout --suspend -show-command-suspend=false -command-hibernate=xfce4-session-logout --hibernate -show-command-hibernate=false -command-logout=xfce4-session-logout -show-command-logout=true -command-menueditor=menulibre -show-command-menueditor=true -command-profile=mugshot -show-command-profile=false -search-actions=5 - -[action0] -name=Man Pages -pattern=# -command=exo-open --launch TerminalEmulator man %s -regex=false - -[action1] -name=Web Search -pattern=? -command=exo-open --launch WebBrowser https://duckduckgo.com/?q=%u -regex=false - -[action2] -name=Wikipedia -pattern=!w -command=exo-open --launch WebBrowser https://en.wikipedia.org/wiki/%u -regex=false - -[action3] -name=Run in Terminal -pattern=! -command=exo-open --launch TerminalEmulator %s -regex=false - -[action4] -name=Open URI -pattern=^(file|http|https):\\/\\/(.*)$ -command=exo-open \\0 -regex=true - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml deleted file mode 100644 index e7e0bcd..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-appfinder.xml b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-appfinder.xml deleted file mode 100644 index 0559966..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-appfinder.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml deleted file mode 100644 index 5dd9176..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml deleted file mode 100644 index ab0d597..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml deleted file mode 100644 index f3c9034..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml deleted file mode 100644 index 276b7ec..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-manager.xml b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-manager.xml deleted file mode 100644 index 0693440..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-manager.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml deleted file mode 100644 index a7d7fe7..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml deleted file mode 100644 index 4d5554e..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.xinitrc b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.xinitrc deleted file mode 100644 index 41eda7a..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.xinitrc +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# -# ~/.xinitrc -# -# Executed by startx (run your window manager from here) - -if [ -d /etc/X11/xinit/xinitrc.d ]; then - for f in /etc/X11/xinit/xinitrc.d/*; do - [ -x "$f" ] && . "$f" - done - unset f -fi - -xrdb -merge .Xresources - -exec xfce4-session \ No newline at end of file diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.xsession b/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.xsession deleted file mode 100644 index 8658258..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/home/live/.xsession +++ /dev/null @@ -1 +0,0 @@ -xfce4-session \ No newline at end of file diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xarchiver/xarchiverrc b/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xarchiver/xarchiverrc deleted file mode 100644 index f65e2a5..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xarchiver/xarchiverrc +++ /dev/null @@ -1,20 +0,0 @@ -[xarchiver] -preferred_format=0 -confirm_deletion=true -sort_filename_content=false -store_output=false -icon_size=0 -show_archive_comment=false -show_sidebar=false -show_location_bar=false -preferred_temp_dir=/tmp -allow_sub_dir=0 -overwrite=false -full_path=true -touch=false -freshen=false -update=false -store_path=false -recurse=true -solid_archive=false -remove_files=false diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/panel/battery-10.rc b/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/panel/battery-10.rc deleted file mode 100644 index 170c036..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/panel/battery-10.rc +++ /dev/null @@ -1,20 +0,0 @@ -display_label=false -display_icon=false -display_power=false -display_percentage=false -display_bar=true -display_time=false -tooltip_display_percentage=true -tooltip_display_time=true -low_percentage=10 -critical_percentage=5 -action_on_low=1 -action_on_critical=1 -hide_when_full=-415324144 -colorA=rgb(136,136,255) -colorH=rgb(0,255,0) -colorL=rgb(255,255,0) -colorC=rgb(255,0,0) -command_on_low= -command_on_critical= - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/panel/launcher-3/TerminalEmulator.desktop b/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/panel/launcher-3/TerminalEmulator.desktop deleted file mode 100644 index e51e56e..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/panel/launcher-3/TerminalEmulator.desktop +++ /dev/null @@ -1,13 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Exec=exo-open --launch TerminalEmulator -Icon=utilities-terminal -StartupNotify=true -Terminal=false -Categories=Utility;X-XFCE;X-Xfce-Toplevel; -OnlyShowIn=XFCE; -X-AppStream-Ignore=True -Name=Terminal Emulator -Comment=Use the command line -X-XFCE-Source=file:///usr/share/applications/exo-terminal-emulator.desktop diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/panel/launcher-4/FileManager.desktop b/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/panel/launcher-4/FileManager.desktop deleted file mode 100644 index 598b0c9..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/panel/launcher-4/FileManager.desktop +++ /dev/null @@ -1,14 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Exec=exo-open --launch FileManager %u -Icon=system-file-manager -StartupNotify=true -Terminal=false -Categories=Utility;X-XFCE;X-Xfce-Toplevel; -OnlyShowIn=XFCE; -X-XFCE-MimeType=inode/directory;x-scheme-handler/trash; -X-AppStream-Ignore=True -Name=File Manager -Comment=Browse the file system -X-XFCE-Source=file:///usr/share/applications/exo-file-manager.desktop diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/panel/launcher-5/WebBrowser.desktop b/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/panel/launcher-5/WebBrowser.desktop deleted file mode 100644 index 4662377..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/panel/launcher-5/WebBrowser.desktop +++ /dev/null @@ -1,14 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Exec=exo-open --launch WebBrowser %u -Icon=web-browser -StartupNotify=true -Terminal=false -Categories=Network;X-XFCE;X-Xfce-Toplevel; -OnlyShowIn=XFCE; -X-XFCE-MimeType=x-scheme-handler/http;x-scheme-handler/https; -X-AppStream-Ignore=True -Name=Web Browser -Comment=Browse the web -X-XFCE-Source=file:///usr/share/applications/exo-web-browser.desktop diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-appfinder.xml b/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-appfinder.xml deleted file mode 100644 index 0559966..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-appfinder.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml b/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml deleted file mode 100644 index 5dd9176..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml b/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml deleted file mode 100644 index ab0d597..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml b/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml deleted file mode 100644 index f3c9034..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml b/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml deleted file mode 100644 index 276b7ec..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-manager.xml b/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-manager.xml deleted file mode 100644 index 0693440..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-manager.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml b/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml deleted file mode 100644 index a7d7fe7..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml b/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml deleted file mode 100644 index 4d5554e..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.xinitrc b/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.xinitrc deleted file mode 100644 index 41eda7a..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.xinitrc +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# -# ~/.xinitrc -# -# Executed by startx (run your window manager from here) - -if [ -d /etc/X11/xinit/xinitrc.d ]; then - for f in /etc/X11/xinit/xinitrc.d/*; do - [ -x "$f" ] && . "$f" - done - unset f -fi - -xrdb -merge .Xresources - -exec xfce4-session \ No newline at end of file diff --git a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.xsession b/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.xsession deleted file mode 100644 index 8658258..0000000 --- a/linux-live/modules/03-xfce-desktop/rootcopy-install/root/.xsession +++ /dev/null @@ -1 +0,0 @@ -xfce4-session \ No newline at end of file diff --git a/linux-live/modules/04-xfce-apps/install b/linux-live/modules/04-xfce-apps/install index 8d72be3..d82c5d6 100644 --- a/linux-live/modules/04-xfce-apps/install +++ b/linux-live/modules/04-xfce-apps/install @@ -9,24 +9,20 @@ SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" # install packages if [ -f $SCRIPT_DIR/$PACKAGE_VARIANT.list ]; then #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD update && - #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD install $APT_OPTIONS $APT_OPTIONS2 \ - $(grep -vE "^\s*#" $SCRIPT_DIR/$PACKAGE_VARIANT.list | tr "\n" " ") >>$OUTPUT 2>&1 + $APT_CMD install $APT_OPTIONS \ + $(grep -vE "^\s*#" $SCRIPT_DIR/$PACKAGE_VARIANT.list | tr "\n" " ") >>$OUTPUT 2>&1 fi if [ $PACKAGE_VARIANT = "standard" ]; then if [ $DISTRIBUTION = "stretch" ]; then echo 'deb http://ftp.debian.org/debian stretch-backports main' | sudo tee --append /etc/apt/sources.list.d/stretch-backports.list >>$OUTPUT 2>&1 - $APT_CMD update && - #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD install -t stretch-backports $APT_OPTIONS $APT_OPTIONS2 \ - remmina remmina-plugin-rdp remmina-plugin-vnc >>$OUTPUT 2>&1 + #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ + $APT_CMD install -t stretch-backports $APT_OPTIONS \ + remmina remmina-plugin-rdp remmina-plugin-vnc >>$OUTPUT 2>&1 else - $APT_CMD update && - #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD install $APT_OPTIONS $APT_OPTIONS2 \ - remmina remmina-plugin-rdp remmina-plugin-vnc >>$OUTPUT 2>&1 + #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ + $APT_CMD install $APT_OPTIONS \ + remmina remmina-plugin-rdp remmina-plugin-vnc >>$OUTPUT 2>&1 fi fi @@ -38,36 +34,18 @@ FileManager=pcmanfm WebBrowser=firefox EOF - cat </home/live/.config/xfce4/helpers.rc -TerminalEmulator=xterm -FileManager=pcmanfm -WebBrowser=firefox - -EOF - cat </root/.config/xfce4/helpers.rc -TerminalEmulator=xterm -FileManager=pcmanfm -WebBrowser=firefox - -EOF - elif [ $PACKAGE_VARIANT = "standard" ]; then cat </etc/skel/.config/xfce4/helpers.rc TerminalEmulator=xfce4-terminal FileManager=Thunar WebBrowser=firefox -EOF - cat </home/live/.config/xfce4/helpers.rc -TerminalEmulator=xfce4-terminal -FileManager=Thunar -WebBrowser=firefox - -EOF - cat </root/.config/xfce4/helpers.rc -TerminalEmulator=xfce4-terminal -FileManager=Thunar -WebBrowser=firefox - EOF fi + +cp -rT /etc/skel /home/$USER_NAME +cp -rT /etc/skel /root +chown 1000:1000 /home/$USER_NAME +chown -R 1000:1000 /home/$USER_NAME +chown 0:0 /root +chown -R 0:0 /root diff --git a/linux-live/modules/04-xfce-apps/postinstall b/linux-live/modules/04-xfce-apps/postinstall index fd06000..a50b2dd 100644 --- a/linux-live/modules/04-xfce-apps/postinstall +++ b/linux-live/modules/04-xfce-apps/postinstall @@ -1,6 +1,11 @@ #!/bin/bash -(cd /rootcopy-install && cp --parents -afr * /) +cp -rT /etc/skel /home/$USER_NAME +cp -rT /etc/skel /root +chown 1000:1000 /home/$USER_NAME +chown -R 1000:1000 /home/$USER_NAME +chown 0:0 /root +chown -R 0:0 /root if [ $PACKAGE_VARIANT = "minimal" ]; then sed -i 's,create=xarchiver --add-to,create=xarchiver --compress,g' /usr/share/libfm/archivers.list diff --git a/linux-live/modules/04-xfce-apps/rootcopy-install/home/live/.config/autostart/volumeicon.desktop b/linux-live/modules/04-xfce-apps/rootcopy-install/home/live/.config/autostart/volumeicon.desktop deleted file mode 100644 index 79c425b..0000000 --- a/linux-live/modules/04-xfce-apps/rootcopy-install/home/live/.config/autostart/volumeicon.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Version=0.9.4 -Type=Application -Name=volumeicon -Comment= -Exec=volumeicon -OnlyShowIn=XFCE; -StartupNotify=false -Terminal=false -Hidden=false - diff --git a/linux-live/modules/04-xfce-apps/rootcopy-install/home/live/.config/volumeicon/volumeicon b/linux-live/modules/04-xfce-apps/rootcopy-install/home/live/.config/volumeicon/volumeicon deleted file mode 100644 index 32df349..0000000 --- a/linux-live/modules/04-xfce-apps/rootcopy-install/home/live/.config/volumeicon/volumeicon +++ /dev/null @@ -1,27 +0,0 @@ -[Alsa] -card=default -logarithmic_scale=false - -[Notification] -show_notification=true -notification_type=0 - -[StatusIcon] -stepsize=5 -onclick=xterm -e 'alsamixer' -theme=White Gnome -use_panel_specific_icons=false -reverse_scroll_direction=false -lmb_slider=false -mmb_mute=false -use_horizontal_slider=false -show_sound_level=false -use_transparent_background=false - -[Hotkeys] -up_enabled=false -down_enabled=false -mute_enabled=false -up=XF86AudioRaiseVolume -down=XF86AudioLowerVolume -mute=XF86AudioMute diff --git a/linux-live/modules/04-xfce-apps/rootcopy-install/home/live/.config/xfce4/terminal/accels.scm b/linux-live/modules/04-xfce-apps/rootcopy-install/home/live/.config/xfce4/terminal/accels.scm deleted file mode 100644 index 43521c9..0000000 --- a/linux-live/modules/04-xfce-apps/rootcopy-install/home/live/.config/xfce4/terminal/accels.scm +++ /dev/null @@ -1,56 +0,0 @@ -; xfce4-terminal GtkAccelMap rc-file -*- scheme -*- -; this file is an automated accelerator map dump -; -(gtk_accel_path "/terminal-window/goto-tab-1" "1") -(gtk_accel_path "/terminal-window/goto-tab-3" "3") -; (gtk_accel_path "/terminal-window/file-menu" "") -; (gtk_accel_path "/terminal-window/close-other-tabs" "") -; (gtk_accel_path "/terminal-window/search" "f") -; (gtk_accel_path "/terminal-window/next-tab" "Page_Down") -; (gtk_accel_path "/terminal-window/copy-html" "") -; (gtk_accel_path "/terminal-window/show-menubar" "") -; (gtk_accel_path "/terminal-window/zoom-reset" "0") -; (gtk_accel_path "/terminal-window/close-window" "q") -; (gtk_accel_path "/terminal-window/save-contents" "") -; (gtk_accel_path "/terminal-window/close-tab" "w") -; (gtk_accel_path "/terminal-window/view-menu" "") -; (gtk_accel_path "/terminal-window/new-tab" "t") -; (gtk_accel_path "/terminal-window/show-toolbar" "") -; (gtk_accel_path "/terminal-window/copy-input" "") -; (gtk_accel_path "/terminal-window/paste" "v") -; (gtk_accel_path "/terminal-window/copy" "c") -; (gtk_accel_path "/terminal-window/edit-menu" "") -; (gtk_accel_path "/terminal-window/fullscreen" "F11") -(gtk_accel_path "/terminal-window/goto-tab-6" "6") -; (gtk_accel_path "/terminal-window/read-only" "") -; (gtk_accel_path "/terminal-window/detach-tab" "d") -(gtk_accel_path "/terminal-window/goto-tab-8" "8") -(gtk_accel_path "/terminal-window/goto-tab-2" "2") -; (gtk_accel_path "/terminal-window/scroll-on-output" "") -(gtk_accel_path "/terminal-window/goto-tab-5" "5") -; (gtk_accel_path "/terminal-window/prev-tab" "Page_Up") -; (gtk_accel_path "/terminal-window/move-tab-left" "Page_Up") -; (gtk_accel_path "/terminal-window/zoom-in" "plus") -; (gtk_accel_path "/terminal-window/search-prev" "") -; (gtk_accel_path "/terminal-window/reset-and-clear" "") -; (gtk_accel_path "/terminal-window/about" "") -; (gtk_accel_path "/terminal-window/search-next" "") -(gtk_accel_path "/terminal-window/toggle-menubar" "F10") -(gtk_accel_path "/terminal-window/goto-tab-7" "7") -; (gtk_accel_path "/terminal-window/select-all" "a") -; (gtk_accel_path "/terminal-window/help-menu" "") -(gtk_accel_path "/terminal-window/goto-tab-9" "9") -; (gtk_accel_path "/terminal-window/show-borders" "") -; (gtk_accel_path "/terminal-window/new-window" "n") -(gtk_accel_path "/terminal-window/goto-tab-4" "4") -; (gtk_accel_path "/terminal-window/contents" "F1") -; (gtk_accel_path "/terminal-window/preferences" "") -; (gtk_accel_path "/terminal-window/move-tab-right" "Page_Down") -; (gtk_accel_path "/terminal-window/zoom-out" "minus") -; (gtk_accel_path "/terminal-window/set-title" "s") -; (gtk_accel_path "/terminal-window/paste-selection" "") -; (gtk_accel_path "/terminal-window/undo-close-tab" "") -; (gtk_accel_path "/terminal-window/tabs-menu" "") -; (gtk_accel_path "/terminal-window/zoom-menu" "") -; (gtk_accel_path "/terminal-window/reset" "") -; (gtk_accel_path "/terminal-window/terminal-menu" "") diff --git a/linux-live/modules/04-xfce-apps/rootcopy-install/home/live/.config/xfce4/terminal/terminalrc b/linux-live/modules/04-xfce-apps/rootcopy-install/home/live/.config/xfce4/terminal/terminalrc deleted file mode 100644 index 04abf43..0000000 --- a/linux-live/modules/04-xfce-apps/rootcopy-install/home/live/.config/xfce4/terminal/terminalrc +++ /dev/null @@ -1,30 +0,0 @@ -[Configuration] -FontName=Monospace 10 -MiscAlwaysShowTabs=FALSE -MiscBell=FALSE -MiscBellUrgent=FALSE -MiscBordersDefault=TRUE -MiscCursorBlinks=FALSE -MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK -MiscDefaultGeometry=80x24 -MiscInheritGeometry=FALSE -MiscMenubarDefault=TRUE -MiscMouseAutohide=FALSE -MiscMouseWheelZoom=TRUE -MiscToolbarDefault=FALSE -MiscConfirmClose=TRUE -MiscCycleTabs=TRUE -MiscTabCloseButtons=TRUE -MiscTabCloseMiddleClick=TRUE -MiscTabPosition=GTK_POS_TOP -MiscHighlightUrls=TRUE -MiscMiddleClickOpensUri=FALSE -MiscCopyOnSelect=FALSE -MiscShowRelaunchDialog=TRUE -MiscRewrapOnResize=TRUE -MiscUseShiftArrowsToScroll=FALSE -MiscSlimTabs=FALSE -MiscNewTabAdjacent=FALSE -BackgroundMode=TERMINAL_BACKGROUND_TRANSPARENT -BackgroundDarkness=0.800000 - diff --git a/linux-live/modules/04-xfce-apps/rootcopy-install/root/.config/autostart/volumeicon.desktop b/linux-live/modules/04-xfce-apps/rootcopy-install/root/.config/autostart/volumeicon.desktop deleted file mode 100644 index 79c425b..0000000 --- a/linux-live/modules/04-xfce-apps/rootcopy-install/root/.config/autostart/volumeicon.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Version=0.9.4 -Type=Application -Name=volumeicon -Comment= -Exec=volumeicon -OnlyShowIn=XFCE; -StartupNotify=false -Terminal=false -Hidden=false - diff --git a/linux-live/modules/04-xfce-apps/rootcopy-install/root/.config/volumeicon/volumeicon b/linux-live/modules/04-xfce-apps/rootcopy-install/root/.config/volumeicon/volumeicon deleted file mode 100644 index 32df349..0000000 --- a/linux-live/modules/04-xfce-apps/rootcopy-install/root/.config/volumeicon/volumeicon +++ /dev/null @@ -1,27 +0,0 @@ -[Alsa] -card=default -logarithmic_scale=false - -[Notification] -show_notification=true -notification_type=0 - -[StatusIcon] -stepsize=5 -onclick=xterm -e 'alsamixer' -theme=White Gnome -use_panel_specific_icons=false -reverse_scroll_direction=false -lmb_slider=false -mmb_mute=false -use_horizontal_slider=false -show_sound_level=false -use_transparent_background=false - -[Hotkeys] -up_enabled=false -down_enabled=false -mute_enabled=false -up=XF86AudioRaiseVolume -down=XF86AudioLowerVolume -mute=XF86AudioMute diff --git a/linux-live/modules/04-xfce-apps/rootcopy-install/root/.config/xfce4/terminal/accels.scm b/linux-live/modules/04-xfce-apps/rootcopy-install/root/.config/xfce4/terminal/accels.scm deleted file mode 100644 index 43521c9..0000000 --- a/linux-live/modules/04-xfce-apps/rootcopy-install/root/.config/xfce4/terminal/accels.scm +++ /dev/null @@ -1,56 +0,0 @@ -; xfce4-terminal GtkAccelMap rc-file -*- scheme -*- -; this file is an automated accelerator map dump -; -(gtk_accel_path "/terminal-window/goto-tab-1" "1") -(gtk_accel_path "/terminal-window/goto-tab-3" "3") -; (gtk_accel_path "/terminal-window/file-menu" "") -; (gtk_accel_path "/terminal-window/close-other-tabs" "") -; (gtk_accel_path "/terminal-window/search" "f") -; (gtk_accel_path "/terminal-window/next-tab" "Page_Down") -; (gtk_accel_path "/terminal-window/copy-html" "") -; (gtk_accel_path "/terminal-window/show-menubar" "") -; (gtk_accel_path "/terminal-window/zoom-reset" "0") -; (gtk_accel_path "/terminal-window/close-window" "q") -; (gtk_accel_path "/terminal-window/save-contents" "") -; (gtk_accel_path "/terminal-window/close-tab" "w") -; (gtk_accel_path "/terminal-window/view-menu" "") -; (gtk_accel_path "/terminal-window/new-tab" "t") -; (gtk_accel_path "/terminal-window/show-toolbar" "") -; (gtk_accel_path "/terminal-window/copy-input" "") -; (gtk_accel_path "/terminal-window/paste" "v") -; (gtk_accel_path "/terminal-window/copy" "c") -; (gtk_accel_path "/terminal-window/edit-menu" "") -; (gtk_accel_path "/terminal-window/fullscreen" "F11") -(gtk_accel_path "/terminal-window/goto-tab-6" "6") -; (gtk_accel_path "/terminal-window/read-only" "") -; (gtk_accel_path "/terminal-window/detach-tab" "d") -(gtk_accel_path "/terminal-window/goto-tab-8" "8") -(gtk_accel_path "/terminal-window/goto-tab-2" "2") -; (gtk_accel_path "/terminal-window/scroll-on-output" "") -(gtk_accel_path "/terminal-window/goto-tab-5" "5") -; (gtk_accel_path "/terminal-window/prev-tab" "Page_Up") -; (gtk_accel_path "/terminal-window/move-tab-left" "Page_Up") -; (gtk_accel_path "/terminal-window/zoom-in" "plus") -; (gtk_accel_path "/terminal-window/search-prev" "") -; (gtk_accel_path "/terminal-window/reset-and-clear" "") -; (gtk_accel_path "/terminal-window/about" "") -; (gtk_accel_path "/terminal-window/search-next" "") -(gtk_accel_path "/terminal-window/toggle-menubar" "F10") -(gtk_accel_path "/terminal-window/goto-tab-7" "7") -; (gtk_accel_path "/terminal-window/select-all" "a") -; (gtk_accel_path "/terminal-window/help-menu" "") -(gtk_accel_path "/terminal-window/goto-tab-9" "9") -; (gtk_accel_path "/terminal-window/show-borders" "") -; (gtk_accel_path "/terminal-window/new-window" "n") -(gtk_accel_path "/terminal-window/goto-tab-4" "4") -; (gtk_accel_path "/terminal-window/contents" "F1") -; (gtk_accel_path "/terminal-window/preferences" "") -; (gtk_accel_path "/terminal-window/move-tab-right" "Page_Down") -; (gtk_accel_path "/terminal-window/zoom-out" "minus") -; (gtk_accel_path "/terminal-window/set-title" "s") -; (gtk_accel_path "/terminal-window/paste-selection" "") -; (gtk_accel_path "/terminal-window/undo-close-tab" "") -; (gtk_accel_path "/terminal-window/tabs-menu" "") -; (gtk_accel_path "/terminal-window/zoom-menu" "") -; (gtk_accel_path "/terminal-window/reset" "") -; (gtk_accel_path "/terminal-window/terminal-menu" "") diff --git a/linux-live/modules/04-xfce-apps/rootcopy-install/root/.config/xfce4/terminal/terminalrc b/linux-live/modules/04-xfce-apps/rootcopy-install/root/.config/xfce4/terminal/terminalrc deleted file mode 100644 index 04abf43..0000000 --- a/linux-live/modules/04-xfce-apps/rootcopy-install/root/.config/xfce4/terminal/terminalrc +++ /dev/null @@ -1,30 +0,0 @@ -[Configuration] -FontName=Monospace 10 -MiscAlwaysShowTabs=FALSE -MiscBell=FALSE -MiscBellUrgent=FALSE -MiscBordersDefault=TRUE -MiscCursorBlinks=FALSE -MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK -MiscDefaultGeometry=80x24 -MiscInheritGeometry=FALSE -MiscMenubarDefault=TRUE -MiscMouseAutohide=FALSE -MiscMouseWheelZoom=TRUE -MiscToolbarDefault=FALSE -MiscConfirmClose=TRUE -MiscCycleTabs=TRUE -MiscTabCloseButtons=TRUE -MiscTabCloseMiddleClick=TRUE -MiscTabPosition=GTK_POS_TOP -MiscHighlightUrls=TRUE -MiscMiddleClickOpensUri=FALSE -MiscCopyOnSelect=FALSE -MiscShowRelaunchDialog=TRUE -MiscRewrapOnResize=TRUE -MiscUseShiftArrowsToScroll=FALSE -MiscSlimTabs=FALSE -MiscNewTabAdjacent=FALSE -BackgroundMode=TERMINAL_BACKGROUND_TRANSPARENT -BackgroundDarkness=0.800000 - diff --git a/linux-live/modules/05-firefox-esr/install b/linux-live/modules/05-firefox-esr/install deleted file mode 100644 index 2fd7bb0..0000000 --- a/linux-live/modules/05-firefox-esr/install +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -set -e # exit on error -set -o pipefail # exit on pipeline error -set -u # treat unset variable as error - -SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" - -# install packages -if [ -f $SCRIPT_DIR/$PACKAGE_VARIANT.list ]; then - #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD update >>$OUTPUT 2>&1 && - #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ - $APT_CMD install $APT_OPTIONS $APT_OPTIONS2 \ - $(grep -vE "^\s*#" $SCRIPT_DIR/$PACKAGE_VARIANT.list | tr "\n" " ") >>$OUTPUT 2>&1 -fi - -if [ $PACKAGE_VARIANT = "minimal" ]; then - cat </etc/skel/.config/xfce4/helpers.rc -TerminalEmulator=xterm -FileManager=pcmanfm -WebBrowser=firefox - -EOF - cat </home/live/.config/xfce4/helpers.rc -TerminalEmulator=xterm -FileManager=pcmanfm -WebBrowser=firefox - -EOF - cat </root/.config/xfce4/helpers.rc -TerminalEmulator=xterm -FileManager=pcmanfm -WebBrowser=firefox - -EOF - -elif [ $PACKAGE_VARIANT = "standard" ]; then - cat </etc/skel/.config/xfce4/helpers.rc -TerminalEmulator=xfce4-terminal -FileManager=Thunar -WebBrowser=firefox - -EOF - cat </home/live/.config/xfce4/helpers.rc -TerminalEmulator=xfce4-terminal -FileManager=Thunar -WebBrowser=firefox - -EOF - cat </root/.config/xfce4/helpers.rc -TerminalEmulator=xfce4-terminal -FileManager=Thunar -WebBrowser=firefox - -EOF -fi \ No newline at end of file diff --git a/linux-live/modules/05-firefox-esr/minimal.list b/linux-live/modules/05-firefox-esr/minimal.list deleted file mode 100644 index e7b065e..0000000 --- a/linux-live/modules/05-firefox-esr/minimal.list +++ /dev/null @@ -1 +0,0 @@ -firefox-esr \ No newline at end of file diff --git a/linux-live/modules/05-firefox-esr/postinstall b/linux-live/modules/05-firefox-esr/postinstall deleted file mode 100644 index a407c94..0000000 --- a/linux-live/modules/05-firefox-esr/postinstall +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -rm -Rf /usr/share/icons/gnome/256x256 >>$OUTPUT 2>&1 diff --git a/linux-live/modules/05-firefox-esr/standard.list b/linux-live/modules/05-firefox-esr/standard.list deleted file mode 100644 index e7b065e..0000000 --- a/linux-live/modules/05-firefox-esr/standard.list +++ /dev/null @@ -1 +0,0 @@ -firefox-esr \ No newline at end of file diff --git a/linux-live/modules/05-firefox/install b/linux-live/modules/05-firefox/install new file mode 100644 index 0000000..0f099c7 --- /dev/null +++ b/linux-live/modules/05-firefox/install @@ -0,0 +1,41 @@ +#!/bin/bash + +set -e # exit on error +set -o pipefail # exit on pipeline error +set -u # treat unset variable as error + +SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" + +# install packages +if [ $DISTRIBUTION_TYPE = "ubuntu" ]; then + #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ + $APT_CMD install $APT_OPTIONS \ + firefox >>$OUTPUT 2>&1 +elif [ $DISTRIBUTION_TYPE = "debian" ]; then + #sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ + $APT_CMD install $APT_OPTIONS \ + firefox-esr >>$OUTPUT 2>&1 +fi + +if [ $PACKAGE_VARIANT = "minimal" ]; then + cat </etc/skel/.config/xfce4/helpers.rc +TerminalEmulator=xterm +FileManager=pcmanfm +WebBrowser=firefox + +EOF +elif [ $PACKAGE_VARIANT = "standard" ]; then + cat </etc/skel/.config/xfce4/helpers.rc +TerminalEmulator=xfce4-terminal +FileManager=Thunar +WebBrowser=firefox + +EOF +fi + +cp -rT /etc/skel /home/$USER_NAME +cp -rT /etc/skel /root +chown 1000:1000 /home/$USER_NAME +chown -R 1000:1000 /home/$USER_NAME +chown 0:0 /root +chown -R 0:0 /root diff --git a/linux-live/modules/05-firefox/postinstall b/linux-live/modules/05-firefox/postinstall new file mode 100644 index 0000000..290c07b --- /dev/null +++ b/linux-live/modules/05-firefox/postinstall @@ -0,0 +1,10 @@ +#!/bin/bash + +cp -rT /etc/skel /home/$USER_NAME +cp -rT /etc/skel /root +chown 1000:1000 /home/$USER_NAME +chown -R 1000:1000 /home/$USER_NAME +chown 0:0 /root +chown -R 0:0 /root + +rm -Rf /usr/share/icons/gnome/256x256 >>$OUTPUT 2>&1 diff --git a/linux-live/pkglists/prereq.list b/linux-live/pkglists/prereq.list index 15a0992..72c01b2 100644 --- a/linux-live/pkglists/prereq.list +++ b/linux-live/pkglists/prereq.list @@ -2,4 +2,6 @@ # Приложения, без которых невозможна установка. sudo systemd-sysv -dbus \ No newline at end of file +dbus +libterm-readline-gnu-perl +cpio \ No newline at end of file diff --git a/autorepack b/makeboot similarity index 95% rename from autorepack rename to makeboot index b51a800..18dd6bc 100755 --- a/autorepack +++ b/makeboot @@ -16,10 +16,10 @@ set -u . $SCRIPT_DIR/linux-live/minioslib || exit 1 . $SCRIPT_DIR/linux-live/config || exit 1 -# don't change! use ./install instead +# change this for unattended installation UNATTENDED="1" -CMD=(repack_modules build_iso) +CMD=(build_boot) # ============= main ================ diff --git a/minios-modules/etc/minios/config b/minios-modules/etc/minios/config index 282f642..2edd492 100644 --- a/minios-modules/etc/minios/config +++ b/minios-modules/etc/minios/config @@ -41,7 +41,7 @@ APT_OPTIONS2="--no-install-recommends" UNION_BUILD_TYPE="overlayfs" # Compression method used for the system and modules. -COMP_TYPE="xz" +COMP_TYPE="lz4" # Kernel file, will be copied to your Live Kit # Your kernel must support aufs and squashfs. Debian Jessie's kernel is ready diff --git a/repack b/repack index cc1a103..2a476b2 100755 --- a/repack +++ b/repack @@ -16,8 +16,8 @@ set -u . $SCRIPT_DIR/linux-live/minioslib || exit 1 . $SCRIPT_DIR/linux-live/config || exit 1 -# don't change! use ./autoinstall instead -UNATTENDED="0" +# change this for unattended installation +UNATTENDED="1" CMD=(repack_modules build_iso)