I try to create Debian Jessie installer which will be fully automated. I use for this purpose customised pressed file. For testing I use VirtualBox. Everything is all right, except one error at the partitioning stage. When the installer creates partition table, an error occurs:
The attempt to mount a filesystem with type swap ... at none failed

enter image description here

I am looking for workaround to avoid this error.

My environment:

cat /etc/issue  
Debian GNU/Linux 8 \n \l

uname -a
Linux localhost 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-3~deb8u1 (2015-04-24) x86_64 GNU/Linux`

My customised preseed.cfg has the following content:

# Locale configuration.
d-i debian-installer/language           string en
d-i debian-installer/country            string US
d-i debian-installer/locale             string en_US.UTF-8

# Keyboard configuration.
d-i console-tools/archs                 select at
d-i console-keymaps-at/keymap           select us
d-i keyboard-configuration/xkb-keymap   select us

# Network configuration.
d-i netcfg/choose_interface             select auto
d-i netcfg/dhcp_failed                  note
d-i netcfg/dhcp_options                 select Do not configure the network at this time

d-i netcfg/use_dhcp                     boolean true
d-i netcfg/disable_dhcp                 boolean false
d-i netcfg/dhcp_timeout                 string 0

d-i netcfg/get_hostname                 string localhost
d-i netcfg/get_domain                   string

# Mirror configuration.
apt-mirror-setup apt-setup/use_mirror   boolean false
apt-mirror-setup apt-setup/mirror/error select Ignore
apt-mirror-setup apt-setup/no_mirror    boolean true

# Time configuration.
d-i clock-setup/utc                     boolean true
d-i time/zone                           string Zulu
d-i clock-setup/ntp                     boolean false

# User configuration.
d-i passwd/root-password                password r00t
d-i passwd/root-password-again          password r00t
d-i passwd/make-user                    boolean true
d-i passwd/user-fullname                string localuser
d-i passwd/username                     string localuser
d-i passwd/user-password                password n0nr00t
d-i passwd/user-password-again          password n0nr00t

popularity-contest popularity-contest/participate boolean false

# Partition configuration.
d-i partman-auto/method                 string regular
d-i partman-auto/disk                   string /dev/sda
d-i partman-auto/choose_recipe          select home

d-i     partman-auto/expert_recipe string                       \
        localhost ::                                            \
                2048 4096 40960 ext4                            \
                        $primary{ } $bootable{ }                \
                        method{ format } format{ }              \
                        use_filesystem{ } filesystem{ ext4 }    \
                        label{ root }                           \
                        mountpoint{ / }                         \
                .                                               \
                128 256 10240 ext4                              \
                        method{ format } format{ }              \
                        label{ home }                           \
                        use_filesystem{ } filesystem{ ext4 }    \
                        label{ home }                           \
                        mountpoint{ /home }                     \
                .                                               \
                128 256 100% linux-swap                         \
                        method{ swap } forman{ }                \
d-i partman-partitioning/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

# GRUB configuration.
d-i grub-installer/only_debian          boolean true
d-i grub-installer/with_other_os        boolean true
d-i grub-installer/bootdev              string default

# Finish.
d-i finish-install/reboot_in_progress   note

It's not important but to be explicit it should be noticed that I create image using live-build in the following way:


echo -e "Remove old artefacts ($(date +%H-%M-%S))."
rm -rf installer

echo -e "Prepare for generate new image ($(date +%H-%M-%S))."
mkdir installer && cd installer

echo -e "Configure Live Builder ($(date +%H-%M-%S))."
lb config \
--apt-indices false \
--ignore-system-defaults \
--architectures amd64 \
--linux-flavours "amd64" \
--binary-images iso-hybrid \
--mode debian \
--source false \
--distribution jessie \
--win32-loader false \
--debian-installer true \
--bootloader syslinux \
--memtest none \
--archive-areas "main contrib non-free" \
--debootstrap-options "--variant=minbase"

echo -e "Inject custom content ($(date +%H-%M-%S))."
mkdir -p config/includes.installer
cp -v ../preseed.cfg config/includes.installer

echo -e "Build image ($(date +%H-%M-%S))."
lb build
cd ..

if [ -f installer/live-image-amd64.hybrid.iso ]; then
    echo -e "Create image successfully complite ($(date +%H-%M-%S))."
    echo -e "Have a nice day!"
    echo -e "Perhaps something bad is happing ($(date +%H-%M-%S))..."
method{ swap } forman{ }                \

Typo there, forman should be format.

Just in case, search swap in a preseed example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.