Skip to content

How to create a DietPi image for x86_64 PCs (BIOS)

yakupcengo edited this page Aug 13, 2022 · 5 revisions

Download base image

Flash and boot

  • Flash the image onto a USB flash drive, using e.g. Rufus or Etcher.
  • Plug the USB flash drive into the target system and boot from it.

Debian installer

  • Advanced options > Expert install
  • When the installer menu shows up, unplug the USB flash drive and in case any other external drive. This is required to allow the installer detecting the main internal drive as SCSI1/sda.
  • Choose language
    • Language: English - English
    • Country, territory or area: United Kingdom
    • Country to base default locale settings on: United Kingdom - en_GB.UTF-8
    • Additional locales: select NO additional locales > Continue
  • Configure the keyboard
    • British English
  • Detect network hardware
    • In case: Deselect any Modules to load as we don't require them.
  • Configure the network
    • In case select correct network adapter and enter WiFi credentials
    • Auto-configure networking: Yes
    • Waiting time for link detection: 3 (default)
    • Hostname: DietPi
    • Domain name: <leave empty>
  • Choose a mirror of the Debian archive
    • Protocol for file downloads: http
    • Debian archive mirror country: just use your country or use United Kingdom. It will be overwritten anyway by DietPi-PREP, as actually most other settings as well 😉.
    • Debian archive mirror: just use one near to your location or deb.debian.org. It will be overwritten anyway by DietPi-PREP, as actually most other settings as well 😉.
    • HTTP proxy information: in case select your proxy server or leave it empty if there is no proxy server.
    • Debian version to install: bullseye - stable
  • Download installer components
    • deselect everything > Continue
  • Set up users and passwords
    • Enable shadow passwords? Yes
    • Allow login as root? Yes
    • Root password: dietpi > Continue
    • Create a normal user account now? No
  • Configure the clock
    • Set the clock using NTP? Yes
    • NTP server to use: leave default mirror 0.debian.pool.ntp.org > Continue
    • Select your time zone: UTC
  • Detect disks
    • In case: Deselect any Modules to load > Continue
  • Partition disks
    • Partition method: Manual
    • Select the main drive (SCSI1/sda)
      • Create new empty partition table on this device?: Yes
      • Partition table type: msdos
    • Select FREE SPACE below the drive
      • Create a new partition
      • New partition size: 1.5 GB (should be sufficient for Debian + DietPi installs) > Continue
      • Location for the new partition: Beginning
      • Partition settings:
        • Use as: Ext4 journaling file system
        • Mount point: /
        • Done setting up the partition
    • Finish partitioning and write changes to disk
      • Do you want to return to the partitioning menu?: No
      • Write the changes to disks?: Yes
  • Install the base system
    • Kernel to install: linux-image-amd64
    • Drivers to include in the initrd: generic to be most compatible.
  • Configure the package manager
    • Use non-free software?: No
    • Use contrib software?: No
    • Enable source repositories in APT? No
    • Services to use: select security updates and release updates and backported software, however it will be added by DietPi-PREP anyway. > Continue.
  • Select and install software
    • Updates management on this system: No automatic updates
    • Participate in the package usage survey?: No (user should decide this oneself later)
    • Deselect all additional software > Continue
  • Install the GRUB boot loader on a hard disk
    • Install the GRUB boot loader to the master boot record?: Yes
    • Device to boot loader installation: /dev/sda
    • Force GRUB installation to the EFI removable media path?: No
  • Finish the installation
    • Is the system clock set to UTC? Yes
    • Installation complete: Continue

DietPi-PREP

Image file creation and packaging

  • Either plug the drive into another DietPi system or boot DietPi from another USB drive.
  • Run DietPi-Imager
    bash -c "$(curl -sSfL 'https://raw.githubusercontent.com/MichaIng/DietPi/master/.build/images/dietpi-imager')"