Sample Header Ad - 728x90

Debian virsh-install unattended install stuck at "loading initial ramdisk" on first boot after install

2 votes
1 answer
39 views
Installing Debian on a virtual machine interactively:
virt-install --virt-type kvm --name debian-13-x64 \
--memory 4096 \
--vcpus 4 \
--cdrom /mnt/data/iso/debian-testing-amd64-DVD-1.iso \
--os-variant debiantesting \
--disk size=64
Boots into the desktop environment as expected. However, when performing an unattended install:
virt-install --virt-type kvm --name debian-13-x64 \
--memory 4096 \
--vcpus 4 \
--os-variant debiantesting \
--disk size=64 \
--graphics none \
--location /mnt/data/iso/debian-testing-amd64-DVD-1.iso \
--initrd-inject /mnt/data/debian-13-preseed.txt \
--extra-args "auto=true priority=critical preseed/file=/debian-13-preseed.txt console=ttyS0,115200n8"
It hangs after the "Loading initial ramdisk" message upon completing the installation and rebooting. enter image description here Before rebooting, I captured the last lines of output from the unattended install log:
Jul 26 22:40:58 finish-install: info: Running /usr/lib/finish-install.d/10update-initramfs
Jul 26 22:40:58 /bin/in-target: warning: /target/etc/mtab won't be updated since it is a symlink.
Jul 26 22:40:58 finish-install: info: Running /usr/lib/finish-install.d/15cdrom-detect
Jul 26 22:40:58 cdrom-detect: Unmounting and ejecting '/dev/sr0'
Jul 26 22:40:58 finish-install: info: Running /usr/lib/finish-install.d/20final-message
Jul 26 22:41:10 finish-install: /usr/lib/finish-install.d/20final-message backed up
Jul 26 22:41:10 main-menu: INFO: Menu item 'finish-install' succeeded but requested to be left unconfigured.
Jul 26 22:41:10 depthcharge-tools-installer: Not installing to non-ChromeOS board.
Jul 26 22:41:10 systemd-boot-installer: systemd-boot is only usable on 64bit EFI systems, not amd64/generic
Jul 26 22:41:10 depthcharge-tools-installer: Not installing to non-ChromeOS board.
Jul 26 22:41:10 systemd-boot-installer: systemd-boot is only usable on 64bit EFI systems, not amd64/generic
Jul 26 22:41:21 main-menu: INFO: Menu item 'di-utils-shell' selected
It appears to be attempting to write BIOS to an EFI partition. Why the difference in behavior between interactive and unattended installs? As far as I can tell the selections are the same. From this I based debian-13-preseed.txt. Here's the content:
#_preseed_V1
#### Contents of the preconfiguration file (for trixie)
### Localization
# Preseeding only locale sets language, country and locale.
d-i debian-installer/locale string en_US.UTF-8

# Keyboard selection.
d-i keyboard-configuration/xkb-keymap select us

# netcfg will choose an interface that has link if possible. This makes it
# skip displaying a list if there is more than one interface.
d-i netcfg/choose_interface select auto

# Any hostname and domain names assigned from dhcp take precedence over
# values set here. However, setting the values still prevents the questions
# from being shown, even if values come from dhcp.
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain

# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string

### Mirror settings
# Mirror protocol:
# If you select ftp, the mirror/country string does not need to be set.
# Default value for the mirror protocol: http.
#d-i mirror/protocol string ftp
d-i mirror/country string manual
d-i mirror/http/hostname string http.us.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string

### Account setup
# Skip creation of a root account (normal user account will be able to
# use sudo).
d-i passwd/root-login boolean false

# To create a normal user account.
d-i passwd/user-fullname string Debian User
d-i passwd/username string debian
# Normal user's password, either in clear text
d-i passwd/user-password password insecure
d-i passwd/user-password-again password insecure

### Clock and time zone setup
# Controls whether or not the hardware clock is set to UTC.
d-i clock-setup/utc boolean true

# You may set this to any valid setting for $TZ; see the contents of
# /usr/share/zoneinfo/ for valid values.
d-i time/zone string US/Eastern

# Controls whether to use NTP to set the clock during the install
d-i clock-setup/ntp boolean true

### Partitioning
# The presently available methods are:
# - regular: use the usual partition types for your architecture
# - lvm:     use LVM to partition the disk
# - crypto:  use LVM within an encrypted partition
d-i partman-auto/method string lvm

# You can define the amount of space that will be used for the LVM volume
# group. It can either be a size with its unit (eg. 20 GB), a percentage of
# free space or the 'max' keyword.
d-i partman-auto-lvm/guided_size string max

# If one of the disks that are going to be automatically partitioned
# contains an old LVM configuration, the user will normally receive a
# warning. This can be preseeded away...
d-i partman-lvm/device_remove_lvm boolean true
# The same applies to pre-existing software RAID array:
d-i partman-md/device_remove_md boolean true
# And the same goes for the confirmation to write the lvm partitions.
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true

# You can choose one of the predefined partitioning recipes:
# - atomic: all files in one partition
# - home:   separate /home partition
# - multi:  separate /home, /var, and /tmp partitions
# - server: separate /var and /srv partitions; swap limitted to 1G
# - small_disk: scheme dedicated to small harddrives (under 10GB)
d-i partman-auto/choose_recipe select atomic

# This makes partman automatically partition without confirmation, provided
# that you told it what to do using one of the methods above.
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

# This makes partman automatically partition without confirmation.
d-i partman-md/confirm boolean true
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

### Base system installation
# Configure APT to not install recommended packages by default. Use of this
# option can result in an incomplete system and should only be used by very
# experienced users.
#d-i base-installer/install-recommends boolean false

# The kernel image (meta) package to be installed; "none" can be used if no
# kernel is to be installed.
#d-i base-installer/kernel/image string linux-image-686

### Apt setup
# Choose, if you want to scan additional installation media
# (default: false).
d-i apt-setup/cdrom/set-first boolean false

### Boot loader installation
# Grub is the boot loader (for x86).

# This is fairly safe to set, it makes grub install automatically to the UEFI
# partition/boot record if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true

# This one makes grub-installer install to the UEFI partition/boot record, if
# it also finds some other OS, which is less safe as it might not be able to
# boot that other OS.
d-i grub-installer/with_other_os boolean true

# Due notably to potential USB sticks, the location of the primary drive can
# not be determined safely in general, so this needs to be specified:
#d-i grub-installer/bootdev  string /dev/sda
# To install to the primary device (assuming it is not a USB stick):
d-i grub-installer/bootdev  string default

### Finishing up the installation
# During installations from serial console, the regular virtual consoles
# (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next
# line to prevent this.
d-i finish-install/keep-consoles boolean true

# Avoid that last message about the install being complete.
#d-i finish-install/reboot_in_progress note
Asked by Dan (121 rep)
Jul 31, 2025, 03:49 AM
Last activity: Aug 6, 2025, 07:32 AM