diff --git a/README.md b/README.md index d7bd034..429fac5 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,12 @@ Or ./build-yunohost i386 ``` +Install process configuration +----------------------------- + +- menu.cfg doc: https://wiki.syslinux.org/wiki/index.php?title=Menu +- Preseed configuration doc: https://www.debian.org/releases/stable/s390x/apb.en.html + Troubleshooting --------------- diff --git a/add-firmware-to b/add-firmware-to index c26b675..acb684b 100755 --- a/add-firmware-to +++ b/add-firmware-to @@ -67,7 +67,7 @@ initrd_append_fw() { tar xfz "$fwfile" mkdir x for file in *deb; do - dpkg-deb -x "$file" x + dpkg-deb -x "$file" x done mkdir -p x/usr/share/graphics/ @@ -118,17 +118,18 @@ if is_iso "$file"; then chmod -R u+w "$buildtree" + cp $BUILD_DIR/menu.cfg $buildtree/isolinux/ + arch=`echo "$file" | cut -d"-" -f3` if [ $arch = "i386" ]; then - cp -f $BUILD_DIR/isolinux/{adgtk.cfg,adtxt.cfg,gtk.cfg,menu.cfg,stdmenu.cfg,txt.cfg} $buildtree/isolinux/ + sed -i 's/__ARCH__/386/g' $buildtree/isolinux/menu.cfg else - rm -f $buildtree/isolinux/{adgtk.cfg,adtxt.cfg,gtk.cfg,menu.cfg,stdmenu.cfg,txt.cfg} - cp -f $BUILD_DIR/isolinux/{amdadgtk.cfg,amdadtxt.cfg,amdgtk.cfg,menu.cfg,stdmenu.cfg,amdtxt.cfg} $buildtree/isolinux/ + sed -i 's/__ARCH__/amd/g' $buildtree/isolinux/menu.cfg fi for i in $(find "$buildtree" -name "initrd.gz" -o -name "initrd.img"); do - initrd_append_fw "$i" "$fwfile" "$i" + initrd_append_fw "$i" "$fwfile" "$i" done isolinuxpath="$(cd $buildtree && find . -name isolinux.bin | head -1 | cut -b 3-)" diff --git a/isolinux/adgtk.cfg b/isolinux/adgtk.cfg deleted file mode 100644 index 4cb3961..0000000 --- a/isolinux/adgtk.cfg +++ /dev/null @@ -1,4 +0,0 @@ -label expertgui - menu label Graphical expert install - kernel /install.386/vmlinuz - append preseed/file=/cdrom/simple-cdd/advanced.preseed video=vesa:ywrap,mtrr vga=788 initrd=/install.386/gtk/initrd.gz -- quiet diff --git a/isolinux/adtxt.cfg b/isolinux/adtxt.cfg deleted file mode 100644 index ca49a57..0000000 --- a/isolinux/adtxt.cfg +++ /dev/null @@ -1,4 +0,0 @@ -label expert - menu label ^Expert install - kernel /install.386/vmlinuz - append preseed/file=/cdrom/simple-cdd/advanced.preseed vga=788 initrd=/install.386/initrd.gz -- quiet diff --git a/isolinux/amdadgtk.cfg b/isolinux/amdadgtk.cfg deleted file mode 100644 index fe27b1b..0000000 --- a/isolinux/amdadgtk.cfg +++ /dev/null @@ -1,4 +0,0 @@ -label expertgui - menu label Graphical expert install - kernel /install.amd/vmlinuz - append preseed/file=/cdrom/simple-cdd/advanced.preseed video=vesa:ywrap,mtrr vga=788 initrd=/install.amd/gtk/initrd.gz -- quiet diff --git a/isolinux/amdadtxt.cfg b/isolinux/amdadtxt.cfg deleted file mode 100644 index 71f8736..0000000 --- a/isolinux/amdadtxt.cfg +++ /dev/null @@ -1,4 +0,0 @@ -label expert - menu label ^Expert install - kernel /install.amd/vmlinuz - append preseed/file=/cdrom/simple-cdd/advanced.preseed vga=788 initrd=/install.amd/initrd.gz -- quiet diff --git a/isolinux/amdgtk.cfg b/isolinux/amdgtk.cfg deleted file mode 100644 index 3b581e7..0000000 --- a/isolinux/amdgtk.cfg +++ /dev/null @@ -1,4 +0,0 @@ -label installgui - menu label ^Graphical install - kernel /install.amd/vmlinuz - append preseed/file=/cdrom/simple-cdd/default.preseed video=vesa:ywrap,mtrr vga=788 initrd=/install.amd/gtk/initrd.gz -- quiet diff --git a/isolinux/amdtxt.cfg b/isolinux/amdtxt.cfg deleted file mode 100644 index b0936ae..0000000 --- a/isolinux/amdtxt.cfg +++ /dev/null @@ -1,6 +0,0 @@ -default install -label install - menu label ^Install - menu default - kernel /install.amd/vmlinuz - append preseed/file=/cdrom/simple-cdd/default.preseed vga=788 initrd=/install.amd/initrd.gz -- quiet diff --git a/isolinux/gtk.cfg b/isolinux/gtk.cfg deleted file mode 100644 index c86cae1..0000000 --- a/isolinux/gtk.cfg +++ /dev/null @@ -1,4 +0,0 @@ -label installgui - menu label ^Graphical install - kernel /install.386/vmlinuz - append preseed/file=/cdrom/simple-cdd/default.preseed video=vesa:ywrap,mtrr vga=788 initrd=/install.386/gtk/initrd.gz -- quiet diff --git a/isolinux/isolinux.cfg b/isolinux/isolinux.cfg deleted file mode 100644 index 6caeb73..0000000 --- a/isolinux/isolinux.cfg +++ /dev/null @@ -1,20 +0,0 @@ -menu hshift 15 -menu width 49 - -menu title Installer boot menu -include stdmenu.cfg -include txt.cfg -include amdtxt.cfg -include gtk.cfg -include amdgtk.cfg -include adtxt.cfg -include amdadtxt.cfg -include adgtk.cfg -include amdadgtk.cfg -menu end -label help - menu label ^Help - text help - Display help screens; type 'menu' at boot prompt to return to this menu - endtext - config prompt.cfg diff --git a/isolinux/menu.cfg b/isolinux/menu.cfg deleted file mode 100644 index 6caeb73..0000000 --- a/isolinux/menu.cfg +++ /dev/null @@ -1,20 +0,0 @@ -menu hshift 15 -menu width 49 - -menu title Installer boot menu -include stdmenu.cfg -include txt.cfg -include amdtxt.cfg -include gtk.cfg -include amdgtk.cfg -include adtxt.cfg -include amdadtxt.cfg -include adgtk.cfg -include amdadgtk.cfg -menu end -label help - menu label ^Help - text help - Display help screens; type 'menu' at boot prompt to return to this menu - endtext - config prompt.cfg diff --git a/isolinux/stdmenu.cfg b/isolinux/stdmenu.cfg deleted file mode 100644 index 90b5d94..0000000 --- a/isolinux/stdmenu.cfg +++ /dev/null @@ -1,13 +0,0 @@ -menu background splash.png -menu color title * #FFFFFFFF * -menu color border * #00000000 #00000000 none -menu color sel * #ffffffff #76a1d0ff * -menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff * -menu color tabmsg * #ffffffff #00000000 * -menu color help 37;40 #ffdddd00 #00000000 none -menu vshift 16 -menu rows 7 -menu helpmsgrow 12 -menu cmdlinerow 12 -menu tabmsgrow 13 -menu tabmsg Press ENTER to boot or TAB to edit a menu entry diff --git a/isolinux/txt.cfg b/isolinux/txt.cfg deleted file mode 100644 index b33ed1d..0000000 --- a/isolinux/txt.cfg +++ /dev/null @@ -1,6 +0,0 @@ -default install -label install - menu label ^Install - menu default - kernel /install.386/vmlinuz - append preseed/file=/cdrom/simple-cdd/default.preseed vga=788 initrd=/install.386/initrd.gz -- quiet diff --git a/menu.cfg b/menu.cfg new file mode 100644 index 0000000..8209ba1 --- /dev/null +++ b/menu.cfg @@ -0,0 +1,37 @@ +menu hshift 15 +menu width 49 + +menu title Installer boot menu + +menu background splash.png +menu color title * #FFFFFFFF * +menu color border * #00000000 #00000000 none +menu color sel * #ffffffff #76a1d0ff * +menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff * +menu color tabmsg * #ffffffff #00000000 * +menu color help 37;40 #ffdddd00 #00000000 none +menu vshift 16 +menu rows 7 +menu helpmsgrow 12 +menu cmdlinerow 12 +menu tabmsgrow 13 +menu tabmsg + +default installgui +label install + menu label ^Text install + kernel /install.__ARCH__/vmlinuz + append preseed/file=/cdrom/simple-cdd/default.preseed vga=788 initrd=/install.__ARCH__/initrd.gz -- quiet +label installgui + menu label ^Graphical install (recommended) + menu default + kernel /install.__ARCH__/vmlinuz + append preseed/file=/cdrom/simple-cdd/default.preseed video=vesa:ywrap,mtrr vga=788 initrd=/install.__ARCH__/gtk/initrd.gz -- quiet +label expert + menu label Expert text install + kernel /install.__ARCH__/vmlinuz + append preseed/file=/cdrom/simple-cdd/expert.preseed vga=788 initrd=/install.__ARCH__/initrd.gz -- quiet +label expertgui + menu label Graphical expert install + kernel /install.__ARCH__/vmlinuz + append preseed/file=/cdrom/simple-cdd/expert.preseed video=vesa:ywrap,mtrr vga=788 initrd=/install.__ARCH__/gtk/initrd.gz -- quiet diff --git a/profiles/default.description b/profiles/default.description index f531b8e..e6b6602 100644 --- a/profiles/default.description +++ b/profiles/default.description @@ -1 +1 @@ -Y U NO HOST full automatic webservices installer +YunoHost installer diff --git a/profiles/default.preseed b/profiles/default.preseed index 10f3c19..5c447b8 100644 --- a/profiles/default.preseed +++ b/profiles/default.preseed @@ -5,7 +5,6 @@ d-i netcfg/dhcp_options select Configure network manually d-i netcfg/disable_dhcp boolean false d-i netcfg/get_hostname string yunohost d-i netcfg/get_domain string yunohost.org -d-i netcfg/get_domain seen true ### Mirror settings d-i mirror/country string manual @@ -15,10 +14,16 @@ d-i mirror/http/proxy string ### Clock and time zone setup d-i clock-setup/utc boolean true -#d-i time/zone string Europe/Paris d-i clock-setup/ntp boolean true d-i clock-setup/ntp-server string 0.fr.pool.ntp.org +# Set locale to en_UK but seen to false, such that the question is asked anyway +d-i debian-installer/locale string en_UK +d-i debian-installer/locale seen false + +d-i time/zone string Europe/Paris +d-i time/zone seen false + ### Partitioning d-i partman-auto/method string lvm d-i partman-lvm/device_remove_lvm boolean true @@ -74,6 +79,13 @@ d-i apt-setup/local0/key string http://forge.yunohost.org/yunohost.asc d-i apt-setup/local0/comment string YunoHost repository #d-i debian-installer/allow_unauthenticated string true +# Skip "scan another CD/DVD" +# https://unix.stackexchange.com/a/409237 +apt-cdrom-setup apt-setup/cdrom/set-next boolean false +d-i apt-setup/cdrom/set-first boolean false +d-i apt-setup/cdrom/set-next boolean false +d-i apt-setup/cdrom/set-failed boolean false + ### Package selection tasksel tasksel/first multiselect standard, ssh-server # Keep postfix in here, otherwise exim4 might get installed and create a weird @@ -88,6 +100,7 @@ debconf debconf/frontend select Noninteractive ### Boot loader installation d-i grub-installer/only_debian boolean true d-i grub-installer/with_other_os boolean true +d-i grub-installer/bootdev string /dev/sda ### Finishing up the installation d-i finish-install/reboot_in_progress note @@ -116,7 +129,6 @@ nslcd nslcd/ldap-binddn string nslcd nslcd/ldap-base string dc=yunohost,dc=org libnss-ldapd libnss-ldapd/nsswitch multiselect group, passwd, shadow postsrsd postsrsd/domain string yunohost.org -apt-cdrom-setup apt-setup/cdrom/set-next boolean false ### Avoid circular dependencies error d-i preseed/early_command string apt-install debhelper || true diff --git a/profiles/expert.description b/profiles/expert.description new file mode 100644 index 0000000..e6b6602 --- /dev/null +++ b/profiles/expert.description @@ -0,0 +1 @@ +YunoHost installer diff --git a/profiles/expert.packages b/profiles/expert.packages new file mode 100644 index 0000000..dfe90aa --- /dev/null +++ b/profiles/expert.packages @@ -0,0 +1,4 @@ +less +simple-cdd-profiles +firmware-linux-nonfree +debhelper diff --git a/profiles/expert.preseed b/profiles/expert.preseed new file mode 100644 index 0000000..50723fd --- /dev/null +++ b/profiles/expert.preseed @@ -0,0 +1,135 @@ +### Network configuration +d-i netcfg/choose_interface select auto +d-i netcfg/dhcp_failed note +d-i netcfg/dhcp_options select Configure network manually +d-i netcfg/disable_dhcp boolean false +d-i netcfg/get_hostname string yunohost +d-i netcfg/get_domain string yunohost.org + +### Mirror settings +d-i mirror/country string manual +d-i mirror/http/hostname string ftp.debian.org +d-i mirror/http/directory string /debian +d-i mirror/http/proxy string +d-i mirror/http/proxy seen false + +### Clock and time zone setup +d-i clock-setup/utc boolean true +d-i clock-setup/ntp boolean true +d-i clock-setup/ntp-server string 0.fr.pool.ntp.org + +# Set locale to en_UK but seen to false, such that the question is asked anyway +#d-i debian-installer/locale string en_UK +#d-i debian-installer/locale seen false + +#d-i time/zone string Europe/Paris +#d-i time/zone seen false + +### Partitioning +d-i partman-auto/method string lvm +d-i partman-lvm/device_remove_lvm boolean true +d-i partman-md/device_remove_md boolean true +d-i partman-auto/choose_recipe select atomic +d-i partman-lvm/device_remove_lvm_span boolean true +d-i partman-auto/purge_lvm_from_device boolean true +d-i partman-auto-lvm/new_vg_name string system +d-i partman-lvm/confirm boolean true +d-i partman-auto-lvm/guided_size string max +d-i partman-auto/expert_recipe string \ + boot-root :: \ + 128 256 256 ext4 \ + $primary{ } \ + $bootable{ } \ + method{ format } format{ } \ + use_filesystem{ } filesystem{ ext4 } \ + mountpoint{ /boot } \ + . \ + 512 1024 1024 linux-swap \ + $lvmok{ } \ + lv_name{ swap } \ + method{ swap } format{ } \ + . \ + 4096 4096 1000000000 ext4 \ + $lvmok{ } \ + lv_name{ root } \ + method{ format } format{ } \ + use_filesystem{ } filesystem{ ext4 } \ + mountpoint{ / } \ + . + +d-i partman/confirm_write_new_label boolean true +#d-i partman/choose_partition select finish +d-i partman/confirm boolean true +d-i partman/confirm_nooverwrite boolean true +d-i partman-lvm/confirm_nooverwrite boolean true + +### Account setup +d-i passwd/root-password-crypted password $1$6xBdkGvE$8nLCNRxwABespdFJniEiX0 +d-i passwd/make-user boolean false + +### Base system installation +d-i apt-setup/non-free boolean false +d-i apt-setup/contrib boolean true + +d-i apt-setup/services-select multiselect security, updates +d-i apt-setup/security_host string security.debian.org + +d-i apt-setup/local0/repository string \ + http://forge.yunohost.org/debian/ buster stable +d-i apt-setup/local0/key string http://forge.yunohost.org/yunohost.asc +d-i apt-setup/local0/comment string YunoHost repository +#d-i debian-installer/allow_unauthenticated string true + +# Skip "scan another CD/DVD" +# https://unix.stackexchange.com/a/409237 +apt-cdrom-setup apt-setup/cdrom/set-next boolean false +d-i apt-setup/cdrom/set-first boolean false +d-i apt-setup/cdrom/set-next boolean false +d-i apt-setup/cdrom/set-failed boolean false + +### Package selection +tasksel tasksel/first multiselect standard, ssh-server +# Keep postfix in here, otherwise exim4 might get installed and create a weird +# conflict... +d-i pkgsel/include string postfix yunohost yunohost-admin +d-i pkgsel/upgrade select none + +### Deactivate poll on popular packages +popularity-contest popularity-contest/participate boolean false +debconf debconf/frontend select Noninteractive + +### Boot loader installation +d-i grub-installer/only_debian boolean true +d-i grub-installer/with_other_os boolean true +#d-i grub-installer/bootdev string /dev/sda + +### Finishing up the installation +d-i finish-install/reboot_in_progress note +d-i cdrom-detect/eject boolean true +d-i debian-installer/exit/reboot boolean true + +### YunoHost Debconf (same than in yunohost/install_script) +slapd slapd/password1 password yunohost +slapd slapd/password2 password yunohost +slapd slapd/domain string yunohost.org +slapd shared/organization string yunohost.org +slapd slapd/allow_ldap_v2 boolean false +slapd slapd/invalid_config boolean true +slapd slapd/backend select MDB +postfix postfix/main_mailer_type select Internet Site +postfix postfix/mailname string /etc/mailname +mysql-server-5.5 mysql-server/root_password password yunohost +mysql-server-5.5 mysql-server/root_password_again password yunohost +mariadb-server-10.0 mysql-server/root_password password yunohost +mariadb-server-10.0 mysql-server/root_password_again password yunohost +nslcd nslcd/ldap-bindpw password +nslc nslcd/ldap-starttls boolean false +nslcd nslcd/ldap-reqcert select +nslcd nslcd/ldap-uris string ldap://localhost/ +nslcd nslcd/ldap-binddn string +nslcd nslcd/ldap-base string dc=yunohost,dc=org +libnss-ldapd libnss-ldapd/nsswitch multiselect group, passwd, shadow +postsrsd postsrsd/domain string yunohost.org + +### Avoid circular dependencies error +d-i preseed/early_command string apt-install debhelper || true