First commit
This commit is contained in:
commit
29b28e9da5
50
firstboot.sh
Normal file
50
firstboot.sh
Normal file
@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$EUID" -ne 0 ]
|
||||
then echo "Please run as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
doasuser () {
|
||||
su clc -c "$1"
|
||||
}
|
||||
|
||||
echo "Cleaning up default Gnome Install."
|
||||
#clean up gnome things
|
||||
apt purge -y gnome-games xterm
|
||||
apt autoremove -y
|
||||
|
||||
echo "Installing base applications."
|
||||
apt install -y curl vlc
|
||||
snap install zoom-client
|
||||
|
||||
#install google chrome
|
||||
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
||||
apt install -y ./google-chrome-stable_current_amd64.deb
|
||||
|
||||
echo "Installing extensions."
|
||||
wget https://raw.githubusercontent.com/brunelli/gnome-shell-extension-installer/master/gnome-shell-extension-installer
|
||||
chmod +x gnome-shell-extension-installer
|
||||
doasuser './gnome-shell-extension-installer 307' #dash-to-dock
|
||||
|
||||
echo "Configuring desktop."
|
||||
#set shell theme and dock
|
||||
doasuser 'gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"'
|
||||
doasuser 'gsettings --schemadir ~/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/schemas/ set org.gnome.shell.extensions.dash-to-dock dock-position BOTTOM'
|
||||
doasuser 'gsettings --schemadir ~/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/schemas/ set org.gnome.shell.extensions.dash-to-dock preferred-monitor 0'
|
||||
|
||||
#configure favorites
|
||||
doasuser 'gsettings set org.gnome.shell favorite-apps '"'"'["firefox-esr.desktop", "google-chrome.desktop", "org.gnome.Nautilus.desktop", "vlc.desktop", "zoom-client_zoom-client.desktop", "libreoffice-impress.desktop"]'"'"''
|
||||
|
||||
#add min and max buttons to title bars
|
||||
doasuser 'gsettings set org.gnome.desktop.wm.preferences button-layout "appbar:minimize,maximize,close"'
|
||||
|
||||
echo "Cleaning up."
|
||||
rm google-chrome-stable_current_amd64.deb gnome-shell-extension-installer
|
||||
|
||||
echo "Running update."
|
||||
apt update
|
||||
apt upgrade -y
|
||||
|
||||
echo "Rebooting..."
|
||||
systemctl reboot
|
144
preseed.cfg
Normal file
144
preseed.cfg
Normal file
@ -0,0 +1,144 @@
|
||||
#### Contents of the preconfiguration file (for buster)
|
||||
### Localization
|
||||
# Preseeding only locale sets language, country and locale.
|
||||
d-i debian-installer/locale string en_US
|
||||
|
||||
# Keyboard selection.
|
||||
d-i keyboard-configuration/xkb-keymap select us
|
||||
|
||||
### Network configuration
|
||||
# netcfg will choose an interface that has link if possible. This makes it
|
||||
# skip displaying a list if there is more than one interface.
|
||||
d-i netcfg/choose_interface select auto
|
||||
|
||||
# Any hostname and domain names assigned from dhcp take precedence over
|
||||
# values set here. However, setting the values still prevents the questions
|
||||
# from being shown, even if values come from dhcp.
|
||||
d-i netcfg/get_hostname string unassigned-hostname
|
||||
d-i netcfg/get_domain string unassigned-domain
|
||||
|
||||
# If you want to force a hostname, regardless of what either the DHCP
|
||||
# server returns or what the reverse DNS entry for the IP is, uncomment
|
||||
# and adjust the following line.
|
||||
#d-i netcfg/hostname string somehost
|
||||
|
||||
# Disable that annoying WEP key dialog.
|
||||
d-i netcfg/wireless_wep string
|
||||
|
||||
# If non-free firmware is needed for the network or other hardware, you can
|
||||
# configure the installer to always try to load it, without prompting. Or
|
||||
# change to false to disable asking.
|
||||
d-i hw-detect/load_firmware boolean true
|
||||
|
||||
### Mirror settings
|
||||
# If you select ftp, the mirror/country string does not need to be set.
|
||||
#d-i mirror/protocol string ftp
|
||||
d-i mirror/country string manual
|
||||
d-i mirror/http/hostname string http.us.debian.org
|
||||
d-i mirror/http/directory string /debian
|
||||
d-i mirror/http/proxy string
|
||||
|
||||
### Account setup
|
||||
# Root password, either in clear text
|
||||
#d-i passwd/root-password password testroot
|
||||
#d-i passwd/root-password-again password testroot
|
||||
# or encrypted using a crypt(3) hash.
|
||||
d-i passwd/root-password-crypted password RagByQTSHsyIY
|
||||
|
||||
# To create a normal user account.
|
||||
d-i passwd/user-fullname string CLC User
|
||||
d-i passwd/username string clc
|
||||
# Normal user's password, either in clear text
|
||||
#d-i passwd/user-password password passwd
|
||||
#d-i passwd/user-password-again password passwd
|
||||
# or encrypted using a crypt(3) hash.
|
||||
d-i passwd/user-password-crypted password JY0jSrbzJgbx2
|
||||
|
||||
### Clock and time zone setup
|
||||
# Controls whether or not the hardware clock is set to UTC.
|
||||
d-i clock-setup/utc boolean true
|
||||
|
||||
# You may set this to any valid setting for $TZ; see the contents of
|
||||
# /usr/share/zoneinfo/ for valid values.
|
||||
d-i time/zone string US/Eastern
|
||||
|
||||
# Controls whether to use NTP to set the clock during the install
|
||||
d-i clock-setup/ntp boolean true
|
||||
|
||||
|
||||
### Partitioning
|
||||
d-i partman-auto/method string lvm
|
||||
d-i partman-auto-lvm/guided_size string max
|
||||
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-lvm/confirm_nooverwrite boolean true
|
||||
|
||||
d-i partman-auto/choose_recipe select atomic
|
||||
|
||||
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 partman-md/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 partman-efi/non_efi_system boolean true
|
||||
|
||||
### Base system installation
|
||||
|
||||
### Apt setup
|
||||
# You can choose to install non-free and contrib software.
|
||||
d-i apt-setup/non-free boolean true
|
||||
d-i apt-setup/contrib boolean true
|
||||
|
||||
### Package selection
|
||||
#tasksel tasksel/first multiselect standard, web-server, kde-desktop
|
||||
|
||||
# Individual additional packages to install
|
||||
#d-i pkgsel/include string openssh-server build-essential
|
||||
d-i pkgsel/include string snapd
|
||||
|
||||
# Whether to upgrade packages after debootstrap.
|
||||
# Allowed values: none, safe-upgrade, full-upgrade
|
||||
#d-i pkgsel/upgrade select none
|
||||
|
||||
### Boot loader installation
|
||||
# This is fairly safe to set, it makes grub install automatically to the MBR
|
||||
# if no other operating system is detected on the machine.
|
||||
d-i grub-installer/only_debian boolean true
|
||||
|
||||
# This one makes grub-installer install to the MBR if it also finds some other
|
||||
# OS, which is less safe as it might not be able to boot that other OS.
|
||||
d-i grub-installer/with_other_os boolean true
|
||||
|
||||
# Due notably to potential USB sticks, the location of the MBR can not be
|
||||
# determined safely in general, so this needs to be specified:
|
||||
#d-i grub-installer/bootdev string /dev/sda
|
||||
# To install to the first device (assuming it is not a USB stick):
|
||||
#d-i grub-installer/bootdev string default
|
||||
|
||||
# Use the following option to add additional boot parameters for the
|
||||
# installed system (if supported by the bootloader installer).
|
||||
# Note: options passed to the installer will be added automatically.
|
||||
#d-i debian-installer/add-kernel-opts string nousb
|
||||
|
||||
### Finishing up the installation
|
||||
|
||||
# Avoid that last message about the install being complete.
|
||||
d-i finish-install/reboot_in_progress note
|
||||
|
||||
#### Advanced options
|
||||
### Running custom commands during the installation
|
||||
|
||||
# This command is run just before the install finishes, but when there is
|
||||
# still a usable /target directory. You can chroot to /target and use it
|
||||
# directly, or use the apt-install and in-target commands to easily install
|
||||
# packages and run commands in the target system.
|
||||
#d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh
|
||||
|
||||
d-i preseed/late_command string in-target wget http://192.168.122.1/firstboot.sh
|
13
preseedserver.sh
Executable file
13
preseedserver.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$EUID" -ne 0 ]
|
||||
then echo "Please run as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
LOCALIP=$(hostname -I)
|
||||
|
||||
echo "Starting server. Press CTRL+C to stop."
|
||||
echo -e "Local IP address: \e[32m$LOCALIP\e[0m"
|
||||
|
||||
python3 -m http.server 80
|
Loading…
Reference in New Issue
Block a user