Monday, August 25, 2025

Debian 13: pyhton3 setting virtual environment

Run once

Installing packages

As root

# sudo apt install python3 python3-pip python3-venv

As user for example user1

As user1

We create folder to store python3 packages for user1 folder name is mpyvenv

$ mkdir mypyenv
$ cd mypyenv
~/mypyenv$  python3 -m venv venv
~/mypyenv$ ls
venv

Every time entering virtual environment use this command

$ cd mypyenv
~/mypyenv$ source venv/bin/activate
(venv) [user]@[host]:~/mypyenv$

To exit virtual environment

(venv) [user]@[host]:~/mypyenv$ deactivate
~/mypyenv$ 

References: chatgpt.com gemini.google.com

Friday, August 15, 2025

Debian 13: upgrading ASUS Eee PC 1215B from Debian 11 to Debian 13

ASUS Eee PC 1215B Release April 2011
AMD E-350 dual-core 1.6 GHz
AMD Radeon HD 6310 graphics 1366x768
Ram DDR3

It is recommended to use shell, during upgrade, desktop environment may be restarting and causing screen lock.

To get into shell, after Desktop login menu appear, press Ctrl + Alt + F1. To turn back into Desktop press Ctrl + Alt + F7.

Edit /etc/apt/sources.list

#main
# 11 to 12
deb https://deb.debian.org/debian bookworm main contrib non-free-firmware non-free
# 12 to 13
#deb https://deb.debian.org/debian trixie main contrib non-free-firmware non-free

#mirror auto
# 11 to 12
deb http://mirror.unair.ac.id/debian bookworm main contrib
# 12 to 13
#deb http://mirror.unair.ac.id/debian trixie main contrib

#security
# 11 to 12
deb https://security.debian.org/debian-security bookworm-security main contrib non-free-firmware non-free
# 12 to 13
#deb https://security.debian.org/debian-security trixie-security main contrib non-free-firmware non-free

#update
# 11 to 12
deb https://deb.debian.org/debian bookworm-updates main contrib non-free-firmware non-free
# 12 to 13
#deb https://deb.debian.org/debian trixie-updates main contrib non-free-firmware non-free

#backport
# 11 to 12
deb http://deb.debian.org/debian bookworm-backports main
# 12 to 13
#deb http://deb.debian.org/debian trixie-backports main

As mention in Debian official website, you can not directly upgrade from Debian 11 to Debian 13. You need to upgrade it in sequence

Upgrade Debian 11 to Debian 12

Edit /etc/apt/sources.list, remove '#' any line containing bookworm and add '#' any line containing trixie.

  1. Update Repository
    # apt-get update
  2. Take full upgrade
    # apt full-upgrade
  3. Restart and perform clean up
    # apt-get autoclean && apt-get autoremove -y

This toke 2 hours and 30 minutes. 

This error occurred when we just perform apt upgrade --without-new-pkgs, make restart and upgrade to Debian 13

Preparing to unpack .../base-files_13.8_amd64.deb ...


******************************************************************************
*
* The base-files package cannot be installed because
* /bin is a directory, but should be a symbolic link.
*
* Please install the usrmerge package to convert this system to merged-/usr.
*
* For more information please read https://wiki.debian.org/UsrMerge.
*
******************************************************************************


dpkg: error processing archive /var/cache/apt/archives/base-files_13.8_amd64.deb
 (--unpack):
 new base-files package pre-installation script subprocess returned error exit s
tatus 1
Errors were encountered while processing:
 /var/cache/apt/archives/base-files_13.8_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Upgrade Debian 12 to Debian 13

Edit /etc/apt/sources.list, add '#' any line containing bookworm and remove '#' any line containing trixie.

  1. Update Repository
    # apt-get update
  2. Take full upgrade
    # apt full-upgrade
  3. Restart and perform clean up
    # apt-get autoclean && apt-get autoremove -y

This toke 3 hours to upgrade 1.945 packages with size 1.388 MB.

Total hours are 5 hours and 30 minutes, with all applications upgraded to latest version.

Thursday, August 14, 2025

Debian 13: Ops, something is wrong during upgrading from Debian 12 to Debian 13

If something wrong during upgrade debian 12 to debian 13, so the installation did not finish, here is my share how to solved it. 

In my case, screen got locked, so I need to manual power off and restart the Laptop.

Normal boot to linux won't work, if possible during selecting menu in grub, select "Advanced Option" and select "Recovery Mode". If you can not go into grub menu, you need to use Debian rescue CD/USB, I use minimal (net install CD),



If you use CD/USB, you will rescue your Debian using chroot. 

To repair grub using CD/USB, you need to enter your drive.



To repair broken upgrade using CD/USB, you need to select your Debian partition and mounting /boot partition.

If you using CD/USB rescue, when repair has completed, type exit from chroot

Command to repair broken upgrade process:

# dpkg --configure -a
....
# apt --fix-broken install 
....
# apt full-upgrade
...-
# grub-update
...
# grub-install /dev/sda
....

To manage boot efi using efibootmgr

# apt install efibootmgr
# efibootmgr
BootCurrent: 0002
Timeout: 5 seconds
BootOrder: 0001,3001,0002,2001,2002,2003
Boot0001* Windows Boot Manager    HD(2,GPT,41ed4da9-8f99-445d-b3dc-d37f4ad717da,0x109000,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000061000100000010000000040000007fff0400
Boot0002* debian    HD(2,GPT,41ed4da9-8f99-445d-b3dc-d37f4ad717da,0x109000,0x32000)/File(\EFI\debian\shimx64.efi)
Boot2001* USB Drive (UEFI)    RC
Boot2002* Internal CD/DVD ROM Drive (UEFI)    RC
Boot3000* Internal Hard Disk or Solid State Disk    RC
Boot3001* Internal Hard Disk or Solid State Disk    RC
Boot3002* Internal Hard Disk or Solid State Disk    RC
# efibootmgr --bootorder Boot0002,Boot0001

Laptop HP Model 15-af109AX, with Bios handled Boot Manager. This model may be not supported in Debian 13 (in Debian 12 there was not problem), I can not change boot order using BIOS nor efibootmgr.

If you can not switch sequence of boot loader using BIOS nor efibootmgr, you need to press F9 button to select boot loader you want to start for HP Model 15-af109AX.



 


Wednesday, August 13, 2025

Debian 13: upgrade from debian 12 bookworm to debian 13 trixie

It is recommended to use shell, during upgrade, desktop environment may be restarting and causing screen lock.

To get into shell, after Desktop login menu appear, press Ctrl + Alt + F1. To turn back into Desktop press Ctrl + Alt + F7.

Current version

# cat /etc/debian_version
12.11

Edit /etc/apt/source.list

#deb cdrom:[Debian GNU/Linux 12.0.0 _Bookworm_ - Official amd64 NETINST with firmware 20230610-10:21]/ bookworm main non-free-firmware

#main
#deb https://deb.debian.org/debian bookworm main contrib non-free-firmware non-free
deb https://deb.debian.org/debian trixie main contrib non-free-firmware non-free

#mirror auto
#deb http://httpredir.debian.org/debian bookworm main contrib
deb http://httpredir.debian.org/debian trixie main contrib

#security
#deb https://security.debian.org/debian-security bookworm-security main contrib non-free-firmware non-free
deb https://security.debian.org/debian-security trixie-security main contrib non-free-firmware non-free

#update
#deb https://deb.debian.org/debian bookworm-updates main contrib non-free-firmware non-free
deb https://deb.debian.org/debian trixie-updates main contrib non-free-firmware non-free

#backport
#deb http://deb.debian.org/debian bookworm-backports main
deb http://deb.debian.org/debian trixie-backports main

Updating repository

# apt-get update
Hit:1 https://dl.google.com/linux/chrome/deb stable InRelease                 
Hit:2 https://deb.debian.org/debian trixie InRelease                           
Hit:3 https://security.debian.org/debian-security trixie-security InRelease   
Hit:4 https://deb.debian.org/debian trixie-updates InRelease                   
Hit:5 http://deb.debian.org/debian trixie-backports InRelease                 
Hit:6 http://httpredir.debian.org/debian trixie InRelease   
Reading package lists... Done

Performing minimal upgrade

# apt upgrade --without-new-pkgs

During minimal upgrade, your system may request you to restart some services, allow it. Take some coffee.....

Restart your Debian. This is optional, just make sure system run proper minimal upgrade. 

Performing full upgrade

# apt full-upgrade

Full upgrade may takes sometimes. 

Restart your Debian and perform clean up

# apt-get autoclean && apt-get autoremove -y
...
$ cat /etc/debian_version
13.0
$ uname -an
Linux hpkakiang 6.12.38+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.38-1 (2025-07-16) x86_64 GNU/Linux



Sunday, August 10, 2025

Debian 13: trixie release


NOTE: 

  1. Debian 13 trixie does not support i386 architecture. Users running i386 systems should not upgrade to trixie.  You can run 32 bit application on Debian 13 trixie using 32 bit support. 
  2. Debian 12 bookworm does not cover any i586 processor, minimum processor requirement is i686
  3. Debian 11 bullseye is latest version support i386

Debian 13 trixie release uses Linux kernel 6.12 LTS series.

Debian 13 trixie ships with several desktop environments, such as:

  1. GNOME 48
  2. KDE Plasma 6.3
  3. LXDE 13
  4. LXQt 2.1.0
  5. Xfce 4.20


A total of seven architectures are officially supported for trixie:

  1. 64-bit PC (amd64),
  2. 64-bit ARM (arm64),
  3. ARM EABI (armel),
  4. ARMv7 (EABI hard-float ABI, armhf),
  5. 64-bit little-endian PowerPC (ppc64el),
  6. 64-bit little-endian RISC-V (riscv64),
  7. IBM System z (s390x)

Reference: www.debian.org/News/2025/20250809

Saturday, August 9, 2025

Unix like OS not base on linux

Linux is a very popular open-source Unix-like operating system. Open-source Unix-like operating systems that are not based on Linux and are still actively developed. They are

  1. FreeBSD
    Focus: Performance, advanced networking, storage
    Use Cases: Servers, firewalls, storage appliances (e.g., TrueNAS)
  2. OpenBSD
    Focus: Security, correctness, simplicity
    Known for: Secure-by-default policies, clean codebase
  3. NetBSD
    Focus: Portability — runs on almost any architecture
    Use Cases: Embedded systems, research, legacy hardware
  4. DragonFly BSD
    Focus: Performance, advanced file system (HAMMER2), scalability
  5. illumos
    Descendant of: OpenSolaris (which was derived from UNIX System V)
  6. OpenIndiana
    Goal: Desktop/server OS based on illumos
  7. SmartOS
    Focus: Cloud-native virtualization with zones, ZFS, DTrace
  8. MidnightBSD
    Fork of FreeBSD, focused on desktop use
  9. Darwin
    Apple's open-source core of macOS (not a complete OS itself)
    Basis for macOS and iOS

Most those operating system are intended to run as server connected directly to internet with advance stability and security. 

Tuesday, August 5, 2025

Netbeans: using maven to connect to mariadb

  1. Create project "Java with Maven" -> "Java Application"
  2. Under tab "Project" -> Project Files, edit pom.xml and add mariadb jconnect client
    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    ...
      <dependencies>
    ...
      <dependency>
        <groupId>org.mariadb.jdbc</groupId>
        <artifactId>mariadb-java-client</artifactId>
        <version>3.5.3</version>
        </dependency>
      </dependencies>
    ...
    </project>
  3. Test connection using this code
      public static void main(String[] args) throws SQLException, ClassNotFoundException {
        // TODO Auto-generated method stub
        String muser = "my_user";
        String mpass = "my_password";
        String murl = "jdbc:mariadb://localhost:3306/my_database_name";
        Class.forName("org.mariadb.jdbc.Driver");
        Connection connection = DriverManager.getConnection(murl, muser, mpass);
        System.out.println("ok");
      }