Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

2 votes
1 answers
39 views
Debian virsh-install unattended install stuck at "loading initial ramdisk" on first boot after install
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, wh...
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
Dan (121 rep)
Jul 31, 2025, 03:49 AM • Last activity: Aug 6, 2025, 07:32 AM
0 votes
1 answers
86 views
debian preseed install auto-creates swap
I'm attempting to preseed a [debian testing](https://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/amd64/iso-cd/) installation that creates following partitions: - /boot/efi - /boot - encrypted VG with: - / Everything appears to work, only that the LVM definitions are not read/used. For...
I'm attempting to preseed a [debian testing](https://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/amd64/iso-cd/) installation that creates following partitions: - /boot/efi - /boot - encrypted VG with: - / Everything appears to work, only that the LVM definitions are not read/used. For instance, no matter what I do, the swap partition is _always_ created. Preseed:
d-i debian-installer/locale string en_US.UTF-8
d-i debian-installer/fallbacklocale select en_US.UTF-8
d-i debian-installer/language string en
d-i debian-installer/country string ES
d-i localechooser/languagelist                  select      en
d-i keyboard-configuration/xkb-keymap select us
d-i netcfg/use_autoconfig                       boolean     true
d-i netcfg/choose_interface select auto
d-i netcfg/use_dhcp string true
d-i netcfg/dhcp_failed note
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/hostname string p14s
d-i netcfg/wireless_wep string
d-i hw-detect/load_firmware boolean true
d-i mirror/country string manual
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string
d-i mirror/http/mirror                          string      deb.debian.org
d-i passwd/shadow                               boolean     true
# Root password, either in clear text
d-i passwd/root-password password insecure
d-i passwd/root-password-again password insecure

d-i passwd/username string user
d-i passwd/user-fullname string User Name
d-i passwd/user-password password insecure
d-i passwd/user-password-again password insecure

d-i clock-setup/utc boolean true
d-i time/zone string Europe/Madrid
d-i clock-setup/ntp boolean true

### Partitioning
# If the system has free space you can choose to only partition that space w/ value
# of 'biggest_free'. This is only honoured if partman-auto/method (below) is not set.
#
# TODO: is 'custom' value needed/working/valid? is this option needed at all?
#d-i partman-auto/init_automatically_partition select custom

d-i partman-auto/disk string /dev/nvme0n1 /dev/sda /dev/vda
d-i partman-auto/method string crypto
d-i partman-auto-lvm/guided_size                string      max
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto-lvm/new_vg_name                string      crypt

# Allow to not set a swap partition
# note if this is false (default) & we don't define swap partition below, then
# one will be created regardless.
d-i partman-basicfilesystems/no_swap boolean false

d-i partman-auto/choose_recipe select custom-crypto


d-i partman-auto/expert_recipe string                        \
      custom-crypto ::                                       \
              538 588 538 free                               \
                     $iflabel{ gpt }                         \
                     $reusemethod{ }                         \
                     method{ efi }                           \
                     format{ }                               \
              .                                              \
              1024 1074 1024 ext4                             \
                      $primary{ } $bootable{ }                \
                      $defaultignore{ }                       \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ ext4 }    \
                      mountpoint{ /boot }                     \
              .                                               \
              # explicit LVM creation:                        \
              #100 2000000 -1 ext4                            \
              #        $defaultignore{ }                       \
              #        $primary{ }                             \
              #        method{ lvm }                           \
              #        format{ }                               \
              #        vg_name{ crypt }                        \
              #.                                               \
              #6000 6040 6000 linux-swap                       \
              #      $lvmok{ }                                 \
              #      in_vg { crypt }                           \
              #      lv_name{ swap }                           \
              #      method{ swap } format{ }                  \
              #.                                               \
              50000 50000 -1 ext4                             \
                    $lvmok{ }                                 \
                    in_vg { crypt }                           \
                    lv_name{ root }                           \
                    method{ format } format{ }                \
                    use_filesystem{ } filesystem{ ext4 }      \
                    mountpoint{ / }                           \
              .                                               \

d-i partman-partitioning/choose_label select gpt
d-i partman-partitioning/default_label string gpt
#
# This makes partman automatically partition without confirmation, provided
# that you told it what to do using one of the methods above.
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
d-i base-installer/initramfs-tools/driver-policy select     most

### Apt setup
d-i apt-setup/disable-cdrom-entries boolean true

# Choose, if you want to scan additional installation media
d-i apt-setup/cdrom/set-first                    boolean     false
d-i apt-setup/cdrom/set-double                   boolean     false
d-i apt-setup/cdrom/set-next                     boolean     false
d-i apt-setup/cdrom/set-failed                   boolean     false


d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i grub-installer/bootdev  string default
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note
Resulting layout:
$ lsblk

NAME                    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
vda                     254:0    0     5G  0 disk  
├─vda1                  254:1    0   533M  0 part  /boot/efi
├─vda2                  254:2    0   763M  0 part  /boot
└─vda3                  254:3    0   3.7G  0 part  
  └─vda3_crypt          253:0    0   3.7G  0 crypt 
    ├─debian--vg-root   253:1    0   3.2G  0 lvm   /
    └─debian--vg-swap_1 253:2    0   564M  0 lvm   [SWAP]
1. how to achieve the goal? 1. what is partman-auto/init_automatically_partition option about and should it be defined?
laur (790 rep)
May 22, 2025, 11:47 PM • Last activity: May 28, 2025, 12:27 PM
5 votes
4 answers
3022 views
Tool to create recipe to preseed partitioning
I want to preseed an Ubuntu 12.04 installer using a custom partitioning recipe. My disk layout is reasonably complex, and so is the recipe syntax itself. Hand-crafting such a recipe seems tedious and error prone. Is there a tool to simply create a recipe from an existing disk, including its partitio...
I want to preseed an Ubuntu 12.04 installer using a custom partitioning recipe. My disk layout is reasonably complex, and so is the recipe syntax itself. Hand-crafting such a recipe seems tedious and error prone. Is there a tool to simply create a recipe from an existing disk, including its partitions and LVM configuration?
Alex (321 rep)
Jan 8, 2014, 12:00 AM • Last activity: May 10, 2025, 01:06 AM
0 votes
1 answers
54 views
Why is Debian preseed not partitioning a volume group?
**Why does my preseed never create a volume group?** Does anyone know what option I might be missing from my config? ``` d-i partman-lvm/device_remove_lvm boolean true d-i partman-lvm/confirm boolean true d-i partman-lvm/confirm_nooverwrite boolean true d-i partman-partitioning/choose_label select g...
**Why does my preseed never create a volume group?** Does anyone know what option I might be missing from my config?
d-i partman-lvm/device_remove_lvm       boolean true
d-i partman-lvm/confirm                 boolean true
d-i partman-lvm/confirm_nooverwrite     boolean true
d-i partman-partitioning/choose_label   select gpt
d-i partman-partitioning/default_label  string gpt
d-i partman-auto/method                 string regular
d-i partman-auto/disk                   string /dev/nvme0n1
d-i partman-auto/choose_recipe          select pve-full
d-i partman-auto-lvm/new_vg_name pve
d-i partman-auto/physical_volumes       string /dev/nvme0n1p3
d-i partman-auto/volume_groups          string pve
d-i partman-auto/logical_volumes        string root swap localdir

d-i partman-auto/expert_recipe string pve-full :: \
    512 512 512 fat32 $primary{ } $bootable{ } method{ efi } format{ } . \
    512 512 512 ext2 $primary{ } method{ format } format{ } use_filesystem{ } filesystem{ ext2 } mountpoint{ /boot } . \
    1 1 -1 lvm $primary{ } method{ lvm } device{ /dev/nvme0n1p3 } pv_name{ pve-pv } vg_name{ pve } . \
    32768 32768 32768 ext4 $lvmok{ } in_vg{ pve } lv_name{ root } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ / } . \
    4096 4096 4096 linux-swap $lvmok{ } in_vg{ pve } lv_name{ swap } method{ swap } format{ } . \
    1 10000 -1 ext4 $lvmok{ } in_vg{ pve } lv_name{ localdir } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /var/lib/vz } .

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
-l
confirms that the system did create a **LVM** on **nvme0n1p3**:
/dev/nvme0n1p1     2048     999423     997376  487M EFI System
/dev/nvme0n1p2   999424    1998847     999424  488M Linux filesystem
/dev/nvme0n1p3  1998848    2000895       2048    1M Linux LVM
/dev/nvme0n1p4  2000896   66000895   64000000 30.5G Linux filesystem
/dev/nvme0n1p5 66000896   74000383    7999488  3.8G Linux swap
/dev/nvme0n1p6 74000384 3907028991 3833028608  1.8T Linux filesystem
Despite this, I keep getting the error "Volume group pve does not exist" and the commands
; vgs; lvs;
give no output... What am I missing from my debian preseed partition that it refuses to create a volume group?
Snoopy (21 rep)
Apr 23, 2025, 11:40 PM • Last activity: Apr 24, 2025, 02:52 PM
3 votes
4 answers
2489 views
Preseeding debian installation still asks for network card
I am using debian installer together with a preseed config-file to automate installation steps. Currently the network-card selection still shows up and I cannot find out why. I have the following networking-related lines d-i netcfg/choose_interface select auto d-i netcfg/choose_interface select enp0...
I am using debian installer together with a preseed config-file to automate installation steps. Currently the network-card selection still shows up and I cannot find out why. I have the following networking-related lines d-i netcfg/choose_interface select auto d-i netcfg/choose_interface select enp0s8 d-i netcfg/link_wait_timeout string 20 The selected interface-card is available in the dialog that appears and also when installation finishes: $ sudo ifconfig enp0s8: flags=4163 mtu 1500 ... However the Debian installer still stops and forces me to choose the network-card to use. How do adjust the preseed file to also perform this selection automatically?
centic (135 rep)
Mar 13, 2019, 09:18 PM • Last activity: Mar 27, 2025, 12:55 AM
3 votes
0 answers
75 views
Setting applied in debian installer preseed doesn't take effect
I've created a custom installer ISO to automate Debian bookworm installs, and most of it is working just fine. However, I tried to activate automatic upgrades by installing the `unattended-upgrades` package and setting `enable_auto_upgrades` for it, with the following lines in my `preseed.cfg`: d-i...
I've created a custom installer ISO to automate Debian bookworm installs, and most of it is working just fine. However, I tried to activate automatic upgrades by installing the unattended-upgrades package and setting enable_auto_upgrades for it, with the following lines in my preseed.cfg: d-i pkgsel/include string unattended-upgrades unattended-upgrades unattended-upgrades/enable_auto_updates boolean true When I booted into the new install, it always showed enable_auto_updates as false. I also tried setting the owner of that debconf setting to d-i instead, but that didn't help. I've worked around the issue by setting it with debconf at the end of the install, and reconfiguring the package: echo "unattended-upgrades unattended-upgrades/enable_auto_updates boolean true" |debconf-set-selections TERM=none dpkg-reconfigure -u unattended-upgrades That does work, but I don't like it. What is wrong with the preseed entry, and what can I do to get it to work? Thanks!
Chad (137 rep)
Mar 25, 2025, 10:25 PM
0 votes
0 answers
189 views
Debian 12 Preseed and Incorrect Swap Size
this is about Debian 12 and partman. Swap is getting the incorrect size. All other partitions / lv's have the expected size. However, swap just doesn't seem to listen. I want 4GB, but I'm getting 9760145408 bytes. RAM is 4GB, sda is 60GB (plenty of space). I started with `4295 4295 4295`, but that p...
this is about Debian 12 and partman. Swap is getting the incorrect size. All other partitions / lv's have the expected size. However, swap just doesn't seem to listen. I want 4GB, but I'm getting 9760145408 bytes. RAM is 4GB, sda is 60GB (plenty of space). I started with 4295 4295 4295, but that produced 9760145408 bytes. Now I'm trying 100%, which is not good because I do not want a relative size. Anyway, I still get the same silly size. # d-i partman-partitioning/choose_label select gpt # d-i partman-partitioning/default_label string gpt d-i partman-auto/method string lvm d-i partman/alignment string optimal d-i partman-auto-lvm/guided_size string max d-i partman-lvm/device_remove_lvm boolean true d-i partman-lvm/confirm boolean true d-i partman-lvm/confirm_nooverwrite boolean true d-i partman-auto/disk string /dev/sda d-i partman-auto-lvm/new_vg_name vgroot # if only we could specify units: mib vs mb # https://askubuntu.com/questions/1340402/ubuntu-preseed-expert-recipe-priority-max-size-dont-translate-into-correct-resu d-i partman-auto/expert_recipe string ems-debian :: \ \ 2048 6000 2048 ext4 $primary{ } $bootable{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } label { boot } mountpoint{ /boot } . \ \ 1 1 -1 lvm $primary{ } method{ lvm } device { /dev/sda2 } vg_name{ vgroot } . \ \ 2148 2148 2148 lvm $lvmok{ } in_vg{ vgroot } lv_name{ lvhome } method{ format } format{ } use_filesystem{ } filesystem{ xfs } label { vgroot } mountpoint{ /home } . \ 17180 17180 17180 lvm $lvmok{ } in_vg{ vgroot } lv_name{ lvopt } method{ format } format{ } use_filesystem{ } filesystem{ xfs } label { vgroot } mountpoint{ /opt } . \ 9664 9664 9664 lvm $lvmok{ } in_vg{ vgroot } lv_name{ lvroot } method{ format } format{ } use_filesystem{ } filesystem{ xfs } label { vgroot } mountpoint{ / } . \ 2148 2148 2148 lvm $lvmok{ } in_vg{ vgroot } lv_name{ lvtmp } method{ format } format{ } use_filesystem{ } filesystem{ xfs } label { vgroot } mountpoint{ /tmp } . \ 21475 21475 21475 lvm $lvmok{ } in_vg{ vgroot } lv_name{ lvvar } method{ format } format{ } use_filesystem{ } filesystem{ xfs } label { vgroot } mountpoint{ /var } . \ 2148 1000 100% linux-swap $lvmok{ } in_vg{ vgroot } lv_name{ swap } method{ swap } format{ } . \ \ d-i partman/confirm_nooverwrite boolean true d-i partman/confirm boolean tru d-i partman/confirm_write_new_label boolean true d-i partman/choose_partition select finish d-i partman/confirm_nooverwrite boolean true d-i partman/confirm boolean true
theirpuppet (1 rep)
Feb 19, 2025, 11:44 AM
8 votes
2 answers
3717 views
How to add a public ssh key using debian preseed file?
Using debian preseeding, I want to copy a public key to `/root/.ssh/authorized_keys` with correct permissions so that I can use ansible to configure the rest of system. I already selected openssh-server to be installed by selecting `d-i pkgsel/include string openssh-server build-essential` in the pr...
Using debian preseeding, I want to copy a public key to /root/.ssh/authorized_keys with correct permissions so that I can use ansible to configure the rest of system. I already selected openssh-server to be installed by selecting d-i pkgsel/include string openssh-server build-essential in the preseed file. Would this late command work?
d-i preseed/late_command string in-target mkdir -p /root/.ssh; \
in-target /bin/sh -c "echo 'ssh-ed25519 AAAAC3NzaC1IAg1wilR9asDXIPwTsvZXasdTXqasdKv0rIqqweAtxGVgup foobar' >> /root/.ssh/authorized_keys"; \
in-target chown -R root:root /root/.ssh/; \
in-target chmod 644 /root/.ssh/authorized_keys; \
in-target chmod 700 /root/.ssh/
Cruise5 (546 rep)
Oct 5, 2022, 03:06 AM • Last activity: Oct 1, 2024, 08:02 PM
4 votes
3 answers
8953 views
How do I set mirrors in /etc/apt/sources.list with a Debian preseed file?
I'm building a custom ISO image of Debian 10 stable ("buster") using [preseeding](https://wiki.debian.org/DebianInstaller/Preseed), and my custom `preseed.cfg` file works perfectly except for one thing: I'd like it to configure `/etc/apt/sources.list` with my chosen repositories so that I don't have...
I'm building a custom ISO image of Debian 10 stable ("buster") using [preseeding](https://wiki.debian.org/DebianInstaller/Preseed) , and my custom preseed.cfg file works perfectly except for one thing: I'd like it to configure /etc/apt/sources.list with my chosen repositories so that I don't have to do it manually every time I install a new system. The goal is an /etc/apt/sources.list that looks like this (https is a necessity here): deb https://deb.debian.org/debian buster main contrib non-free deb-src https://deb.debian.org/debian buster main contrib non-free deb https://deb.debian.org/debian-security/ buster/updates main contrib non-free deb-src https://deb.debian.org/debian-security/ buster/updates main contrib non-free deb https://deb.debian.org/debian buster-updates main contrib non-free deb-src https://deb.debian.org/debian buster-updates main contrib non-free My preseed.cfg file looks like this: #### Contents of the preconfiguration file (for buster) ### Localization # Preseeding only locale sets language, country and locale. d-i debian-installer/locale string en_US # Keyboard selection. d-i keyboard-configuration/xkb-keymap select us # d-i keyboard-configuration/toggle select No toggling ### Network configuration d-i netcfg/choose_interface select auto d-i netcfg/get_hostname string unassigned-hostname d-i netcfg/get_domain string unassigned-domain d-i netcfg/hostname string vienna1-preseed d-i netcfg/wireless_wep string ### Mirror settings 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 d-i passwd/root-login boolean false # To create a normal user account. d-i passwd/user-fullname string theusername d-i passwd/username string theusername d-i passwd/user-password-crypted password $6$qVk198UWGPxpW$tzMYxQyiOrI4ClDJdDGALsyYq1j1IbXWbpem3JevFT9Krqdmt4wKdvtiY8ry3PRh277V6GHzSKP3zSI7jt04Y/ ### Clock and time zone setup d-i clock-setup/utc boolean true d-i time/zone string US/Eastern d-i clock-setup/ntp boolean true ### Partitioning d-i partman-auto/method string regular d-i partman-lvm/device_remove_lvm boolean true d-i partman-md/device_remove_md boolean true d-i partman-lvm/confirm boolean true d-i partman-lvm/confirm_nooverwrite boolean true d-i partman-auto/choose_recipe select atomic 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 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 # https://serverfault.com/a/622818 d-i apt-setup/use_mirror 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 ### 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 ### Apt setup # You can choose to install non-free and contrib software. d-i apt-setup/non-free boolean true d-i apt-setup/contrib boolean true ### Package selection tasksel tasksel/first multiselect standard d-i pkgsel/upgrade select full-upgrade popularity-contest popularity-contest/participate boolean false ### 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 default d-i finish-install/reboot_in_progress note d-i debian-installer/exit/poweroff boolean true
Michael A (1713 rep)
Dec 9, 2019, 08:05 PM • Last activity: Jun 7, 2024, 09:00 PM
0 votes
1 answers
901 views
Debian-installer custom luks crypto recipe
I want to automate the install of Debian and have control over how the partitioning is done by providing a custom recipe. It was easy enough (ish) when I wasn't using luks or lvm, but I can't get the installer to use crypt and a custom recipe at the same time. The only way a successful install with...
I want to automate the install of Debian and have control over how the partitioning is done by providing a custom recipe. It was easy enough (ish) when I wasn't using luks or lvm, but I can't get the installer to use crypt and a custom recipe at the same time. The only way a successful install with a luks partition went through was when I let partman-auto do it with d-i partman-auto/method string crypto but it seems to ignore my recipe.
### Partitioning
d-i partman-auto/method string regular
d-i partman-auto/choose_recipe select crypto-recipe
d-i partman-auto/expert_recipe_file string /crypto-recipe

d-i partman-crypto/passphrase string super-secret
d-i partman-crypto/passphrase-again string super-secret

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
d-i partman-basicfilesystems/no_swap boolean false
crypto-recipe ::

    538 538 1075 fat32
        $iflabel{ gpt }
        $reusemethod{ }
        method{ efi }
        format{ } .

    512 1024 768 ext4
        method{ format }
        format{ }
        use_filesystem{ }
        filesystem{ ext4 }
        mountpoint{ /boot } .

    2000 2000 -1 crypt
        $iflabel{ gpt }
        method{ lvm }
        vg_name{ vg0 } .

    1000 1000 -1 lvmpart
        $lvmok{ }
        in_vg{ vg0 }
        lv_name{ root }
        method{ format }
        format{ }
        use_filesystem{ }
        filesystem{ ext4 }
        label{ doomar }
        mountpoint{ / }
        .
I want the installer to use the one and only physical disk, but am not sure if I need to specify something for that to happen. Any other options I should try?
d-i partman-auto/disk string /dev/vda

d-i partman-auto/method string crypto
I've also tried specifying my crypt partition with percentages:
100% 100% 100% crypt
        $iflabel{ gpt }
        method{ lvm }
        vg_name{ vg0 } .
There are too many other changes here and there I've tried to list and have got lost. Documentation seems a bit unclear. Is there a better alternative to use preseed files? They don't seem great and I've spent *a lot* of time trying to get them to work how I want, but they seem limited. A few problems I run into while trying various options: - Doesn't select a disk - Fails to install system - Insists on /boot despite /boot/efi present - Many examples are outdated (BIOS, not UEFI/GPT) - Falls back to partman-auto and doesn't follow recipe - Creates a blank partition (presumably what should be the crypt partition) next to where the system is installed If anyone can provide a working example, and clarify whether the method should be regular or crypto when specifying the partitions in a recipe, that at least would give me a starting point. ## Update I tried increasing the size of my virtual disk and it is more clear now that the problem is getting an lvm to be created inside the crypt container. Previously, if the crypt partition took the remaining space on disk then there wasn't anything left for the system. This is what I tried:
crypto-recipe ::

    538 538 538 fat32
        $iflabel{ gpt }
        $reusemethod{ }
        method{ efi }
        format{ } .

    512 1024 512 ext4
        method{ format }
        format{ }
        use_filesystem{ }
        filesystem{ ext4 }
        mountpoint{ /boot } .

    2000 2000 -1 crypt
        $iflabel{ gpt }
        method{ crypto }
        vg_name{ vg0 } .

    2000 2000 -1 lvmpart
        $lvmok{ }
        in_vg{ vg0 }
        lv_name{ root }
        method{ format }
        format{ }
        use_filesystem{ }
        filesystem{ ext4 }
        label{ doomar }
        mountpoint{ / }
        .
Now it is clear
vda                                                                            
├─vda1 vfat   FAT32        390B-57B3                             505.1M     1% /boot/efi
├─vda2 ext4   1.0          48ab2ad8-2744-4fe0-b8ed-dbb9766e0cae  369.7M    11% /boot
├─vda3                                                                         
└─vda4 ext4   1.0   doomar 5ada0c1d-4048-4ff6-ac23-4936dcc16710    1.1G    41% /
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 5369MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                  Flags
 1      1049kB  538MB   537MB   fat32        EFI System Partition  boot, esp
 2      538MB   1050MB  512MB   ext4
 3      1050MB  3049MB  2000MB
 4      3049MB  5368MB  2318MB  ext4
vda3 should be the luks crypt partition, and vda4 shouldn't exist, instead being an lvm inside vda3
a2k42 (131 rep)
Nov 12, 2023, 12:53 PM • Last activity: Nov 13, 2023, 03:12 PM
0 votes
1 answers
1046 views
Debian preseed installation is failing if there a previous OS installed
I am trying to automate the install of Debian 12. It is working correctly when I wipe the disk off using a live cd but I want the preseed iso to wipe the disk off instead and continue with installation. When there is already an OS (like debian 9) installed on disk, I am getting an error `"Failed to...
I am trying to automate the install of Debian 12. It is working correctly when I wipe the disk off using a live cd but I want the preseed iso to wipe the disk off instead and continue with installation. When there is already an OS (like debian 9) installed on disk, I am getting an error "Failed to create a file system, the ext4 file system creation in partition #1 of SCSI1 (0,0,0) (sda) failed If I look at pseudo-terminal: partman: /dev/sda1 is mounted; will not make a filesystem here. This is the preseed file I am using:
### Partitioning
## Partitioning example
# If the system has free space you can choose to only partition that space.
# This is only honoured if partman-auto/method (below) is not set.
#d-i partman-auto/init_automatically_partition select biggest_free

# Alternatively, you may specify a disk to partition. If the system has only
# one disk the installer will default to using that, but otherwise the device
# name must be given in traditional, non-devfs format (so e.g. /dev/sda
# and not e.g. /dev/discs/disc0/disc).
# For example, to use the first SCSI/SATA hard disk:
d-i partman-auto/disk string /dev/sda
# In addition, you'll need to specify the method to use.
# 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 regular

# 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 three predefined partitioning recipes:
# - atomic: all files in one partition
# - home:   separate /home partition
# - multi:  separate /home, /var, and /tmp partitions
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

## Controlling how partitions are mounted
# The default is to mount by UUID, but you can also choose "traditional" to
# use traditional device names, or "label" to try filesystem labels before
# falling back to UUIDs.
d-i partman/mount_style select uuid
rocky_alpine (497 rep)
Sep 8, 2023, 08:20 PM • Last activity: Sep 15, 2023, 09:36 PM
1 votes
1 answers
1650 views
Debian net install to preseed hostname and domain name
Basically the opposite of https://unix.stackexchange.com/questions/563009/ With the new Debian bullseye release, the net install is asking me for hostname and domain name. How to `preseed` it to disable such prompt? - I used the same `preseed` file with the buster release, and cannot recall it asked...
Basically the opposite of https://unix.stackexchange.com/questions/563009/ With the new Debian bullseye release, the net install is asking me for hostname and domain name. How to preseed it to disable such prompt? - I used the same preseed file with the buster release, and cannot recall it asked for hostname and domain name or not. At least it was not causing me trouble. - I check the [new Debian bullseye preseed sample file](https://www.debian.org/releases/stable/example-preseed.txt) and found the setting is the same as mine.
# 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 my-hostname
d-i netcfg/get_domain string my-domain

# If you want to force a hostname, regardless of what either the DHCP
# server returns or what the reverse DNS entry for the IP is, uncomment
# and adjust the following line.
d-i netcfg/hostname string my-domain

# The wacky dhcp hostname that some ISPs use as a password of sorts.
d-i netcfg/dhcp_hostname string my-domain
How to preseed hostname and domain name to disable their prompt?
xpt (1858 rep)
Oct 24, 2021, 09:19 PM • Last activity: Dec 19, 2022, 04:11 PM
2 votes
0 answers
376 views
Debian installer unable to detect preseed.cfg file
I am trying to do a fully headless Debian install for an old x86_64 Windows NAS that has no display output. Aside from serial interfacing (which is not documented for my hardware), preseeding is my only option. As per the official documentation, I created a modified install image with the `preseed.c...
I am trying to do a fully headless Debian install for an old x86_64 Windows NAS that has no display output. Aside from serial interfacing (which is not documented for my hardware), preseeding is my only option. As per the official documentation, I created a modified install image with the preseed.cfg file (shown below, configured to do most of the installation over *network-console*) inside the initrd.gz archive.
d-i debian-installer/language string en
d-i debian-installer/country string AE
d-i debian-installer/locale string en_US.UTF-8

d-i keyboard-configuration/xkb-keymap select us

d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string HP_StorageWorks_X510
d-i netcfg/wireless_wep string

d-i hw-detect/load_firmware boolean true

d-i anna/choose_modules string network-console

d-i network-console/password password r00tme
d-i network-console/password-again password r00tme
However, when I test the modified install image in a virtual machine and enter the installer with the modified initial ram disk image, it does not recognize the preseed file. I just the see the option to select the language as if the pressed is not there. What could be the issue here? I extracted the modified install image and made sure the preseeding was done correctly. Better yet, is there an easy way to specify the preseed file without having to modify the installer image myself at all?
Marwi (141 rep)
Sep 27, 2022, 09:27 PM • Last activity: Nov 27, 2022, 08:22 PM
1 votes
0 answers
1093 views
Automatic installation using Debian with preseed inserted into initrd ignores keyboard configuration
This is my full `preseed.cfg`: ``` # Locales d-i debian-installer/language string en_GB:en d-i debian-installer/country string ES d-i debian-installer/locale string en_GB.UTF-8 # Keyboard d-i keyboard-configuration/xkb-keymap select es # Network d-i netcfg/choose_interface select auto d-i netcfg/get...
This is my full preseed.cfg:
# Locales
d-i debian-installer/language string en_GB:en
d-i debian-installer/country string ES
d-i debian-installer/locale string en_GB.UTF-8


# Keyboard
d-i keyboard-configuration/xkb-keymap select es


# Network
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string preseed
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/wireless_wep string


# Mirror
d-i mirror/country string ES
d-i mirror/http/hostname string deb.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string
d-i mirror/suite string stable


# Accounts
d-i passwd/root-password-crypted password $1$EuB1h0/P$IIUGcTg79ZeX72l28Fh0E0
d-i passwd/user-fullname string preseed
d-i passwd/username string preseed
d-i passwd/user-password-crypted password $1$N/qFSN1R$Ub33hbzjj4.jBhbygvN0P/


# Clock and time zone
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Madrid
d-i clock-setup/ntp boolean true


# Partitioning
d-i partman-auto/disk string /dev/vda
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-auto/method string lvm
d-i partman-lvm/confirm boolean true
d-i partman-auto/choose_recipe select mypartitioning
d-i partman-auto-lvm/new_vg_name string vg00
d-i partman-auto-lvm/guided_size string max
d-i partman-lvm/confirm_nooverwrite boolean true

d-i partman-auto/expert_recipe string                         \
      mypartitioning ::                                       \
              512 1 512 xfs                                   \
                      $primary{ } $bootable{ }                \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ xfs }     \
                      mountpoint{ /boot }                     \
              .                                               \
              1024 1 1024 linux-swap                          \
                      $defaultignore{ }                       \
                      $lvmok{ }                               \
                      lv_name{ swap }                         \
                      in_vg { vg00 }                          \
                      method{ swap } format{ }                \
              .                                               \
              3072 1 3072 xfs                                 \
                      $defaultignore{ }                       \
                      $lvmok{ }                               \
                      lv_name{ root }                         \
                      in_vg { vg00 }                          \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ xfs }     \
                      mountpoint{ / }                         \
              .                                               \
              6144 1 6144 xfs                                 \
                      $defaultignore{ }                       \
                      $lvmok{ }                               \
                      lv_name{ var }                          \
                      in_vg { vg00 }                          \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ xfs }     \
                      mountpoint{ /var }                      \
              .                                               \
              8192 1 1000000000 xfs                           \
                      $defaultignore{ }                       \
                      $lvmok{ }                               \
                      lv_name{ home }                         \
                      in_vg { vg00 }                          \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ xfs }     \
                      mountpoint{ /home }                     \
              .

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
d-i base-installer/kernel/image string linux-image-amd64


# Apt
d-i apt-setup/services-select multiselect security, updates
d-i apt-setup/security_host string security.debian.org


# Package selection
tasksel tasksel/first multiselect standard, ssh-server
popularity-contest popularity-contest/participate boolean false


# Boot loader
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i grub-installer/bootdev  string default


# Finishing up
d-i finish-install/reboot_in_progress note
Installation completes successfully but the Spanish keyboard is not configured. /etc/default/keyboard is not even created. Things that I have tried but won't make a difference: - Adjusting locale and language settings to meet keyboard settings. That is, using Spanish language and locale - Using more keyboard definitions like variant, model, layout, no toggling, etc. No matter how further I specify the keyboard configuration, it won't work. Things that I have noticed: - This same preseed works 100% when using network installation, either storing the file in a web server or a PXE server. In those scenarios, the keyboard will be properly configured, which leads me to think that this preseed file is not the problem, has to be something else. - A classmate showed me that you can change the keyboard by modifying the txt.cfg in isolinux, but this whole process is a bit messy and I still think you should be able to change the keyboard just modifying the preseed file Here you have the full [/var/log/installer/syslog](https://pastebin.com/mz3Bm87j) of a created VM with this preseed file. Do you think this is a d-i limitation or bug? Is there any actual way to make the keyboard config work using initrd preseeding by just modifying the preseed file? Why does it work over network installs but not with ISO?
Adrián Jaramillo (459 rep)
Oct 3, 2022, 07:14 PM
2 votes
0 answers
181 views
Best practice for including custom .deb in Debian preseed
I have a bootable Debian 11 USB drive, and I'm writing a preseed configuration file to be loading at installation time. I've written a custom `app.deb` (not the actual name), and my goal is to have it installed at the time of system install. I've been trying to figure it out for several days, and it...
I have a bootable Debian 11 USB drive, and I'm writing a preseed configuration file to be loading at installation time. I've written a custom app.deb (not the actual name), and my goal is to have it installed at the time of system install. I've been trying to figure it out for several days, and it seems like there are potentially multiple methods for doing this. Is there a best practice way for loading binaries through a preseeding process? I want the binary installer to be local to the drive - I don't want to have to set up a repository.
Ethan Hill (131 rep)
Sep 21, 2022, 07:42 PM • Last activity: Sep 21, 2022, 07:54 PM
1 votes
0 answers
656 views
Debian-installer preseed: include sub-files and running multiple late_ and early_ commands
I have been using a preseeded USB disk for a few years now, but am hitting a wall. One of my machines needs the RTW89 module and firmware to access the internet. I have succeeded in building the driver and firmware for both 5.10.0.16 (deb 11.4 installer kernel) and 5.10.0.17 (deb 11.4 target kernel)...
I have been using a preseeded USB disk for a few years now, but am hitting a wall. One of my machines needs the RTW89 module and firmware to access the internet. I have succeeded in building the driver and firmware for both 5.10.0.16 (deb 11.4 installer kernel) and 5.10.0.17 (deb 11.4 target kernel), and am halfway there using this approach: * with an early_command I can copy all files to the installer environment and * with a late_command I can copy all files to the target environment. PROBLEM: the installer picks up the wlp3s0 interface, but does not scan for SSIDs, nor does it ask me to connect to a WiFi network. It tries the link on the wired and wireless interface, and runs a dhcp attempt to then fail (as expected). If I drop to a TTY, I can connect using wpa_supplicant and udhcpc, but still the installer does not pick up the active network connection when it continues... QUESTIONS: 1. After copying over the modules and firmware, i run 'depmod -a', but I cannot run 'modprobe XXX' in the early_command as it fails to find dependencies. I don't think this is causing the issue (d-i picks up the *presence* of the wlp3s0 iface after all), but still want to mention it... Should I run additional commands to make d-i aware of this preseed intervention? 2. I am using two d-i/include commands: one for this rtw89 module and one to specify partitioning for both NVME and SATA setups (see below) - could this be causing the d-i confusion?
### INCLUDE SUB RTW89 (RTW8852 network)
d-i preseed/include_command string if [[ "grep 8852 -c /proc/bus/pci/devices" -gt 0 ]]; then echo preseed-sub-rtw8852.cfg; fi
### END INCLUDE

### INCLUDE SUB PARTITIONING NVME vs SATA
d-i preseed/include_command string if [[ "grep nvme -c /proc/modules" -eq 0 ]]; then echo preseed-sub-sata.cfg; else echo preseed-sub-nvme.cfg; fi
### END INCLUDE
zenlord (738 rep)
Aug 29, 2022, 01:10 PM • Last activity: Aug 29, 2022, 01:21 PM
11 votes
3 answers
17108 views
What hash algorithms can I use in preseed's passwd/user-password-crypted entry?
When it comes to `passwd/user-password-crypted` statement in a preseed file, most examples use an MD5 hash. Example: > # Normal user's password, either in clear text > #d-i passwd/user-password password insecure > #d-i passwd/user-password-again password insecure > # or encrypted using an MD5 hash....
When it comes to passwd/user-password-crypted statement in a preseed file, most examples use an MD5 hash. Example: > # Normal user's password, either in clear text > #d-i passwd/user-password password insecure > #d-i passwd/user-password-again password insecure > # or encrypted using an MD5 hash. > #d-i passwd/user-password-crypted password [MD5 hash] From Debian's Appendix B. Automating the installation using preseeding . A few sources show that it's also possible to use SHA-512: > Try using a hashed password like this: > > $ mkpasswd -m sha-512 > > [...] > > And then in your preseed file: > > d-i passwd/user-password-crypted password $6$ONf5M3F1u$bpljc9f1SPy1w4J2br[...] From Can't automate user creation with preseeding on AskUbuntu . This is slightly better than MD5, but still doesn't resist well against brute force and rainbow tables. What other algorithms can I use? For instance, is PBKDF2 supported, or am I limited by the algorithms used in /etc/shadow, that is MD5, Blowfish, SHA-256 and SHA-512 ?
Arseni Mourzenko (1382 rep)
Aug 24, 2015, 07:35 PM • Last activity: Mar 29, 2022, 08:53 AM
0 votes
1 answers
991 views
How do you load a third-party module in debian-installer?
I'm trying to install Debian Bullseye on a new Lenovo laptop (T14s Gen1). The laptop has a Realtek 8852AE wifi chip, for which currently no driver has been added to the kernel. There is [a Github repository][1] where a suitable driver appears to be present, and I'm able to build both the firmware an...
I'm trying to install Debian Bullseye on a new Lenovo laptop (T14s Gen1). The laptop has a Realtek 8852AE wifi chip, for which currently no driver has been added to the kernel. There is a Github repository where a suitable driver appears to be present, and I'm able to build both the firmware and the kernel modules on another Debian Bullseye machine. I have created a Debian Bullseye usb stick and added my regular preseed file, which is working fine. I tried adding a series of 'early_command's, but d-i always throws an error at the first early_command it encounters. Any pointers what is wrong with it? ### Copy the Realtek 8852AE firmware during installation d-i preseed/early_command string \ /bin/cp /cdrom/realtek8852/rtw8852a_fw.bin /lib/firmware/rtw8852a_fw.bin; ### Modprobe the Realtek 8852AE network driver during installation d-i preseed/early_command string \ /bin/cp /cdrom/realtek8852/rtw89core.ko /lib/modules/5.10.0-8-amd64/rtw89core.ko; \ /bin/cp /cdrom/realtek8852/rtw89pci.ko /lib/modules/5.10.0-8-amd64/rtw89pci.ko; \ /sbin/depmod -a \ /sbin/modprobe rtw89pci; ### Copy the Realtek 8852AE firmware on target machine d-i preseed/late_command string \ /bin/cp /cdrom/realtek8852/rtw8852a_fw.bin /target/lib/firmware/rtw8852a_fw.bin; ### Modprobe the Realtek 8852AE network driver on target machine d-i preseed/late_command string \ /bin/cp /cdrom/realtek8852/rtw89core.ko /target/lib/modules/5.10.0-8-amd64/rtw89core.ko; \ /bin/cp /cdrom/realtek8852/rtw89pci.ko /target/lib/modules/5.10.0-8-amd64/rtw89pci.ko; \ /bin/touch /target/etc/modules-load.d/rtw89.conf; \ /bin/echo "rtw89pci" >> /target/etc/modules-load.d/rtw89.conf;
zenlord (738 rep)
Sep 20, 2021, 07:56 AM • Last activity: Sep 20, 2021, 06:47 PM
1 votes
1 answers
539 views
Schedule reboot in the background during debian preseeding
I want to schedule a 30-minute reboot timer inside a Debian preseed so that in case of download problems etc. the installation does not hang (requiring someone on-site to reboot the machine manually). I am installing from a netboot image. The following does not work (it does not run in the backgroun...
I want to schedule a 30-minute reboot timer inside a Debian preseed so that in case of download problems etc. the installation does not hang (requiring someone on-site to reboot the machine manually). I am installing from a netboot image. The following does not work (it does not run in the background, but in the foreground):
d-i preseed/early_command string reboot -d 1800 &
d-i preseed/early_command string sh -c 'reboot -d 1800 &' ;
I think the culprit is the log-output program used here https://salsa.debian.org/installer-team/preseed/-/blob/master/preseed_command#L16 Is there an alternative way to accomplish the scheduled reboot? Bonus if I do not have to install additional software (again, network problems …)
user478797 (13 rep)
Jun 24, 2021, 07:39 AM • Last activity: Jun 25, 2021, 04:27 PM
0 votes
1 answers
99 views
Replace awk in this command
I am struggling with a preseed-script for Debian and figured out that awk is not available in the installation process. ## A little context The preseed-script fails at the following line and returns empty result: ``` real=`ip -o link | awk '/ / {print $2;}' | sed s/://` cat /etc/network/interfaces #...
I am struggling with a preseed-script for Debian and figured out that awk is not available in the installation process. ## A little context The preseed-script fails at the following line and returns empty result:
real=ip -o link | awk '// {print $2;}' | sed s/://
cat  /etc/network/interfaces
#loopback
auto lo
iface lo inet loopback

#
auto $real
allow-hotplug $real
iface $real inet
As result, $real is empty and produces a faulty network configuration. ## What I hope to archive I'd like to rewrite the command so that the result looks like ens18 or eth0 based on this input:
root@vm:~# ip -o link
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000\    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens18:  mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000\    link/ether 1e:7d:da:55:31:23 brd ff:ff:ff:ff:ff:ff
This is the command which is failing during installation:
root@vm:~# ip -o link | awk '/1e:7d:da:55:31:23/ {print $2;}' | sed s/://
ens18
## My question How can I avoid awk and work with other tools in this situation to get the interface-name like ens18 from ip -o link-output? Unfortunately I am not that familiar with sed.
SPQRInc (105 rep)
Apr 14, 2021, 06:54 AM • Last activity: Apr 14, 2021, 07:09 AM
Showing page 1 of 20 total questions