GNU Linux Debian - very fast and easy semi-automatic online install Debian 11 (non-free)
many users have/had macbooks.
what was/still is great: OSX can be reinstalled over internet! (no more searching for licence keys or setup sticks/DVDs/CDs/)
given the fact ā that once installed ā GNU Linux Debian can boot (almost) anywhere, the fastest and easiest way to āinstallā it is to simply 1:1 copy it on whatever the user wants to boot from (harddisk or usb stick (some sticks can not be made bootable, try at least 3 different vendors)).
Soā¦ this install script 1:1 copy installs Debian 11 (non-free) on any laptop/desktop/server (depending on internet speed) very fast & easy.
The process can be automated (on similar hardware or on hardware where /dev/sda is always the device the user wants to 1:1 overwrite).
This script install process is almost like OSX š but āsemi-automaticā to double ask, not to overwrite the wrong (USB attached?) disk.
- it comes with a full MATE Desktop and everything to get working (LibreOffice and Firefox and Thunderbird)
- it has the ācosmosā slideshow (love it!) background enabled per default
- the terminal comes with green on black for better readability
- it does not have a swap partition enabled, so the user can easily with gparted 1) extend the harddisk to itās full capacity 2) create a swap partition
- English, Spanish, Chinese and German keyboard layout are active, should be possible to switch between them in the top right corner
todo: what is still missing
- what is still missing is:
- automatically calc (based on RAM size, would do as much swap as RAM) how much swap should be created
- extend the /root partition to full harddisk capacity minus the swap space
- create the swap partition and edit config files /etc/fstab and /etc/initramfs-tools/conf.d/resume for proper (as intended) functionality of the system
- apply this
- display a dancing penguin during first successfull boot and encourage user to do at least 5min of dancing to this funky music š
WARNING!
- make sure to disconnect all devices (external harddisks, usb sticks, sdcards)
- less devices = less trouble and less accidentally overwriting a external harddisk or usb stick
- if the target device /dev/sdX contains important data, backup it up !first! (all data will be overwritten)
WHY NON FREE?
itās based on the non-free version, because it is intended to allow new users that never tested GNU Linux Debian (with a MATE Desktop) a āit just worksā turnkey experience.
Is the Free version better?
If the user has concerns about surveillance/spying and needs maximum privacy than it is probably better to start with the defautl GNU Linux Debian free version and usually all network-cards/NICs work out of the box (free drivers available š (but maybe not the wifi cards)
new users: workaround for this pitfall:
https://dwaves.de/2022/01/21/gnu-linux-debian-11-2-network-stops-working-networking-stops-during-setup-bad-archive-mirror-how-every-os-setup-should-be/
Problems might arise with the free version and wifi: (notebooks)
because then the user will probably have to install the appropriate closed source (#evil!) drivers from the the non-free repository with all the spying backdoors that a intel wifi driver might have (after all a network card, is like a small computer, inside a computer, ideal! but then if the BIOS is not LibreBootedā¦ the Intel ME can not be disabledā¦ (some OS allow to permanently disable Intel ME!!!).
ā¦ the fight for more privacy and security ā seems never ending and goes on.
requirements:
usage:
# sdX is the device the user wants to install Debian 11 on
<span style="color: #00ffff;">/scripts/install_debian_from_image.sh /dev/sdX
</span>
process complete? reboot & āit just worksā?
congratz! do 1min of wiggle dance!
[video width=ā306ā³ height=ā194ā³ mp4=āhttps://dwaves.de/wp-content/uploads/2022/01/happyness-drum-and-bass-dance-of-success.mp4ā³\]\[/video\]
post processing:
want to use the complete harddisk not just the 100GBytes? two possibilities:
what the script will do:
- download a pre-installed Debian 11 image.gz and itās sha512check-sum
- sha512 check the image (check the image is unaltered and intact)
- on the fly unpack and 1:1 write the image to /dev/sdX while showing a progress bar
<span style="color: #00ffff;">vim /scripts/install_debian_from_image.sh</span>
<span style="color: #ff6600;">#!/bin/bash
DEBIAN_IMAGE=debian11_amd64_non_free_drivers_mate_libre_firefox.img.gz
DOWNLOAD=https://dwaves.de/downloads/$DEBIAN_IMAGE
# define colors
RED='\033[0;31m'
WHITE='\033[0;37m'
YELLOW='\033[0;33m'
COLOR_OFF='\033[0m' # reset color to default
echo -e "${WHITE}=== download and 1:1 copy debian.img.gz to $1 ===${COLOR_OFF}\n"
if [ -z "$1" ]
then
echo "please pass device like this: /dev/sdx
TARGET THE WHOLE DEVICE (sdb)
NOT A PARTITION! (sdb1)"
else
echo -e "${RED}this script is meant to be run from an live-cd or usb stick (so $1 should be an OFFLINE filesystem (not currently running)"
echo "please read carefully, a mistake could overwrite critical data!!!"
echo -e "physically disconnect all critical data-drives before procedure!!!${COLOR_OFF}\n"
echo ""
echo "========== do you want to copy the $DEBIAN_IMAGE image on device $1 ?"
echo -e "${YELLOW}~3GBytes of disk space is needed in the current directory${COLOR_OFF}\n"
pwd
echo "=========== harddisk overview";
echo "==== where is what";
lsblk -o 'NAME,MAJ:MIN,RM,SIZE,RO,FSTYPE,MOUNTPOINT,UUID'
smartctl -i $1;
echo ""
echo -e "${YELLOW}"
read -p "CONTINUE? (y/n)" choice
case "$choice" in
y|Y ) echo "yes";;
n|N ) echo "no";;
* ) echo "invalid";;
esac
echo "installing required software for fast multi threaded decompression of image (pigz)"
echo "and showing progress during dd (pv)"
echo -e "${COLOR_OFF}\n"
apt update
apt install pv pigz curl
echo -e "${YELLOW}starting download of $DOWNLOAD... please stand by${COLOR_OFF}\n"
curl -L -O -C - $DOWNLOAD;
echo -e "${YELLOW}starting download of checksum $DOWNLOAD.sha512sum.txt ... please stand by${COLOR_OFF}\n"
curl -L -O -C - $DOWNLOAD.sha512sum.txt;
echo "verify sha512sum..."
cat "./$DEBIAN_IMAGE.sha512sum.txt" | sha512sum -c
if [ $? != 0 ]; then
echo -e "${RED}Checksum failed. aborting script. maybe $DEBIAN_IMAGE corrupted during download. please try to re-run the script." >&2
echo -e "${COLOR_OFF}\n"
exit 1
fi
echo -e "${YELLOW}starting write process...${COLOR_OFF}\n"
umount $1*;
dd if=./$DEBIAN_IMAGE of=$1 status=progress; sync;
pigz -dc $DEBIAN_IMAGE | pv | dd bs=1M of=$1; sync;
## single core
### gunzip -c /path/to/image.img.gz | pv | dd of=$1; # write image to usb stick
echo -e "${YELLOW}the image $DEBIAN_IMAGE was written to stick $1. process finished. try booting it now :)${COLOR_OFF}\n"
fi
</span>
#linux #gnu #gnulinux #opensource #administration #sysops #gnu-linux #debian #osx #setup #installation #breeze #easy #fast #debian11 #bullseye
Originally posted at: https://dwaves.de/2022/01/28/gnu-linux-debian-very-fast-and-easy-semi-automatic-online-install-debian-11-non-free/