- download kernel 5.17 source tar.gz file from kernel.org
- Unpack the source and apply the patch with cd linux; patch -p1 < patch_file
- Run "make localmodconfig"
- Compile (run "make")
- Install: sudo make modules_install install
- reboot and choose the new kernel in grub
Saturday, April 9. 2022
Building Kernel for Debian
Saturday, May 8. 2021
Package vital stats via dpkg
# dpkg -s sc Package: sc Status: install ok installed Priority: optional Section: math Installed-Size: 440 Maintainer: Adam MajerArchitecture: amd64 Source: sc (7.16-4) Version: 7.16-4+b3 Depends: libc6 (>= 2.14), libncurses6 (>= 6), libtinfo6 (>= 6) Description: Text-based spreadsheet with VI-like keybindings "Spreadsheet Calculator" is a much modified version of the public- domain spread sheet sc, which was posted to Usenet several years ago by Mark Weiser as vc, originally by James Gosling. It is based on rectangular table much like a financial spreadsheet. . Its keybindings are familiar to users of 'vi', and it has most features that a pure spreadsheet would, but lacks things like graphing and saving in foreign formats. It's very stable and quite easy to use once you've put a little effort into learning it.
Debian Versioning
# lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux bullseye/sid Release: testing Codename: bullseye
Thursday, May 6. 2021
Unable to open MTP device "001,104"
When attaching an Android device to a Linux machine, you may see a popup with the message:
Unable to open MTP device "001,104"
The numbers may vary depending upon device and port:
# tail -f /var/log/kern.log May 5 22:53:51 nuc8i7hvk01 kernel: [3205901.564694] usb 1-1: new high-speed USB device number 105 using xhci_hcd May 5 22:53:51 nuc8i7hvk01 kernel: [3205901.714863] usb 1-1: New USB device found, idVendor=18d1, idProduct=4ee1, bcdDevice= 2.23 May 5 22:53:51 nuc8i7hvk01 kernel: [3205901.714865] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 May 5 22:53:51 nuc8i7hvk01 kernel: [3205901.714866] usb 1-1: Product: Nexus 6 May 5 22:53:51 nuc8i7hvk01 kernel: [3205901.714867] usb 1-1: Manufacturer: motorola May 5 22:53:51 nuc8i7hvk01 kernel: [3205901.714868] usb 1-1: SerialNumber: ZX1G22MGK2
Further diagnostics generate:
# mtp-detect libmtp version: 1.1.17 Listing raw device(s) No raw devices found. root@nuc8i7hvk01:/home/rpb# mtp-detect libmtp version: 1.1.17 Listing raw device(s) Device 0 (VID=18d1 and PID=4ee1) is a Google Inc Nexus/Pixel (MTP). Found 1 device(s): Google Inc: Nexus/Pixel (MTP) (18d1:4ee1) @ bus 1, dev 103 Attempting to connect device(s) error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to initialize device Unable to open raw device 0 OK.
On my system, the culprit is the gvfs filesystem packages:
# dpkg -l |grep gvfs ii gvfs:amd64 1.46.2-1 amd64 userspace virtual filesystem - GIO module ii gvfs-backends 1.46.2-1 amd64 userspace virtual filesystem - backends ii gvfs-common 1.46.2-1 all userspace virtual filesystem - common data files ii gvfs-daemons 1.46.2-1 amd64 userspace virtual filesystem - servers ii gvfs-fuse 1.46.2-1 amd64 userspace virtual filesystem - fuse server ii gvfs-libs:amd64 1.46.2-1 amd64 userspace virtual filesystem - private libraries # systemctl |grep gvfs run-user-1000-gvfs.mount loaded active mounted /run/user/1000/gvfs # ps aux |grep gvfs rpb 1886 0.0 0.0 241436 4036 ? Ssl Mar29 0:00 /usr/libexec/gvfsd rpb 1891 0.0 0.0 753756 3364 ? Sl Mar29 0:26 /usr/libexec/gvfsd-fuse /run/user/1000/gvfs -f rpb 2009 0.0 0.0 501008 4632 ? Ssl Mar29 0:00 /usr/libexec/gvfs-udisks2-volume-monitor rpb 2041 0.0 0.0 237900 4828 ? Ssl Mar29 0:00 /usr/libexec/gvfs-mtp-volume-monitor rpb 2061 0.0 0.0 239776 3052 ? Ssl Mar29 0:00 /usr/libexec/gvfs-gphoto2-volume-monitor rpb 2069 0.0 0.0 237500 3052 ? Ssl Mar29 0:00 /usr/libexec/gvfs-goa-volume-monitor rpb 2073 0.0 0.0 315992 3160 ? Ssl Mar29 0:41 /usr/libexec/gvfs-afc-volume-monitor rpb 2135 0.0 0.0 391244 6824 ? Sl Mar29 0:02 /usr/libexec/gvfsd-trash --spawner :1.8 /org/gtk/gvfs/exec_spaw/0 rpb 178920 0.0 0.0 315892 3956 ? Sl Mar30 0:01 /usr/libexec/gvfsd-network --spawner :1.8 /org/gtk/gvfs/exec_spaw/1 rpb 178946 0.0 0.0 317528 3172 ? Sl Mar30 0:01 /usr/libexec/gvfsd-dnssd --spawner :1.8 /org/gtk/gvfs/exec_spaw/3 rpb 179014 0.0 0.0 206540 5372 ? Ssl Mar30 1:29 /usr/libexec/gvfsd-metadata
The file browser known as pcmanfs does not seem to be able to access the filesystem
Solution: Dolphin, as a substitute for Nautilus, can be used to access the virtual filesystems.
The command gio can be used to access the file system:
# gio Usage: gio COMMAND [ARGS…] Commands: help Print help version Print version cat Concatenate files to standard output copy Copy one or more files info Show information about locations list List the contents of locations mime Get or set the handler for a mimetype mkdir Create directories monitor Monitor files and directories for changes mount Mount or unmount the locations move Move one or more files open Open files with the default application rename Rename a file remove Delete one or more files save Read from standard input and save set Set a file attribute trash Move files or directories to the trash tree Lists the contents of locations in a tree Use “gio help COMMAND” to get detailed help.
Background info via Wikipedia, which comes with a set of back-ends, including trash support, SFTP, FTP, WebDAV, SMB, and local data via Udev integration, OBEX, MTP and others.
- Don't know why this has to be so difficult on Debian, why all the competing applications which lock each other out?
- Remember: on Android, once connected, select transfer files
- May need to open a new dolphin window to actually get at the files
- And then in Dolphin, the actual right-click/copy/paste doesn't actually work -- need to load a file and then save it.... just painful .. I hope other's experience is less painful ... maybe I have to rebuild my machine
Tuesday, April 6. 2021
Debian Boot Links
- DebianInstaller - wiki starting point for many things installer
- Debian Installer Internals - introduction to the inner workings of the installer when it is running, its components (udebs) and its build system.
- Debian GNU/Linux Installation Guide - installation instructions for the Debian GNU/Linux system for the 64-bit PC (“amd64”) architecture. It also contains pointers to more information and information on how to make the most of your new Debian system.
- Netboot Assistant - provides a tool to simplify the preparation of files for TFTP net booting
- UEFI - describe UEFI for Debian purposes: what's supported in Debian and how to use it, plus some troubleshooting tips.
- Installing Debian using network booting - describes installing a new Debian system with no CD, DVD, USB at all. By the end of the installation process, the new machine is able to run without the support of the server. During the installation, you will need a network boot server.
Monday, January 18. 2021
Grub Notes
When in the grub prompt, these two commands provide good situational awareness:
- run the 'set' command to see what the current boot and network variables are.
- run the 'ls' command to see what devices and partitions are available
Then something like 'ls (hd0,gpt1)/boot' can show files in that partition
When running manual boot operations in the grub menu on a Dell Wyse 3040, something along the lines of the following might be used:
grub> linux (hd0,gpt2)/vmliunz root=/dev/mmcblk0p2 ro grub> initrd (hd0,gpt2)/initrd.img grub> boot
At Grub not loading config file or booting into linux automatically shows the trick of starting the grub menu:
grub> configfile (hd0,gpt4)/boot/grub/grub.cfg
Saturday, December 19. 2020
Debian Debugging During Install
Is it possible to shift+page-up to reveal the backtrace? The backtrace section ends with "---[ end trace 75435… ]---" If that's not possible, see if you can get a copy from /var/log after rebooting with a working kernel or when using a network disk. If that's not possible, and you have good reflexes, you could try ctr+s or scroll-lock to pause the kernel output at just the right moment, but it's probably easier to just set up remote logs:
Wednesday, April 29. 2020
What can you preseed when installing Debian?
From Debian Misc Developer News (#51):
Steve McIntyre created[3] a debian-preseed[4] service that extracts all of the debconf templates in the Debian archive and lists each of the possible preseed options available along with their descriptions. If you want to repeat the extractions, you can use Steve's new Perl script or the existing tools on the preseed wiki page[5].
-- Paul Wise
Monday, March 16. 2020
Debian Preseed Updates in Bullseye Alpha 2 release
From the debian-boot mailing list:
* pkgsel: - Ensure tasksel is installed, regardless of its priority. - Add preseedable pkgsel/run_tasksel debconf template, making it possible (by setting it to false) to skip tasksel entirely (installation and prompt), while still benefiting from other pkgsel features. * preseed: - Update auto-install/defaultroot, replacing buster with bullseye.
Has loads of scripts and conditional actions going on, and is intended to work either from a remote server, or from a directory that d-i can see: hands.com/d-i/
he initrd of d-i can indeed be extended / appended. And in the "appendix" goes the desired extras. Then
d-i preseed/early_commands /myextras/early_script
Sunday, December 22. 2019
LXDE Screen Rotation Settings on Debian
On my Debian desktop, I have both of my primary monitors in portrait mode, with a third monitor in landscape mode. The login screen is therefore rotated 90 degrees from how it needs to be. After login, I need to manually go into System Settings, and manually rotate the monitors.
That is, up until now. A little poking around says I need to:
apt install arandr
This is a GUI application which will create a script in .screenlayout which can be auto-started upon login:
$ cat .screenlayout/bythree.sh #!/bin/sh xrandr \ --output DisplayPort-0 --primary --mode 3840x2160 --pos 0x8 --rotate right \ --output DisplayPort-1 --mode 3840x2160 --pos 2160x0 --rotate right \ --output DisplayPort-2 --off \ --output DisplayPort-3 --mode 2560x1600 --pos 4320x0 --rotate normal \ --output HDMI-A-0 --off \ --output HDMI-A-1 --off
This can be autostarted in LXDE with:
$ cat ~/.config/lxsession/LXDE/autostart @lxpanel --profile LXDE @pcmanfm --desktop --profile LXDE @xscreensaver -no-splash #@~/.screenlayout/bythree.sh <= does not work #@${HOME}/.screenlayout/bythree.sh <= does not work # make sure there is a line return at end of command: @/home/me/.screenlayout/bythree.sh
Instructions for the autostart file can be found at LXSession.
Saturday, November 16. 2019
Rebuilding Linux
When needing to rebuild a personal linux machine, some suggested commands to collect state:
dpkg --get-selections > ~/mint/Package.list apt-key exportall > ~/mint/Repo.keys crontab -u wgking -l > ~/mint/crontab.backup
Debian Linux Bluetooth - Cannot Find Adapter
For some odd reason, my Bluetooth based mouse stopped working on my Debian Linux workstation. Going into the Bluetooth control panel in Settings indicated that no Bluetooth Adapter could be found.
In scouring the help groups, the solution is to go into BIOS, disable Bluetooth, reboot, restart into BIOS, and enable Bluetooth. In the end, this revived my Bluetooth adapters and devices.
Tuesday, October 15. 2019
Bypass GUI on Debian systemd Based Systems
At one point in time, removing 'quiet' and placing 'text' on the grub/linux command line would boot in to console mode, the current way to do that is the remove 'quiet' and add the following to the linux kernel command line:
systemctl set-default multi-user.target
I need to keep this around and see what it does to the boot up log listing (based upon Force Debian console into text mode, it can be used when ILO complains of "Monitor is in graphics mode or an unsupported text mode.":
GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"
Another useful function is the following to disable graphical terminal in the grub boot file (use update-grub after any changes):
GRUB_TERMINAL=console
Wednesday, June 26. 2019
pigz: abort: write error on <stdout> (No space left on device)
On Debian Buster, even when cleaned of all older kernels, my /boot directory seems to be short of space now. I can't seem to update when just one kernel is present:
# ls -alt /boot total 42733 drwxr-xr-x 5 root root 1024 Jun 26 01:02 . -rw-r--r-- 1 root root 34752610 Jun 26 01:01 initrd.img-4.19.0-5-amd64 drwxr-xr-x 5 root root 1024 Jun 25 23:29 grub drwxr-xr-x 1 root root 234 Jun 3 18:06 .. -rw-r--r-- 1 root root 206223 May 15 16:07 config-4.19.0-5-amd64 -rw-r--r-- 1 root root 3370661 May 15 16:07 System.map-4.19.0-5-amd64 -rw-r--r-- 1 root root 5217520 May 15 16:07 vmlinuz-4.19.0-5-amd64 drwx------ 2 root root 12288 Jul 25 2018 lost+found drwx------ 3 root root 4096 Dec 31 1969 efi
My problem, is when adding or installing packages, I end up with:
Building cpio /boot/initrd.img-4.19.0-5-amd64.new initramfs pigz: abort: write error on(No space left on device) E: mkinitramfs failure pigz 28 update-initramfs: failed for /boot/initrd.img-4.19.0-5-amd64 with 1.
The solution is to mv or remove initrd.img-4.19.0-5-amd64.
I can then rebuild the file with:
# update-initramfs -cvk `uname -r`
or removing the file prior to installing updates:
~/initramfs# rm /boot/initrd.img-4.19.0-5-amd64 ~/initramfs# apt install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 140 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up initramfs-tools (0.133) ... update-initramfs: deferring update (trigger activated) Processing triggers for initramfs-tools (0.133) ...
On watching the build, there must be a bunch of firmware files going in there. I wonder how to tone that down (mostly nuc8i7hvk01 special purpose display).
A bunch here -- will need to tone that down I think -- will need to go back to my installation notes to see why they are there:
# du -h --max-depth=1 /lib/firmware/amdgpu/ 25M /lib/firmware/amdgpu/
For simpler jobs, some commands to keep in mind:
- sudo apt-get autoclean
- sudo apt-get clean
- sudo apt-get autoremove
- sudo apt-get purge
2019/08/12 Most of the firmware size issue is resolved by:
- removing the firmware-misc-nonfree package, most of which seems to be included with no descretion
- keeping the firmware-amd-graphics package, but moving the /lib/firmware/amdgpu and /lib/firmware/radeon directories elsewhere, and 'mv firmware/amdgpu/vegam* /lib/firmware/' back again as the only files needed based upon 'dmesg|grep firmware'.
# lshw -short |grep Polaris /0/100/1/0 /dev/fb0 display Polaris 22 XT [Radeon RX Vega M GH] /0/100/1/0.1 multimedia Polaris 22 HDMI Audio
# dmesg|grep firmware [ 0.229009] Spectre V2 : Enabling Restricted Speculation for firmware calls [ 1.313160] amdgpu 0000:01:00.0: firmware: direct-loading firmware amdgpu/vegam_pfp.bin [ 1.313171] amdgpu 0000:01:00.0: firmware: direct-loading firmware amdgpu/vegam_me.bin [ 1.313179] amdgpu 0000:01:00.0: firmware: direct-loading firmware amdgpu/vegam_ce.bin [ 1.313188] amdgpu 0000:01:00.0: firmware: direct-loading firmware amdgpu/vegam_rlc.bin [ 1.313224] amdgpu 0000:01:00.0: firmware: direct-loading firmware amdgpu/vegam_mec.bin [ 1.313261] amdgpu 0000:01:00.0: firmware: direct-loading firmware amdgpu/vegam_mec2.bin [ 1.314058] amdgpu 0000:01:00.0: firmware: direct-loading firmware amdgpu/vegam_sdma.bin [ 1.314069] amdgpu 0000:01:00.0: firmware: direct-loading firmware amdgpu/vegam_sdma1.bin [ 1.314167] amdgpu 0000:01:00.0: firmware: direct-loading firmware amdgpu/vegam_uvd.bin [ 1.314170] [drm] Found UVD firmware Version: 1.130 Family ID: 16 [ 1.314786] amdgpu 0000:01:00.0: firmware: direct-loading firmware amdgpu/vegam_vce.bin [ 1.314789] [drm] Found VCE firmware Version: 53.21 Binary ID: 3 [ 1.314987] amdgpu 0000:01:00.0: firmware: direct-loading firmware amdgpu/vegam_smc.bin [ 3.772379] iwlwifi 0000:06:00.0: firmware: direct-loading firmware iwlwifi-8265-36.ucode [ 3.775171] iwlwifi 0000:06:00.0: loaded firmware version 36.8fd77bb3.0 op_mode iwlmvm
# ls -alt /lib/firmware/amdgpu/ total 1284 drwxr-xr-x 1 root root 290 Aug 13 09:36 . -rw-r--r-- 1 root root 16660 Aug 13 09:36 vegam_rlc.bin -rw-r--r-- 1 root root 12692 Aug 13 09:36 vegam_sdma1.bin -rw-r--r-- 1 root root 12692 Aug 13 09:36 vegam_sdma.bin -rw-r--r-- 1 root root 130964 Aug 13 09:36 vegam_smc.bin -rw-r--r-- 1 root root 375424 Aug 13 09:36 vegam_uvd.bin -rw-r--r-- 1 root root 166816 Aug 13 09:36 vegam_vce.bin -rw-r--r-- 1 root root 8852 Aug 13 09:36 vegam_ce.bin -rw-r--r-- 1 root root 17044 Aug 13 09:36 vegam_me.bin -rw-r--r-- 1 root root 262824 Aug 13 09:36 vegam_mec2.bin -rw-r--r-- 1 root root 262824 Aug 13 09:36 vegam_mec.bin -rw-r--r-- 1 root root 17044 Aug 13 09:36 vegam_pfp.bin drwxr-xr-x 1 root root 2740 Aug 13 09:31 ..