├── Bookworm ├── generate_images.sh ├── grub.cfg ├── preseed.cfg └── startup.nsh ├── Bullseye ├── .gitignore ├── generate_images.sh ├── grub.cfg ├── preseed.cfg └── startup.nsh ├── Buster ├── .gitignore ├── generate_images.sh ├── grub.cfg ├── preseed.cfg └── startup.nsh └── README.md /Bookworm/generate_images.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ##RUN THIS AS SUDO OR ROOT 4 | 5 | ##requires gzip, rsync, wget, cpio, grub2, xorriso, gawk 6 | ##sudo apt-get install gzip rsync wget cpio grub2 xorriso gawk -y 7 | 8 | distro="bookworm" 9 | 10 | ####Prepare output directories#### 11 | mkdir debian-files output 12 | rm -r payload/ 13 | mkdir -p payload/source 14 | 15 | ####Clear tempfiles if applicable#### 16 | cd debian-files 17 | if [ -d "tmp" ]; then 18 | rm -r "tmp/" 19 | fi 20 | 21 | ####Download the latest distro netboot installer ISO#### 22 | wget -N "http://ftp.nl.debian.org/debian/dists/$distro/main/installer-amd64/current/images/netboot/mini.iso" 23 | cd .. 24 | 25 | ####Bring prerequisite files into the payload build directory#### 26 | cp preseed.cfg payload/ 27 | cp startup.nsh payload/ 28 | #cp ../../../*.sh payload/source/ 29 | #cp ../../../*.service payload/source/ 30 | #cp ../../../it8721.conf payload/source/ 31 | #cp -r ../../../micon_scripts payload/source/ 32 | #cp ../../../micro-evtd payload/source/ 33 | #cp -r ../../../Tools/modules payload/source/ 34 | 35 | ####Extract the netboot installer ISO#### 36 | xorriso -osirrox on -indev debian-files/mini.iso -extract / iso/ 37 | cp iso/initrd.gz . 38 | if [ $? -ne 0 ]; then 39 | echo "failed to retrieve initrd.gz, quitting" 40 | exit 41 | fi 42 | 43 | ####Get the netboot installer kernel version#### 44 | kernel_ver="$(zcat initrd.gz | cpio -t | grep -m 1 lib/modules/ | gawk -F/ '{print $3}')" 45 | 46 | ####Extract the initial ramdisk of the netboot installer#### 47 | gunzip initrd.gz 48 | if [ $? -ne 0 ]; then 49 | echo "failed to unpack initrd.gz, quitting" 50 | exit 51 | fi 52 | 53 | ####Modify the initial ramdisk#### 54 | cd payload 55 | find . | cpio -v -H newc -o -A -F ../initrd 56 | if [ $? -ne 0 ]; then 57 | echo "failed to patch initrd.gz, quitting" 58 | exit 59 | fi 60 | 61 | ####Repack the new initial ramdisk#### 62 | cd .. 63 | gzip initrd 64 | #cat initrd | xz --check=crc32 -9 > initrd.xz 65 | if [ $? -ne 0 ]; then 66 | echo "failed to pack initrd, quitting" 67 | exit 68 | fi 69 | 70 | ####Remove original GRUB files#### 71 | #rm -r iso/boot/grub/* 72 | 73 | ####Assemble some files for the new ISO#### 74 | cp initrd.gz iso/ 75 | cp grub.cfg iso/boot/grub/ 76 | #mkdir iso/EFI 77 | #cp startup.nsh iso/EFI 78 | 79 | ####Clear the final output directory#### 80 | rm output/* 81 | 82 | ####Build the new ISO using GRUB#### 83 | #grub-mkrescue -o "output/dx4000-$distro-installer.iso" iso/ 84 | 85 | ####Make a GRUB image#### 86 | #BOOT_IMG_DATA=$(mktemp -d) 87 | #BOOT_IMG=$(mktemp -d)/efi.img 88 | 89 | #mkdir -p $(dirname $BOOT_IMG) 90 | 91 | #truncate -s 8M $BOOT_IMG 92 | #mkfs.vfat $BOOT_IMG 93 | #mount $BOOT_IMG $BOOT_IMG_DATA 94 | #mkdir -p $BOOT_IMG_DATA/efi/boot 95 | 96 | #grub-mkimage \ 97 | # -C xz \ 98 | # -O x86_64-efi \ 99 | # -p /boot/grub \ 100 | # -o $BOOT_IMG_DATA/efi/boot/bootx64.efi \ 101 | # boot linux search normal configfile \ 102 | # part_gpt btrfs ext2 fat iso9660 loopback \ 103 | # test keystatus gfxmenu regexp probe \ 104 | # efi_gop efi_uga all_video gfxterm font \ 105 | # echo read ls cat png jpeg halt reboot 106 | 107 | #umount $BOOT_IMG_DATA 108 | #cp $BOOT_IMG . 109 | #rm -rf $BOOT_IMG_DATA 110 | 111 | ####Extract Debian's unused EFI raw image#### 112 | mkdir efimount 113 | 114 | mount debian-files/mini.iso efimount 115 | if [ $? -ne 0 ]; then 116 | echo "failed to mount mini.iso for EFI extraction, quitting" 117 | exit 118 | fi 119 | 120 | cp efimount/boot/grub/efi.img . 121 | 122 | umount efimount 123 | if [ $? -ne 0 ]; then 124 | echo "failed to unmount mini.iso, quitting" 125 | exit 126 | fi 127 | 128 | rmdir efimount 129 | 130 | ####Assemble ISO#### 131 | xorriso -as mkisofs \ 132 | -iso-level 3 \ 133 | -r -V "dx4000-$distro-installer" \ 134 | -J -joliet-long \ 135 | -append_partition 2 0xef efi.img \ 136 | -partition_cyl_align all \ 137 | -o "output/dx4000-$distro-installer.iso" \ 138 | iso/ 139 | 140 | ####Delete byproducts#### 141 | rm -r iso/ 142 | rm efi.img 143 | rm initrd.gz 144 | -------------------------------------------------------------------------------- /Bookworm/grub.cfg: -------------------------------------------------------------------------------- 1 | set timeout=5 2 | set default=0 3 | 4 | terminal_output gfxterm console 5 | 6 | menuentry "DX4000 Debian Installer" { 7 | linux /linux --- console=ttyS1,115200n8 8 | initrd /initrd.gz 9 | boot 10 | } -------------------------------------------------------------------------------- /Bookworm/preseed.cfg: -------------------------------------------------------------------------------- 1 | #_preseed_V1 2 | #### Contents of the preconfiguration file (for bullseye) 3 | ### Localization 4 | # Preseeding only locale sets language, country and locale. 5 | d-i debian-installer/locale string en_US 6 | 7 | # The values can also be preseeded individually for greater flexibility. 8 | #d-i debian-installer/language string en 9 | #d-i debian-installer/country string NL 10 | #d-i debian-installer/locale string en_GB.UTF-8 11 | # Optionally specify additional locales to be generated. 12 | #d-i localechooser/supported-locales multiselect en_US.UTF-8, nl_NL.UTF-8 13 | 14 | # Keyboard selection. 15 | d-i keyboard-configuration/xkb-keymap select us 16 | # d-i keyboard-configuration/toggle select No toggling 17 | 18 | ### Network configuration 19 | # Disable network configuration entirely. This is useful for cdrom 20 | # installations on non-networked devices where the network questions, 21 | # warning and long timeouts are a nuisance. 22 | #d-i netcfg/enable boolean false 23 | 24 | # netcfg will choose an interface that has link if possible. This makes it 25 | # skip displaying a list if there is more than one interface. 26 | d-i netcfg/choose_interface select auto 27 | 28 | # To pick a particular interface instead: 29 | #d-i netcfg/choose_interface select eth1 30 | 31 | # To set a different link detection timeout (default is 3 seconds). 32 | # Values are interpreted as seconds. 33 | d-i netcfg/link_wait_timeout string 10 34 | 35 | # If you have a slow dhcp server and the installer times out waiting for 36 | # it, this might be useful. 37 | d-i netcfg/dhcp_timeout string 60 38 | #d-i netcfg/dhcpv6_timeout string 60 39 | 40 | # If you prefer to configure the network manually, uncomment this line and 41 | # the static network configuration below. 42 | #d-i netcfg/disable_autoconfig boolean true 43 | 44 | # If you want the preconfiguration file to work on systems both with and 45 | # without a dhcp server, uncomment these lines and the static network 46 | # configuration below. 47 | #d-i netcfg/dhcp_failed note 48 | #d-i netcfg/dhcp_options select Configure network manually 49 | 50 | # Static network configuration. 51 | # 52 | # IPv4 example 53 | #d-i netcfg/get_ipaddress string 192.168.1.42 54 | #d-i netcfg/get_netmask string 255.255.255.0 55 | #d-i netcfg/get_gateway string 192.168.1.1 56 | #d-i netcfg/get_nameservers string 192.168.1.1 57 | #d-i netcfg/confirm_static boolean true 58 | # 59 | # IPv6 example 60 | #d-i netcfg/get_ipaddress string fc00::2 61 | #d-i netcfg/get_netmask string ffff:ffff:ffff:ffff:: 62 | #d-i netcfg/get_gateway string fc00::1 63 | #d-i netcfg/get_nameservers string fc00::1 64 | #d-i netcfg/confirm_static boolean true 65 | 66 | # Any hostname and domain names assigned from dhcp take precedence over 67 | # values set here. However, setting the values still prevents the questions 68 | # from being shown, even if values come from dhcp. 69 | d-i netcfg/get_hostname string debian 70 | d-i netcfg/get_domain string unassigned-domain 71 | 72 | # If you want to force a hostname, regardless of what either the DHCP 73 | # server returns or what the reverse DNS entry for the IP is, uncomment 74 | # and adjust the following line. 75 | #d-i netcfg/hostname string somehost 76 | 77 | # Disable that annoying WEP key dialog. 78 | d-i netcfg/wireless_wep string 79 | # The wacky dhcp hostname that some ISPs use as a password of sorts. 80 | #d-i netcfg/dhcp_hostname string radish 81 | 82 | # If non-free firmware is needed for the network or other hardware, you can 83 | # configure the installer to always try to load it, without prompting. Or 84 | # change to false to disable asking. 85 | #d-i hw-detect/load_firmware boolean true 86 | 87 | ### Network console 88 | # Use the following settings if you wish to make use of the network-console 89 | # component for remote installation over SSH. This only makes sense if you 90 | # intend to perform the remainder of the installation manually. 91 | d-i anna/choose_modules string network-console 92 | #d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key 93 | d-i network-console/password password dx4000 94 | d-i network-console/password-again password dx4000 95 | 96 | ### Mirror settings 97 | # If you select ftp, the mirror/country string does not need to be set. 98 | #d-i mirror/protocol string ftp 99 | d-i mirror/country string manual 100 | d-i mirror/http/hostname string http.us.debian.org 101 | d-i mirror/http/directory string /debian 102 | d-i mirror/http/proxy string 103 | 104 | # Suite to install. 105 | #d-i mirror/suite string testing 106 | # Suite to use for loading installer components (optional). 107 | #d-i mirror/udeb/suite string testing 108 | 109 | ### Account setup 110 | # Skip creation of a root account (normal user account will be able to 111 | # use sudo). 112 | #d-i passwd/root-login boolean false 113 | # Alternatively, to skip creation of a normal user account. 114 | #d-i passwd/make-user boolean false 115 | 116 | # Root password, either in clear text 117 | #d-i passwd/root-password password r00tme 118 | #d-i passwd/root-password-again password r00tme 119 | # or encrypted using a crypt(3) hash. 120 | #d-i passwd/root-password-crypted password [crypt(3) hash] 121 | 122 | # To create a normal user account. 123 | #d-i passwd/user-fullname string Debian User 124 | #d-i passwd/username string debian 125 | # Normal user's password, either in clear text 126 | #d-i passwd/user-password password insecure 127 | #d-i passwd/user-password-again password insecure 128 | # or encrypted using a crypt(3) hash. 129 | #d-i passwd/user-password-crypted password [crypt(3) hash] 130 | # Create the first user with the specified UID instead of the default. 131 | #d-i passwd/user-uid string 1010 132 | 133 | # The user account will be added to some standard initial groups. To 134 | # override that, use this. 135 | #d-i passwd/user-default-groups string audio cdrom video 136 | 137 | ### Clock and time zone setup 138 | # Controls whether or not the hardware clock is set to UTC. 139 | d-i clock-setup/utc boolean true 140 | 141 | # You may set this to any valid setting for $TZ; see the contents of 142 | # /usr/share/zoneinfo/ for valid values. 143 | #d-i time/zone string US/Eastern 144 | 145 | # Controls whether to use NTP to set the clock during the install 146 | d-i clock-setup/ntp boolean true 147 | # NTP server to use. The default is almost always fine here. 148 | #d-i clock-setup/ntp-server string ntp.example.com 149 | 150 | ### Partitioning 151 | ## Partitioning example 152 | # If the system has free space you can choose to only partition that space. 153 | # This is only honoured if partman-auto/method (below) is not set. 154 | #d-i partman-auto/init_automatically_partition select biggest_free 155 | 156 | # Alternatively, you may specify a disk to partition. If the system has only 157 | # one disk the installer will default to using that, but otherwise the device 158 | # name must be given in traditional, non-devfs format (so e.g. /dev/sda 159 | # and not e.g. /dev/discs/disc0/disc). 160 | # For example, to use the first SCSI/SATA hard disk: 161 | #d-i partman-auto/disk string /dev/sda 162 | # In addition, you'll need to specify the method to use. 163 | # The presently available methods are: 164 | # - regular: use the usual partition types for your architecture 165 | # - lvm: use LVM to partition the disk 166 | # - crypto: use LVM within an encrypted partition 167 | #d-i partman-auto/method string lvm 168 | 169 | # You can define the amount of space that will be used for the LVM volume 170 | # group. It can either be a size with its unit (eg. 20 GB), a percentage of 171 | # free space or the 'max' keyword. 172 | #d-i partman-auto-lvm/guided_size string max 173 | 174 | # If one of the disks that are going to be automatically partitioned 175 | # contains an old LVM configuration, the user will normally receive a 176 | # warning. This can be preseeded away... 177 | #d-i partman-lvm/device_remove_lvm boolean true 178 | # The same applies to pre-existing software RAID array: 179 | #d-i partman-md/device_remove_md boolean true 180 | # And the same goes for the confirmation to write the lvm partitions. 181 | #d-i partman-lvm/confirm boolean true 182 | #d-i partman-lvm/confirm_nooverwrite boolean true 183 | 184 | # You can choose one of the three predefined partitioning recipes: 185 | # - atomic: all files in one partition 186 | # - home: separate /home partition 187 | # - multi: separate /home, /var, and /tmp partitions 188 | d#-i partman-auto/choose_recipe select atomic 189 | 190 | # Or provide a recipe of your own... 191 | # If you have a way to get a recipe file into the d-i environment, you can 192 | # just point at it. 193 | #d-i partman-auto/expert_recipe_file string /hd-media/recipe 194 | 195 | # If not, you can put an entire recipe into the preconfiguration file in one 196 | # (logical) line. This example creates a small /boot partition, suitable 197 | # swap, and uses the rest of the space for the root partition: 198 | #d-i partman-auto/expert_recipe string \ 199 | # boot-root :: \ 200 | # 40 50 100 ext3 \ 201 | # $primary{ } $bootable{ } \ 202 | # method{ format } format{ } \ 203 | # use_filesystem{ } filesystem{ ext3 } \ 204 | # mountpoint{ /boot } \ 205 | # . \ 206 | # 500 10000 1000000000 ext3 \ 207 | # method{ format } format{ } \ 208 | # use_filesystem{ } filesystem{ ext3 } \ 209 | # mountpoint{ / } \ 210 | # . \ 211 | # 64 512 300% linux-swap \ 212 | # method{ swap } format{ } \ 213 | # . 214 | 215 | # The full recipe format is documented in the file partman-auto-recipe.txt 216 | # included in the 'debian-installer' package or available from D-I source 217 | # repository. This also documents how to specify settings such as file 218 | # system labels, volume group names and which physical devices to include 219 | # in a volume group. 220 | 221 | ## Partitioning for EFI 222 | # If your system needs an EFI partition you could add something like 223 | # this to the recipe above, as the first element in the recipe: 224 | # 538 538 1075 free \ 225 | # $iflabel{ gpt } \ 226 | # $reusemethod{ } \ 227 | # method{ efi } \ 228 | # format{ } \ 229 | # . \ 230 | # 231 | # The fragment above is for the amd64 architecture; the details may be 232 | # different on other architectures. The 'partman-auto' package in the 233 | # D-I source repository may have an example you can follow. 234 | 235 | # This makes partman automatically partition without confirmation, provided 236 | # that you told it what to do using one of the methods above. 237 | #d-i partman-partitioning/confirm_write_new_label boolean true 238 | #d-i partman/choose_partition select finish 239 | #d-i partman/confirm boolean true 240 | #d-i partman/confirm_nooverwrite boolean true 241 | 242 | # Force UEFI booting ('BIOS compatibility' will be lost). Default: false. 243 | #d-i partman-efi/non_efi_system boolean true 244 | # Ensure the partition table is GPT - this is required for EFI 245 | #d-i partman-partitioning/choose_label string gpt 246 | #d-i partman-partitioning/default_label string gpt 247 | 248 | # When disk encryption is enabled, skip wiping the partitions beforehand. 249 | #d-i partman-auto-crypto/erase_disks boolean false 250 | 251 | ## Partitioning using RAID 252 | # The method should be set to "raid". 253 | #d-i partman-auto/method string raid 254 | # Specify the disks to be partitioned. They will all get the same layout, 255 | # so this will only work if the disks are the same size. 256 | #d-i partman-auto/disk string /dev/sda /dev/sdb 257 | 258 | # Next you need to specify the physical partitions that will be used. 259 | #d-i partman-auto/expert_recipe string \ 260 | # multiraid :: \ 261 | # 1000 5000 4000 raid \ 262 | # $primary{ } method{ raid } \ 263 | # . \ 264 | # 64 512 300% raid \ 265 | # method{ raid } \ 266 | # . \ 267 | # 500 10000 1000000000 raid \ 268 | # method{ raid } \ 269 | # . 270 | 271 | # Last you need to specify how the previously defined partitions will be 272 | # used in the RAID setup. Remember to use the correct partition numbers 273 | # for logical partitions. RAID levels 0, 1, 5, 6 and 10 are supported; 274 | # devices are separated using "#". 275 | # Parameters are: 276 | # \ 277 | # 278 | 279 | #d-i partman-auto-raid/recipe string \ 280 | # 1 2 0 ext3 / \ 281 | # /dev/sda1#/dev/sdb1 \ 282 | # . \ 283 | # 1 2 0 swap - \ 284 | # /dev/sda5#/dev/sdb5 \ 285 | # . \ 286 | # 0 2 0 ext3 /home \ 287 | # /dev/sda6#/dev/sdb6 \ 288 | # . 289 | 290 | # For additional information see the file partman-auto-raid-recipe.txt 291 | # included in the 'debian-installer' package or available from D-I source 292 | # repository. 293 | 294 | # This makes partman automatically partition without confirmation. 295 | #d-i partman-md/confirm boolean true 296 | #d-i partman-partitioning/confirm_write_new_label boolean true 297 | #d-i partman/choose_partition select finish 298 | #d-i partman/confirm boolean true 299 | #d-i partman/confirm_nooverwrite boolean true 300 | 301 | ## Controlling how partitions are mounted 302 | # The default is to mount by UUID, but you can also choose "traditional" to 303 | # use traditional device names, or "label" to try filesystem labels before 304 | # falling back to UUIDs. 305 | #d-i partman/mount_style select uuid 306 | 307 | ### Base system installation 308 | # Configure APT to not install recommended packages by default. Use of this 309 | # option can result in an incomplete system and should only be used by very 310 | # experienced users. 311 | #d-i base-installer/install-recommends boolean false 312 | 313 | # The kernel image (meta) package to be installed; "none" can be used if no 314 | # kernel is to be installed. 315 | #d-i base-installer/kernel/image string linux-image-686 316 | 317 | ### Apt setup 318 | # You can choose to install non-free and contrib software. 319 | #d-i apt-setup/non-free boolean true 320 | #d-i apt-setup/contrib boolean true 321 | # Uncomment this if you don't want to use a network mirror. 322 | #d-i apt-setup/use_mirror boolean false 323 | # Select which update services to use; define the mirrors to be used. 324 | # Values shown below are the normal defaults. 325 | #d-i apt-setup/services-select multiselect security, updates 326 | #d-i apt-setup/security_host string security.debian.org 327 | 328 | # Additional repositories, local[0-9] available 329 | #d-i apt-setup/local0/repository string \ 330 | # http://local.server/debian stable main 331 | #d-i apt-setup/local0/comment string local server 332 | # Enable deb-src lines 333 | #d-i apt-setup/local0/source boolean true 334 | # URL to the public key of the local repository; you must provide a key or 335 | # apt will complain about the unauthenticated repository and so the 336 | # sources.list line will be left commented out. 337 | #d-i apt-setup/local0/key string http://local.server/key 338 | # If the provided key file ends in ".asc" the key file needs to be an 339 | # ASCII-armoured PGP key, if it ends in ".gpg" it needs to use the 340 | # "GPG key public keyring" format, the "keybox database" format is 341 | # currently not supported. 342 | 343 | # By default the installer requires that repositories be authenticated 344 | # using a known gpg key. This setting can be used to disable that 345 | # authentication. Warning: Insecure, not recommended. 346 | #d-i debian-installer/allow_unauthenticated boolean true 347 | 348 | # Uncomment this to add multiarch configuration for i386 349 | #d-i apt-setup/multiarch string i386 350 | 351 | 352 | ### Package selection 353 | #tasksel tasksel/first multiselect standard, web-server, kde-desktop 354 | 355 | # Individual additional packages to install 356 | #d-i pkgsel/include string openssh-server build-essential 357 | # Whether to upgrade packages after debootstrap. 358 | # Allowed values: none, safe-upgrade, full-upgrade 359 | #d-i pkgsel/upgrade select none 360 | 361 | # Some versions of the installer can report back on what software you have 362 | # installed, and what software you use. The default is not to report back, 363 | # but sending reports helps the project determine what software is most 364 | # popular and should be included on the first CD/DVD. 365 | #popularity-contest popularity-contest/participate boolean false 366 | 367 | ### Boot loader installation 368 | # Grub is the boot loader (for x86). 369 | 370 | # This is fairly safe to set, it makes grub install automatically to the UEFI 371 | # partition/boot record if no other operating system is detected on the machine. 372 | #d-i grub-installer/only_debian boolean true 373 | 374 | # This one makes grub-installer install to the UEFI partition/boot record, if 375 | # it also finds some other OS, which is less safe as it might not be able to 376 | # boot that other OS. 377 | #d-i grub-installer/with_other_os boolean true 378 | 379 | # Due notably to potential USB sticks, the location of the primary drive can 380 | # not be determined safely in general, so this needs to be specified: 381 | #d-i grub-installer/bootdev string /dev/sda 382 | # To install to the primary device (assuming it is not a USB stick): 383 | #d-i grub-installer/bootdev string default 384 | 385 | # Alternatively, if you want to install to a location other than the UEFI 386 | # parition/boot record, uncomment and edit these lines: 387 | #d-i grub-installer/only_debian boolean false 388 | #d-i grub-installer/with_other_os boolean false 389 | #d-i grub-installer/bootdev string (hd0,1) 390 | # To install grub to multiple disks: 391 | #d-i grub-installer/bootdev string (hd0,1) (hd1,1) (hd2,1) 392 | 393 | # Optional password for grub, either in clear text 394 | #d-i grub-installer/password password r00tme 395 | #d-i grub-installer/password-again password r00tme 396 | # or encrypted using an MD5 hash, see grub-md5-crypt(8). 397 | #d-i grub-installer/password-crypted password [MD5 hash] 398 | 399 | # Use the following option to add additional boot parameters for the 400 | # installed system (if supported by the bootloader installer). 401 | # Note: options passed to the installer will be added automatically. 402 | #d-i debian-installer/add-kernel-opts string nousb 403 | 404 | ### Finishing up the installation 405 | # During installations from serial console, the regular virtual consoles 406 | # (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next 407 | # line to prevent this. 408 | #d-i finish-install/keep-consoles boolean true 409 | 410 | # Avoid that last message about the install being complete. 411 | #d-i finish-install/reboot_in_progress note 412 | 413 | # This will prevent the installer from ejecting the CD during the reboot, 414 | # which is useful in some situations. 415 | #d-i cdrom-detect/eject boolean false 416 | 417 | # This is how to make the installer shutdown when finished, but not 418 | # reboot into the installed system. 419 | #d-i debian-installer/exit/halt boolean true 420 | # This will power off the machine instead of just halting it. 421 | #d-i debian-installer/exit/poweroff boolean true 422 | 423 | ### Preseeding other packages 424 | # Depending on what software you choose to install, or if things go wrong 425 | # during the installation process, it's possible that other questions may 426 | # be asked. You can preseed those too, of course. To get a list of every 427 | # possible question that could be asked during an install, do an 428 | # installation, and then run these commands: 429 | # debconf-get-selections --installer > file 430 | # debconf-get-selections >> file 431 | 432 | 433 | #### Advanced options 434 | ### Running custom commands during the installation 435 | # d-i preseeding is inherently not secure. Nothing in the installer checks 436 | # for attempts at buffer overflows or other exploits of the values of a 437 | # preconfiguration file like this one. Only use preconfiguration files from 438 | # trusted locations! To drive that home, and because it's generally useful, 439 | # here's a way to run any shell command you'd like inside the installer, 440 | # automatically. 441 | 442 | # This first command is run as early as possible, just after 443 | # preseeding is read. 444 | #d-i preseed/early_command string anna-install some-udeb 445 | # This command is run immediately before the partitioner starts. It may be 446 | # useful to apply dynamic partitioner preseeding that depends on the state 447 | # of the disks (which may not be visible when preseed/early_command runs). 448 | #d-i partman/early_command \ 449 | # string debconf-set partman-auto/disk "$(list-devices disk | head -n1)" 450 | # This command is run just before the install finishes, but when there is 451 | # still a usable /target directory. You can chroot to /target and use it 452 | # directly, or use the apt-install and in-target commands to easily install 453 | # packages and run commands in the target system. 454 | #d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh 455 | 456 | -------------------------------------------------------------------------------- /Bookworm/startup.nsh: -------------------------------------------------------------------------------- 1 | fs0: 2 | cd EFI\debian 3 | grubx64.efi 4 | 5 | fs1: 6 | cd EFI\debian 7 | grubx64.efi 8 | 9 | fs2: 10 | cd EFI\debian 11 | grubx64.efi 12 | 13 | fs3: 14 | cd EFI\debian 15 | grubx64.efi 16 | 17 | fs4: 18 | cd EFI\debian 19 | grubx64.efi 20 | 21 | fs5: 22 | cd EFI\debian 23 | grubx64.efi -------------------------------------------------------------------------------- /Bullseye/.gitignore: -------------------------------------------------------------------------------- 1 | debian-files/* 2 | output/* 3 | payload/* -------------------------------------------------------------------------------- /Bullseye/generate_images.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ##RUN THIS AS SUDO OR ROOT 4 | 5 | ##requires gzip, rsync, wget, cpio, grub2, xorriso, gawk 6 | ##sudo apt-get install gzip rsync wget cpio grub2 xorriso gawk -y 7 | 8 | distro="bullseye" 9 | 10 | ####Prepare output directories#### 11 | mkdir debian-files output 12 | rm -r payload/ 13 | mkdir -p payload/source 14 | 15 | ####Clear tempfiles if applicable#### 16 | cd debian-files 17 | if [ -d "tmp" ]; then 18 | rm -r "tmp/" 19 | fi 20 | 21 | ####Download the latest distro netboot installer ISO#### 22 | wget -N "http://ftp.nl.debian.org/debian/dists/$distro/main/installer-amd64/current/images/netboot/mini.iso" 23 | cd .. 24 | 25 | ####Bring prerequisite files into the payload build directory#### 26 | cp preseed.cfg payload/ 27 | cp startup.nsh payload/ 28 | #cp ../../../*.sh payload/source/ 29 | #cp ../../../*.service payload/source/ 30 | #cp ../../../it8721.conf payload/source/ 31 | #cp -r ../../../micon_scripts payload/source/ 32 | #cp ../../../micro-evtd payload/source/ 33 | #cp -r ../../../Tools/modules payload/source/ 34 | 35 | ####Extract the netboot installer ISO#### 36 | xorriso -osirrox on -indev debian-files/mini.iso -extract / iso/ 37 | cp iso/initrd.gz . 38 | if [ $? -ne 0 ]; then 39 | echo "failed to retrieve initrd.gz, quitting" 40 | exit 41 | fi 42 | 43 | ####Get the netboot installer kernel version#### 44 | kernel_ver="$(zcat initrd.gz | cpio -t | grep -m 1 lib/modules/ | gawk -F/ '{print $3}')" 45 | 46 | ####Extract the initial ramdisk of the netboot installer#### 47 | gunzip initrd.gz 48 | if [ $? -ne 0 ]; then 49 | echo "failed to unpack initrd.gz, quitting" 50 | exit 51 | fi 52 | 53 | ####Modify the initial ramdisk#### 54 | cd payload 55 | find . | cpio -v -H newc -o -A -F ../initrd 56 | if [ $? -ne 0 ]; then 57 | echo "failed to patch initrd.gz, quitting" 58 | exit 59 | fi 60 | 61 | ####Repack the new initial ramdisk#### 62 | cd .. 63 | gzip initrd 64 | #cat initrd | xz --check=crc32 -9 > initrd.xz 65 | if [ $? -ne 0 ]; then 66 | echo "failed to pack initrd, quitting" 67 | exit 68 | fi 69 | 70 | ####Remove original GRUB files#### 71 | #rm -r iso/boot/grub/* 72 | 73 | ####Assemble some files for the new ISO#### 74 | cp initrd.gz iso/ 75 | cp grub.cfg iso/boot/grub/ 76 | #mkdir iso/EFI 77 | #cp startup.nsh iso/EFI 78 | 79 | ####Clear the final output directory#### 80 | rm output/* 81 | 82 | ####Build the new ISO using GRUB#### 83 | #grub-mkrescue -o "output/dx4000-$distro-installer.iso" iso/ 84 | 85 | ####Make a GRUB image#### 86 | #BOOT_IMG_DATA=$(mktemp -d) 87 | #BOOT_IMG=$(mktemp -d)/efi.img 88 | 89 | #mkdir -p $(dirname $BOOT_IMG) 90 | 91 | #truncate -s 8M $BOOT_IMG 92 | #mkfs.vfat $BOOT_IMG 93 | #mount $BOOT_IMG $BOOT_IMG_DATA 94 | #mkdir -p $BOOT_IMG_DATA/efi/boot 95 | 96 | #grub-mkimage \ 97 | # -C xz \ 98 | # -O x86_64-efi \ 99 | # -p /boot/grub \ 100 | # -o $BOOT_IMG_DATA/efi/boot/bootx64.efi \ 101 | # boot linux search normal configfile \ 102 | # part_gpt btrfs ext2 fat iso9660 loopback \ 103 | # test keystatus gfxmenu regexp probe \ 104 | # efi_gop efi_uga all_video gfxterm font \ 105 | # echo read ls cat png jpeg halt reboot 106 | 107 | #umount $BOOT_IMG_DATA 108 | #cp $BOOT_IMG . 109 | #rm -rf $BOOT_IMG_DATA 110 | 111 | ####Extract Debian's unused EFI raw image#### 112 | mkdir efimount 113 | mount debian-files/mini.iso efimount 114 | cp efimount/boot/grub/efi.img . 115 | umount efimount 116 | rmdir efimount 117 | 118 | ####Assemble ISO#### 119 | xorriso -as mkisofs \ 120 | -iso-level 3 \ 121 | -r -V "dx4000-$distro-installer" \ 122 | -J -joliet-long \ 123 | -append_partition 2 0xef efi.img \ 124 | -partition_cyl_align all \ 125 | -o "output/dx4000-$distro-installer.iso" \ 126 | iso/ 127 | 128 | ####Delete byproducts#### 129 | rm -r iso/ 130 | rm efi.img 131 | rm initrd.gz 132 | -------------------------------------------------------------------------------- /Bullseye/grub.cfg: -------------------------------------------------------------------------------- 1 | set timeout=5 2 | set default=0 3 | 4 | terminal_output gfxterm console 5 | 6 | menuentry "DX4000 Debian Installer" { 7 | linux /linux --- console=ttyS1,115200n8 8 | initrd /initrd.gz 9 | boot 10 | } -------------------------------------------------------------------------------- /Bullseye/preseed.cfg: -------------------------------------------------------------------------------- 1 | #_preseed_V1 2 | #### Contents of the preconfiguration file (for bullseye) 3 | ### Localization 4 | # Preseeding only locale sets language, country and locale. 5 | d-i debian-installer/locale string en_US 6 | 7 | # The values can also be preseeded individually for greater flexibility. 8 | #d-i debian-installer/language string en 9 | #d-i debian-installer/country string NL 10 | #d-i debian-installer/locale string en_GB.UTF-8 11 | # Optionally specify additional locales to be generated. 12 | #d-i localechooser/supported-locales multiselect en_US.UTF-8, nl_NL.UTF-8 13 | 14 | # Keyboard selection. 15 | d-i keyboard-configuration/xkb-keymap select us 16 | # d-i keyboard-configuration/toggle select No toggling 17 | 18 | ### Network configuration 19 | # Disable network configuration entirely. This is useful for cdrom 20 | # installations on non-networked devices where the network questions, 21 | # warning and long timeouts are a nuisance. 22 | #d-i netcfg/enable boolean false 23 | 24 | # netcfg will choose an interface that has link if possible. This makes it 25 | # skip displaying a list if there is more than one interface. 26 | d-i netcfg/choose_interface select auto 27 | 28 | # To pick a particular interface instead: 29 | #d-i netcfg/choose_interface select eth1 30 | 31 | # To set a different link detection timeout (default is 3 seconds). 32 | # Values are interpreted as seconds. 33 | d-i netcfg/link_wait_timeout string 10 34 | 35 | # If you have a slow dhcp server and the installer times out waiting for 36 | # it, this might be useful. 37 | d-i netcfg/dhcp_timeout string 60 38 | #d-i netcfg/dhcpv6_timeout string 60 39 | 40 | # If you prefer to configure the network manually, uncomment this line and 41 | # the static network configuration below. 42 | #d-i netcfg/disable_autoconfig boolean true 43 | 44 | # If you want the preconfiguration file to work on systems both with and 45 | # without a dhcp server, uncomment these lines and the static network 46 | # configuration below. 47 | #d-i netcfg/dhcp_failed note 48 | #d-i netcfg/dhcp_options select Configure network manually 49 | 50 | # Static network configuration. 51 | # 52 | # IPv4 example 53 | #d-i netcfg/get_ipaddress string 192.168.1.42 54 | #d-i netcfg/get_netmask string 255.255.255.0 55 | #d-i netcfg/get_gateway string 192.168.1.1 56 | #d-i netcfg/get_nameservers string 192.168.1.1 57 | #d-i netcfg/confirm_static boolean true 58 | # 59 | # IPv6 example 60 | #d-i netcfg/get_ipaddress string fc00::2 61 | #d-i netcfg/get_netmask string ffff:ffff:ffff:ffff:: 62 | #d-i netcfg/get_gateway string fc00::1 63 | #d-i netcfg/get_nameservers string fc00::1 64 | #d-i netcfg/confirm_static boolean true 65 | 66 | # Any hostname and domain names assigned from dhcp take precedence over 67 | # values set here. However, setting the values still prevents the questions 68 | # from being shown, even if values come from dhcp. 69 | d-i netcfg/get_hostname string debian 70 | d-i netcfg/get_domain string unassigned-domain 71 | 72 | # If you want to force a hostname, regardless of what either the DHCP 73 | # server returns or what the reverse DNS entry for the IP is, uncomment 74 | # and adjust the following line. 75 | #d-i netcfg/hostname string somehost 76 | 77 | # Disable that annoying WEP key dialog. 78 | d-i netcfg/wireless_wep string 79 | # The wacky dhcp hostname that some ISPs use as a password of sorts. 80 | #d-i netcfg/dhcp_hostname string radish 81 | 82 | # If non-free firmware is needed for the network or other hardware, you can 83 | # configure the installer to always try to load it, without prompting. Or 84 | # change to false to disable asking. 85 | #d-i hw-detect/load_firmware boolean true 86 | 87 | ### Network console 88 | # Use the following settings if you wish to make use of the network-console 89 | # component for remote installation over SSH. This only makes sense if you 90 | # intend to perform the remainder of the installation manually. 91 | d-i anna/choose_modules string network-console 92 | #d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key 93 | d-i network-console/password password dx4000 94 | d-i network-console/password-again password dx4000 95 | 96 | ### Mirror settings 97 | # If you select ftp, the mirror/country string does not need to be set. 98 | #d-i mirror/protocol string ftp 99 | d-i mirror/country string manual 100 | d-i mirror/http/hostname string http.us.debian.org 101 | d-i mirror/http/directory string /debian 102 | d-i mirror/http/proxy string 103 | 104 | # Suite to install. 105 | #d-i mirror/suite string testing 106 | # Suite to use for loading installer components (optional). 107 | #d-i mirror/udeb/suite string testing 108 | 109 | ### Account setup 110 | # Skip creation of a root account (normal user account will be able to 111 | # use sudo). 112 | #d-i passwd/root-login boolean false 113 | # Alternatively, to skip creation of a normal user account. 114 | #d-i passwd/make-user boolean false 115 | 116 | # Root password, either in clear text 117 | #d-i passwd/root-password password r00tme 118 | #d-i passwd/root-password-again password r00tme 119 | # or encrypted using a crypt(3) hash. 120 | #d-i passwd/root-password-crypted password [crypt(3) hash] 121 | 122 | # To create a normal user account. 123 | #d-i passwd/user-fullname string Debian User 124 | #d-i passwd/username string debian 125 | # Normal user's password, either in clear text 126 | #d-i passwd/user-password password insecure 127 | #d-i passwd/user-password-again password insecure 128 | # or encrypted using a crypt(3) hash. 129 | #d-i passwd/user-password-crypted password [crypt(3) hash] 130 | # Create the first user with the specified UID instead of the default. 131 | #d-i passwd/user-uid string 1010 132 | 133 | # The user account will be added to some standard initial groups. To 134 | # override that, use this. 135 | #d-i passwd/user-default-groups string audio cdrom video 136 | 137 | ### Clock and time zone setup 138 | # Controls whether or not the hardware clock is set to UTC. 139 | d-i clock-setup/utc boolean true 140 | 141 | # You may set this to any valid setting for $TZ; see the contents of 142 | # /usr/share/zoneinfo/ for valid values. 143 | #d-i time/zone string US/Eastern 144 | 145 | # Controls whether to use NTP to set the clock during the install 146 | d-i clock-setup/ntp boolean true 147 | # NTP server to use. The default is almost always fine here. 148 | #d-i clock-setup/ntp-server string ntp.example.com 149 | 150 | ### Partitioning 151 | ## Partitioning example 152 | # If the system has free space you can choose to only partition that space. 153 | # This is only honoured if partman-auto/method (below) is not set. 154 | #d-i partman-auto/init_automatically_partition select biggest_free 155 | 156 | # Alternatively, you may specify a disk to partition. If the system has only 157 | # one disk the installer will default to using that, but otherwise the device 158 | # name must be given in traditional, non-devfs format (so e.g. /dev/sda 159 | # and not e.g. /dev/discs/disc0/disc). 160 | # For example, to use the first SCSI/SATA hard disk: 161 | #d-i partman-auto/disk string /dev/sda 162 | # In addition, you'll need to specify the method to use. 163 | # The presently available methods are: 164 | # - regular: use the usual partition types for your architecture 165 | # - lvm: use LVM to partition the disk 166 | # - crypto: use LVM within an encrypted partition 167 | #d-i partman-auto/method string lvm 168 | 169 | # You can define the amount of space that will be used for the LVM volume 170 | # group. It can either be a size with its unit (eg. 20 GB), a percentage of 171 | # free space or the 'max' keyword. 172 | #d-i partman-auto-lvm/guided_size string max 173 | 174 | # If one of the disks that are going to be automatically partitioned 175 | # contains an old LVM configuration, the user will normally receive a 176 | # warning. This can be preseeded away... 177 | #d-i partman-lvm/device_remove_lvm boolean true 178 | # The same applies to pre-existing software RAID array: 179 | #d-i partman-md/device_remove_md boolean true 180 | # And the same goes for the confirmation to write the lvm partitions. 181 | #d-i partman-lvm/confirm boolean true 182 | #d-i partman-lvm/confirm_nooverwrite boolean true 183 | 184 | # You can choose one of the three predefined partitioning recipes: 185 | # - atomic: all files in one partition 186 | # - home: separate /home partition 187 | # - multi: separate /home, /var, and /tmp partitions 188 | d#-i partman-auto/choose_recipe select atomic 189 | 190 | # Or provide a recipe of your own... 191 | # If you have a way to get a recipe file into the d-i environment, you can 192 | # just point at it. 193 | #d-i partman-auto/expert_recipe_file string /hd-media/recipe 194 | 195 | # If not, you can put an entire recipe into the preconfiguration file in one 196 | # (logical) line. This example creates a small /boot partition, suitable 197 | # swap, and uses the rest of the space for the root partition: 198 | #d-i partman-auto/expert_recipe string \ 199 | # boot-root :: \ 200 | # 40 50 100 ext3 \ 201 | # $primary{ } $bootable{ } \ 202 | # method{ format } format{ } \ 203 | # use_filesystem{ } filesystem{ ext3 } \ 204 | # mountpoint{ /boot } \ 205 | # . \ 206 | # 500 10000 1000000000 ext3 \ 207 | # method{ format } format{ } \ 208 | # use_filesystem{ } filesystem{ ext3 } \ 209 | # mountpoint{ / } \ 210 | # . \ 211 | # 64 512 300% linux-swap \ 212 | # method{ swap } format{ } \ 213 | # . 214 | 215 | # The full recipe format is documented in the file partman-auto-recipe.txt 216 | # included in the 'debian-installer' package or available from D-I source 217 | # repository. This also documents how to specify settings such as file 218 | # system labels, volume group names and which physical devices to include 219 | # in a volume group. 220 | 221 | ## Partitioning for EFI 222 | # If your system needs an EFI partition you could add something like 223 | # this to the recipe above, as the first element in the recipe: 224 | # 538 538 1075 free \ 225 | # $iflabel{ gpt } \ 226 | # $reusemethod{ } \ 227 | # method{ efi } \ 228 | # format{ } \ 229 | # . \ 230 | # 231 | # The fragment above is for the amd64 architecture; the details may be 232 | # different on other architectures. The 'partman-auto' package in the 233 | # D-I source repository may have an example you can follow. 234 | 235 | # This makes partman automatically partition without confirmation, provided 236 | # that you told it what to do using one of the methods above. 237 | #d-i partman-partitioning/confirm_write_new_label boolean true 238 | #d-i partman/choose_partition select finish 239 | #d-i partman/confirm boolean true 240 | #d-i partman/confirm_nooverwrite boolean true 241 | 242 | # Force UEFI booting ('BIOS compatibility' will be lost). Default: false. 243 | #d-i partman-efi/non_efi_system boolean true 244 | # Ensure the partition table is GPT - this is required for EFI 245 | #d-i partman-partitioning/choose_label string gpt 246 | #d-i partman-partitioning/default_label string gpt 247 | 248 | # When disk encryption is enabled, skip wiping the partitions beforehand. 249 | #d-i partman-auto-crypto/erase_disks boolean false 250 | 251 | ## Partitioning using RAID 252 | # The method should be set to "raid". 253 | #d-i partman-auto/method string raid 254 | # Specify the disks to be partitioned. They will all get the same layout, 255 | # so this will only work if the disks are the same size. 256 | #d-i partman-auto/disk string /dev/sda /dev/sdb 257 | 258 | # Next you need to specify the physical partitions that will be used. 259 | #d-i partman-auto/expert_recipe string \ 260 | # multiraid :: \ 261 | # 1000 5000 4000 raid \ 262 | # $primary{ } method{ raid } \ 263 | # . \ 264 | # 64 512 300% raid \ 265 | # method{ raid } \ 266 | # . \ 267 | # 500 10000 1000000000 raid \ 268 | # method{ raid } \ 269 | # . 270 | 271 | # Last you need to specify how the previously defined partitions will be 272 | # used in the RAID setup. Remember to use the correct partition numbers 273 | # for logical partitions. RAID levels 0, 1, 5, 6 and 10 are supported; 274 | # devices are separated using "#". 275 | # Parameters are: 276 | # \ 277 | # 278 | 279 | #d-i partman-auto-raid/recipe string \ 280 | # 1 2 0 ext3 / \ 281 | # /dev/sda1#/dev/sdb1 \ 282 | # . \ 283 | # 1 2 0 swap - \ 284 | # /dev/sda5#/dev/sdb5 \ 285 | # . \ 286 | # 0 2 0 ext3 /home \ 287 | # /dev/sda6#/dev/sdb6 \ 288 | # . 289 | 290 | # For additional information see the file partman-auto-raid-recipe.txt 291 | # included in the 'debian-installer' package or available from D-I source 292 | # repository. 293 | 294 | # This makes partman automatically partition without confirmation. 295 | #d-i partman-md/confirm boolean true 296 | #d-i partman-partitioning/confirm_write_new_label boolean true 297 | #d-i partman/choose_partition select finish 298 | #d-i partman/confirm boolean true 299 | #d-i partman/confirm_nooverwrite boolean true 300 | 301 | ## Controlling how partitions are mounted 302 | # The default is to mount by UUID, but you can also choose "traditional" to 303 | # use traditional device names, or "label" to try filesystem labels before 304 | # falling back to UUIDs. 305 | #d-i partman/mount_style select uuid 306 | 307 | ### Base system installation 308 | # Configure APT to not install recommended packages by default. Use of this 309 | # option can result in an incomplete system and should only be used by very 310 | # experienced users. 311 | #d-i base-installer/install-recommends boolean false 312 | 313 | # The kernel image (meta) package to be installed; "none" can be used if no 314 | # kernel is to be installed. 315 | #d-i base-installer/kernel/image string linux-image-686 316 | 317 | ### Apt setup 318 | # You can choose to install non-free and contrib software. 319 | #d-i apt-setup/non-free boolean true 320 | #d-i apt-setup/contrib boolean true 321 | # Uncomment this if you don't want to use a network mirror. 322 | #d-i apt-setup/use_mirror boolean false 323 | # Select which update services to use; define the mirrors to be used. 324 | # Values shown below are the normal defaults. 325 | #d-i apt-setup/services-select multiselect security, updates 326 | #d-i apt-setup/security_host string security.debian.org 327 | 328 | # Additional repositories, local[0-9] available 329 | #d-i apt-setup/local0/repository string \ 330 | # http://local.server/debian stable main 331 | #d-i apt-setup/local0/comment string local server 332 | # Enable deb-src lines 333 | #d-i apt-setup/local0/source boolean true 334 | # URL to the public key of the local repository; you must provide a key or 335 | # apt will complain about the unauthenticated repository and so the 336 | # sources.list line will be left commented out. 337 | #d-i apt-setup/local0/key string http://local.server/key 338 | # If the provided key file ends in ".asc" the key file needs to be an 339 | # ASCII-armoured PGP key, if it ends in ".gpg" it needs to use the 340 | # "GPG key public keyring" format, the "keybox database" format is 341 | # currently not supported. 342 | 343 | # By default the installer requires that repositories be authenticated 344 | # using a known gpg key. This setting can be used to disable that 345 | # authentication. Warning: Insecure, not recommended. 346 | #d-i debian-installer/allow_unauthenticated boolean true 347 | 348 | # Uncomment this to add multiarch configuration for i386 349 | #d-i apt-setup/multiarch string i386 350 | 351 | 352 | ### Package selection 353 | #tasksel tasksel/first multiselect standard, web-server, kde-desktop 354 | 355 | # Individual additional packages to install 356 | #d-i pkgsel/include string openssh-server build-essential 357 | # Whether to upgrade packages after debootstrap. 358 | # Allowed values: none, safe-upgrade, full-upgrade 359 | #d-i pkgsel/upgrade select none 360 | 361 | # Some versions of the installer can report back on what software you have 362 | # installed, and what software you use. The default is not to report back, 363 | # but sending reports helps the project determine what software is most 364 | # popular and should be included on the first CD/DVD. 365 | #popularity-contest popularity-contest/participate boolean false 366 | 367 | ### Boot loader installation 368 | # Grub is the boot loader (for x86). 369 | 370 | # This is fairly safe to set, it makes grub install automatically to the UEFI 371 | # partition/boot record if no other operating system is detected on the machine. 372 | #d-i grub-installer/only_debian boolean true 373 | 374 | # This one makes grub-installer install to the UEFI partition/boot record, if 375 | # it also finds some other OS, which is less safe as it might not be able to 376 | # boot that other OS. 377 | #d-i grub-installer/with_other_os boolean true 378 | 379 | # Due notably to potential USB sticks, the location of the primary drive can 380 | # not be determined safely in general, so this needs to be specified: 381 | #d-i grub-installer/bootdev string /dev/sda 382 | # To install to the primary device (assuming it is not a USB stick): 383 | #d-i grub-installer/bootdev string default 384 | 385 | # Alternatively, if you want to install to a location other than the UEFI 386 | # parition/boot record, uncomment and edit these lines: 387 | #d-i grub-installer/only_debian boolean false 388 | #d-i grub-installer/with_other_os boolean false 389 | #d-i grub-installer/bootdev string (hd0,1) 390 | # To install grub to multiple disks: 391 | #d-i grub-installer/bootdev string (hd0,1) (hd1,1) (hd2,1) 392 | 393 | # Optional password for grub, either in clear text 394 | #d-i grub-installer/password password r00tme 395 | #d-i grub-installer/password-again password r00tme 396 | # or encrypted using an MD5 hash, see grub-md5-crypt(8). 397 | #d-i grub-installer/password-crypted password [MD5 hash] 398 | 399 | # Use the following option to add additional boot parameters for the 400 | # installed system (if supported by the bootloader installer). 401 | # Note: options passed to the installer will be added automatically. 402 | #d-i debian-installer/add-kernel-opts string nousb 403 | 404 | ### Finishing up the installation 405 | # During installations from serial console, the regular virtual consoles 406 | # (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next 407 | # line to prevent this. 408 | #d-i finish-install/keep-consoles boolean true 409 | 410 | # Avoid that last message about the install being complete. 411 | #d-i finish-install/reboot_in_progress note 412 | 413 | # This will prevent the installer from ejecting the CD during the reboot, 414 | # which is useful in some situations. 415 | #d-i cdrom-detect/eject boolean false 416 | 417 | # This is how to make the installer shutdown when finished, but not 418 | # reboot into the installed system. 419 | #d-i debian-installer/exit/halt boolean true 420 | # This will power off the machine instead of just halting it. 421 | #d-i debian-installer/exit/poweroff boolean true 422 | 423 | ### Preseeding other packages 424 | # Depending on what software you choose to install, or if things go wrong 425 | # during the installation process, it's possible that other questions may 426 | # be asked. You can preseed those too, of course. To get a list of every 427 | # possible question that could be asked during an install, do an 428 | # installation, and then run these commands: 429 | # debconf-get-selections --installer > file 430 | # debconf-get-selections >> file 431 | 432 | 433 | #### Advanced options 434 | ### Running custom commands during the installation 435 | # d-i preseeding is inherently not secure. Nothing in the installer checks 436 | # for attempts at buffer overflows or other exploits of the values of a 437 | # preconfiguration file like this one. Only use preconfiguration files from 438 | # trusted locations! To drive that home, and because it's generally useful, 439 | # here's a way to run any shell command you'd like inside the installer, 440 | # automatically. 441 | 442 | # This first command is run as early as possible, just after 443 | # preseeding is read. 444 | #d-i preseed/early_command string anna-install some-udeb 445 | # This command is run immediately before the partitioner starts. It may be 446 | # useful to apply dynamic partitioner preseeding that depends on the state 447 | # of the disks (which may not be visible when preseed/early_command runs). 448 | #d-i partman/early_command \ 449 | # string debconf-set partman-auto/disk "$(list-devices disk | head -n1)" 450 | # This command is run just before the install finishes, but when there is 451 | # still a usable /target directory. You can chroot to /target and use it 452 | # directly, or use the apt-install and in-target commands to easily install 453 | # packages and run commands in the target system. 454 | #d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh 455 | 456 | -------------------------------------------------------------------------------- /Bullseye/startup.nsh: -------------------------------------------------------------------------------- 1 | fs0: 2 | cd EFI\debian 3 | grubx64.efi 4 | 5 | fs1: 6 | cd EFI\debian 7 | grubx64.efi 8 | 9 | fs2: 10 | cd EFI\debian 11 | grubx64.efi 12 | 13 | fs3: 14 | cd EFI\debian 15 | grubx64.efi 16 | 17 | fs4: 18 | cd EFI\debian 19 | grubx64.efi 20 | 21 | fs5: 22 | cd EFI\debian 23 | grubx64.efi -------------------------------------------------------------------------------- /Buster/.gitignore: -------------------------------------------------------------------------------- 1 | debian-files/* 2 | output/* 3 | payload/* -------------------------------------------------------------------------------- /Buster/generate_images.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ##RUN THIS AS SUDO OR ROOT 4 | 5 | ##requires gzip, rsync, wget, cpio, grub2, xorriso, gawk 6 | ##sudo apt-get install gzip rsync wget cpio grub2 xorriso gawk -y 7 | 8 | distro="buster" 9 | 10 | ####Prepare output directories#### 11 | mkdir debian-files output 12 | rm -r payload/ 13 | mkdir -p payload/source 14 | 15 | ####Clear tempfiles if applicable#### 16 | cd debian-files 17 | if [ -d "tmp" ]; then 18 | rm -r "tmp/" 19 | fi 20 | 21 | ####Download the latest distro netboot installer ISO#### 22 | wget -N "http://ftp.nl.debian.org/debian/dists/$distro/main/installer-amd64/current/images/netboot/mini.iso" 23 | cd .. 24 | 25 | ####Bring prerequisite files into the payload build directory#### 26 | cp preseed.cfg payload/ 27 | cp startup.nsh payload/ 28 | #cp ../../../*.sh payload/source/ 29 | #cp ../../../*.service payload/source/ 30 | #cp ../../../it8721.conf payload/source/ 31 | #cp -r ../../../micon_scripts payload/source/ 32 | #cp ../../../micro-evtd payload/source/ 33 | #cp -r ../../../Tools/modules payload/source/ 34 | 35 | ####Extract the netboot installer ISO#### 36 | xorriso -osirrox on -indev debian-files/mini.iso -extract / iso/ 37 | cp iso/initrd.gz . 38 | if [ $? -ne 0 ]; then 39 | echo "failed to retrieve initrd.gz, quitting" 40 | exit 41 | fi 42 | 43 | ####Get the netboot installer kernel version#### 44 | kernel_ver="$(zcat initrd.gz | cpio -t | grep -m 1 lib/modules/ | gawk -F/ '{print $3}')" 45 | 46 | ####Extract the initial ramdisk of the netboot installer#### 47 | gunzip initrd.gz 48 | if [ $? -ne 0 ]; then 49 | echo "failed to unpack initrd.gz, quitting" 50 | exit 51 | fi 52 | 53 | ####Modify the initial ramdisk#### 54 | cd payload 55 | find . | cpio -v -H newc -o -A -F ../initrd 56 | if [ $? -ne 0 ]; then 57 | echo "failed to patch initrd.gz, quitting" 58 | exit 59 | fi 60 | 61 | ####Repack the new initial ramdisk#### 62 | cd .. 63 | gzip initrd 64 | #cat initrd | xz --check=crc32 -9 > initrd.xz 65 | if [ $? -ne 0 ]; then 66 | echo "failed to pack initrd, quitting" 67 | exit 68 | fi 69 | 70 | ####Remove original GRUB files#### 71 | #rm -r iso/boot/grub/* 72 | 73 | ####Assemble some files for the new ISO#### 74 | cp initrd.gz iso/ 75 | cp grub.cfg iso/boot/grub/ 76 | #mkdir iso/EFI 77 | #cp startup.nsh iso/EFI 78 | 79 | ####Clear the final output directory#### 80 | rm output/* 81 | 82 | ####Build the new ISO using GRUB#### 83 | #grub-mkrescue -o "output/dx4000-$distro-installer.iso" iso/ 84 | 85 | ####Make a GRUB image#### 86 | #BOOT_IMG_DATA=$(mktemp -d) 87 | #BOOT_IMG=$(mktemp -d)/efi.img 88 | 89 | #mkdir -p $(dirname $BOOT_IMG) 90 | 91 | #truncate -s 8M $BOOT_IMG 92 | #mkfs.vfat $BOOT_IMG 93 | #mount $BOOT_IMG $BOOT_IMG_DATA 94 | #mkdir -p $BOOT_IMG_DATA/efi/boot 95 | 96 | #grub-mkimage \ 97 | # -C xz \ 98 | # -O x86_64-efi \ 99 | # -p /boot/grub \ 100 | # -o $BOOT_IMG_DATA/efi/boot/bootx64.efi \ 101 | # boot linux search normal configfile \ 102 | # part_gpt btrfs ext2 fat iso9660 loopback \ 103 | # test keystatus gfxmenu regexp probe \ 104 | # efi_gop efi_uga all_video gfxterm font \ 105 | # echo read ls cat png jpeg halt reboot 106 | 107 | #umount $BOOT_IMG_DATA 108 | #cp $BOOT_IMG . 109 | #rm -rf $BOOT_IMG_DATA 110 | 111 | ####Extract Debian's unused EFI raw image#### 112 | mkdir efimount 113 | mount debian-files/mini.iso efimount 114 | cp efimount/boot/grub/efi.img . 115 | umount efimount 116 | rmdir efimount 117 | 118 | ####Assemble ISO#### 119 | xorriso -as mkisofs \ 120 | -iso-level 3 \ 121 | -r -V "dx4000-$distro-installer" \ 122 | -J -joliet-long \ 123 | -append_partition 2 0xef efi.img \ 124 | -partition_cyl_align all \ 125 | -o "output/dx4000-$distro-installer.iso" \ 126 | iso/ 127 | 128 | ####Delete byproducts#### 129 | rm -r iso/ 130 | rm efi.img 131 | rm initrd.gz 132 | -------------------------------------------------------------------------------- /Buster/grub.cfg: -------------------------------------------------------------------------------- 1 | set timeout=5 2 | set default=0 3 | 4 | terminal_output gfxterm console 5 | 6 | menuentry "DX4000 Debian Installer" { 7 | linux /linux --- console=ttyS1,115200n8 8 | initrd /initrd.gz 9 | boot 10 | } -------------------------------------------------------------------------------- /Buster/preseed.cfg: -------------------------------------------------------------------------------- 1 | #_preseed_V1 2 | #### Contents of the preconfiguration file (for bullseye) 3 | ### Localization 4 | # Preseeding only locale sets language, country and locale. 5 | d-i debian-installer/locale string en_US 6 | 7 | # The values can also be preseeded individually for greater flexibility. 8 | #d-i debian-installer/language string en 9 | #d-i debian-installer/country string NL 10 | #d-i debian-installer/locale string en_GB.UTF-8 11 | # Optionally specify additional locales to be generated. 12 | #d-i localechooser/supported-locales multiselect en_US.UTF-8, nl_NL.UTF-8 13 | 14 | # Keyboard selection. 15 | d-i keyboard-configuration/xkb-keymap select us 16 | # d-i keyboard-configuration/toggle select No toggling 17 | 18 | ### Network configuration 19 | # Disable network configuration entirely. This is useful for cdrom 20 | # installations on non-networked devices where the network questions, 21 | # warning and long timeouts are a nuisance. 22 | #d-i netcfg/enable boolean false 23 | 24 | # netcfg will choose an interface that has link if possible. This makes it 25 | # skip displaying a list if there is more than one interface. 26 | d-i netcfg/choose_interface select auto 27 | 28 | # To pick a particular interface instead: 29 | #d-i netcfg/choose_interface select eth1 30 | 31 | # To set a different link detection timeout (default is 3 seconds). 32 | # Values are interpreted as seconds. 33 | d-i netcfg/link_wait_timeout string 10 34 | 35 | # If you have a slow dhcp server and the installer times out waiting for 36 | # it, this might be useful. 37 | d-i netcfg/dhcp_timeout string 60 38 | #d-i netcfg/dhcpv6_timeout string 60 39 | 40 | # If you prefer to configure the network manually, uncomment this line and 41 | # the static network configuration below. 42 | #d-i netcfg/disable_autoconfig boolean true 43 | 44 | # If you want the preconfiguration file to work on systems both with and 45 | # without a dhcp server, uncomment these lines and the static network 46 | # configuration below. 47 | #d-i netcfg/dhcp_failed note 48 | #d-i netcfg/dhcp_options select Configure network manually 49 | 50 | # Static network configuration. 51 | # 52 | # IPv4 example 53 | #d-i netcfg/get_ipaddress string 192.168.1.42 54 | #d-i netcfg/get_netmask string 255.255.255.0 55 | #d-i netcfg/get_gateway string 192.168.1.1 56 | #d-i netcfg/get_nameservers string 192.168.1.1 57 | #d-i netcfg/confirm_static boolean true 58 | # 59 | # IPv6 example 60 | #d-i netcfg/get_ipaddress string fc00::2 61 | #d-i netcfg/get_netmask string ffff:ffff:ffff:ffff:: 62 | #d-i netcfg/get_gateway string fc00::1 63 | #d-i netcfg/get_nameservers string fc00::1 64 | #d-i netcfg/confirm_static boolean true 65 | 66 | # Any hostname and domain names assigned from dhcp take precedence over 67 | # values set here. However, setting the values still prevents the questions 68 | # from being shown, even if values come from dhcp. 69 | d-i netcfg/get_hostname string debian 70 | d-i netcfg/get_domain string unassigned-domain 71 | 72 | # If you want to force a hostname, regardless of what either the DHCP 73 | # server returns or what the reverse DNS entry for the IP is, uncomment 74 | # and adjust the following line. 75 | #d-i netcfg/hostname string somehost 76 | 77 | # Disable that annoying WEP key dialog. 78 | d-i netcfg/wireless_wep string 79 | # The wacky dhcp hostname that some ISPs use as a password of sorts. 80 | #d-i netcfg/dhcp_hostname string radish 81 | 82 | # If non-free firmware is needed for the network or other hardware, you can 83 | # configure the installer to always try to load it, without prompting. Or 84 | # change to false to disable asking. 85 | #d-i hw-detect/load_firmware boolean true 86 | 87 | ### Network console 88 | # Use the following settings if you wish to make use of the network-console 89 | # component for remote installation over SSH. This only makes sense if you 90 | # intend to perform the remainder of the installation manually. 91 | d-i anna/choose_modules string network-console 92 | #d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key 93 | d-i network-console/password password dx4000 94 | d-i network-console/password-again password dx4000 95 | 96 | ### Mirror settings 97 | # If you select ftp, the mirror/country string does not need to be set. 98 | #d-i mirror/protocol string ftp 99 | d-i mirror/country string manual 100 | d-i mirror/http/hostname string http.us.debian.org 101 | d-i mirror/http/directory string /debian 102 | d-i mirror/http/proxy string 103 | 104 | # Suite to install. 105 | #d-i mirror/suite string testing 106 | # Suite to use for loading installer components (optional). 107 | #d-i mirror/udeb/suite string testing 108 | 109 | ### Account setup 110 | # Skip creation of a root account (normal user account will be able to 111 | # use sudo). 112 | #d-i passwd/root-login boolean false 113 | # Alternatively, to skip creation of a normal user account. 114 | #d-i passwd/make-user boolean false 115 | 116 | # Root password, either in clear text 117 | #d-i passwd/root-password password r00tme 118 | #d-i passwd/root-password-again password r00tme 119 | # or encrypted using a crypt(3) hash. 120 | #d-i passwd/root-password-crypted password [crypt(3) hash] 121 | 122 | # To create a normal user account. 123 | #d-i passwd/user-fullname string Debian User 124 | #d-i passwd/username string debian 125 | # Normal user's password, either in clear text 126 | #d-i passwd/user-password password insecure 127 | #d-i passwd/user-password-again password insecure 128 | # or encrypted using a crypt(3) hash. 129 | #d-i passwd/user-password-crypted password [crypt(3) hash] 130 | # Create the first user with the specified UID instead of the default. 131 | #d-i passwd/user-uid string 1010 132 | 133 | # The user account will be added to some standard initial groups. To 134 | # override that, use this. 135 | #d-i passwd/user-default-groups string audio cdrom video 136 | 137 | ### Clock and time zone setup 138 | # Controls whether or not the hardware clock is set to UTC. 139 | d-i clock-setup/utc boolean true 140 | 141 | # You may set this to any valid setting for $TZ; see the contents of 142 | # /usr/share/zoneinfo/ for valid values. 143 | #d-i time/zone string US/Eastern 144 | 145 | # Controls whether to use NTP to set the clock during the install 146 | d-i clock-setup/ntp boolean true 147 | # NTP server to use. The default is almost always fine here. 148 | #d-i clock-setup/ntp-server string ntp.example.com 149 | 150 | ### Partitioning 151 | ## Partitioning example 152 | # If the system has free space you can choose to only partition that space. 153 | # This is only honoured if partman-auto/method (below) is not set. 154 | #d-i partman-auto/init_automatically_partition select biggest_free 155 | 156 | # Alternatively, you may specify a disk to partition. If the system has only 157 | # one disk the installer will default to using that, but otherwise the device 158 | # name must be given in traditional, non-devfs format (so e.g. /dev/sda 159 | # and not e.g. /dev/discs/disc0/disc). 160 | # For example, to use the first SCSI/SATA hard disk: 161 | #d-i partman-auto/disk string /dev/sda 162 | # In addition, you'll need to specify the method to use. 163 | # The presently available methods are: 164 | # - regular: use the usual partition types for your architecture 165 | # - lvm: use LVM to partition the disk 166 | # - crypto: use LVM within an encrypted partition 167 | #d-i partman-auto/method string lvm 168 | 169 | # You can define the amount of space that will be used for the LVM volume 170 | # group. It can either be a size with its unit (eg. 20 GB), a percentage of 171 | # free space or the 'max' keyword. 172 | #d-i partman-auto-lvm/guided_size string max 173 | 174 | # If one of the disks that are going to be automatically partitioned 175 | # contains an old LVM configuration, the user will normally receive a 176 | # warning. This can be preseeded away... 177 | #d-i partman-lvm/device_remove_lvm boolean true 178 | # The same applies to pre-existing software RAID array: 179 | #d-i partman-md/device_remove_md boolean true 180 | # And the same goes for the confirmation to write the lvm partitions. 181 | #d-i partman-lvm/confirm boolean true 182 | #d-i partman-lvm/confirm_nooverwrite boolean true 183 | 184 | # You can choose one of the three predefined partitioning recipes: 185 | # - atomic: all files in one partition 186 | # - home: separate /home partition 187 | # - multi: separate /home, /var, and /tmp partitions 188 | d#-i partman-auto/choose_recipe select atomic 189 | 190 | # Or provide a recipe of your own... 191 | # If you have a way to get a recipe file into the d-i environment, you can 192 | # just point at it. 193 | #d-i partman-auto/expert_recipe_file string /hd-media/recipe 194 | 195 | # If not, you can put an entire recipe into the preconfiguration file in one 196 | # (logical) line. This example creates a small /boot partition, suitable 197 | # swap, and uses the rest of the space for the root partition: 198 | #d-i partman-auto/expert_recipe string \ 199 | # boot-root :: \ 200 | # 40 50 100 ext3 \ 201 | # $primary{ } $bootable{ } \ 202 | # method{ format } format{ } \ 203 | # use_filesystem{ } filesystem{ ext3 } \ 204 | # mountpoint{ /boot } \ 205 | # . \ 206 | # 500 10000 1000000000 ext3 \ 207 | # method{ format } format{ } \ 208 | # use_filesystem{ } filesystem{ ext3 } \ 209 | # mountpoint{ / } \ 210 | # . \ 211 | # 64 512 300% linux-swap \ 212 | # method{ swap } format{ } \ 213 | # . 214 | 215 | # The full recipe format is documented in the file partman-auto-recipe.txt 216 | # included in the 'debian-installer' package or available from D-I source 217 | # repository. This also documents how to specify settings such as file 218 | # system labels, volume group names and which physical devices to include 219 | # in a volume group. 220 | 221 | ## Partitioning for EFI 222 | # If your system needs an EFI partition you could add something like 223 | # this to the recipe above, as the first element in the recipe: 224 | # 538 538 1075 free \ 225 | # $iflabel{ gpt } \ 226 | # $reusemethod{ } \ 227 | # method{ efi } \ 228 | # format{ } \ 229 | # . \ 230 | # 231 | # The fragment above is for the amd64 architecture; the details may be 232 | # different on other architectures. The 'partman-auto' package in the 233 | # D-I source repository may have an example you can follow. 234 | 235 | # This makes partman automatically partition without confirmation, provided 236 | # that you told it what to do using one of the methods above. 237 | #d-i partman-partitioning/confirm_write_new_label boolean true 238 | #d-i partman/choose_partition select finish 239 | #d-i partman/confirm boolean true 240 | #d-i partman/confirm_nooverwrite boolean true 241 | 242 | # Force UEFI booting ('BIOS compatibility' will be lost). Default: false. 243 | #d-i partman-efi/non_efi_system boolean true 244 | # Ensure the partition table is GPT - this is required for EFI 245 | #d-i partman-partitioning/choose_label string gpt 246 | #d-i partman-partitioning/default_label string gpt 247 | 248 | # When disk encryption is enabled, skip wiping the partitions beforehand. 249 | #d-i partman-auto-crypto/erase_disks boolean false 250 | 251 | ## Partitioning using RAID 252 | # The method should be set to "raid". 253 | #d-i partman-auto/method string raid 254 | # Specify the disks to be partitioned. They will all get the same layout, 255 | # so this will only work if the disks are the same size. 256 | #d-i partman-auto/disk string /dev/sda /dev/sdb 257 | 258 | # Next you need to specify the physical partitions that will be used. 259 | #d-i partman-auto/expert_recipe string \ 260 | # multiraid :: \ 261 | # 1000 5000 4000 raid \ 262 | # $primary{ } method{ raid } \ 263 | # . \ 264 | # 64 512 300% raid \ 265 | # method{ raid } \ 266 | # . \ 267 | # 500 10000 1000000000 raid \ 268 | # method{ raid } \ 269 | # . 270 | 271 | # Last you need to specify how the previously defined partitions will be 272 | # used in the RAID setup. Remember to use the correct partition numbers 273 | # for logical partitions. RAID levels 0, 1, 5, 6 and 10 are supported; 274 | # devices are separated using "#". 275 | # Parameters are: 276 | # \ 277 | # 278 | 279 | #d-i partman-auto-raid/recipe string \ 280 | # 1 2 0 ext3 / \ 281 | # /dev/sda1#/dev/sdb1 \ 282 | # . \ 283 | # 1 2 0 swap - \ 284 | # /dev/sda5#/dev/sdb5 \ 285 | # . \ 286 | # 0 2 0 ext3 /home \ 287 | # /dev/sda6#/dev/sdb6 \ 288 | # . 289 | 290 | # For additional information see the file partman-auto-raid-recipe.txt 291 | # included in the 'debian-installer' package or available from D-I source 292 | # repository. 293 | 294 | # This makes partman automatically partition without confirmation. 295 | #d-i partman-md/confirm boolean true 296 | #d-i partman-partitioning/confirm_write_new_label boolean true 297 | #d-i partman/choose_partition select finish 298 | #d-i partman/confirm boolean true 299 | #d-i partman/confirm_nooverwrite boolean true 300 | 301 | ## Controlling how partitions are mounted 302 | # The default is to mount by UUID, but you can also choose "traditional" to 303 | # use traditional device names, or "label" to try filesystem labels before 304 | # falling back to UUIDs. 305 | #d-i partman/mount_style select uuid 306 | 307 | ### Base system installation 308 | # Configure APT to not install recommended packages by default. Use of this 309 | # option can result in an incomplete system and should only be used by very 310 | # experienced users. 311 | #d-i base-installer/install-recommends boolean false 312 | 313 | # The kernel image (meta) package to be installed; "none" can be used if no 314 | # kernel is to be installed. 315 | #d-i base-installer/kernel/image string linux-image-686 316 | 317 | ### Apt setup 318 | # You can choose to install non-free and contrib software. 319 | #d-i apt-setup/non-free boolean true 320 | #d-i apt-setup/contrib boolean true 321 | # Uncomment this if you don't want to use a network mirror. 322 | #d-i apt-setup/use_mirror boolean false 323 | # Select which update services to use; define the mirrors to be used. 324 | # Values shown below are the normal defaults. 325 | #d-i apt-setup/services-select multiselect security, updates 326 | #d-i apt-setup/security_host string security.debian.org 327 | 328 | # Additional repositories, local[0-9] available 329 | #d-i apt-setup/local0/repository string \ 330 | # http://local.server/debian stable main 331 | #d-i apt-setup/local0/comment string local server 332 | # Enable deb-src lines 333 | #d-i apt-setup/local0/source boolean true 334 | # URL to the public key of the local repository; you must provide a key or 335 | # apt will complain about the unauthenticated repository and so the 336 | # sources.list line will be left commented out. 337 | #d-i apt-setup/local0/key string http://local.server/key 338 | # If the provided key file ends in ".asc" the key file needs to be an 339 | # ASCII-armoured PGP key, if it ends in ".gpg" it needs to use the 340 | # "GPG key public keyring" format, the "keybox database" format is 341 | # currently not supported. 342 | 343 | # By default the installer requires that repositories be authenticated 344 | # using a known gpg key. This setting can be used to disable that 345 | # authentication. Warning: Insecure, not recommended. 346 | #d-i debian-installer/allow_unauthenticated boolean true 347 | 348 | # Uncomment this to add multiarch configuration for i386 349 | #d-i apt-setup/multiarch string i386 350 | 351 | 352 | ### Package selection 353 | #tasksel tasksel/first multiselect standard, web-server, kde-desktop 354 | 355 | # Individual additional packages to install 356 | #d-i pkgsel/include string openssh-server build-essential 357 | # Whether to upgrade packages after debootstrap. 358 | # Allowed values: none, safe-upgrade, full-upgrade 359 | #d-i pkgsel/upgrade select none 360 | 361 | # Some versions of the installer can report back on what software you have 362 | # installed, and what software you use. The default is not to report back, 363 | # but sending reports helps the project determine what software is most 364 | # popular and should be included on the first CD/DVD. 365 | #popularity-contest popularity-contest/participate boolean false 366 | 367 | ### Boot loader installation 368 | # Grub is the boot loader (for x86). 369 | 370 | # This is fairly safe to set, it makes grub install automatically to the UEFI 371 | # partition/boot record if no other operating system is detected on the machine. 372 | #d-i grub-installer/only_debian boolean true 373 | 374 | # This one makes grub-installer install to the UEFI partition/boot record, if 375 | # it also finds some other OS, which is less safe as it might not be able to 376 | # boot that other OS. 377 | #d-i grub-installer/with_other_os boolean true 378 | 379 | # Due notably to potential USB sticks, the location of the primary drive can 380 | # not be determined safely in general, so this needs to be specified: 381 | #d-i grub-installer/bootdev string /dev/sda 382 | # To install to the primary device (assuming it is not a USB stick): 383 | #d-i grub-installer/bootdev string default 384 | 385 | # Alternatively, if you want to install to a location other than the UEFI 386 | # parition/boot record, uncomment and edit these lines: 387 | #d-i grub-installer/only_debian boolean false 388 | #d-i grub-installer/with_other_os boolean false 389 | #d-i grub-installer/bootdev string (hd0,1) 390 | # To install grub to multiple disks: 391 | #d-i grub-installer/bootdev string (hd0,1) (hd1,1) (hd2,1) 392 | 393 | # Optional password for grub, either in clear text 394 | #d-i grub-installer/password password r00tme 395 | #d-i grub-installer/password-again password r00tme 396 | # or encrypted using an MD5 hash, see grub-md5-crypt(8). 397 | #d-i grub-installer/password-crypted password [MD5 hash] 398 | 399 | # Use the following option to add additional boot parameters for the 400 | # installed system (if supported by the bootloader installer). 401 | # Note: options passed to the installer will be added automatically. 402 | #d-i debian-installer/add-kernel-opts string nousb 403 | 404 | ### Finishing up the installation 405 | # During installations from serial console, the regular virtual consoles 406 | # (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next 407 | # line to prevent this. 408 | #d-i finish-install/keep-consoles boolean true 409 | 410 | # Avoid that last message about the install being complete. 411 | #d-i finish-install/reboot_in_progress note 412 | 413 | # This will prevent the installer from ejecting the CD during the reboot, 414 | # which is useful in some situations. 415 | #d-i cdrom-detect/eject boolean false 416 | 417 | # This is how to make the installer shutdown when finished, but not 418 | # reboot into the installed system. 419 | #d-i debian-installer/exit/halt boolean true 420 | # This will power off the machine instead of just halting it. 421 | #d-i debian-installer/exit/poweroff boolean true 422 | 423 | ### Preseeding other packages 424 | # Depending on what software you choose to install, or if things go wrong 425 | # during the installation process, it's possible that other questions may 426 | # be asked. You can preseed those too, of course. To get a list of every 427 | # possible question that could be asked during an install, do an 428 | # installation, and then run these commands: 429 | # debconf-get-selections --installer > file 430 | # debconf-get-selections >> file 431 | 432 | 433 | #### Advanced options 434 | ### Running custom commands during the installation 435 | # d-i preseeding is inherently not secure. Nothing in the installer checks 436 | # for attempts at buffer overflows or other exploits of the values of a 437 | # preconfiguration file like this one. Only use preconfiguration files from 438 | # trusted locations! To drive that home, and because it's generally useful, 439 | # here's a way to run any shell command you'd like inside the installer, 440 | # automatically. 441 | 442 | # This first command is run as early as possible, just after 443 | # preseeding is read. 444 | #d-i preseed/early_command string anna-install some-udeb 445 | # This command is run immediately before the partitioner starts. It may be 446 | # useful to apply dynamic partitioner preseeding that depends on the state 447 | # of the disks (which may not be visible when preseed/early_command runs). 448 | #d-i partman/early_command \ 449 | # string debconf-set partman-auto/disk "$(list-devices disk | head -n1)" 450 | # This command is run just before the install finishes, but when there is 451 | # still a usable /target directory. You can chroot to /target and use it 452 | # directly, or use the apt-install and in-target commands to easily install 453 | # packages and run commands in the target system. 454 | #d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh 455 | 456 | -------------------------------------------------------------------------------- /Buster/startup.nsh: -------------------------------------------------------------------------------- 1 | fs0: 2 | cd EFI\debian 3 | grubx64.efi 4 | 5 | fs1: 6 | cd EFI\debian 7 | grubx64.efi 8 | 9 | fs2: 10 | cd EFI\debian 11 | grubx64.efi 12 | 13 | fs3: 14 | cd EFI\debian 15 | grubx64.efi 16 | 17 | fs4: 18 | cd EFI\debian 19 | grubx64.efi 20 | 21 | fs5: 22 | cd EFI\debian 23 | grubx64.efi -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WD-DX4000-Installer 2 | ## A solderless Debian installer for the WD DX4000. No case removal, soldering or serial ports required! 3 | 4 | Work In Progress 5 | 6 | # Please use the prebuilt ISOs under Releases if you don't know what you're doing. If you do know what you're doing and want to use the scripts to assemble your own images, please test the prebuilt ISOs before reporting issues, and include the results! https://github.com/alexhorner/WD-DX4000-Installer/tags 7 | 8 | --- 9 | 10 | ## Troubleshooting 11 | ### Kernel modules error message 12 | ![image](https://github.com/alexhorner/WD-DX4000-Installer/assets/33007665/ce344fb8-ad4c-4d92-ab6b-72848cb2dab4) 13 | 14 | If you encounter this error page, please open an issue. This is caused by Debian removing kernel modules from their archive repository, and requires a refreshed ISO file to be built and released by myself. 15 | 16 | ### Pings but won't SSH 17 | If you encounter this problem, please open an issue. I haven't checked what causes this, but I have found it is similar to the Kernel modules error message, and requires a refreshed ISO file to be built and released by myself. 18 | 19 | --- 20 | 21 | Credit goes to @1000001101000 for https://github.com/1000001101000/Debian_on_Intel_Terastations/ 22 | 23 | --- 24 | 25 | The released version is a prerelease, however it should be suitable for production use. The difference between this prerelease and the intended final product will be automation of certain tasks which usually require manual work, namely: 26 | - LCDProc for LCD control 27 | - Fancontrol 28 | - Automated startup script placement (explained below) 29 | 30 | The final installer will also have some useful features like displaying the IP address on the network on the LCD during the installer and showing the current installer status too. 31 | 32 | --- 33 | 34 | To use the latest prerelease, you will want to write (balena Etcher, Win32DiskImager, DD etc) the ISO image to a USB drive and insert it into any of the ports on the back of your DX4000. 35 | 36 | Avoid using Rufus to write the image unless you know what you're doing (you need to write raw instead of letting Rufus install a bootloader). Using Rufus without disabling its "assistive" bootloader features will cause incorrect parameters to be specified to boot the installer, resulting in the installer USB not working, or even more likely, it working but the emergency serial console being disabled both on the installer and in the final Debian installation, since the final installation appears to be affected by the installer's boot parameters. 37 | 38 | With the DX4000 powered down but plugged in, hold the reset button on the back (for example with a pen. Avoid metal objects) and press the power button. Continue to hold the button until the LCD shows the Loading Recovery message. 39 | 40 | The LCD will stay on Loading Recovery for the remainder of the installation as there is no software in the installer to drive the LCD at this time. 41 | 42 | Use a tool like Advanced IP Scanner or NMAP to scan your network for the DX4000. It should automatically retrieve an IP address when it has fully started. 43 | 44 | Connect via SSH to the IP address of the DX4000 using the SSH CLI or a tool like PuTTY or RoyalTS. 45 | 46 | When asked for the details to log in, the username is `installer` and the password is `dx4000` 47 | 48 | NOTE: Make sure to enable SSH Server and basic system utilities when prompted to select software. You should probably disable the graphical desktop environment too, as the DX4000 has not video output and will just waste resources. You may wish to install a graphical environment and use VNC or XDRP later. 49 | 50 | --- 51 | 52 | After the install is complete, the system will fail to boot. You must press and hold the reset button again to boot the installer. Log back in. 53 | 54 | Go to the bottom of the action list and choose Start shell. 55 | 56 | Run the `disk-detect` command to ensure all disk device nodes have been populated. 57 | 58 | Mount your installation's boot partition (usually the very first partition on the newly installed disk) and copy `startup.nsh` from the root of the installer USB to the root of your boot partition. You may now reboot and the system should come online on it's own. 59 | 60 | --- 61 | 62 | Notes: 63 | 64 | - If you have existing data on your DX4000, please take a backup. I am not liable for any data loss you endure as a result of using this software. 65 | - If you had a stock Windows installation RAID, it should be possible to retain this as MDADM should detect it an use it, as MDADM appears to support Intel Rapid RAID. 66 | - You will need to follow the old guide (the soldered install one, but don't worry, no soldering needed!) for the Fan and LCD setup. Find it at https://github.com/alexhorner/WD-DX4000 . 67 | - If you have soldered wires to your DX4000 and want to use the serial console for the install instead of SSH, this has been enabled for you. Soldering to access the serial port is COMPLETELY OPTIONAL for this installer, as this installer is intended to work without even opening your DX4000's cover. 68 | --------------------------------------------------------------------------------