~lucidiot's wiki

tank

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.

tank in tablet mode, used to browse a PostgreSQL database while standing in a square

Specifications

  • Birth date: 2011-03-13
  • Bought second-hand, received on 2017-07-28
  • Product ID: 45N4955
  • Machine type: 3113
  • Serial: R9C12M0
  • Core i5-520UM
  • Intel HD Graphics
  • 12.1" 1280×800 (WXGA) TFT display
  • Wacom Serial Penabled Pen
  • 8GB PC3-8500 RAM
  • SanDisk SSD PLUS 240GB 19136F805340
  • Ricoh 5-in-1 Multicard Reader
  • Intel 10/100/1000 Ethernet
  • Intel HD audio with CX20585 codec
  • ThinkPad Modem (MDC-3.0, 56kbps HDA)
  • 2 MiniPCI Express slots:
    • Intel Centrino Advanced-N 6200 Wi-Fi card
    • Qualcomm Gobi 2000 3G and GPS card, Verizon-locked
  • ExpressCard/54 slot
  • 2MP webcam
  • UPEK Touchstrip TCRD4C fingerprint reader
  • Broadcom BCM2046 Bluetooth Controller
  • TPM 1.2 embedded security system
  • HDAPS support
  • UltraNav trackpoint
  • Intel Active Management Technology 6.x

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.

  • Grenoble
    • My student room
      • Daily driver for a year
      • Helped set up Carthage
    • My first apartment
    • At my best friend’s place in Championnet
    • On a hill near the Désert de l’Écureuil
      • Maintenance on an autonomous webcam and weather station
    • IGA (abandoned geography institute)
      • Saw the Tour de France on a road down there while listening to the organizer’s radio comms
      • Checked the connection to a Wi-Fi network provided by a router many kilometers away
    • Institut Dolomieu (abandoned geology institute)
      • Tried to draw some floorplans, and ate breakfast there
    • Charmant Som (a summit)
      • Listed QRZs received during a hamradio contest
      • Answered random people’s questions about the 6 meter-high antenna we deployed there
    • La Coop
    • La Turbine
    • Under Étoile Polaire
      • Analyzed Wi-Fi scanning results from a ESP32 contraption to look for weak security Wi-Fi access points
    • “Sushione” sushi restaurant
      WEP password: 1234567890
    • Place Verdun
      • Learnt how to tunnel through another server to connect to a server over SSH
      • Wrote some thoughts on using a laptop outside in a journal
    • A park alongside the courthouse
      • Uploaded 120 edits to OpenStreetMap through StreetComplete
      • Did some quasi-meditative writing on where I was and how I was feeling
    • Kateb Yacine public library
    • City center public library
    • On a concrete barrier of the A480 motorway
      • Wrote an XQuery script and a post for RSRSSS
    • French Coffee Shop
      • Found out when tank was born
      • Wrote yet another post for RSRSSS
    • In front of the Méliès movie theater
      • Wrote a post about Dailymotion’s RSS support for RSRSSS
  • La Buisse
    • Plateau du Grand Ratz
  • Lille
    • Lille-Flandres train station
    • Gaston Berger high school
      • Removed the Windows partition, making it my first Linux-only computer
      • Solved riddles in law class using regexes
      • Played games, wrote blog articles, learnt Python during classes
    • Lille university
      • IUT
      • Pierant’s room
      • Liliad (library)
    • Plugged into a dead drop
    • On the stairs to the opera
    • Walking around a neighborhood
      • Got a few WEP passwords using wifite
  • Wattrelos
    • My great-aunt’s house
  • Douai
    • At home
    • Walking around the city center, breaking into WEP passwords using Kali-Linux
    • “Le Prince” kebab restaurant
      WEP password: 1122334455
    • F.P.’s place
  • Brest
    • My aunt’s apartment
      • Configured a router
  • Le Folgoët
    • My grandparents’ house
      • Watching movies
  • Thionville
    • My parents’ home
      • Daily driver for a few months
      • Typed this list
  • Colmar
    • Some cheap Airbnb
      • Read a lot of articles from RSS feeds
      • Solved some geocaching puzzles
  • Paris
    • Teklia’s previous office
  • Carcassonne
    • My grandparents’ house
      • Finished a 4+ month-long group project alone in 2 days
    • My aunt and uncle’s house
  • Valence
    • Valence-TGV Rhône-Alpes-Sud train station
      • Won a game of Battle for Wesnoth
  • Trains
    • Grenoble → Valence TGV
    • Valence TGV → Paris-Lyon
    • Valence TGV → Carcassonne
      • Installed NetworkManager on Alpine to get the Wi-Fi to work
      • Worked on parsing binary files using Kaitai Struct
    • Valence TGV → Grenoble
      • Found a 0.05£ coin
    • Narbonne → Valence TGV
      • Learnt a lot about the Well-Known Binary format
    • Grenoble → Lyon Perrache
    • Lyon Part-Dieu → Paris-Lyon
    • Lyon Part-Dieu → Grenoble
    • Lyon Part-Dieu → Colmar
      • Got delayed by a flood
      • Upgraded an Alpine package
    • Chambéry → Paris-Lyon
    • Grenoble → Paris-Lyon
    • Paris-Lyon → Grenoble
    • Douai → Lille Flandres
    • Lille Flandres → Douai
      • Worked on my first C# project, a coffee machine simulator
      • Played with my Windows 98SE VM
      • Rewrote my French blog
      • Played Euro Truck Simulator 2 while standing

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
    print
    quit
    
    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
    lvscan
    
    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:

    modules=sd-mod,usb-storage,ext4,cryptsetup,keymap,cryptkey,kms,lvm
    root=UUID=<UUID of /dev/mapper/vg0-root>
  6. chroot /mnt/
    # This may cause errors on `/boot`, ignore them
    update-extlinux
    exit
    dd bs=440 count=1 conv=notrunc if=/mnt/usr/share/syslinux/mbr.bin of=/dev/sda
    cd
    umount /mnt/boot
    swapoff /dev/vg0/swap
    umount /mnt
    vgchange -a n
    cryptsetup luksClose lvmcrypt
    reboot
  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 \
        wireplumber
    
    cat <<EOF
    Section "InputClass"
            Identifier      "Keyboard Default"
            MatchIsKeyboard "yes"
            Option          "XkbLayout" "fr"
            Option          "XkbVariant" "oss"
            Option          "XkbOptions" "compose:rctrl"
    EndSection
    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