Debian

    First installation on a desktop

    Here are some notes in case you install debian for the first time from the [official website]

    • configure wired ethernet (avoid trouble to configure later)
    • if you need to encrypt a partition, ensure that you first have EFI partition (~500MB) and /boot (ext4, ~500MB)

    Auto security updates

    apt-get install unattended-upgrades && dpkg-reconfigure unattended-upgrades
    

    KDE

    If you are minimalist install kde-plasma-desktop, if you need more like kwin (to move a window through desktops) install kde-standard.

    source

    APT list

    Bullseye

    deb http://deb.debian.org/debian/ bullseye main contrib
    deb http://deb.debian.org/debian/ bullseye-updates main contrib
    deb http://deb.debian.org/debian bullseye-proposed-updates main contrib
    # deb http://deb.debian.org/debian/ bullseye-backports main contrib
    
    deb http://deb.debian.org/debian-security/ bullseye-security main contrib
    

    Note: you can add non-free if some non open-source packages are required.

    Buster

    deb http://deb.debian.org/debian/ buster main contrib
    deb-src http://deb.debian.org/debian/ buster main contrib
    
    deb http://deb.debian.org/debian/ buster-updates main contrib
    deb-src http://deb.debian.org/debian/ buster-updates main contrib
    
    deb http://security.debian.org/debian-security buster/updates main contrib
    deb-src http://security.debian.org/debian-security buster/updates main contrib
    

    ISO arm

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA256
    
    735401ae94a8ea5b56ebb09839f47f4419b60ad0411f489b266a21d7e736d860  buster-minimal-rock64-0.11.2-1187-arm64.img.xz
    -----BEGIN PGP SIGNATURE-----
    
    iHUEAREIAB0WIQTvklEfN1MKqSoQFZ9IVFdXiuZ0RgUCYTzbhgAKCRBIVFdXiuZ0
    RjElAQDdaoyDS7CsZzt4gVwt073efuAn81n8jW8xOPa+bSO2xgEA3HeK5aQqS93O
    1+7YB86Hlwug9anuss3MXJX1r5R9GaY=
    =PEDo
    -----END PGP SIGNATURE-----
    

    Note: default ssh user rock64 and password rock64

    source

    Change Kernel

    Steps: 1. Download/install with apt-get a kernel ((will be added in boot/ directory)) 2. Recreate new grub.cfg ((normally apt-get will do this step)) 3. Retrieve number in menuentry of grub for kernel you'd like to boot 4. Use this number to set-up as default boot kernel 5. Reboot and check kernel expected is here. 6. You can remove old kernel.

    Example:

    root@host1:~# apt-get install pve-firmware pve-kernel-2.6.32-26-pve
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages will be REMOVED:
      firmware-linux-free
    The following NEW packages will be installed:
      pve-firmware pve-kernel-2.6.32-26-pve
    0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
    Need to get 52.8 MB of archives.
    After this operation, 90.1 kB disk space will be freed.
    Do you want to continue [Y/n]? y
    Get:1 http://download.proxmox.com/debian/ wheezy/pve pve-firmware all 1.0-23 [19.7 MB]
    Get:2 http://download.proxmox.com/debian/ wheezy/pve pve-kernel-2.6.32-26-pve amd64 2.6.32-114 [33.1 MB]
    Fetched 52.8 MB in 4s (10.9 MB/s)
    (Reading database ... 24530 files and directories currently installed.)
    Removing firmware-linux-free ...
    Selecting previously unselected package pve-firmware.
    (Reading database ... 24497 files and directories currently installed.)
    Unpacking pve-firmware (from .../pve-firmware_1.0-23_all.deb) ...
    Selecting previously unselected package pve-kernel-2.6.32-26-pve.
    Unpacking pve-kernel-2.6.32-26-pve (from .../pve-kernel-2.6.32-26-pve_2.6.32-114_amd64.deb) ...
    Setting up pve-firmware (1.0-23) ...
    Setting up pve-kernel-2.6.32-26-pve (2.6.32-114) ...
    update-initramfs: Generating /boot/initrd.img-2.6.32-26-pve
    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-3.2.0-4-amd64
    Found initrd image: /boot/initrd.img-3.2.0-4-amd64
    Found linux image: /boot/vmlinuz-2.6.32-26-pve
    Found initrd image: /boot/initrd.img-2.6.32-26-pve
      No volume groups found
    done
    

    Note: here we install a kernel 2.6.32, linux don't choose him as default cause the version is older than 3.2 which is already there((You could verify this on this step, just do a reboot, and using uname, you'll see kernel 3.2)). We could do a apt-get remove of current version, but it's really dangerous cause we currently running on it. That's why we keep the current version of kernel, and changing the default kernel boot((see below)).

    grub-mkconfig -o /boot/grub/grub.cfg # allow to create config file for grub, based on kernel available in /boot/*
    

    Notice: Normally apt-get doing this step automatically.

    root@host1:~# grep menuentry /boot/grub/grub.cfg
    menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64' --class debian --class gnu-linux --class gnu --class os { # entry 0
    menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os { # entry 1
    menuentry 'Debian GNU/Linux, with Linux 2.6.32-26-pve' --class debian --class gnu-linux --class gnu --class os { # entry 2
    menuentry 'Debian GNU/Linux, with Linux 2.6.32-26-pve (recovery mode)' --class debian --class gnu-linux --class gnu --class os { # entry 3
    
    root@host1:~# sed -i 's/set default="0"/set default="2"/g' /boot/grub/grub.cfg
    

    After reboot, we check kernel expected is currently using

    root@host1:~# uname -a
    Linux host1.frenchwinesociety.org 2.6.32-26-pve #1 SMP Mon Oct 14 08:22:20 CEST 2013 x86_64 GNU/Linux
    

    It's present, so we can remove old kernel

    apt-get remove linux-image-amd64 linux-image-3.2.0-4-amd64 linux-base
    

    And now we need to upgrade grub.cfg

    update-grub
    

    Notice: alias for ''grub-mkconfig -o /boot/grub/grub.cfg''

    List kernels

    apt-cache search linux-image
    

    Packaging

    Tutorial:

    apt install packaging-tutorial
    okular /usr/share/doc/packaging-tutorial/packaging-tutorial.pdf
    

    Install packages:

    apt install build-essential devscripts
    

    Make a package :

    debuild
    

    @todo talk about debian/ directory, authors file, etc...

    @todo sample example : http://stackoverflow.com/questions/20959644/building-debian-package-for-shell-script