<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.ledhed.net/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.ledhed.net/index.php?action=history&amp;feed=atom&amp;title=Ubuntu_22.04_Autoinstall</id>
		<title>Ubuntu 22.04 Autoinstall - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.ledhed.net/index.php?action=history&amp;feed=atom&amp;title=Ubuntu_22.04_Autoinstall"/>
		<link rel="alternate" type="text/html" href="https://wiki.ledhed.net/index.php?title=Ubuntu_22.04_Autoinstall&amp;action=history"/>
		<updated>2026-05-22T16:14:39Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.2</generator>

	<entry>
		<id>//wiki.ledhed.net/index.php?title=Ubuntu_22.04_Autoinstall&amp;diff=3550&amp;oldid=prev</id>
		<title>Ledhed: Created page with &quot;== Overview == This article will explain how to create a custom USB Boot disk for automatic installation of Ubuntu 22.04 including an answer file.   == Quick-n-Dirty == === In...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.ledhed.net/index.php?title=Ubuntu_22.04_Autoinstall&amp;diff=3550&amp;oldid=prev"/>
				<updated>2022-08-24T15:01:53Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Overview == This article will explain how to create a custom USB Boot disk for automatic installation of Ubuntu 22.04 including an answer file.   == Quick-n-Dirty == === In...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Overview ==&lt;br /&gt;
This article will explain how to create a custom USB Boot disk for automatic installation of Ubuntu 22.04 including an answer file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Quick-n-Dirty ==&lt;br /&gt;
=== Installation Media ===&lt;br /&gt;
Partition USB stick into 2 pieces&amp;lt;br&amp;gt;&lt;br /&gt;
Partition 1 = 16M, EFI, Format FAT32&amp;lt;br&amp;gt;&lt;br /&gt;
Partition 2 = 4G, MS Dos, Format FAT32&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Mount Partition 2''' (make sure to use the right device, you can check with lsblk)&lt;br /&gt;
 mount /dev/sdb2 /mnt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Extract ISO to Partition 2'''&lt;br /&gt;
 7z -y x ubuntu-22.04.1-live-server-amd64.iso -o/mnt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Edit /mnt/boot/grub/grub.cfg'''&lt;br /&gt;
Add these lines after the end of the first 'menuentry'&lt;br /&gt;
 menuentry &amp;quot;Auto Install Ubuntu Server&amp;quot; {&lt;br /&gt;
         set gfxpayload=keep&lt;br /&gt;
         linux   /casper/vmlinuz autoinstall quiet  ---&lt;br /&gt;
         initrd  /casper/initrd&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Update /mnt/md5sum.txt'''&lt;br /&gt;
 cd /mnt&lt;br /&gt;
 md5sum ./boot/grub/grub.cfg &amp;gt;&amp;gt; /mnt/md5sum.txt&lt;br /&gt;
Remember to delete the old grub.cfg line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Create an efi directory under /mnt/boot/''':&lt;br /&gt;
 mkdir /mnt/boot/efi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Mount Partition 1'''&lt;br /&gt;
 mount /dev/sdb1 /mnt/boot/efi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Install grub on Partition 2''' (this assumes the system is x64 UEFI):&lt;br /&gt;
 grub-install --boot-directory=/mnt/boot /dev/sdb2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Unmount Partition 1, then Partition 2'''&lt;br /&gt;
 umount /mnt/boot/efi&lt;br /&gt;
 umount /mnt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Answer File Media ===&lt;br /&gt;
'''Generate a user-data file''', this is most easily done by copying one from a manual installation. This file can be found at:&lt;br /&gt;
 /var/log/install/autoinstall-user-data&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Generate a meta-data file''', this file is typically empty.&lt;br /&gt;
 touch meta-data&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Create the answer-file.iso'''&lt;br /&gt;
 cloud-localds ./answer_file.iso user-data meta-data&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Burn answer-file.iso to a USB stick.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' Unmount the Answer File USB stick'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Boot it! ===&lt;br /&gt;
Insert the newly created Installation USB stick and invoke your system's boot menu (F11 perhaps).&lt;br /&gt;
* Highlight Partition 2&lt;br /&gt;
* Insert the Answer File Media&lt;br /&gt;
* Press [Enter]&lt;br /&gt;
The system should install unattended including the network settings, user credentials, and packages you selected when generating the user-data file on the manual installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
https://ubuntu.com/server/docs/install/autoinstall&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
https://github.com/covertsh/ubuntu-autoinstall-generator/blob/main/ubuntu-autoinstall-generator.sh#L249&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
https://linuxconfig.org/ubuntu-autoinstall-example&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
https://gist.github.com/jamiekurtz/26c46b3e594f8cdd453a&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Ledhed</name></author>	</entry>

	</feed>