libre-linux and abrowser working on Debian bookworm with only free packages

1 reply [Last post]
Aku.trisquel
Offline
Joined: 08/06/2025

Ok guys so I've been bouncing around, trying to tame my usb's with bios booting, on a uefi machine

and in the process I managed to get a libre-linux kernel to work on debian and learned some things along the way

basically here's how I did it, because without these extremely unique steps, it's simply not possible

First I installed debian bullseye (11) because it had different usb device handling than 12 that caught my eye, plus the live xfce version boots with only 600 mb of ram utilized after a fresh boot, and is lightning fast, but the packages have been broken since it came out with like the 11.10 point upgrade or whatever, and bookworm was called stable, anyways...

so I actually had bookworm installed beforehand, but bookworm actually behaved differently in a variety of ways, such as not respecting the firmware=never command on the grub command like, which bullseye did,

so then, I installed debian bullseye, with the firmware=never command, which resulted in the non-free repositories being disabled, and no firmware ever being installed, which bookworm also did, even though I disabled all the non-free sources in it's apt list.

anyways long story short, then, after installing bullseye with the successful firmware=never command, I eventually tried building libre kernels... the regular kernel, and installing a bunch of packages, but because many of the packages on bullseye became broken after bookworm was released, I couldn't get the dependencies for building the kernel, and I tried the old trick of pulling them from bookworms repositories, which seemed like it was going to be okay, and it wasn't, I kept building broken kernels... and couldn't figure out why, until a duckduckgo search suggested my packages were broken, which was absolutely the case!

so then I decided, that if I can't build custom kernels, I need a new system, I can't sit around with a default kernel... (i broke debian bullseye)(but it's not my fault it was already broken) so then I decided to update my sources list, and sudo apt dist-upgrade to upgrade to bookworm, which I wanted to avoid using, but I knew, that if I did that, and it worked, at least my packages would be fixed, aligned, and then I could build custom kernels again...

So I did it, and for the first time in history, it actually worked, I really expected it to totally break my system upgrading like 2000 packages, including xorg, and basically everything, which it always has in the past, but it actually worked without issues, and then I immediately was able to build a custom libre-linux kernel on Debian Bookworm without issues, and using the .config file from the freesh repository, combined with the tarball from the main repo...

Also I got a .deb for abrowser 140, that installed without issues, like this... sudo dpkg -i abrowser.deb

and a quick sudo apt install -f

afterwards to fix the errors and pull in exactly 1 missing package, and now I have a working debian bookworm, with only free packages, libre-linux, abrowser, and an msdos partition on an nvme harddrive...

user@pc:~$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
user@pc:~$ uname -a
Linux pc 6.16.1-gnu.Super #2 SMP PREEMPT Sat Aug 16 23:03:32 EDT 2025 x86_64 GNU/Linux

I was thinking about rebranding it as trisquel and pretending to be trisquel, but I hope you guys aren't so mean to drive me away, for using different systems : D I'm always hopping around trying different things...

Aku.trisquel
Offline
Joined: 08/06/2025

I'm gonna leave a short guide here, for anyone interested... as a long time gnu also linux (GaL) user I have often found resources on the web to be lacking, such as for example... links, simply links to other websites, as opposed to recursive links, to a host projects own website. Then, the main search engines loop us around to the same tired old websites, like stackexchange or ubuntu forums, that also do not have links to other websites, or helpful information for actually escaping these limited paradigms... anyways...

Presumeably, you can disable non-free packages on Debian Bookworm

https://wiki.debian.org/Firmware

"How to disable detection and use of non-free firmware

Since Debian 12, the installer will automatically check for needed firmware blobs and add them as required. If you would prefer it not to do this, add

firmware=never

to the installer boot parameters as described in the installation guide.

On a Debian Live ISO, add

firmware=never live-installer/enable=false"

Older releases

"For Debian 11 (bullseye) and older, Debian did not include firmware on official installation and live images. The following sections are now of historical interest and describe how firmware was used when installed those old releases of Debian."

I used the live iso, and only firmware=never on the command line, and not,
firmware=never live-installer/enable=false
as the wiki instructs us, and haven't tested this to see if it will work yet.

Otherwise you can use bullseye, which was shipped without firmware on the install cd's, and check your /etc/apt/sources.list after booting up, I tried firmware=never on the command line, I don't even know if that command did anything... that's how it goes with linux, there are lots of difficult to track down technical details. Then you will have to sudo apt upgrade, reboot, upgrade your sources to bookworm, then sudo apt update && sudo apt dist-upgrade. It might be helpful to note, that I disabled the security repository, which may have helped ease the transition.

For abrowser, I pulled the latest version from the trisquel(ecne) 12 repositories like this, on a trisquel 12 system: sudo apt download abrowser
When you do that, the command output will inform you the .deb for it, is located inside of...
/var/cache/apt/archives/abrowser_140.0.4+build1-0ubuntu0.22.04.1~mt1+11.0trisquel124_amd64.deb
which can be copied as root somewhere else

Then on debian, we can install the latest abrowser like this..
sudo dpkg -i abrowser_140.0.4+build1-0ubuntu0.22.04.1~mt1+11.0trisquel124_amd64.deb

and then to fix the error message

sudo apt install -f

For the libre kernel, we can just grab what we need straight from the fsfla website...

The tarballs I used are the ones from the main release directory...
https://linux-libre.fsfla.org/pub/linux-libre/releases/LATEST-6.16.N/

the config I used is from the freesh directory
https://linux-libre.fsfla.org/pub/linux-libre/freesh/configs/6.16/x86-64

The hard part was getting debian to install without firmware... the easy way to do that is to start from bullseye, when it wasn't included by default on the CD's... bullseye is located here
https://cdimage.debian.org/mirror/cdimage/archive/11.11.0-live/amd64/iso-hybrid/

and here is the standard(not live) installer
https://cdimage.debian.org/mirror/cdimage/archive/11.10.0/amd64/iso-dvd/
sometimes I like to use that too

then after fully upgrading the system, bullseye->bookworm->sudo apt upgrade,
we can get the debian dependencies for building the kernel...(I usually build it as root in my home directory)(old school method)

sudo apt install bc binutils bison dwarves flex gcc git gnupg2 gzip libelf-dev libncurses5-dev libssl-dev make openssl perl-base rsync tar xz-utils pahole gawk

(gawk is a new addition)

It's sort of complex explaining all the details, so I'm going to try and avoid doing that.

essentially, as root extract the tarball where you would like the source to reside, then you can run the commands for successfully configuring, building the kernel, and change things to suit your needs.

tar -xf linux-libre-6.16.1-gnu.tar.xz

cd linux-6.16/

#(this is the kernel .config from freesh)
cp ../x86-64 .config

make olddefconfig

#(you can do make localmodconfig if you learn how to use it here)

# then this script disables module signing, which wont work,
# for a basic custom debian kernel
./scripts/config --file .config --disable MODULE_SIG

# then make menuconfig allows us to easily modify it,
# but if you modify too much you will likely break it,
# (don't turn off symmetric multi processing support)
make menuconfig

# then the final build all-in-one command
# sync is a workaround for different filesystem types as opposed to ext4
# sometimes included anyways just for certainty

make -j$(nproc) && make modules && make modules_install && make headers_install && make install && sync && sudo poweroff

# the kernel wont use all of your cpu processing power, giving you enough
# room to use a web browser, or listen to music or read a book,
# while the kernel is compiling, to have a stable compilation you want
# to close all programs ideally, and I recommend disabling network access.
# if you want to compile faster, there is a trick to add +1 to the $(nproc) value

# can use the command make help inside the kernel directory to learn
# about all the make commands, and the help option inside of make menuconfig
# to learn about all the different options there.