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


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



    Users can expect 3 years of full support for each release and 2 years of extra LTS support.

    • Debian 11 ("bullseye") — current "stable" release EOL: ~2024-07
    • Debian 10 ("buster") — current "oldstable" release EOL: 2022-09-10
    • Debian 9 ("stretch") — "oldoldstable" release, under LTS support
    • Debian 8 ("jessie") — archived release, under extended LTS support
    • Debian 7 ("wheezy") — obsolete stable release
    • Debian 6.0 ("squeeze") — obsolete stable release


    APT list


    deb bullseye main contrib
    deb bullseye-updates main contrib
    deb bullseye-proposed-updates main contrib
    # deb bullseye-backports main contrib
    deb bullseye-security main contrib

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


    deb buster main contrib
    deb-src buster main contrib
    deb buster-updates main contrib
    deb-src buster-updates main contrib
    deb buster/updates main contrib
    deb-src buster/updates main contrib

    ISO arm

    Hash: SHA256
    735401ae94a8ea5b56ebb09839f47f4419b60ad0411f489b266a21d7e736d860  buster-minimal-rock64-0.11.2-1187-arm64.img.xz
    -----END PGP SIGNATURE-----

    Note: default ssh user rock64 and password rock64


    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.


    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:
    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 wheezy/pve pve-firmware all 1.0-23 [19.7 MB]
    Get:2 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

    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 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


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

    List kernels

    apt-cache search linux-image




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


    apt install build-essential devscripts debhelper

    Tree structure of files

    |-- changelog
    |-- compat
    |-- control
    |-- rules
    |-- source
    |-- *preinst
    |-- *postinst
    |-- *prerm
    |-- *postrm


    • those with * are optional, just good to know it can be specified
    • control contains the version, package's dependencies, maintainer contact, architecture, description
    • rules set of rules to build the package
    • compat the debhelper compatbility version


    Minimal rule (using debhelper)

    #!/usr/bin/make -f
    #DH_VERBOSE = 1
      dh $@ 
    # you can override a rule, e.g.
    #	echo "passed... assuming that test are done before building package"

    Note: see man debhelper 7

    Create changelog

    dch --create

    Requires: devscripts

    Build package

    Make a package :

    # debuild (old ?)
    dpkg-buildpackage -rfakeroot -b  # or dpkg-buildpackage -us -uc 

    Info on package

    dpkg --info file.deb  # or -I
    # extract only control informations
    dpkg -e file.deb # see DEBIAN/ directory
    # list files
    dpkg --contents file.deb
    # extract everything
    ar x file.deb
    # changelog
    apt-get changelog package


    Unpack / Repack a package

    mkdir tmp
    dpkg-deb -R original.deb tmp
    # edit DEBIAN/postinst
    dpkg-deb -b tmp fixed.deb