====== Preseed Linux USB Create ======
To create an Auto-Install USB Stock with Mint 21.2 or later, use the following steps.
- Download latest Linux Mint iso file https://www.linuxmint.com/edition.php?id=305
- Insert USB stick, check with dmesg | tail to identify the usb device
- Delete/Create FAT32 partition su -
fdisk /dev/xxx
create type c (Win95 FAT32 LBA) partition\\ See for details: https://askubuntu.com/questions/1064278/how-to-create-win95-fat32-lba-partition-type-on-32-gb-usb
- create vfat filesystem on new partition mkfs.vfat /dev/xxx1
- mount disk mount /dev/xxx1 /mnt
- rename usb stick label if necessary/desiredmlabel -i /dev/xxx1 -s ::"CST_MINT212"
- mount iso and copy iso content directly to usb stick partition. Ensure hidden files/directories are copied as well.
- copy custom_install directory to usb stick root
- copy custom preseed files to usb stick preseed directory
- edit /boot/grub/grub.cfg and add to end: menuentry "Install Custom Linux Mint 21.2 Cinnamon 64-bit" {
set gfxpayload=keep
linux /casper/vmlinuz file=/cdrom/preseed/mint_allinone.seed boot=casper debian-installer/locale=en keyboard-configuration/layoutcode=en_GB console-setup/layoutcode=en_GB automatic-ubiquity quiet splash --
initrd /casper/initrd.lz
}
- add syslinux.cfg to root with content:default vesamenu.c32
timeout 100
menu background splash.png
menu title Welcome to Linux Mint Cinnamon 64-bit
menu color screen 37;40 #80ffffff #00000000 std
MENU COLOR border 30;44 #40ffffff #a0000000 std
MENU COLOR title 1;36;44 #ffffffff #a0000000 std
MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all
MENU COLOR unsel 37;44 #50ffffff #a0000000 std
MENU COLOR help 37;40 #c0ffffff #a0000000 std
MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std
MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std
MENU COLOR msg07 37;40 #90ffffff #a0000000 std
MENU COLOR tabmsg 31;40 #ffDEDEDE #00000000 std
MENU WIDTH 78
MENU MARGIN 15
MENU ROWS 7
MENU VSHIFT 10
MENU TABMSGROW 12
MENU CMDLINEROW 12
MENU HELPMSGROW 16
MENU HELPMSGENDROW 29
label custom
menu label Automated installation (Everything in one partition) (syslinux)
kernel casper/vmlinuz
append file=/cdrom/preseed/mint_allinone.seed boot=casper initrd=/casper/initrd.lz debian-installer/locale=en keyboard-configuration/layoutcode=en_GB console-setup/layoutcode=en_GB automatic-ubiquity quiet splash --
label live
menu label Start Linux Mint
kernel /casper/vmlinuz
append file=/cdrom/preseed/linuxmint.seed boot=casper initrd=/casper/initrd.lz quiet splash -- persistent
menu default
label xforcevesa
menu label Start in compatibility mode
kernel /casper/vmlinuz
append file=/cdrom/preseed/linuxmint.seed boot=casper initrd=/casper/initrd.lz noapic noacpi nosplash irqpoll nomodeset --
label oem
menu label OEM install (for manufacturers)
kernel /casper/vmlinuz
append file=/cdrom/preseed/linuxmint.seed oem-config/enable=true only-ubiquity boot=casper initrd=/casper/initrd.lz quiet splash --
label check
menu label Integrity check
kernel /casper/vmlinuz
append boot=casper integrity-check initrd=/casper/initrd.lz quiet splash --
label hdt
menu label Hardware Detection
kernel hdt.c32
label local
menu label Boot from local drive
COM32 chain.c32
APPEND hd0
label memtest
menu label Memory test
kernel /casper/memtest
- add mint_allinone.seed file to preseed folder. Example:
### Set language and keyboard layout
d-i debian-installer/locale string en_GB.UTF-8
d-i keyboard-configuration/xkb-keymap select gb
d-i keyboard-configuration/layoutcode string gb
d-i keyboard-configuration/modelcode string pc105
d-i console-setup/layoutcode string en_GB
d-i console-setup/ask_detect boolean false
### Timezone and NTP
d-i time/zone string Europe/London
d-i clock-setup/ntp boolean true
### Mirror settings
d-i mirror/country string GB
### Enable extras.ubuntu.com.
d-i apt-setup/extras boolean true
### Disable nonfree multimedia codecs
ubiquity ubiquity/use_nonfree boolean false
### Avoid EFI warning if bios set or allowed to use legacy BIOS boot as well
d-i partman-efi/non_efi_system true
### Partitioning
d-i partman-auto/method string lvm
d-i partman-auto/choose_recipe select atomic
partman-basicfilesystems partman-basicfilesystems/no_mount_point boolean false
d-i partman-basicfilesystem/no_swap boolean false
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-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 grub-installer/only_debian boolean true
d-i grub-installer/bootdev string /dev/sda
d-i partman-crypto/passphrase password
d-i partman-crypto/passphrase-again password
### allow root account
d-i passwd/root-login boolean true
### Root password
d-i passwd/root-password password rootpassword
d-i passwd/root-password-again password rootpassword
### To create a normal user account.
d-i passwd/user-fullname string XXXFULLNAMEXXX
d-i passwd/username string XXXUSERNAMEXXX
### Normal user's password, either in clear text or encrypted using a crypt(3) hash. i.e mkpasswd -m sha-512
d-i passwd/user-password-crypted password XXXUSERPASSWORDXXX
### The installer will warn about weak passwords. If you are sure you know what you're doing and want to override it, uncomment this.
d-i user-setup/allow-password-weak boolean true
### setup groups for user
d-i passwd/user-default-groups string audio cdrom video dip plugdev lpadmin sambashare
### set Hostname
d-i netcfg/get_hostname string XXXPCHOSTNAMEXXX
### Auto Login after first boot
d-i passwd/auto-login boolean true
### Trigger reboot
ubiquity ubiquity/reboot boolean true
### Custom Commands
ubiquity ubiquity/success_command string \
cp /cdrom/auto_install/auto* /target/root/ ;\
cp -a /cdrom/auto_install/config-files /target/root/config-files ;\
cp -a /cdrom/auto_install/scripts /target/root/scripts ;\
cp -a /cdrom/auto_install/dpkg /target/root/dpkg ;\
chroot /target /root/auto.sh
Finally, proceed with pre-config as per CUSTOM USB INSTALL instructions (to follow)