lucidiot's cybrecluster


A Lenovo ThinkPad X201 Tablet. My first ever ThinkPad, a very useful tool for my studies. It has been my daily driver, on and off, for over a year and a half in total. I really like it when I compute on the go, especially on trains or on mountains (not to be confused with mountain). I now try to bring it with me and use it wherever, just to add to the list on this page.


Places it went to

Just taking it with me without doing anything does not count; I have to turn it on and use it for a place to enter this list. This list is unordered. I sometimes add some fun things I did in each place, when I remember them.

Alpine setup

wsinatra got me interested in Alpine, and I am having issues with Ubuntu 20 on most computers with tank being the worst affected, so I switched to Alpine. Below are some notes on the initial setup process.

  1. Go through setup-alpine until the disk prompt, then ^C

  2. apk add lvm2 cryptsetup parted haveged e2fsprogs syslinux
    rc-service haveged start
    parted -a optimal
    # Inside parted
    mklabel msdos
    mkpart primary ext4 0% 100M
    mkpart primary ext4 100M 100%
    set 1 boot on
    # Check that everything looks right
    haveged -n 0 | dd of=/dev/sda2
    cryptsetup luksFormat /dev/sda2
    cryptsetup luksOpen /dev/sda2 lvmcrypt
    pvcreate /dev/mapper/lvmcrypt
    vgcreate vg0 /dev/mapper/lvmcrypt
    lvcreate -L 9G vg0 -n swap
    lvcreate -l 100%FREE vg0 -n root
    # Check that everything looks right
    mkfs.ext4 /dev/sda1
    mkfs.ext4 /dev/vg0/root
    mkswap /dev/vg0/swap
    swapon /dev/vg0/swap
    mount -t ext4 /dev/vg0/root /mnt/
    mkdir -v /mnt/boot
    mount -t ext4 /dev/sda1 /mnt/boot
    setup-disk -m sys /mnt/
    echo "/dev/vg0/swap\tnone\tswap\tdefaults\t0 0" > /mnt/etc/fstab
  3. Add cryptsetup and keymap to the features in /mnt/etc/mkinitfs/mkinitfs.conf

  4. mkinitfs -c /mnt/etc/mkinitfs/mkinitfs.conf -b /mnt/ $(ls /mnt/lib/modules/)
    blkid -s UUID -o value /dev/sda2 > ~/uuid
  5. Set the proper UUID in /mnt/etc/update-extlinux.conf:

    default_kernel_opts="… cryptroot=UUID=<THE UUID> cryptdm=lvmcrypt"

    Also check this:

    root=UUID=<UUID of /dev/mapper/vg0-root>
  6. chroot /mnt/
    # This may cause errors on `/boot`, ignore them
    dd bs=440 count=1 conv=notrunc if=/mnt/usr/share/syslinux/mbr.bin of=/dev/sda
    umount /mnt/boot
    swapoff /dev/vg0/swap
    umount /mnt
    vgchange -a n
    cryptsetup luksClose lvmcrypt
  7. Enable the edge repos in /etc/apk/repositories

  8. apk update
    setup-xorg-base xfce4 xfce4-terminal lightdm-gtk-greeter xfce4-screensaver dbus-x11 sudo
    apk add \
            xf86-video-intel \
            xf86-input-synaptics \
            xf86-input-libinput \
            xf86-input-evdev \
            xf86-input-wacom \
            setxkbmap \
            elogind \
            polkit-elogind \
            gvfs-fuse \
            gvfs-mtp \
            gvfs-smb \
            fuse-openrc \
            thunar-volman \
            udisks2 \
            pavucontrol \
            libreoffice \
            firefox \
            pass \
            git \
            gvim \
            xfce4-screenshooter \
            syncthing \
            xfce4-whiskermenu-plugin \
            onboard \
            evolution \
            vlc \
            openssh \
            tlp \
            cpufreqd \
            blueman \
        pipewire-alsa \
        pipewire-pulse \
    cat <<EOF
    Section "InputClass"
            Identifier      "Keyboard Default"
            MatchIsKeyboard "yes"
            Option          "XkbLayout" "fr"
            Option          "XkbVariant" "oss"
            Option          "XkbOptions" "compose:rctrl"
    EOF >/usr/share/X11/xorg.conf.d/20-keyboard.conf
    adduser -g lucidiot lucidiot
  9. Use visudo to allow lucidiot and add Defaults insults

  10. Edit /etc/conf.d/bootmisc to set wipe_tmp to YES

  11. rc-update del networking boot
    rc-update del wpa_supplicant boot
    rc-update del wpa_cli boot
    rc-update add dbus default
    rc-update add fuse default
    rc-update add networking default
    rc-update add wpa_supplicant default
    rc-update add cpufreqd default
    rc-update add tlp default
    rc-update add bluetooth default
    rc-update add swap default
    rc-service dbus start
    rc-service fuse start
    rc-service lightdm start
  12. Login into XFCE, check everything works

  13. rc-update add lightdm default

Licensed under Creative Commons Attribution 4.0 International Generated on 2023-11-23T19:41:14+01:00 using pandoc