The small linux problem thread

Thanks! That gave me some insights how to set up the fstab file. However! I’m pretty sure that there was something special that you wrote in it for like SSD devices, since 4 of my devices are M.2 SSD’s, I’m a bit confused to if this is the right way to go, regarding the fstab file.

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>                             <mount point>                   <type>  <options>               <dump><pass>
#   M2-4A-2TB (M.2 PCIe4 A 2TB)
UUID=1C63-3069                              /boot/efi                       vfat    umask=0077                  0   2
UUID=e2dd5771-846a-4439-9049-e92cd7b04ae0   /                               ext4    defaults,noatime            0   1
tmpfs                                       /tmp                            tmpfs   defaults,noatime,mode=1777  0   0
#   M2-4B-2TB (M.2 PCIe4 B 2TB)
UUID=c6c12098-c236-48cf-a678-08e1a9372709   /run/media/querzion/M2-4B-2TB   btrfs   defaults,noatime            0   0
#   M2-3A-2TB (M.2 PCIe3 A 2TB)
UUID=2fb1d5ca-fd6c-439e-9601-100e0746ccb8   /run/media/querzion/M2-3A-2TB   btrfs   defaults,noatime            0   0
#   M2-3B-1TB (M.2 PCIe3 B 1TB)
UUID=c2060fef-6c33-40c1-a2b5-3e10aa30535a   /run/media/querzion/M2-3B-1TB   btrfs   defaults,noatime            0   0
#   HDD-4TB (HardDiskDrive 4TB)
UUID=1e95c01d-9e6c-475a-b1f9-e351b7eba170   /run/media/querzion/HDD-4TB     btrfs   defaults,noatime            0   0
#   HDD-8TB (HarddiskDrive 8TB)
UUID=59cfb494-9180-4842-a25b-e028d166a382   /run/media/querzion/HDD-8TB     btrfs   defaults,noatime            0   0

Apperently I got a fstab startup problem with the last three things added, I just deleted two of them from here, so the only one left on the list is HDD-8TB. It couldn’t be mounted during startup… It’s not even a third as slow in the startup as HDD-4TB, but I still got an error, and had to change the fstab file. "/

rsync over ssh should work

This site explains it well; setup passwordless login & then just check the example 1. You don’t need the -a flag tho.

Paired with a bash script or cronjob you can sync to multiple devices

Edit: just remembered you asked

Is there a best approach to making changes that affect all system configurations, and also changes unique to just one device?

For that I don’t have an answer apart from just ssh:ing in and changing the configs manually

How does it compare to gtile?

https://extensions.gnome.org/extension/28/gtile/

Diverging configs sounds like something to maintain using git. For parallel manual maintenance, use something like dvtm, tmux or screen and enable multiplexing mode (in dvtm is mod+a), where you send the same command on all visible screens (instead of having to type it n times).

Eventually when your infrastructure grows out of hand (especially VMs or containers), you might be forced into developing some shell scripts, used with pssh, to maintain it, or using more advanced tools like ansible.

I’m glad only one of my devices has a GUI, but my goal is digital minimalism (for the most part), stability and portability. Except when I’m forced to change configs, everything stays the same (I use sway). I haven’t changed my .sway/config in years, besides changing the wallpaper a few months ago. I have edited it to check some of my configs (when I switched my pcs, from aarch64 back to x86_64, I did not have swaylock installed and I was wondering why my lock keys were not working, if I was using the right ones, I thought I had added it to my package list).

Back to diverging configs, you should keep a patch of what is diverged on different configs, pull the master branch, then apply the patch on the updated master.

In all honesty, if your program allows it, I would make it one single file with an if check to see what’s my hostname, and split the config based on that. On i3wm, it might not work, but good for other stuff (like the i3wm status bar script).

1 Like

Modern distributions take care of the fstrim requirement so you no longer need to do that in FSTAB.

I adapted this script that I got from someone on the OBS discord:

Obviously adjust names and such to your liking, and I put it in my default.pa. You can create as many sinks as you like. I run four: one for game audio, one for music, one for voice chats, and one for alerts which is also OBS’ monitoring device. That gives me the option of adding and removing devices per scene so I don’t need to constantly mute or unmute sources depending on the scene.

If you want to adjust volume for yourself without influencing what’s on stream the only way I found was looping one virtual sink into another, i.e. sink1 goes into sink2, which goes into the physical device. You can then grab sink1 in OBS and change volume or mute sink2 freely without influencing the recording. There might be other ways but if there are I haven’t found one.
This is actually a nice Quality of Life change on PipeWire because it always grabs on full volume even when you mute the sink in the volume controls, which is nice.

This is my full default.pa:

# include the distro-supplied configuration file
.include /etc/pulse/default.pa

# Pulse and/or ALSA boot with a volume level 0
# set it to 100% at boot
# this is an absolute value, taken from command:
# pacmd list-sinks | grep -e "name:" -e "index:" -e "base volume:"

set-sink-volume alsa_output.pci-0000_0d_00.3.analog-stereo 65536

#
# add streaming audio sink
# adapted from pa-combine-sink script:
# https://github.com/derhass/miscstuff/blob/master/misc/pa-combine-sink.sh
# default sink selected via:
# pacmd list-sinks | grep -A1 "* index" | grep -oP "<\K[^ >]+"

# separate sink for volume adjustment
# full volume to OBS (can adjust there), adjusted volume on volume-sink
# volume sink goes to audio device
load-module module-combine-sink sink_name="streaming-audio-volume" slaves=alsa_output.pci-0000_0d_00.3.analog-stereo sink_properties=device.description="OBS_Stream-Volume"

# Stream Audio goes to volume-sink
load-module module-combine-sink sink_name="streaming-audio" slaves="streaming-audio-volume" sink_properties=device.description="OBS_Stream-Sink"

# separate sink for sound alerts so we can grab the audio independent of audio source, fed from OBS monitor
load-module module-combine-sink sink_name="streaming-alerts" slaves="streaming-audio-volume" sink_properties=device.description="OBS_Sound-Alerts"

# separate sink for music for Twitch VOD to separate from Twitch VOD track
load-module module-combine-sink sink_name="streaming-music" slaves="streaming-audio-volume" sink_properties=device.description="OBS_Sound-Music"

(note this is older and I have since removed the volume sink and added the voice chat sink)

sink_properties=device.description= is optional I believe but I found it helpful in the volume controls. It also seems like this cannot contain spaces, hence the _.

Gonna try this later. Lets hope its in Silverblue

1 Like

Small problem. On Ubuntu 22.04 on ZFS.
Does anyone experience this?

[11117.588211] INFO: task journal-offline:19848 blocked for more than 120 seconds.
[11117.588244]       Tainted: P           O      5.15.0-67-generic #74-Ubuntu
[11117.588257] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[11117.588271] task:journal-offline state:D stack:    0 pid:19848 ppid:     1 flags:0x00000002
[11117.588274] Call Trace:
[11117.588275]  <TASK>
[11117.588278]  __schedule+0x24e/0x590
[11117.588283]  schedule+0x69/0x110
[11117.588285]  io_schedule+0x46/0x80
[11117.588286]  wait_on_page_bit_common+0x10c/0x3d0
[11117.588290]  ? filemap_invalidate_unlock_two+0x50/0x50
[11117.588292]  wait_on_page_bit+0x3f/0x50
[11117.588293]  wait_on_page_writeback+0x26/0x80
[11117.588295]  __filemap_fdatawait_range+0x97/0x120
[11117.588297]  filemap_write_and_wait_range+0x88/0xe0
[11117.588300]  zpl_fsync+0x3d/0xa0 [zfs]
[11117.588384]  vfs_fsync_range+0x46/0x90
[11117.588386]  ? __fget_light+0x39/0x90
[11117.588389]  __x64_sys_fsync+0x38/0x70
[11117.588390]  do_syscall_64+0x59/0xc0
[11117.588392]  ? switch_fpu_return+0x4e/0xc0
[11117.588395]  ? exit_to_user_mode_prepare+0x96/0xb0
[11117.588397]  ? syscall_exit_to_user_mode+0x27/0x50
[11117.588399]  entry_SYSCALL_64_after_hwframe+0x61/0xcb
[11117.588401] RIP: 0033:0x7f058a60fa5b
[11117.588403] RSP: 002b:00007f0589437c50 EFLAGS: 00000293 ORIG_RAX: 000000000000004a
[11117.588405] RAX: ffffffffffffffda RBX: 000056111e035c70 RCX: 00007f058a60fa5b
[11117.588406] RDX: 0000000000000000 RSI: 00007f058a99f9f4 RDI: 000000000000001f
[11117.588406] RBP: 00007f058a9a1280 R08: 0000000000000000 R09: 00007ffdb3a9b03f
[11117.588407] R10: 00007f058a58899a R11: 0000000000000293 R12: 0000000000000002
[11117.588408] R13: 0000000000000002 R14: 00007f058a588850 R15: 00007ffdb3a9b080
[11117.588409]  </TASK>

Doesn’t have to be zfs specifically, it is a kind of resource starvation.
INFO: task blocked for more than 120 seconds. - Helpful.

Apparently they happen when your IO is slow, or your system is overloaded. Generally the IO is the fault, but it can be because of heavy swapping to the point of trashing your disk. Check the link above.

1 Like

Are you using disk encryption, iSCSI/FC, or anything similar?
If it’s normal local disks, one of them may have a problem.

It feels like it should belong more in KDE than GNOME (let’s put it that way).

Windows tiling, while not customizable in Win11, still feels more elegant and intuitive. I think they got that one right.

1 Like

I use ZFS native encrpytion.
I tracked down to systemd-journald service. It looks like only systemd-journald throws this error. Right now, I set “Storage=volatile” in /etc/systemd/journald.conf. Thus, the journal will no longer be written to the disk. It is so strange why only systemd-journald complains IO issue. All other applications in the system seem to be absolutely fine. I will let the system run for couple of days, and see whether I get more IO error.

My small linux problem:

Virtual Machine in TrueNAS running Ubuntu 22.04, installing the light version as no-one would be logging in.

Running Cloudlfare Tunnels through Docker.

“Watchdog Bug: Soft lockup CPU#5 has been stuck for x seconds.”

Googling this was really rather unhelpful - and it was happening a lot - sometimes mere minutes after booting up - sometimes hours later. Didn’t see any rhyme or reason for this.

Since this particular VM was running Cloudflare, and that was important for some services. I booted up another VM - using 20.04 Ubuntu instead. Installed nothing but docker on this machine and then ran the Cloudflare docker for Tunnels.

Thus far, no issues on this new VM, no soft lockup - but interestingly, no soft lockup on the 22.04 VM either and it has been about 7-hours.

Now it could still go wrong overnight, we will have to wait and see - but I do wonder what the problem was between Cloudflare in Docker and Ubuntu 22.04 that “appears” on the face of it to be causing this problem.

Well took something like 10-hours but the 22.04 Soft lockup bug hit again.

So in an effort to nail down the culprit, I split all of my services out to different VM - and now I can see which one, if any, were causing the soft lockups. Also moved from one no longer supported service to a newer service that is being supported - so it could have been that one…

Hoping for some easy bash help.

I have a script that just checks the dates on SSL certificates. This works perfectly fine.

domain="google.com"
echo | openssl s_client -servername $domain -connect "$domain:443" &>/dev/null | openssl x509 -noout -dates;

If I try to put it in a file so I can pass an argument for what domain to check, and call it like bash myScript.sh google.com

echo | openssl s_client -servername $1 -connect "$1:443" &>/dev/null | openssl x509 -noout -dates;

Then it fails

unable to load certificate
8132084032:error:09FFF06C:PEM routines:CRYPTO_internal:no start line:/AppleInternal/Library/BuildRoots/9e200cfa-7d96-11ed-886f-a23c4f261b56/Library/Caches/com.apple.xbs/Sources/libressl/libressl-3.3/crypto/pem/pem_lib.c:694:Expecting: TRUSTED CERTIFICATE

What am I missing here?

i would build the request for input into the script, here is a script to copy a dvd with user input for title and stuff. you want to do the same type of thing but use your certificate request as the command at the bottom instead of dvdbackup.

‘echo’ sends a line out
‘read’ takes user input as a variable, then you use the variable in your command.
NOTE: lots of comment lines are in this for other things.
IE:

#!/bin/bash
#This script uses dvdbackup to rip the dsk
 
# Path to the mencoder executable
dvdbackup=/usr/bin/dvdbackup
 
# Path for the output file
# outputpath=/media/DataStorage/meizuvid/
 
 
echo "->        The following are prompts for you to do something."
echo "->        please do....."
echo "->        something"
echo "->        thanx"
echo
echo
 
echo -n "specify location "
read loc
 
echo -n "input device (usually /dev/dvd}: "
read inp
 
echo -n "title, no fancy characters: "
read tit

echo -n "mirror or feature enter -M or -F   mind yur CAPS:  "
read mof
 
	
	$dvdbackup $mof -i $inp -o $loc -n $tit 




#        $mencoder $1 -idx -noodml -ofps $fps \
#        -vf scale=320:-2,expand=:240:::1,crop=320:240,rotate=1 \
#        -ovc lavc -ffourcc XVID -lavcopts vcodec=mpeg4:vbitrate=$vbr:vmax_b_frames=0:vhq \
#        -sws 9 -oac mp3lame -lameopts cbr:mode=2:br=$abr -af resample=44100 -srate 44100 -o #$outputpath[M6]$2
 
exit 0
1 Like

Make sure you’ve got a shebang(first line in a script should read #!/bin/bash - Maybe you’re running this in sh, alltough I don’t know why that wouldn’t work)

Also I don’t like the redirection, it hides potential errors.
(The error you’re seeing sounds like the first command in the pipe didn’t produce any output).

This script works for me:

#!/bin/bash
domain="${1}"
echo | openssl s_client -verify_quiet -connect "${domain}:443" | openssl x509 -noout -dates
3 Likes

is weird, and won’t work with dash. In bash standard output is directed to /dev/null then directed to the pipeline. It’s a bit like coding a=1 a=2, the last direction takes effect. I think you mean 2>/dev/null |.

If the script lacks a shebang on a debian-derived distro dash will be used, even though you ran it with bash. dash will see that as

command & # run in background
: > /dev/null | next-command
3 Likes

Hey guys, so awhile back I was installing windows to a computer of mine, and I had a data drive formatted with an EXT4 filesystem that I didn’t remove from the case but for some reason still hooked up to the motherboard. Anyway, I accidentally deleted that partition. I want to recover it, but the only tool I know to do that is autopsy. I have absolutely failed to get it installed on several distros. On Pop_OS, I failed to install it following the project’s official directions and from the repositories. I don’t remember how it failed on Fedora, but I was unsuccessful there. And finally, I just tried to install it on Arch Linux, only for Python2 to fail being installed. Is there another software I can try; should I maybe try another method of installing Autopsy (i.e if a COPR repository exists for installing it on Fedroa) ; or should I install it on a different distro - like Debian.

Here is a thread from 2010 that might help with this, trusty old command line should still work:

2 Likes