linux64
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux64 [2024/07/17 20:56] – [grub2 boot config] bengt | linux64 [2026/09/17 09:49] (current) – [ollama in podman for ai] bengt | ||
|---|---|---|---|
| Line 49: | Line 49: | ||
| Standard users https:// | Standard users https:// | ||
| - | ==== TBS 6280 PCIe DVB-T2 ==== | + | |
| + | ==== Hauppauge WinTV Dual HD ==== | ||
| + | |||
| + | After issues with compiling for tbs on newer kernels I decided to try a Hauppauge WinTV Dual HD. Modern kernels have the drivers included. You may need to install a firmware file and you may also want to set transfer mode to bulk. See https:// | ||
| + | |||
| + | I had device ID not matching those on that page and it was stuck repeating downloading firmware in dmesg. It was fixed by downloading the firmware on the page above: | ||
| + | lsusb -v | grep Haup | ||
| + | Bus 001 Device 005: ID 2040:8265 Hauppauge dualHD | ||
| + | wget http:// | ||
| + | cp dvb-demod-si2168-b40-01.fw / | ||
| + | But the firmware I had was actually newer, "B 4.0.25" | ||
| + | |||
| + | When I tried to just use this tuner instead of tbs I could only tune DVB-T2 channels. It turns out that the tbs card autoswitched between T and T2 but for this card I need to set T2 in mythsetup. It also seems like you need to create a new source and search for channels again for it to store T/T2 info per channel/ | ||
| + | |||
| + | Then I deleted the cards and sources and recreated them because EIT data did not get updated. Still had issues with low SVT1/2/B/K but I think this was because EIT for these overwrote the ones in use. Only enable EIT for channels in use. See MythTV EIT Issues below. | ||
| + | |||
| + | ==== Moving boot disk from sata to m.2 ==== | ||
| + | |||
| + | Updating boot drive from sata to m.2 turned out to be a real hassle on my MSI Tomahawk Max B450. Just putting the m.2 drive in and it stopped booting from the old sata boot drive. It turns out that m.2 disables sata ports 5 and 6. After rearranging cables and adding default, | ||
| + | |||
| + | Then I need to boot from a live usb stick (press Fn+F11 during boot and do not use the topmost slow usb ports) and then use dd to clone: | ||
| + | # dd if=/dev/sda of=/ | ||
| + | |||
| + | Then it still hangs on boot when systemd is trying to mount my vfat /boot partition with uuid F71B-C42F. Apparently this is for lacking drivers in the boot image. Had to remove the m.2 disk and boot fedora 43 again to prepare with support for nvme on on sata disk: | ||
| + | # echo ' | ||
| + | # dracut --regenerate-all --force | ||
| + | Ran out of disk space in /boot here. The fun never ends. | ||
| + | |||
| + | Removed a kernel and tried this instead: | ||
| + | # echo -e ' | ||
| + | # dracut --force | ||
| + | Then clone again. Remove sata and boot from nvme to check that it works. This time it did. Then boot livecd again, install gparted and use this to expand /boot and move and expand / putting the swap at the end as well. Reboot | ||
| + | |||
| + | Also took the time to get new rescue images as my old ones were from 2016, remove old vmlinuz/ | ||
| + | # / | ||
| + | |||
| + | |||
| + | |||
| + | ==== grub2 boot config ==== | ||
| + | |||
| + | This is a bit different on uefi see https:// | ||
| + | # vi / | ||
| + | # vi / | ||
| + | # grub2-mkconfig -o / | ||
| + | |||
| + | ==== efi partition too small ==== | ||
| + | |||
| + | Trying to fix full boot partition which failed to install new kernel rpm properly by: (Wrong solution, see end of chapter!) | ||
| + | - Creating bootable fedora live usb and booting from it. | ||
| + | - You MUST disable automatic suspension in " | ||
| + | - Installing gparted to check which devices to use. | ||
| + | - Mounting a disk with enough data "mount /dev/sdc1 / | ||
| + | - Using dd to backup disk to a file "dd if=/dev/sda of=/ | ||
| + | - Using gparted to slightly shrink/move sda2 (/boot) and expand sda1 (/ | ||
| + | - Note that the maximum size I could give the fat16 partition was 256MB. Otherwise gparted said that fat32 was needed. Note that I found no way of converting so I guess I would have to rsync/ | ||
| + | - Reinstall the kernel that failed to update boot config due to disk space issues "dnf reinstall kernel-core-6.9.9-100.fc39.x86_64" | ||
| + | |||
| + | Eventually I found https:// | ||
| + | # mv "/ | ||
| + | I deleted the _disabled folder later to get back some disk storage. Seemed to boot fine, but it was the rescue stuff that was taking disk space. | ||
| + | |||
| + | ==== efi partition to fat32 ==== | ||
| + | |||
| + | These instrutions were saved for possible future need if 256MB is not enough for /boot/efi, from https:// | ||
| + | |||
| + | Mount the ESP (if it's not mounted already, e.g. on /boot or / | ||
| + | # mount /dev/sdx1 /mnt # replace sdx1 with ESP | ||
| + | Make a backup of its contents: | ||
| + | # mkdir ~/esp | ||
| + | # rsync -av /mnt/ ~/esp/ | ||
| + | |||
| + | Unmount the ESP: | ||
| + | # umount /mnt | ||
| + | |||
| + | Delete and recreate the ESP: | ||
| + | # gdisk /dev/sdx # replace sdx with disk containing ESP | ||
| + | p (list partitions) | ||
| + | (ensure the ESP is the first partition) | ||
| + | d (delete partition) | ||
| + | 1 (select first partition) | ||
| + | n (create partition) | ||
| + | Enter (use default partition number, should be 1) | ||
| + | Enter (use default first sector, should be 2048) | ||
| + | Enter (use default last sector, should be all available space) | ||
| + | EF00 (hex code for EFI system partition) | ||
| + | w (write changes to disk and exit) | ||
| + | |||
| + | Format the ESP: | ||
| + | # partprobe /dev/sdx | ||
| + | # mkfs.fat -F32 /dev/sdx1 | ||
| + | |||
| + | Restore the ESP's contents: | ||
| + | # mount /dev/sdx1 /mnt | ||
| + | # rsync -av ~/esp/ /mnt | ||
| + | |||
| + | Update EFI entry in / | ||
| + | # blkid | grep EFI | ||
| + | # nano / | ||
| + | UUID=XXXX-XXXX /boot vfat umask=0077 0 2 # Replace with UUID from blkid | ||
| + | If you use GRUB, you may need to update or regenerate its configuration file (/ | ||
| + | |||
| + | ==== nvidia | ||
| + | |||
| + | This is old information from when I used the geforce 210 card. Nowadays I'm using a 1660Ti with nouveau driver. Removed all the a 340xx stuff and it worked out-of-the box after a reboot. | ||
| + | |||
| + | Install something like this: | ||
| + | # dnf install xorg-x11-drv-nvidia akmod-nvidia " | ||
| + | # reboot? | ||
| + | # dnf remove kmod-nvidia-< | ||
| + | # akmods --force | ||
| + | # reboot | ||
| + | Note that after upgrade to fedora 25 I had to remove all nvidia stuff and do the above again. Do not use nvidia-xconfig as the Xorg.xonf written will prevent booting into X, the file should be empty. | ||
| + | |||
| + | After the last update to kernel 5.11 I had to run nvidia-xconfig to get fullhd output and acceleration on my GeForce 210 card again. This was rather the opposite of my previous experience where I had to restore/ | ||
| + | |||
| + | More info on rpmfusion drivers: | ||
| + | https:// | ||
| + | |||
| + | ==== TBS 6280 PCIe DVB-T2 | ||
| A PCIe card for recording DVB-T2 TV. Linux driver support from the manufacturer, | A PCIe card for recording DVB-T2 TV. Linux driver support from the manufacturer, | ||
| Line 104: | Line 222: | ||
| sudo reboot | sudo reboot | ||
| - | I've really had issues with kernel 5.7, in the forum they suggest to download precompiled files instead which does not work either. Failed the same way as the compilation for 5.7.15 did. Therefor I eventually decided to try: | + | I've really had issues with kernel 5.7, in the forum they suggest to download precompiled files instead which does not work either. Failed the same way as the compilation for 5.7.15 did. Therefor I eventually decided to try usb instead. See above. |
| - | ==== Hauppauge WinTV Dual HD ==== | ||
| - | |||
| - | After issues with compiling for tbs on newer kernels I decided to try a Hauppauge WinTV Dual HD. Modern kernels have the drivers included. You may need to install a firmware file and you may also want to set transfer mode to bulk. See https:// | ||
| - | |||
| - | I had device ID not matching those on that page and it was stuck repeating downloading firmware in dmesg. It was fixed by downloading the firmware on the page above: | ||
| - | lsusb -v | grep Haup | ||
| - | Bus 001 Device 005: ID 2040:8265 Hauppauge dualHD | ||
| - | wget http:// | ||
| - | cp dvb-demod-si2168-b40-01.fw / | ||
| - | But the firmware I had was actually newer, "B 4.0.25" | ||
| - | |||
| - | When I tried to just use this tuner instead of tbs I could only tune DVB-T2 channels. It turns out that the tbs card autoswitched between T and T2 but for this card I need to set T2 in mythsetup. It also seems like you need to create a new source and search for channels again for it to store T/T2 info per channel/ | ||
| - | |||
| - | Then I deleted the cards and sources and recreated them because EIT data did not get updated. Still had issues with low SVT1/2/B/K but I think this was because EIT for these overwrote the ones in use. Only enable EIT for channels in use. See MythTV EIT Issues below. | ||
| - | |||
| - | ==== grub2 boot config ==== | ||
| - | |||
| - | This is a bit different on uefi see https:// | ||
| - | # vi / | ||
| - | # vi / | ||
| - | # grub2-mkconfig -o / | ||
| - | |||
| - | === efi partition too small === | ||
| - | |||
| - | Trying to fix full boot partition which failed to install new kernel rpm properly by: (Wrong solution, see end of chapter!) | ||
| - | - Creating bootable fedora live usb and booting from it. | ||
| - | - You MUST disable automatic suspension in " | ||
| - | - Installing gparted to check which devices to use. | ||
| - | - Mounting a disk with enough data "mount /dev/sdc1 /mnt". | ||
| - | - Using dd to backup disk to a file "dd if=/dev/sda of=/ | ||
| - | - Using gparted to slightly shrink/move sda2 (/boot) and expand sda1 (/ | ||
| - | - Note that the maximum size I could give the fat16 partition was 256MB. Otherwise gparted said that fat32 was needed. Note that I found no way of converting so I guess I would have to rsync/ | ||
| - | - Reinstall the kernel that failed to update boot config due to disk space issues "dnf reinstall kernel-core-6.9.9-100.fc39.x86_64" | ||
| - | |||
| - | Eventually I found https:// | ||
| - | # mv "/ | ||
| - | |||
| - | ==== nvidia | ||
| - | |||
| - | This is old information from when I used the geforce 210 card. Nowadays I'm using a 1660Ti with nouveau driver. Removed all the a 340xx stuff and it worked out-of-the box after a reboot. | ||
| - | |||
| - | Install something like this: | ||
| - | # dnf install xorg-x11-drv-nvidia akmod-nvidia " | ||
| - | # reboot? | ||
| - | # dnf remove kmod-nvidia-< | ||
| - | # akmods --force | ||
| - | # reboot | ||
| - | Note that after upgrade to fedora 25 I had to remove all nvidia stuff and do the above again. Do not use nvidia-xconfig as the Xorg.xonf written will prevent booting into X, the file should be empty. | ||
| - | |||
| - | After the last update to kernel 5.11 I had to run nvidia-xconfig to get fullhd output and acceleration on my GeForce 210 card again. This was rather the opposite of my previous experience where I had to restore/ | ||
| - | |||
| - | More info on rpmfusion drivers: | ||
| - | https:// | ||
| ===== Services ===== | ===== Services ===== | ||
| Line 416: | Line 481: | ||
| See misc below for scanning tv channels... | See misc below for scanning tv channels... | ||
| - | ==== squeezebox | + | ==== squeezebox/ |
| - | I found out that there is a spotify-plugin for squeezebox and decided to try a Boom in the kitchen and after a number of years I now have 9 squeezeboxes. Nowadays they aren't manufactured anymore but it is possible to use a chromecast as a squeezebox using a plugin in the server. Squeezebox on the server is a very nice solution to get access to your music files, spotify, internet radio and more. Instructions for fedora here:\\ | + | I found out that there is a spotify-plugin for squeezebox and decided to try a Boom in the kitchen and after a number of years I now have 9 squeezeboxes. Nowadays they aren't manufactured anymore but it is possible to use a chromecast as a squeezebox using a plugin in the server. Squeezebox on the server is a very nice solution to get access to your music files, spotify, internet radio and more.Instructions for fedora here:\\ |
| http:// | http:// | ||
| + | |||
| + | Note that it is called lyrionmusicserver nowadays and some instructions below may need an update... | ||
| There was a period when the community squeeze project had a fedora repo available. This is no longer the case, but there are still some nice guys updating the server: | There was a period when the community squeeze project had a fedora repo available. This is no longer the case, but there are still some nice guys updating the server: | ||
| Line 432: | Line 499: | ||
| # vi /etc/group0 | # vi /etc/group0 | ||
| squeezeboxserver: | squeezeboxserver: | ||
| - | | + | # wget https:// |
| - | # dnf install logitechmediaserver-8.3.1-0.1.1672158254.noarch.rpm | + | # dnf install |
| - | | + | |
| - | # dnf install | + | |
| # ln -s / | # ln -s / | ||
| # firewall-config # Open port 9000 TCP for http, 3483 TCP& | # firewall-config # Open port 9000 TCP for http, 3483 TCP& | ||
| - | # systemctl enable | + | # systemctl enable |
| - | Check logs with something like " | + | # cd / |
| + | Check logs with something like " | ||
| + | |||
| + | If you get issues with lacking modules in status, like Proc:: | ||
| - | For example after upgrade to fedora 35 the "EV YAML:: | + | Another |
| The web server is then available for configuration: | The web server is then available for configuration: | ||
| Line 454: | Line 522: | ||
| $ sed ' | $ sed ' | ||
| + | There is an issue with loosing connection with radios on modern wifis. Maybe playing a mad song when using the radio as an alarm clock. The community firmware could be the solution: https:// | ||
| ==== samba network shares ==== | ==== samba network shares ==== | ||
| Line 617: | Line 686: | ||
| If you want to be able to run with plugins you may want to look into https:// | If you want to be able to run with plugins you may want to look into https:// | ||
| - | $ wget https:// | + | $ wget https:// |
| $ cd minecraft/ | $ cd minecraft/ | ||
| $ wget -O floodgate-spigot.jar https:// | $ wget -O floodgate-spigot.jar https:// | ||
| Line 728: | Line 797: | ||
| ## NameCheap DynDNS | ## NameCheap DynDNS | ||
| ## | ## | ||
| - | use=web, web=dynamicdns.park-your-domain.com/ | + | |
| + | use=web, web=http:// | ||
| | | ||
| protocol=namecheap | protocol=namecheap | ||
| Line 763: | Line 833: | ||
| + | ==== OpenWebRX+ for radio ==== | ||
| + | |||
| + | I buought an rtl sdr dongle that I later realized would be nice to pair with a leftover pi 4: \\ | ||
| + | https:// | ||
| + | https:// | ||
| + | |||
| + | Use the the official raspberry image to enable and set ssh username/ | ||
| + | https:// | ||
| + | https:// | ||
| + | |||
| + | SSH into the machine and follow the instructions to add a user: \\ | ||
| + | sudo openwebrx admin adduser < | ||
| + | |||
| + | You may want to install extra drivers, see note on home page: \\ | ||
| + | sudo install-softmbe.sh | ||
| + | |||
| + | Some comments about antenna length: | ||
| + | https:// | ||
| + | |||
| + | ==== ollama in podman for ai ==== | ||
| + | |||
| + | Using rootless podman as a separate user (starting with cpu only): | ||
| + | # dnf install | ||
| + | # useradd ollama | ||
| + | # visudo | ||
| + | ALL ALL=(ollama) NOPASSWD: / | ||
| + | # firewall-config # Add tcp 11434 to be able to access it from hass | ||
| + | # su - ollama | ||
| + | $ mkdir ollama | ||
| + | $ vi start.sh | ||
| + | #!/bin/bash -x | ||
| + | cd $HOME | ||
| + | loginctl enable-linger ollama | ||
| + | podman run -d --rm -v / | ||
| + | $ chmod u+x start.sh | ||
| + | Then setup a start.sh-script containing the startup command line and maybe start this using " | ||
| + | |||
| + | Test it as the ollama user: | ||
| + | # su - ollama | ||
| + | $ podman exec -it ollama bash | ||
| + | $ ollama run llama3.2 | ||
| + | |||
| + | Backup images and update: | ||
| + | # su - ollama | ||
| + | $ podman save ollama/ | ||
| + | $ podman pull ollama/ | ||
| + | Restart container... | ||
| + | |||
| + | You can add the ollama integration to home assistant. On issues check your firewall config. Be sure to have " | ||
| + | |||
| + | After buying a 5060 16GB ti for AI to have next to my 1660 ti super used for the console I needed to switch to nvidia drivers and configure podman. I already have rpmfusion-nonfree repo enabled so I just did this: | ||
| + | # dnf update # To avoid issues below. Reboot if new kernel. | ||
| + | # dnf install -y akmod-nvidia xorg-x11-drv-nvidia-cuda | ||
| + | # akmods --force | ||
| + | Wait for akmod to complete building drivers before rebooting. Check with top? | ||
| + | Note that I lost audio after this for the new kernel that got installed at the same time. Turns out that those modules were not installed as they were not needed to compile the nvidia driver. Update and reboot before or install lacking kernel-modules and kernel-modules-extra. This should also work "dnf install kernel-$(uname -r)". | ||
| + | |||
| + | Configure podman: | ||
| + | # dnf install nvidia-container-toolkit | ||
| + | # nvidia-ctk cdi generate --output=/ | ||
| + | # nvidia-ctk cdi list | ||
| + | # podman run --rm --security-opt label=disable --device nvidia.com/ | ||
| + | # vi start.sh | ||
| + | Add " | ||
| + | # nvidia-smi # Check ram usage for gpus. Watch out for too large context windows spilling over as it will spread not prioritizing the 5060 ti. | ||
| + | If you run into context size problems (it got capped at 4096) you can add "-e OLLAMA_CONTEXT_LENGTH=32768" | ||
| + | |||
| + | In the end I bought a second 5060 ti to not have to create custom modelfiles and fiddle around that much. | ||
| ===== Software ===== | ===== Software ===== | ||
| Line 996: | Line 1134: | ||
| # systemctl stop firewalld.service | # systemctl stop firewalld.service | ||
| # iptables --flush | # iptables --flush | ||
| - | | + | |
| + | Calculate sha256 of all files in folder and store in text file that can be used to check for bit rot later or when replacing disk and checking rsync: | ||
| + | $ find movies/ -type f -exec sha256sum {} \; > | ||
| + | or | ||
| + | $ find movies/ -type f | sort | xargs -d' | ||
| + | File checksum mismatch after copying files to a new disk can be due to memory issues. It can even vary checksumming the same file on the same disk. You can use " | ||
| ==== Picade ===== | ==== Picade ===== | ||
| Line 1119: | Line 1262: | ||
| - | === Disk full and mariadb recovery === | + | ==== Disk full and mariadb recovery |
| The rocksdb part of mariadb filled my root partition, solution: | The rocksdb part of mariadb filled my root partition, solution: | ||
| Line 1152: | Line 1295: | ||
| Seems ok. Had to do this later for " | Seems ok. Had to do this later for " | ||
| - | ==== Upgrade Fedora ... -> 35 -> 36 -> 37 -> 38 -> 39 ==== | + | ==== MythTV MariaDB cannot be null issue ==== |
| + | |||
| + | The MythTV scheduler crashes or fails during reschedules, | ||
| + | https:// | ||
| + | |||
| + | Do this for now until they fix it upstream: | ||
| + | # dnf upgrade --exclude=mariadb-connector-c* | ||
| + | |||
| + | |||
| + | ==== Kernel 7.2.5 boot issues ==== | ||
| + | |||
| + | This is the likely issue, root= disappearing from the kernel line triggering auto-detection: | ||
| + | https:// | ||
| + | |||
| + | It also suggested adding the root UUID to the kernel paremeters, the others have it: | ||
| + | # grep -E -R ' | ||
| + | # grubby --update-kernel=/ | ||
| + | It turns out this is lacking from the new boot entry. | ||
| + | |||
| + | Possible permanent fix: | ||
| + | # echo " | ||
| + | Or just remove that file and trust modern grubenv kernel-install handling: | ||
| + | If / | ||
| + | |||
| + | For ollama to work again: | ||
| + | # nvidia-ctk cdi generate --output=/ | ||
| + | ==== Upgrade Fedora ... -> 35 -> 36 -> 37 -> 38 -> 39 -> 40 -> 41 -> 42 -> 43 ==== | ||
| Following the instructions on https:// | Following the instructions on https:// | ||
| Line 1164: | Line 1333: | ||
| # dnf remove gnomebaker php-recode --noautoremove # For fedora 32 | # dnf remove gnomebaker php-recode --noautoremove # For fedora 32 | ||
| # dnf remove compat-ffmpeg28 # For fedora 39 | # dnf remove compat-ffmpeg28 # For fedora 39 | ||
| - | # dnf system-upgrade download --releasever=39 # Did not work on Saturdays due to 404 for lacking rpmfusion files, waiting for mirroring and retrying on Sunday worked. | + | |
| + | # dnf remove python2-pillow # For fedora 41 | ||
| + | # dnf remove scala # For fedora 43 | ||
| + | | ||
| You may need the " | You may need the " | ||
| Then reboot this way to do the actual upgrade: | Then reboot this way to do the actual upgrade: | ||
| - | # sudo dnf system-upgrade reboot | + | |
| + | (# sudo dnf system-upgrade reboot) | ||
| You may need to upgrade the squeezeboxserver rpm. Maybe update java version used for minecraft. See those chapters. (Old, running nouveau with modern gfx-card nowadays: You may need to uninstall and install nvidia drivers again, at least uninstall the newly created kmod-nvidia and rebuild it using akmods.) | You may need to upgrade the squeezeboxserver rpm. Maybe update java version used for minecraft. See those chapters. (Old, running nouveau with modern gfx-card nowadays: You may need to uninstall and install nvidia drivers again, at least uninstall the newly created kmod-nvidia and rebuild it using akmods.) | ||
| After upgrade: | After upgrade: | ||
| + | - For fedora 39 there is a bug when installing kernels fails with "No space left on device" | ||
| - It hangs during first boot waiting for lvm2 mirrors. I had to disable Intel RST and use AHCI in BIOS to get it to boot. Then I disabled/ | - It hangs during first boot waiting for lvm2 mirrors. I had to disable Intel RST and use AHCI in BIOS to get it to boot. Then I disabled/ | ||
| - Old, not be needed anymore: It is running cgroups v2 which was incompatible with docker. Either switch to v1 using kernel command line options or use podman instead of docker. Add " | - Old, not be needed anymore: It is running cgroups v2 which was incompatible with docker. Either switch to v1 using kernel command line options or use podman instead of docker. Add " | ||
| - Had to upgrade to squeezeboxserver 7.9.3 and build tbs with workarounds for kernel 5.7. Later I replaced tbs with a hauppauge dongle. | - Had to upgrade to squeezeboxserver 7.9.3 and build tbs with workarounds for kernel 5.7. Later I replaced tbs with a hauppauge dongle. | ||
| - New samba 4.11 disables smbv1 by default which does not work with my tablet used as a photo frame. See samba section above for how to fix. | - New samba 4.11 disables smbv1 by default which does not work with my tablet used as a photo frame. See samba section above for how to fix. | ||
| - | - Autologin had to be reconfigured in / | + | - Autologin had to be reconfigured in / |
| + | - The mailserver got disabled for fedora 42, run " | ||
| - Maybe clean up old unmaintained packages using " | - Maybe clean up old unmaintained packages using " | ||
| + | |||
linux64.1721249800.txt.gz · Last modified: by bengt