Alpine Notes:
default
#### Disorganized notes on an Alpine Install that
#### was done to run: V7/x86 Unix
* Vostro 7500 Issues
** Can not boot Alpine usb
BIOS Setup > Boot Configuration > Enable Secure Boot > Toggle OFF
;;; Need to F12 into bios and turn off: Enable Secure Boot
;;; Can turn this back on after Alpine is installed or so
;;; it claims
** No hardisk seen once Alpine usb is booted
;;; Vostro 7500 has: RAID On
;;; SATA is configured to support RAID
;;; (Intel Rapid Restore Technology)
;;; Need to switch to AHCI
BIOS Setup > Storage > SATA Operation > Choose AHCI
;;; Need to F12 into bios and switch to AHCI
;;; (SATA is configured for AHCI mode
bkid
fdisk -l
;;; Boot back into Alpine usb and should be able to
;;; see hard drive (nvme in my case) with: blkid
;;; or fdisk -l
* Verify Alpine ISO before putting on USB
https://www.alpinelinux.org/downloads/
;;; Download iso, sha256 and gpg beside the iso link
;;; Also at top dowload GPG ncopa.asc (for sig verification)
diff -s <(cat alpine-standard-3.20.3-x86_64.iso.sha256) <(sha256sum alpine-standard-3.20.3-x86_64.iso)
;;; If it says identical you are good to go
;;; By default does not output anything if they are the same
;;; -s = report when they are the same
sha256sum -c alpine-standard-3.20.3-x86_64.iso.sha256
;;; Or you could use this way, if good it will say: OK
Compare-Object -ReferenceObject (Get-FileHash .\alpine-standard-3.20.3-x86_64.iso -algorithm sha256 | select hash -ExpandProperty hash) -DifferenceObject (cat .\alpine-standard-3.20.3-x86_64.iso.sha256 | ForEach-Object {$_.split(" ")[0]}) -IncludeEqual
;;; Powershell version to see if they are the same
;;; By default it will not output anything if equal
;;; -IncludeEqual will output == if they are the same
;;; $_ = $PSItem = current object in pipeline
Compare-Object -ReferenceObject `
(Get-FileHash .\alpine-standard-3.20.3-x86_64.iso -algorithm sha256 | `
select hash -ExpandProperty hash) `
-DifferenceObject `
(cat .\alpine-standard-3.20.3-x86_64.iso.sha256 | `
ForEach-Object {$_.split(" ")[0]}) -IncludeEqual
;;; Command so long, splitting on several lines with backtick
gpg --import ncopa.asc
gpg --verify alpine-standard-3.20.3-x86_64.iso.asc alpine-standard-3.20.3-x86_64.iso
;;; Import ncopa key and verify the iso and sig
;;; Create a bootable USB with rufus, ventoy, dd or whaterever you prefer.
;;; If using rufus (use dd mode)
cmp ~/Downloads/alpine-standard-3.20.3-x86_64.iso /dev/sdX
;;; Verify with bit-wise comparison, should return EOF if
;;; all is good
cmp: EOF on alpine-standard-3.20.3-x86_64.iso
# Used Ventoy to put onto USB
** Setup-Alpine
setup-disk
# If you want to decide your partition scheme
# run this first, else I setup determines this
# automatically
setup-alpine
us
us
desired-hostname
eth0
192.168.1.40
255.255.255.0
192.168.1.254
???
chrony
reboot
** After 1st Reboot
su -l
# Login as regular user and su -l
apk add doas #install doas
echo 'permit nopass ribbit' > /etc/doas.d/doas.conf #doas with no password
apk add ed #install the standard unix editor
apk add edbrowse #install edbrowse
doas setup-apkrepos -cf #setup community repo choosing fastest mirror
doas apk update #update package index afterwards
doas apk add rlwrap # need community repo before can install this
# using this for ed
# Install man command, apropos, and make manpages add/remove with pkgs
apk add mandoc mandoc-apropos docs
cat /etc/alpine-release #show which version running
doas sed -i -e 's/v3\.20/edge/' /etc/apk/repositories #change to edge repos
#from v3.20
# Add testing if want, but it is not supported
http://mirrors.gigenet.com/alpinelinux/edge/main
http://mirrors.gigenet.com/alpinelinux/edge/community
http://mirrors.gigenet.com/alpinelinux/edge/testing
doas apk update #need to update after changing to edge and adding testing
apk add tmux -U #install tmux
# -U updates packages, so you don't have to run:
# apk update before each pkg installation
apk add gcompat #add glibc compatibility layer
#apk search nvidia # see if any nvidia drivers
#apk add linux-firmware-nvidia
setup-xorg-base
apk add font-terminus
apk add dbus
dbus-uuidgen > /var/lib/dbus/machine-id
# Had to add user to input group, so not sure
# what all I needed, cause found out to late.
rc-update add udev
rc-update add dbus
apk add i3wm i3status i3lock xterm dmenu
addgroup ribbit video
addgroup ribbit input
apk add xf86-input-synaptics
apk add xf86-input-libinput
apk add xbacklight
apk add ncurses-dev pciutils-dev
apk add ca-certificates xz make gcc linux-headers
apk add file
apk musl-dev
apk add musl-fts
apk search musl-fts-dev
apk add util-linux-misc #so can use setterm, without X
setterm --blank force #keep screen blank, even if key pressed
setterm --blank poke #unblank screen
setterm --blank 1 #blank screen after 1 minute
setterm --blank 1 --powerdown 2 #turn off screen after 2 mins
* Upgrading all packages
apk add --upgrade apk-tools #update pkg manager 1st
doas apk upgrade --available #upgrade all packages
#--available forces all package to upgrade
sync
reboot #if services were updated they need to be restarted
# if kernel was updated system needs to reboot
cat /etc/alpine-release #see what is running now vs: 3.20.3 earlier
3.21.0_alpha20240923
* Package Management
apk add tmux #adds a package
apk add --allow-untrusted /path/to/tmux.apk #if package from another machine
#aka local packages
apk del tmux #remove a program
apk del vi ed tmux #remove several packages
apk update #update then upgrade to get lastest security
apk upgrade #upgrades and bugfixes
apk -U upgrade #sec upgrades and bugfixes shorthad
apk add tmux@testing #installing a pinned pkg
apk -U upgrade tmux #upgrade specific pkg
apk search -v #list all packages with description
apk search -v 'xorg*' #search xorg related pkgs
apk search -v -d 'lisp' #show pkgs with lisp in their --description or [-d]
apk info -a xz #show info on contents, depedendencies, which files
# belong to package
apk info -w ed #only show webpage info
# Other apk info options are:
-d --description [description of package]
-w --webpage [where the pkg is hosted]
-s --size [size once installed]
-R --depends [pkgs required in order to use this pkg]
-r --rdepends [pkgs that requre this pkg]
-L --contents [shows files this pkg installs]
-t --triggers [lists directories that are watched, for triggers when
this pkg is add/delete]
* Misc
cat /sys/module/kernel/parameters/consoleblank
# Check how long it takes for console screen to go blank
# 0 means it is disabled
tty1::sysinit:echo -e '\033[9;1]'
# Set blank screen timeout on tty1 to 1 minute (sleep mode)
# Setting this cause I remote into this laptop and prefer
# screen to blank after being booted
# Put this after the ttys that are set up under this line:
# Set up a couple of getty's
* Install Qemu and run V7/x86 Unix
apk add qemu qemu-img qemu-modules qemu-system-aarch64 qemu-system-arm qemu-system-x86_64 qemu-tools
getent group # show groups
addgroup ribbit qemu #add ribbit to qemu and kvm groups (else use root)
addgroup ribbit kvm
qemu-system-x86_64 -hda hd0.img #run v7/x86 in gui
# qemu-system-x86_64 -nographic -hda hd0.img # hangs over ssh
qemu-system-x86_64 -display curses -hda hd0.img #run in curses mode (ssh)
qemu-system-x86_64 -display curses -drive file=hd0.img,format=raw
# Suppress warning:
# Image format was not specified for 'hd0.img' and probing guessed raw.
# At boot prompt hit: enter
# At # prompt hit ^D to logout of root
# Login as: guest (no password)
# To shutdown and (save work) su to root with password: password
# then run: kill -1 1 (those are ones) [this actually saves]
# then run: sync ; sync ; sync (for good measure)
# then power off machine (or ps on host and kill pid)
* Get Nvidia drivers
# wget the correct driver from here:
https://www.nvidia.com/en-us/drivers/unix/
sh NVIDIA-Linux-x86_64-550.127.05.run --check
sh NVIDIA-Linux-x86_64-550.127.05.run --extract-only
# Had some issues trying to compile this as it expects
# glibc
* User and Developer Handbooks
https://wiki.alpinelinux.org/wiki/Installation
;;; Installation notes from wiki
;;; Handbook also has install notes
https://docs.alpinelinux.org/user-handbook/0.1a/index.html
;;; Alpine User Handbook
https://docs.alpinelinux.org/developer-handbook/0.1a/index.html
;;; Alpine Developer Handbook
* IRC
OFTC Network
#alpine-linux
* Mailing List
lists.alpinelinux.org
default