2 # Filename: /etc/debootstrap/chroot-script
3 # Purpose: script executed in chroot when installing Debian via grml-debootstrap
4 # Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports: see https://grml.org/bugs/
6 # License: This file is licensed under the GPL v2.
7 ################################################################################
8 # GRML_CHROOT_SCRIPT_MARKER - do not remove this line unless you want to keep
9 # this script as /bin/chroot-script on your new installed system
10 ################################################################################
13 if [ "$REPORT_TRAP_ERR" = "yes" ] || [ "$FAIL_TRAP_ERR" = "yes" ]; then
16 trap "error_handler" ERR
20 # shellcheck disable=SC1091
21 . /etc/debootstrap/config || exit 1
22 # shellcheck disable=SC1091
23 . /etc/debootstrap/variables || exit 1
25 [ -r /proc/1 ] || mount -t proc none /proc
26 [ -r /sys/kernel ] || mount -t sysfs none /sys
30 # use aptitude only if it's available
31 if [ -x /usr/bin/aptitude ] ; then
32 APTUPDATE="aptitude update $DPKG_OPTIONS"
33 # Debian ISOs do not contain signed Release files
34 if [ -n "$ISO" ] ; then
35 APTINSTALL="aptitude -y --allow-untrusted --without-recommends install $DPKG_OPTIONS"
36 APTUPGRADE="aptitude -y --allow-untrusted safe-upgrade $DPKG_OPTIONS"
38 APTINSTALL="aptitude -y --without-recommends install $DPKG_OPTIONS"
39 APTUPGRADE="aptitude -y safe-upgrade $DPKG_OPTIONS"
42 APTINSTALL="apt-get -y --no-install-recommends install $DPKG_OPTIONS"
43 APTUPDATE="apt-get update $DPKG_OPTIONS"
44 APTUPGRADE="apt-get -y upgrade $DPKG_OPTIONS"
47 if [ -z "$STAGES" ] ; then
48 STAGES='/etc/debootstrap/stages'
49 [ -d "$STAGES" ] || mkdir -p "$STAGES"
53 # helper functions {{{
56 echo "$2" > "$STAGES/$1"
58 elif grep -q 'done' "$STAGES/$1" 2>/dev/null ; then
59 echo " [*] Notice: stage $1 has been executed already, skipping execution therefore.">&2
62 echo " Executing stage ${1}"
67 # read -s emulation for dash. result is in $resp.
69 [ -t 0 ] && stty -echo
76 # define chroot mirror {{{
78 if [ "$KEEP_SRC_LIST" = "yes" ] ; then
79 echo "KEEP_SRC_LIST has been enabled, skipping chrootmirror stage."
83 if [ -z "$COMPONENTS" ] ; then
86 echo "Using repository components $COMPONENTS"
88 if [ -n "$ISO" ] ; then
89 echo "Adjusting sources.list for ISO (${ISO})."
90 echo "deb $ISO $RELEASE $COMPONENTS" > /etc/apt/sources.list
92 if [ -n "$MIRROR" ] ; then
93 echo "Adding mirror entry (${MIRROR}) to sources.list."
94 echo "deb $MIRROR $RELEASE $COMPONENTS" >> /etc/apt/sources.list
97 if [ -n "$MIRROR" ] ; then
98 echo "Adjusting sources.list for mirror (${MIRROR})."
99 echo "deb $MIRROR $RELEASE $COMPONENTS" > /etc/apt/sources.list
106 if [ -n "$MIRROR" ] ; then
107 echo "Release matching $RELEASE - enabling LTS support in sources.list"
108 echo "deb $MIRROR ${RELEASE}-lts $COMPONENTS" >> /etc/apt/sources.list
113 # add security.debian.org:
115 unstable|sid|lenny) ;; # no security pool available
116 squeeze|wheezy|jessie|stretch|buster)
117 echo "Adding security.debian.org to sources.list."
118 echo "deb http://security.debian.org ${RELEASE}/updates $COMPONENTS" >> /etc/apt/sources.list
121 # bullseye and newer releases use a different repository layout, see
122 # https://lists.debian.org/debian-devel-announce/2019/07/msg00004.html
123 echo "Adding security.debian.org/debian-security to sources.list."
124 echo "deb http://security.debian.org/debian-security ${RELEASE}-security $COMPONENTS" >> /etc/apt/sources.list
130 # remove local chroot mirror {{{
131 remove_chrootmirror() {
132 if [ "$KEEP_SRC_LIST" = "yes" ] ; then
133 echo "KEEP_SRC_LIST has been enabled, skipping remove_chrootmirror stage."
137 if [ -n "$ISO" ] ; then
138 echo "Removing ISO (${ISO}) from sources.list."
139 TMP_ISO="${ISO//\//\\\/}"
140 sed -i "/deb $TMP_ISO $RELEASE $COMPONENTS/ D" /etc/apt/sources.list
142 if [ -n "$MIRROR" ] && echo "$MIRROR" | grep -q 'file:' ; then
143 echo "Removing local mirror (${MIRROR}) from sources.list."
144 TMP_MIRROR="${MIRROR//\//\\\/}"
145 sed -i "/deb $TMP_MIRROR $RELEASE $COMPONENTS/ D" /etc/apt/sources.list
146 echo "Adding fallback mirror entry (${FALLBACK_MIRROR}) to sources.list instead."
147 echo "deb $FALLBACK_MIRROR $RELEASE $COMPONENTS" >> /etc/apt/sources.list
153 # set up grml repository {{{
155 if [ -z "$GRMLREPOS" ] ; then
159 # user might have provided their own apt sources configuration
160 if [ -r /etc/apt/sources.list.d/grml.list ] ; then
161 echo "File /etc/apt/sources.list.d/grml.list exists already, not modifying."
163 echo "Setting up /etc/apt/sources.list.d/grml.list."
164 cat > /etc/apt/sources.list.d/grml.list << EOF
165 # grml: stable repository:
166 deb [signed-by=/usr/share/keyrings/grml-archive-keyring.gpg] http://deb.grml.org/ grml-stable main
167 deb-src [signed-by=/usr/share/keyrings/grml-archive-keyring.gpg] http://deb.grml.org/ grml-stable main
169 # grml: testing/development repository:
170 deb [signed-by=/usr/share/keyrings/grml-archive-keyring.gpg] http://deb.grml.org/ grml-testing main
171 deb-src [signed-by=/usr/share/keyrings/grml-archive-keyring.gpg] http://deb.grml.org/ grml-testing main
175 # make sure we install packages from Grml's pool only if not available from Debian
176 if [ -r /etc/apt/preferences.d/grml.pref ] ; then
177 echo "File /etc/apt/preferences.d/grml.pref exists already, not modifying."
179 echo "Setting up /etc/apt/preferences.d/grml.pref."
180 cat > /etc/apt/preferences.d/grml.pref << EOF
181 Explanation: use Grml repository only after Debian ones
183 Pin: origin deb.grml.org
188 apt-get update -o Acquire::AllowInsecureRepositories=1
189 apt-get -y --allow-unauthenticated install grml-debian-keyring
192 if [ "$(dpkg-query -f "\${db:Status-Status} \${db:Status-Eflag}" -W grml-debian-keyring 2>/dev/null)" != 'installed ok' ]; then
193 echo "Error: installation of grml-debian-keyring failed." >&2
199 # feature to provide Debian backports repos {{{
201 if [ -n "$BACKPORTREPOS" ] ; then
202 cat >> /etc/apt/sources.list.d/backports.list << EOF
203 # debian backports: ${RELEASE}-backports repository:
204 deb ${MIRROR} ${RELEASE}-backports main
205 deb-src ${MIRROR} ${RELEASE}-backports main
211 # set up kernel-img.conf {{{
213 if ! [ -r /etc/kernel-img.conf ] ; then
214 echo "Setting up /etc/kernel-img.conf"
215 cat > /etc/kernel-img.conf << EOF
216 # Kernel Image management overrides
217 # See kernel-img.conf(5) for details
225 # make sure services do not start up {{{
226 install_policy_rcd() {
227 if ! [ -r /usr/sbin/policy-rc.d ] ; then
229 cat > /usr/sbin/policy-rc.d << EOF
233 chmod 775 /usr/sbin/policy-rc.d
238 # make sure we have an up2date system {{{
240 if [ "$UPGRADE_SYSTEM" = "yes" ] ; then
241 echo "Running update + upgrade"
243 DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTUPGRADE
245 echo "Not running update + upgrade as \$UPDATE_AND_UPGRADE is not set to 'yes'."
250 # remove now useless apt cache {{{
252 if [ "$RM_APTCACHE" = 'yes' ] ; then
253 echo "Cleaning apt cache."
254 # shellcheck disable=SC2086
255 apt-get clean $DPKG_OPTIONS
257 echo "Not cleaning apt cache as \$RM_APTCACHE is unset."
262 # install additional packages {{{
264 # Pre-seed the debconf database with answers. Each question will be marked
265 # as seen to prevent debconf from asking the question interactively.
266 [ -f /etc/debootstrap/debconf-selections ] && {
267 echo "Preseeding the debconf database, some lines might be skipped..."
268 debconf-set-selections < /etc/debootstrap/debconf-selections
271 if [ "$PACKAGES" = 'yes' ] ; then
272 if ! [ -r /etc/debootstrap/packages ] ; then
273 echo "Error: /etc/debootstrap/packages (inside chroot) not found, exiting." >&2
277 # shellcheck disable=SC2086,SC2046
278 DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL $(grep -v '^#' /etc/debootstrap/packages) $GRMLPACKAGES
284 # install extra packages {{{
286 if [ "$EXTRAPACKAGES" = 'yes' ] ; then
287 PACKAGELIST=$(find /etc/debootstrap/extrapackages -type f -name '*.deb')
288 if [ -n "$PACKAGELIST" ]; then
289 # shellcheck disable=SC2086
291 # run apt again to resolve any deps
292 DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL
298 # check if the specified Debian package exists
300 output=$(apt-cache show "$1" 2>/dev/null)
306 # determine the kernel version postfix
307 get_kernel_version() {
308 # do not override $KERNEL if set via config file
309 if [ -n "$KERNEL" ] ; then
316 # shellcheck disable=SC2153
320 lenny|squeeze|wheezy) KARCH='686' ;;
321 # since jessie the linux-image-686 image doesn't exist any longer
322 *) KARCH='686-pae' ;;
329 echo "Only i386 and amd64 are currently supported" >&2
333 for KPREFIX in "" "2.6-" ; do # iterate through the kernel prefixes,
334 # currently "" and "2.6-"
335 if package_exists linux-image-${KPREFIX}${KARCH} ; then
336 echo ${KPREFIX}${KARCH}
343 # install kernel packages {{{
345 if [ -n "$NOKERNEL" ] ; then
346 echo "Skipping installation of kernel packages as requested via --nokernel"
351 KVER=$(get_kernel_version)
352 if [ -n "$KVER" ] ; then
353 # note: install busybox to be able to debug initramfs
354 KERNELPACKAGES="linux-image-$KVER linux-headers-$KVER busybox firmware-linux-free"
355 # only add firmware-linux if we have non-free as a component
356 if expr "$COMPONENTS" : '.*non-free' >/dev/null ; then
357 KERNELPACKAGES="$KERNELPACKAGES firmware-linux"
359 # shellcheck disable=SC2086
360 DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL $KERNELPACKAGES
362 echo "Warning: Could not find a kernel for your system. Your system won't be able to boot itself!"
367 # reconfigure packages {{{
369 if [ -n "$RECONFIGURE" ] ; then
370 for package in $RECONFIGURE ; do
371 if dpkg --list "$package" >/dev/null 2>&1 | grep -q '^ii' ; then
372 DEBIAN_FRONTEND=$DEBIAN_FRONTEND dpkg-reconfigure "$package" || \
373 echo "Warning: $package does not exist, can not reconfigure it."
380 # set password of user root {{{
383 if [ -n "$NOPASSWORD" ] ; then
384 echo "Skip setting root password as requested."
388 echo "Activating shadow passwords."
392 if chpasswd --help 2>&1 | grep -q -- '-m,' ; then
396 if [ -n "$ROOTPASSWORD" ] ; then
397 echo root:"$ROOTPASSWORD" | chpasswd $CHPASSWD_OPTION
398 export ROOTPASSWORD=''
402 echo "Setting password for user root:"
403 while [ "$a" != "$b" ] ; do
404 printf "Enter new UNIX password for user root: "
409 printf "Retype new UNIX password for user root: "
414 if [ "$a" != "$b" ] ; then
415 echo "Sorry, passwords do not match. Retry."
419 echo root:"$a" | chpasswd $CHPASSWD_OPTION
428 # set up /etc/hosts {{{
430 if ! [ -f /etc/hosts ] ; then
431 cat > /etc/hosts << EOF
433 ::1 localhost ip6-localhost ip6-loopback
435 ff02::2 ip6-allrouters
441 # set default locales {{{
443 if [ -n "$DEFAULT_LOCALES" ] ; then
444 if ! [ -x /usr/sbin/update-locale ] ; then
445 echo "Warning: update-locale executable not available (no locales package installed?)"
446 echo "Ignoring request to run update-locale for $DEFAULT_LOCALES therefore"
450 /usr/sbin/update-locale LANGUAGE="$DEFAULT_LANGUAGE" LANG="$DEFAULT_LOCALES"
455 # adjust timezone {{{
457 if [ -n "$TIMEZONE" ] ; then
458 echo "Adjusting /etc/localtime"
459 ln -sf "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
461 echo "Setting /etc/timezone to $TIMEZONE"
462 printf '%s\n' "$TIMEZONE" > /etc/timezone
468 # helper function for fstab() {{{
470 echo "Setting up /etc/fstab"
471 cat > /etc/fstab <<EOF
472 # /etc/fstab - created by grml-debootstrap on $(date)
473 # Accessible filesystems, by reference, are maintained under '/dev/disk/'.
474 # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
476 # After editing this file, run 'systemctl daemon-reload' to update systemd
477 # units generated from this file.
481 if [ -n "$TARGET_UUID" ] ; then
482 local rootfs_mount_options=""
484 if [ -z "${FILESYSTEM}" ] ; then
485 FILESYSTEM="$(blkid -o value -s TYPE /dev/disk/by-uuid/"${TARGET_UUID}")"
488 case "${FILESYSTEM}" in
489 # errors=remount-ro is supported only by a few file systems
490 ext*|exfat|fat|jfs|nilfs2|vfat)
491 rootfs_mount_options=",errors=remount-ro"
495 echo "/dev/disk/by-uuid/${TARGET_UUID} / auto defaults${rootfs_mount_options} 0 1" >> /etc/fstab
497 echo "Warning: couldn't identify target UUID for rootfs, your /etc/fstab might be incomplete."
500 if [ -n "$EFI" ] ; then
501 # shellcheck disable=SC2086
502 echo "UUID=$(blkid -o value -s UUID $EFI) /boot/efi vfat umask=0077 0 1" >> /etc/fstab
505 cat >> /etc/fstab << EOF
506 proc /proc proc defaults 0 0
507 /dev/cdrom /mnt/cdrom0 iso9660 ro,user,noauto 0 0
508 # some other examples:
509 # /dev/sda2 none swap sw,pri=0 0 0
510 # /dev/hda1 /Grml ext3 dev,suid,user,noauto 0 2
511 # //1.2.3.4/pub /smb/pub cifs user,noauto,uid=grml,gid=grml 0 0
512 # linux:/pub /beer nfs defaults 0 0
513 # tmpfs /tmp tmpfs size=300M 0 0
514 # /dev/sda5 none swap sw 0 0
519 # generate /etc/fstab {{{
521 # set up /etc/fstab if file is not present (cdebootstrap)
522 if [ ! -f /etc/fstab ] ; then
526 # set up /etc/fstab if file is UNCONFIGURED (debootstrap)
527 if grep -q UNCONFIGURED /etc/fstab ; then
533 # ensure we have according filesystem tools available {{{
537 # note: this is supposed to be coming either via command lines'
538 # $_opt_filesystem or via createfstab()
539 case "${FILESYSTEM}" in
548 if [ -n "${pkg:-}" ] && ! dpkg --list "${pkg}" 2>/dev/null | grep -q '^ii' ; then
549 echo "Filesystem package ${pkg} not present, installing now"
550 DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL "${pkg}"
555 # set up hostname {{{
557 if [ -n "$HOSTNAME" ] ; then
558 echo "Setting hostname to ${HOSTNAME}."
559 echo "$HOSTNAME" > /etc/hostname
561 # adjust postfix configuration
562 if [ -r /etc/postfix/main.cf ] ; then
563 # adjust hostname related options:
564 sed -i "s/grml/$HOSTNAME/g" /etc/postfix/main.cf
566 # listen on loopback interface only:
567 sed -i "s/^inet_interfaces = .*/inet_interfaces = loopback-only/" /etc/postfix/main.cf
568 grep -q inet_interfaces /etc/postfix/main.cf || echo 'inet_interfaces = loopback-only' >> /etc/postfix/main.cf
570 if [ -r /etc/mailname ] ; then
571 # adjust /etc/mailname
572 local etc_mail_domain
573 etc_mail_domain=$(/bin/dnsdomainname 2>/dev/null || echo localdomain)
576 local mailname="$HOSTNAME"
579 local mailname="${HOSTNAME}.${etc_mail_domain}"
582 echo "Setting mailname to ${mailname}"
583 echo "$mailname" > /etc/mailname
589 # generate initrd/initramfs {{{
591 # assume the first available kernel as our main kernel
592 # shellcheck disable=SC2012
593 KERNELIMG=$(ls -1 /boot/vmlinuz-* 2>/dev/null | head -1)
594 if [ -z "$KERNELIMG" ] ; then
595 echo 'No kernel image found, skipping initrd stuff.'>&2
599 KERNELVER=${KERNELIMG#/boot/vmlinuz-}
602 if [ -n "$INITRD" ] ; then
603 echo "Generating initrd."
604 if [ "$INITRD_GENERATOR" = 'dracut' ] ; then
605 DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL dracut
606 dracut --no-hostonly --kver "$KERNELVER" --fstab --add-fstab /etc/fstab --force --reproducible $INITRD_GENERATOR_OPTS
608 update-initramfs -c -t -k "$KERNELVER" $INITRD_GENERATOR_OPTS
615 if [ -z "$EFI" ] ; then
619 if ! dpkg --list efibootmgr 2>/dev/null | grep -q '^ii' ; then
620 echo "Notice: efi option set but no efibootmgr package, installing it therefore."
621 DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL efibootmgr
625 echo "Mounting $EFI on /boot/efi"
626 mount "$EFI" /boot/efi || return 1
628 # if efivarfs kernel module is loaded, but efivars isn't,
629 # then we need to mount efivarfs for efibootmgr usage
630 if ! ls /sys/firmware/efi/efivars/* &>/dev/null ; then
631 echo "Mounting efivarfs on /sys/firmware/efi/efivars"
632 mount -t efivarfs efivarfs /sys/firmware/efi/efivars
635 echo "Invoking efibootmgr"
636 efibootmgr || return 1
639 # grub configuration/installation {{{
641 # helper function to get relevant /dev/disk/by-id/* entries,
642 # based on GRUB's postinst script
646 [ -d /dev/disk/by-id ] || return
648 for path in /dev/disk/by-id/*; do
649 [ -e "${path}" ] || continue
650 printf '%s %s\n' "${path}" "$(readlink -f "${path}")"
651 done | sort -k2 -s -u | cut -d' ' -f1
656 # helper function to report corresponding /dev/disk/by-id/… for a given device name,
657 # based on GRUB's postinst script
661 for id in $(available_ids); do
662 if [ "$(readlink -f "${id}")" = "$(readlink -f "$1")" ]; then
668 # Fall back to the plain device name if there's no by-id link for it.
678 if [ -z "$GRUB" ] ; then
679 echo "Notice: \$GRUB not defined, will not install grub inside chroot at this stage."
683 efi_setup || return 1
685 if [ -n "$EFI" ] ; then
686 GRUB_PACKAGE=grub-efi-amd64
691 # make sure this is pre-defined so we have sane settings for automated
692 # upgrades, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=711019
694 grub_device=$(device_to_id "${GRUB}")
695 if [ -z "${grub_device:-}" ] ; then
696 echo "Warning: Could not identify /dev/disk/by-id/... for '${GRUB}', falling back to '${GRUB}'"
697 grub_device="${GRUB}"
700 echo "Setting ${GRUB_PACKAGE} debconf configuration for install device to $GRUB"
701 echo "${GRUB_PACKAGE} ${GRUB_PACKAGE}/install_devices multiselect ${grub_device}" | debconf-set-selections
703 if ! dpkg --list ${GRUB_PACKAGE} 2>/dev/null | grep -q '^ii' ; then
704 echo "Notice: grub option set but no ${GRUB_PACKAGE} package, installing it therefore."
705 DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL ${GRUB_PACKAGE}
708 if ! [ -x "$(command -v grub-install)" ] ; then
709 echo "Error: grub-install not available. (Error while installing grub package?)" >&2
713 if [ -n "$SELECTED_PARTITIONS" ] ; then # using sw-raid
714 for device in $SELECTED_PARTITIONS ; do
715 GRUB="${device%%[0-9]}"
716 echo "Installing grub on ${GRUB}:"
717 if ! grub-install --no-floppy "$GRUB" ; then
718 echo "Error: failed to execute 'grub-install --no-floppy $GRUB'." >&2
723 rm -f /boot/grub/device.map
725 echo "Installing grub on ${GRUB}:"
727 lenny|squeeze|wheezy)
729 grub_dev="$(readlink -f "${GRUB}")"
730 if ! grub-install --no-floppy "${grub_dev}" ; then
731 echo "Error: failed to execute 'grub-install --no-floppy ${grub_dev}'." >&2
734 rm -f /boot/grub/device.map
737 echo "(hd0) ${GRUB}" > /boot/grub/device.map
738 if ! grub-install "(hd0)" ; then
739 echo "Error: failed to execute 'grub-install (hd0)'." >&2
742 rm /boot/grub/device.map
747 echo "Adjusting grub configuration for use on ${GRUB}."
749 # finally install grub
750 if [ -x /usr/sbin/update-grub ] ; then
751 UPDATEGRUB='/usr/sbin/update-grub'
752 elif [ -x /sbin/update-grub ] ; then
753 UPDATEGRUB='/sbin/update-grub'
755 echo "Error: update-grub not available, can not execute it." >&2
759 if [ -n "${BOOT_APPEND}" ] ; then
760 echo "Adding BOOT_APPEND configuration ['${BOOT_APPEND}'] to /etc/default/grub."
761 sed -i "/GRUB_CMDLINE_LINUX_DEFAULT/ s#\"\$# ${BOOT_APPEND}\"#" /etc/default/grub
764 mountpoint /boot/efi &>/dev/null && umount /boot/efi
770 # execute all scripts present in /etc/debootstrap/chroot-scripts/ {{{
772 [ -d /etc/debootstrap/chroot-scripts/ ] || return 0
774 for script in /etc/debootstrap/chroot-scripts/* ; do
775 echo "Executing script $script"
776 $script && echo "done" || echo "failed"
781 # make sure we don't have any running processes left {{{
783 for service in ssh mdadm mdadm-raid ; do
784 if [ -x /etc/init.d/"$service" ] ; then
785 /etc/init.d/"$service" stop || true
791 # unmount /proc and make sure nothing is left {{{
793 # make sure we don't leave any sensible data
794 rm -f /etc/debootstrap/variables
796 [ -n "$POLICYRCD" ] && rm -f /usr/sbin/policy-rc.d
798 umount /sys/firmware/efi/efivars &>/dev/null || true
800 umount /sys >/dev/null 2>/dev/null || true
801 umount /proc >/dev/null 2>/dev/null || true
808 [ -n "$1" ] && EXIT="$1" || EXIT="1"
813 # set signal handler {{{
814 trap signal_handler HUP INT QUIT TERM
817 # execute the functions {{{
819 # always execute install_policy_rcd
822 for i in chrootmirror grmlrepos backportrepos kernelimg_conf \
823 kernel packages extrapackages reconfigure hosts \
824 default_locales timezone fstab install_fs_tools hostname \
825 initrd grub_install passwords \
826 custom_scripts upgrade_system remove_apt_cache services \
827 remove_chrootmirror; do
829 $i && stage $i 'done' || exit 1
832 # always execute the finalize stage:
836 # finally exit the chroot {{{
837 echo "Finished chroot installation, exiting."
841 ## END OF FILE #################################################################
842 # vim: ai tw=80 expandtab foldmethod=marker