-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configuration for Ubuntu Server autoinstall #16
Open
DaniilKl
wants to merge
1
commit into
main
Choose a base branch
from
netboot-integration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#cloud-config | ||
autoinstall: | ||
version: 1 | ||
early-commands: | ||
# Configure system-wide DNS, use Google DNS as generic server: | ||
- 'sed -i "s/^nameserver [0-9.]\+/nameserver 8.8.8.8/g" /etc/resolv.conf' | ||
packages: | ||
- 'ubuntu-desktop' | ||
- 'linux-tools-generic' | ||
- 'open-vm-tools' | ||
- 'openssh-server' | ||
- 'libglib2.0-bin' | ||
- 'dbus-x11' | ||
locale: 'en_US.UTF-8' | ||
refresh-installer: | ||
update: true | ||
keyboard: | ||
layout: 'us' | ||
network: | ||
version: 2 | ||
ethernets: | ||
enp0s6: | ||
dhcp4: true | ||
apt: | ||
preserve_sources_list: false | ||
mirror_selection: | ||
primary: | ||
- country-mirror | ||
- uri: 'http://archive.ubuntu.com/ubuntu' | ||
geoip: true | ||
fallback: 'abort' | ||
identity: | ||
realname: 'Ubuntu' | ||
username: 'ubuntu' | ||
hostname: '3mdeb' | ||
# Password: ubuntu | ||
# Generated with "openssl passwd -6" | ||
password: '$6$eRzcYyR3Xw2elP6l$l7JXHXxbXRgD8KCx4xFt4q7aJFpsUfjjMHbfYZAlJ56GLSspojJ6ODxlauuauL72jYbwhEhGwUmzgImIVCFle0' | ||
ssh: | ||
install-server: true | ||
allow-pw: true | ||
codecs: | ||
install: true | ||
timezone: 'geoip' | ||
updates: 'all' | ||
late-commands: | ||
- chroot /target sed -i 's/^[[:space:]#]*PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config | ||
- chroot /target systemctl enable ssh | ||
- chroot /target sed -i 's/\(^GRUB_CMDLINE_LINUX_DEFAULT=".*\)"/\1 console=tty0 console=ttyS0,115200"/' /etc/default/grub | ||
- chroot /target sed -i 's/GRUB_TIMEOUT=.*/GRUB_TIMEOUT=5/' /etc/default/grub | ||
- chroot /target sed -i 's/kernel.printk.*/kernel.printk = 1 4 1 7/' /etc/sysctl.d/10-console-messages.conf | ||
- chroot /target sed -i 's/^GRUB_TIMEOUT_STYLE=.*/GRUB_TIMEOUT_STYLE=menu/' /etc/default/grub | ||
- chroot /target sed -i 's/^#GRUB_TERMINAL=.*/GRUB_TERMINAL="serial gfxterm"/' /etc/default/grub | ||
- mount --bind /proc /target/proc | ||
- mount --bind /sys /target/sys | ||
- mount --bind /dev /target/dev | ||
- chroot /target update-grub | ||
- chroot /target gsettings set org.gnome.SessionManager logout-prompt false | ||
shutdown: 'reboot' |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DaniilKl why this in server installation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, because
netboot.xyz
uses Ubuntu server installer, but at the end we want to have desktop version.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this is not the case for all installations. Also, this file format leads to weird issues on 24.04.1 (discussed more in the matrix). It should be changed to user-data, meta-data, and vendor-data files. I will provide fixes for this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks.