Compare commits

..

No commits in common. "0460940582e59714a59a8ed623800b000b9ae445" and "3fe25352130c488ca39450769b1d2501acc4b3c3" have entirely different histories.

8 changed files with 31 additions and 64 deletions

View File

@ -47,7 +47,6 @@ There are a couple manual steps to get started before the installer scripts can
- Be aware that Void uses a US keymap until you change it. If your keyboard is different, you might need to look up an image of a US keyboard to find the right keys. - Be aware that Void uses a US keymap until you change it. If your keyboard is different, you might need to look up an image of a US keyboard to find the right keys.
- If booting off the USB stick you want to install to, use (RAM) option - If booting off the USB stick you want to install to, use (RAM) option
- Log in as `root`, password `voidlinux` - Log in as `root`, password `voidlinux`
- It wont display anything while you type in the password but it will accept it.
- If you need to use WiFi, run `void-installer` - If you need to use WiFi, run `void-installer`
- Set your keyboard layout (optional) - Set your keyboard layout (optional)
- Connect to your network - Connect to your network
@ -70,7 +69,7 @@ The scripts will take it from there, asking you for information and downloading
- `install-stage2.sh`: continues setting up things after booting into the freshly installed base system - `install-stage2.sh`: continues setting up things after booting into the freshly installed base system
- `opt/`: contains files to be installed in /opt/void-usb/ - `opt/`: contains files to be installed in /opt/void-usb/
- `grub-config`: custom grub config generator (probably not necessary but at this point I dont wanna dig into the default one) - `grub-config`: custom grub config generator (probably not necessary but at this point I dont wanna dig into the default one)
- `system-image`: helper script to rebuild the squashfs - `backup-fs`: helper script to rebuild the squashfs
- `kernel.d/`: kernel hooks to be installed in /etc/kernel.d - `kernel.d/`: kernel hooks to be installed in /etc/kernel.d
- `skel/`: files to be added to /etc/skel - `skel/`: files to be added to /etc/skel
- `bashrc`: my custom .bashrc - `bashrc`: my custom .bashrc

View File

@ -26,11 +26,9 @@ function yesno {
read -p "[y/n] " -n1 DISCARD_ME read -p "[y/n] " -n1 DISCARD_ME
case "$DISCARD_ME" in case "$DISCARD_ME" in
y) y)
echo ""
return 0 return 0
;; ;;
n) n)
echo ""
return 1 return 1
;; ;;
*) *)
@ -53,7 +51,7 @@ if [ ! "$(id -u)" -eq 0 ]; then
exit 1 exit 1
fi fi
if ping -c2 repo-default.voidlinux.org >> $LOGFILE 2>&1; then if ping -c4 repo-default.voidlinux.org >> $LOGFILE 2>&1; then
: :
else else
echo "An internet connection is required to run this script." echo "An internet connection is required to run this script."
@ -242,7 +240,7 @@ echo "Adding mirror configuration."
echo "repository=$TARGET_MIRROR" > /mnt/target/etc/xbps.d/00-repository-main.conf echo "repository=$TARGET_MIRROR" > /mnt/target/etc/xbps.d/00-repository-main.conf
echo "Adding sudo configuration." echo "Adding sudo configuration."
echo "%wheel ALL=(ALL:ALL) ALL" > /mnt/target/etc/sudoers.d/wheel_as_sudo_group echo "%wheel ALL=(ALL:ALL) ALL" > /mnt/target/etc/sudoers.d/wheel_as_sudo_group.conf
echo "Disabling root password." echo "Disabling root password."
run_in_target passwd --lock root run_in_target passwd --lock root
@ -268,13 +266,13 @@ wget --output-document=/mnt/target/lib/dracut/modules.d/90void-usb/overlay.sh "$
chmod 744 /mnt/target/lib/dracut/modules.d/90void-usb/overlay.sh >> $LOGFILE 2>&1 chmod 744 /mnt/target/lib/dracut/modules.d/90void-usb/overlay.sh >> $LOGFILE 2>&1
echo "done" echo "done"
echo -n "Adding system-image helper... " echo -n "Adding file system helper... "
mkdir -p /mnt/target/opt/void-usb >> $LOGFILE 2>&1 mkdir -p /mnt/target/opt/void-usb >> $LOGFILE 2>&1
chmod 755 /mnt/target/opt/void-usb >> $LOGFILE 2>&1 chmod 755 /mnt/target/opt/void-usb >> $LOGFILE 2>&1
wget --output-document=/mnt/target/opt/void-usb/system-image "$GIT_REPO_BASE/opt/system-image" >> $LOGFILE 2>&1 wget --output-document=/mnt/target/opt/void-usb/backup-fs "$GIT_REPO_BASE/opt/backup-fs" >> $LOGFILE 2>&1
chmod 744 /mnt/target/opt/void-usb/system-image >> $LOGFILE 2>&1 chmod 744 /mnt/target/opt/void-usb/backup-fs >> $LOGFILE 2>&1
echo " echo "
/opt/void-usb/system-image" >> /mnt/target/etc/rc.shutdown /opt/void-usb/backup-fs" >> /mnt/target/etc/rc.shutdown
echo "done" echo "done"
echo "Adding fstab." echo "Adding fstab."
@ -434,7 +432,7 @@ echo 'if [ -x /sbin/agetty -o -x /bin/agetty ]; then
fi' > /mnt/target/etc/sv/agetty-tty1/conf fi' > /mnt/target/etc/sv/agetty-tty1/conf
[ -f /mnt/target/root/.profile ] && mv /mnt/target/root/.profile /mnt/target/root/.profile.bak >> $LOGFILE 2>&1 [ -f /mnt/target/root/.profile ] && mv /mnt/target/root/.profile /mnt/target/root/.profile.bak >> $LOGFILE 2>&1
echo "if ps aux | grep 'installer-stage2.sh' | grep -v 'grep' > /dev/null 2>&1; then echo "if ps aux | grep 'installer-stage2.sh' > /dev/null 2>&1; then
true true
else else
/opt/void-usb/installer/install-stage2.sh /opt/void-usb/installer/install-stage2.sh
@ -455,6 +453,6 @@ press_any_key
echo "Creating system image..." echo "Creating system image..."
#TODO: make this work without user interaction #TODO: make this work without user interaction
run_in_target /opt/void-usb/system-image run_in_target /opt/void-usb/backup-fs
reboot reboot
# #

View File

@ -14,11 +14,9 @@ function yesno {
read -p "[y/n] " -n1 DISCARD_ME read -p "[y/n] " -n1 DISCARD_ME
case "$DISCARD_ME" in case "$DISCARD_ME" in
y) y)
echo ""
return 0 return 0
;; ;;
n) n)
echo ""
return 1 return 1
;; ;;
*) *)
@ -95,17 +93,15 @@ for I in ${!SECTIONS[@]}; do
else else
clear clear
cat "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/description.txt" cat "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/description.txt"
echo ""
for J in ${!AVAILABLE_OPTIONS[@]}; do for J in ${!AVAILABLE_OPTIONS[@]}; do
source "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/${AVAILABLE_OPTIONS[$J]}" source "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/${AVAILABLE_OPTIONS[$J]}"
echo "$J: $DESCRIPTION" echo "$J: $DESCRIPTION"
done done
CHOICE="" CHOICE=""
while [ -z "$CHOICE" ]; do while [ -z "$CHOICE" ]; do
echo ""
echo "Select by entering the corresponding number." echo "Select by entering the corresponding number."
read -p "> " CHOICE_NUMBER read -p "> " CHOICE_NUMBER
grep "^[0-9]*$" <<< "$CHOICE_NUMBER" && CHOICE="${AVAILABLE_OPTIONS[$CHOICE_NUMBER]}" CHOICE="${AVAILABLE_OPTIONS[$CHOICE_NUMBER]}"
done done
fi fi

View File

@ -8,16 +8,14 @@ do not rely on the RTC
- only fall back to using rtc if offline - only fall back to using rtc if offline
- do not set the RTC - do not set the RTC
make our own or extract (if feasible) kb selection and time zone selection to hijack them for our purposes make our own or extract (if feasible) kb selection and time zone selection to hijack them for our purposes
- potentially interesting packages
- ckbcomp
- kbd-data
vkpurge old stuff - only keep 2 vkpurgeable kernels vkpurge old stuff - only keep 2 vkpurgeable kernels
- change kernel pre-install hook - change kernel pre-install hook
overview of the installation process at the start overview of the installation process at the start
overall progress indication (step x out of y) overall progress indication (step x out of y)
exclude optical drives exclude optical drives
add newline after yesno (also in backup script)
add bash completion along the line somewhere add bash completion along the line somewhere
replace OpenBox with something lighter test that OpenBox is actually lighter than IceWM - or replace it with something that is
allow unprivileged users to mount / unmount disks in GUI sessions allow unprivileged users to mount / unmount disks in GUI sessions
look into roxterm as an alternative terminal look into roxterm as an alternative terminal
add a zram swap option to package_selections add a zram swap option to package_selections
@ -30,15 +28,8 @@ first run message in xinitrc
put a README.txt on root dir of F2FS partition put a README.txt on root dir of F2FS partition
add online check to all the selections that need internet add online check to all the selections that need internet
sort out /etc/resolv.conf for the chroot sort out /etc/resolv.conf for the chroot
set keyboard layout for initramfs
need some sort of notification handler?
when installing GUI also install elogind xdg-utils dbus-elogind dbus-elogind-libs dbus-elogind-x11 Minimum viable Xorg setup: setxkbmap xauth xorg-video-drivers mesa mesa-dri xorg-server elogind xorg-input-drivers xrandr acpilight xhost xinit xrdb xinput xgamma xset iceauth sessreg transset xcmsdb xkbutils xmodmap dejavu-fonts-ttf
allow backgrounds only for icewm-fancy
when pre-configuring desktop
-> check if pipewire installed
-> add pipewire, pipewire-pulse, wireplumber
-> run IceWM directly if the lighter setup was selected
musl downsides: musl downsides:
- no nvidia drivers - no nvidia drivers
@ -57,16 +48,9 @@ Stage 2:
-> set up user -> set up user
-> ask for username -> ask for username
-> run useradd (non-interactively) -> run useradd (non-interactively)
-> useradd --groups "comma,separated,groups" --create-home --shell /bin/bash $USERNAME
-> groups: dialout users wheel
-> ?? groups:
-> video - Can use GUI? Can use webcam?
-> cdrom optical - can listen to CDs? Can watch DVDs? Can mount / unmount CDs/DVDs?
-> storage - can mount / unmount disks from GUI?
-> scanner - can scan things (for example using XSane?)
-> network - can interface with NetworkManager?
-> kvm - can run QEMU?
-> run passwd (interactively) -> run passwd (interactively)
-> add to groups
-> including sudo group
-> clean up -> clean up
-> mv /mnt/target/etc/sv/agetty-tty1/conf.bak /mnt/target/etc/sv/agetty-tty1/conf -> mv /mnt/target/etc/sv/agetty-tty1/conf.bak /mnt/target/etc/sv/agetty-tty1/conf
-> if [ -f /mnt/target/root/.profile.bak ]; then mv /mnt/target/root/.profile.bak /mnt/target/root/.profile; else rm /mnt/target/root/.profile; fi -> if [ -f /mnt/target/root/.profile.bak ]; then mv /mnt/target/root/.profile.bak /mnt/target/root/.profile; else rm /mnt/target/root/.profile; fi

View File

@ -14,11 +14,9 @@ function yesno {
read -p "[y/n] " -n1 DISCARD_ME < $TTY_OR_CONSOLE read -p "[y/n] " -n1 DISCARD_ME < $TTY_OR_CONSOLE
case "$DISCARD_ME" in case "$DISCARD_ME" in
y) y)
echo ""
return 0 return 0
;; ;;
n) n)
echo ""
return 1 return 1
;; ;;
*) *)
@ -50,39 +48,34 @@ for I in ${!MOUNT_LIST[@]}; do
fi fi
done done
touch /run/void-usb/system-image-excludes touch /run/void-usb/backup-fs-excludes
touch /run/void-usb/system-image-pseudo touch /run/void-usb/backup-fs-pseudo
for I in ${!EXCLUDE_LIST[@]}; do for I in ${!EXCLUDE_LIST[@]}; do
echo "/${EXCLUDE_LIST[$I]}" >> /run/void-usb/system-image-excludes echo "/${EXCLUDE_LIST[$I]}" >> /run/void-usb/backup-fs-excludes
FILE_PERMS="$(stat -c '%a %u %g' "${EXCLUDE_LIST[$I]}")" FILE_PERMS="$(stat -c '%a %u %g' "${EXCLUDE_LIST[$I]}")"
echo "\"/${EXCLUDE_LIST[$I]}\" d $FILE_PERMS" >> /run/void-usb/system-image-pseudo echo "\"/${EXCLUDE_LIST[$I]}\" d $FILE_PERMS" >> /run/void-usb/backup-fs-pseudo
done done
#TODO: refuse to run if system is running #TODO: refuse to run if system is running
#TODO: add a way to force a new system image up without asking (for example a file in /run/void-usb) #TODO: add a way to force backing up without asking (for example a file in /run/void-usb)
#TODO: colors (bright white / light gray for readability) #TODO: colors (bright white / light gray for readability)
echo "Create a new system image? echo "Back up system changes to disk?
This will replace the existing system image with a snapshot of the currently This only affects things outside the /home directory.
running system. Choosing no here will discard any newly installed programs, Backing up the system will take some time.
updates, system configuration changes, etc.
This should not affect your files in /home as they are stored to disk directly.
Check /TODO/README.txt for more information.
Creating a new system image will take some time.
" "
if yesno; then if yesno; then
echo "Building image..." echo "Backing up..."
mksquashfs / /run/void-usb/container/new_squashfs.img -b 1M -comp xz -progress -noappend -pf /run/void-usb/system-image-pseudo -ef /run/void-usb/system-image-excludes mksquashfs / /run/void-usb/container/new_squashfs.img -b 1M -comp xz -progress -noappend -pf /run/void-usb/backup-fs-pseudo -ef /run/void-usb/backup-fs-excludes
#TODO: check if enough disk space #TODO: check if enough disk space
# yes -> create new image next to old image # yes -> create new image next to old image
# no -> create new image in RAM # no -> create new image in RAM
#TODO: figure out when appending to existing squashfs is a good idea #TODO: figure out when appending to existing squashfs is a good idea
mv /run/void-usb/container/new_squashfs.img /run/void-usb/container/squashfs.img mv /run/void-usb/container/new_squashfs.img /run/void-usb/container/squashfs.img
else else
echo "Discarding system changes." echo ""
echo "Not backing up."
fi fi

View File

@ -5,9 +5,8 @@ function check {
DESCRIPTION="BodgeMasters IceWM setup (recommended)" DESCRIPTION="BodgeMasters IceWM setup (recommended)"
XORG_PACKAGES="setxkbmap xauth xorg-video-drivers mesa mesa-dri xorg-server elogind xorg-input-drivers xrandr acpilight xhost xinit xrdb xinput xgamma xset iceauth sessreg transset xcmsdb xkbutils xmodmap dejavu-fonts-ttf"
# TODO # TODO
PACKAGES="$XORG_PACKAGES icewm elogind" PACKAGES=""
function post_install { function post_install {
echo "desktop/icewm-fancy" >> /tmp/stage-2-choices echo "desktop/icewm-fancy" >> /tmp/stage-2-choices

View File

@ -5,9 +5,8 @@ function check {
DESCRIPTION="Lighter IceWM setup" DESCRIPTION="Lighter IceWM setup"
XORG_PACKAGES="setxkbmap xauth xorg-video-drivers mesa mesa-dri xorg-server elogind xorg-input-drivers xrandr acpilight xhost xinit xrdb xinput xgamma xset iceauth sessreg transset xcmsdb xkbutils xmodmap dejavu-fonts-ttf"
# TODO # TODO
PACKAGES="$XORG_PACKAGES icewm elogind" PACKAGES=""
function post_install { function post_install {
echo "desktop/icewm-light" >> /tmp/stage-2-choices echo "desktop/icewm-light" >> /tmp/stage-2-choices

View File

@ -6,9 +6,8 @@ function check {
# TODO: more information for the user # TODO: more information for the user
DESCRIPTION="OpenBox window manager (even more lightweight???)" DESCRIPTION="OpenBox window manager (even more lightweight???)"
XORG_PACKAGES="setxkbmap xauth xorg-video-drivers mesa mesa-dri xorg-server elogind xorg-input-drivers xrandr acpilight xhost xinit xrdb xinput xgamma xset iceauth sessreg transset xcmsdb xkbutils xmodmap dejavu-fonts-ttf" # TODO also add xclock
# TODO PACKAGES=""
PACKAGES="$XORG_PACKAGES xclock openbox elogind"
function post_install { function post_install {
echo "desktop/openbox" >> /tmp/stage-2-choices echo "desktop/openbox" >> /tmp/stage-2-choices