User Tools

Site Tools


linux64

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux64 [2024/07/17 20:56] – [grub2 boot config] bengtlinux64 [2026/09/17 09:49] (current) – [ollama in podman for ai] bengt
Line 49: Line 49:
 Standard users https://docs.fedoraproject.org/en-US/Fedora/14/html/Deployment_Guide/s1-users-groups-standard-users.html and groups https://docs.fedoraproject.org/en-US/Fedora/14/html/Deployment_Guide/s1-users-groups-standard-groups.html which seems to be lacking. Maybe because I did a workstation installation. Standard users https://docs.fedoraproject.org/en-US/Fedora/14/html/Deployment_Guide/s1-users-groups-standard-users.html and groups https://docs.fedoraproject.org/en-US/Fedora/14/html/Deployment_Guide/s1-users-groups-standard-groups.html which seems to be lacking. Maybe because I did a workstation installation.
  
-==== 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://www.linuxtv.org/wiki/index.php/Hauppauge_WinTV-dualHD 
 + 
 +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://palosaari.fi/linux/v4l-dvb/firmware/Si2168/Si2168-B40/4.0.11/dvb-demod-si2168-b40-01.fw 
 +  cp dvb-demod-si2168-b40-01.fw /usr/lib/firmware/dvb-demod-si2168-b40-01.fw 
 +But the firmware I had was actually newer, "B 4.0.25" instead of "B 4.0.11". I think that it may be interesting to look for other firmwares if things does not work well. 
 + 
 +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/multiplexer properly. For full tuning do not forget to set your country in the hidden menu. I tried to fix the database for the old source but ended up migrating to the new source. 
 + 
 +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,nofail to data drives it boots again. Also, if I want to use my future graphics card for LLM:s I need to boot with UEFI for ReBar but without secure boot for nvidia drivers to load. 
 + 
 +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=/dev/nvme0n1 bs=64K status=progress conv=fsync 
 + 
 +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 'hostonly="no"' | tee /etc/dracut.conf.d/generic.conf 
 +  # 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 'add_drivers+=" nvme ahci libata sd_mod "' | tee /etc/dracut.conf.d/generic.conf 
 +  # 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/initramfs for rescue first: 
 +  # /usr/lib/kernel/install.d/51-dracut-rescue.install add "$(uname -r)" /boot "/boot/vmlinuz-$(uname -r)" 
 + 
 + 
 + 
 +==== grub2 boot config ==== 
 + 
 +This is a bit different on uefi see https://fedoraproject.org/wiki/GRUB_2#Updating_GRUB_2_configuration_on_UEFI_systems and: 
 +  # vi /boot/efi/EFI/fedora/grub.cfg # Changes will not survive a new kernel or grub2-mkconfig 
 +  # vi /etc/default/grub # Edit defaults for grub2-mkconfig 
 +  # grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg # Update kernel boot list 
 +  
 +==== 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 "Settings --> Power --> Automatic Suspend". Hangs on resume which you don't want for disk operations. See https://forums.fedoraforum.org/showthread.php?330586-Fedora-38-change-Systems-with-Gnome-suspend-after-15-minutes-even-when-plugged-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=/mnt/backup.img" 
 +  - Using gparted to slightly shrink/move sda2 (/boot) and expand sda1 (/boot/efi). 
 +  - 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/format/rsync back. Set boot&esp flags, maybe name it "EFI System Partition" and give it UUID "F71B-C42F" again which does not seem easy. See below. 
 +  - 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". It still ran out of disk space which seems quite strange. 
 + 
 +Eventually I found https://www.reddit.com/r/Fedora/comments/186amfb/kernels_6510_does_not_install_properly_in_fedora/ and https://discussion.fedoraproject.org/t/f39-kernels-fail-to-install-when-boot-efi-machineid-is-present/96086 which apparently was a fedora 39 problem when upgrading since forever. The solution was: 
 +  # mv "/boot/efi/$(cat /etc/machine-id)" "/boot/efi/$(cat /etc/machine-id)_disabled" 
 +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://superuser.com/questions/1230741/how-to-resize-the-efi-system-partition 
 + 
 +Mount the ESP (if it's not mounted already, e.g. on /boot or /boot/efi): 
 +  # 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 /etc/fstab 
 +  # blkid | grep EFI 
 +  # nano /etc/fstab 
 +  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 (/boot/grub/grub.cfg), e.g. by running update-grub. 
 + 
 +==== nvidia  [old] ==== 
 + 
 +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 "kernel-devel-uname-r == $(uname -r)" 
 +  # reboot? 
 +  # dnf remove kmod-nvidia-<current-kernel> # May be needed after fedora upgrade 
 +  # 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/remove xorg.conf after doing this. Note that for this card I have to run the old 340xx-340.108 nvidia driver. 
 + 
 +More info on rpmfusion drivers: 
 +https://rpmfusion.org/Howto/NVIDIA 
 + 
 +==== TBS 6280 PCIe DVB-T2 [old] ====
  
 A PCIe card for recording DVB-T2 TV. Linux driver support from the manufacturer, which means that you have to recompile it on kernel update. Official linux drivers can be downloaded at http://www.tbsdtv.com/download/ and open source at https://github.com/ljalves/linux_media/wiki/Installating. Visit https://www.tbsdtv.com/forum/viewtopic.php?f=87&t=25422 and http://www.tbsdtv.com/forum/viewforum.php?f=49 for a forum. A PCIe card for recording DVB-T2 TV. Linux driver support from the manufacturer, which means that you have to recompile it on kernel update. Official linux drivers can be downloaded at http://www.tbsdtv.com/download/ and open source at https://github.com/ljalves/linux_media/wiki/Installating. Visit https://www.tbsdtv.com/forum/viewtopic.php?f=87&t=25422 and http://www.tbsdtv.com/forum/viewforum.php?f=49 for a forum.
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://www.linuxtv.org/wiki/index.php/Hauppauge_WinTV-dualHD 
- 
-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://palosaari.fi/linux/v4l-dvb/firmware/Si2168/Si2168-B40/4.0.11/dvb-demod-si2168-b40-01.fw 
-  cp dvb-demod-si2168-b40-01.fw /usr/lib/firmware/dvb-demod-si2168-b40-01.fw 
-But the firmware I had was actually newer, "B 4.0.25" instead of "B 4.0.11". I think that it may be interesting to look for other firmwares if things does not work well. 
- 
-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/multiplexer properly. For full tuning do not forget to set your country in the hidden menu. I tried to fix the database for the old source but ended up migrating to the new source. 
- 
-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://fedoraproject.org/wiki/GRUB_2#Updating_GRUB_2_configuration_on_UEFI_systems and: 
-  # vi /boot/efi/EFI/fedora/grub.cfg # Changes will not survive a new kernel or grub2-mkconfig 
-  # vi /etc/default/grub # Edit defaults for grub2-mkconfig 
-  # grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg # Update kernel boot list 
-  
-=== 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 "Settings --> Power --> Automatic Suspend". Hangs on resume which you don't want for disk operations. See https://forums.fedoraforum.org/showthread.php?330586-Fedora-38-change-Systems-with-Gnome-suspend-after-15-minutes-even-when-plugged-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=/mnt/backup.img" 
-  - Using gparted to slightly shrink/move sda2 (/boot) and expand sda1 (/boot/efi). 
-  - 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/format/rsync back. Set boot&esp flags, maybe name it "EFI System Partition" and give it UUID "F71B-C42F" again which does not seem easy. See below. 
-  - 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". It still ran out of disk space which seems quite strange. 
- 
-Eventually I found https://www.reddit.com/r/Fedora/comments/186amfb/kernels_6510_does_not_install_properly_in_fedora/ and https://discussion.fedoraproject.org/t/f39-kernels-fail-to-install-when-boot-efi-machineid-is-present/96086 which apparently was a fedora 39 problem when upgrading since forever. The solution was: 
-  # mv "/boot/efi/$(cat /etc/machine-id)" "/boot/efi/$(cat /etc/machine-id)_disabled" 
- 
-==== nvidia  [old] ==== 
- 
-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 "kernel-devel-uname-r == $(uname -r)" 
-  # reboot? 
-  # dnf remove kmod-nvidia-<current-kernel> # May be needed after fedora upgrade 
-  # 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/remove xorg.conf after doing this. Note that for this card I have to run the old 340xx-340.108 nvidia driver. 
- 
-More info on rpmfusion drivers: 
-https://rpmfusion.org/Howto/NVIDIA 
 ===== Services ===== ===== Services =====
  
Line 416: Line 481:
  
 See misc below for scanning tv channels... See misc below for scanning tv channels...
-==== squeezebox for music ====+==== squeezebox/lyrion music server ====
  
-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://wiki.slimdevices.com/index.php http://wiki.slimdevices.com/index.php
 +
 +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:x:319:   squeezeboxserver:x:319:
-  # wget http://downloads-origin.slimdevices.com/nightly/8.3/lms/8e014fb139b7e75bf19d7750ce70efd6959e2d43/logitechmediaserver-8.3.1-0.1.1672158254.noarch.rpm +  # wget https://downloads.lms-community.org/LyrionMusicServer_v9.1.0/lyrionmusicserver-9.1.0-1.noarch.rpm 
-  # dnf install logitechmediaserver-8.3.1-0.1.1672158254.noarch.rpm +  # dnf install lyrionmusicserver-9.1.0-1.noarch.rpm # Moving config from /var/lib/squeezeboxserver to /etc/sysconfig/lyrionmusicserver and needs changes to scripts accordingly
-  # wget https://downloads.lms-community.org/LogitechMediaServer_v8.5.2/logitechmediaserver-8.5.2-1.noarch.rpm +
-  # dnf install logitechmediaserver-8.5.2-1.noarch.rpm+
   # ln -s /usr/lib/perl5/vendor_perl/Slim /usr/lib64/perl5/vendor_perl/Slim # Fix for 64bit OS   # ln -s /usr/lib/perl5/vendor_perl/Slim /usr/lib64/perl5/vendor_perl/Slim # Fix for 64bit OS
   # firewall-config # Open port 9000 TCP for http, 3483 TCP&UDP, 9005 TCP&UDP for spotify, 49152-49215 TCP for 3x chromecast bridge and 9090 TCP for cli. Note that cc bridge port is dynamic, tick "Use LMS interface and start from port" and set base port 49152.   # firewall-config # Open port 9000 TCP for http, 3483 TCP&UDP, 9005 TCP&UDP for spotify, 49152-49215 TCP for 3x chromecast bridge and 9090 TCP for cli. Note that cc bridge port is dynamic, tick "Use LMS interface and start from port" and set base port 49152.
-  # systemctl enable squeezeboxserver && systemctl start squeezeboxserver +  # systemctl enable lyrionmusicserver.service && systemctl start lyrionmusicserver.service 
-Check logs with something like "**journalctl -u squeezeboxserver.service**" or "systemctl status -n1000 squeezeboxserver.service".+  # cd /etc/lyrionmusicserver/ # Check rpmsave files and likely replace old conf-files. Can fix cpan module issues. 
 +Check logs with something like "**journalctl -u lyrionmusicserver.service**" or "systemctl status -n1000 lyrionmusicserver.service"
 + 
 +If you get issues with lacking modules in status, like Proc::Background, then the problem may actually be that you need to copy /etc/lyrionmusicserver/modules.conf.rpmnew to /etc/lyrionmusicserver/modules.conf.
  
-For example after upgrade to fedora 35 the "EV YAML::XS" module failed to load according to "journalctl -u squeezeboxserver.service". Found https://forums.slimdevices.com/showthread.php?115928-Updating-from-8-0-1-to-8-3-0 and I decided to upgrade to latest 8.2 nightly http://downloads-origin.slimdevices.com/nightly/?ver=8.2 to be sure to get an updated version. This worked; remember to start by upgrading rpm when facing issues after fedora upgrade.+Another example after upgrade to fedora 35 the "EV YAML::XS" module failed to load according to "journalctl -u squeezeboxserver.service". Found https://forums.slimdevices.com/showthread.php?115928-Updating-from-8-0-1-to-8-3-0 and I decided to upgrade to latest 8.2 nightly http://downloads-origin.slimdevices.com/nightly/?ver=8.2 to be sure to get an updated version. This worked; remember to start by upgrading rpm when facing issues after fedora upgrade.
  
 The web server is then available for configuration: \\ The web server is then available for configuration: \\
Line 454: Line 522:
   $ sed 's#/data/music/#Y:/music/#g' Bengts.m3u > BengtsWin.m3u   $ sed 's#/data/music/#Y:/music/#g' Bengts.m3u > BengtsWin.m3u
  
 +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://forums.lyrion.org/forum/user-forums/3rd-party-software/1699666-how-and-why-to-install-the-community-firmware-step-by-step
 ==== 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://papermc.io/software/paper and https://hangar.papermc.io/ fo the actual plugins. For example if you want to be able to use bedrock clients you can use GeyserMC https://hangar.papermc.io/GeyserMC with floodgate. https://www.youtube.com/watch?v=nJWIo9LgQzA If you want to be able to run with plugins you may want to look into https://papermc.io/software/paper and https://hangar.papermc.io/ fo the actual plugins. For example if you want to be able to use bedrock clients you can use GeyserMC https://hangar.papermc.io/GeyserMC with floodgate. https://www.youtube.com/watch?v=nJWIo9LgQzA
-  $ wget https://api.papermc.io/v2/projects/paper/versions/1.20.1/builds/196/downloads/paper-1.20.1-196.jar+  $ wget https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/120/downloads/paper-1.21.1-120.jar
   $ cd minecraft/plugins   $ cd minecraft/plugins
   $ wget -O floodgate-spigot.jar https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot   $ wget -O floodgate-spigot.jar https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot
Line 728: Line 797:
   ## NameCheap DynDNS   ## NameCheap DynDNS
   ##   ##
-  use=web, web=dynamicdns.park-your-domain.com/getip+  #use=web, web=dynamicdns.park-your-domain.com/getip # Stopped working 20250321, got 1.1.0.1 as ip 
 +  use=web, web=http://ipv4.nsupdate.info/myip
      
   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://fms.komkon.org/OWRX/ \\
 +https://luarvique.github.io/ppa/ \\
 +
 +Use the the official raspberry image to enable and set ssh username/password: \\
 +https://github.com/luarvique/openwebrx/releases/ \\
 +https://www.raspberrypi.com/software/ \\
 +
 +SSH into the machine and follow the instructions to add a user: \\
 +sudo openwebrx admin adduser <USERNAME>
 +
 +You may want to install extra drivers, see note on home page: \\
 +sudo install-softmbe.sh
 +
 +Some comments about antenna length:
 +https://www.rtl-sdr.com/using-our-new-dipole-antenna-kit/
 +
 +==== 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: /home/ollama/start.sh
 +  # 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 /home/ollama/ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama # See below for flags when using gpu
 +  $ chmod u+x start.sh
 +Then setup a start.sh-script containing the startup command line and maybe start this using "lxterminal -t ollama -e sudo -u ollama /home/ollama/start.sh". Replace "-d" with "-it" in the podman command line to see the output if starting this way.
 +
 +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/ollama > image_backup.tar
 +  $ podman pull ollama/ollama
 +  Restart container...
 +
 +You can add the ollama integration to home assistant. On issues check your firewall config. Be sure to have "conversation:" "assist_pipeline:" in configuration.yaml if you do not use the default config before trying to setup assist pipelines.
 +
 +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=/etc/cdi/nvidia.yaml # Needs to be rerun after nvidia driver updates and when switching hdmi port between cards
 +  # nvidia-ctk cdi list
 +  # podman run --rm --security-opt label=disable --device nvidia.com/gpu=1 ubuntu nvidia-smi # Check gpu index to the one you want to use
 +  # vi start.sh
 +  Add "--security-opt label=disable --device nvidia.com/gpu=1" with the index of the wanted gpu or all to use the 1660 ti for some layers in my case. Doubled the performance compared to spilling over to the cpu. But models splits early.
 +  # 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" to the podman line. But then you will probably want to cap this client side for the larger models using both gpus. Using "ollama ps" will show the active max context size. Check "nvidia-smi" for when the context makes the model split.
 +
 +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 {} \; >checksum.txt; sort -k2 -o checksum.txt checksum.txt 
 +  or 
 +  $ find movies/ -type f | sort | xargs -d'\n' sha256sum >checksum.txt 
 +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 "memtester" live in linux or reboot into memtest in the grub menu. In my case one of the two pairs/kits were faulty I eventually found out after removing/swapping pairs.
 ==== 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 "events" as well. Do not forget to remove the recovery setting and restart mariadb so that home assistant can connect. Moved away from remote mariadb hass database to the default sqlite implementation with a database on an ssd. Set up a nightly backup through an automation to to avoid all these issues. Seems quicker as well. Seems ok. Had to do this later for "events" as well. Do not forget to remove the recovery setting and restart mariadb so that home assistant can connect. Moved away from remote mariadb hass database to the default sqlite implementation with a database on an ssd. Set up a nightly backup through an automation to to avoid all these issues. Seems quicker as well.
  
-==== Upgrade Fedora ... -> 35 -> 36 -> 37 -> 38 -> 39 ====+==== MythTV MariaDB cannot be null issue ==== 
 + 
 +The MythTV scheduler crashes or fails during reschedules, throwing the specific error: Scheduler AddHistory fails with "Column 'starttime' cannot be null" 
 +https://github.com/MythTV/mythtv/issues/1402 
 + 
 +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://discussion.fedoraproject.org/t/error-at-boot-with-kernel-6-17-12-300-fc43-x86-64/177533 
 + 
 +It also suggested adding the root UUID to the kernel paremeters, the others have it: 
 +  # grep -E -R 'title|options' /boot/loader/entries/ 
 +  # grubby --update-kernel=/boot/vmlinuz-7.2.5-100.fc43.x86_64 --args="root=UUID=7cbb7c6a-5996-48d4-8378-4ba59e5f1f52 ro rhgb quiet" 
 +It turns out this is lacking from the new boot entry.   
 + 
 +Possible permanent fix: 
 +  # echo "root=UUID=7cbb7c6a-5996-48d4-8378-4ba59e5f1f52 ro rhgb quiet rd.driver.blacklist=nouveau,nova_core modprobe.blacklist=nouveau,nova_core" > /etc/kernel/cmdline 
 +Or just remove that file and trust modern grubenv kernel-install handling:
 +If /etc/kernel/cmdline does not exist, the installer automatically falls back to reading the kernelopts line straight out of your grubenv file to build new kernel configurations.If /etc/kernel/cmdline does exist, the modern BLS (Boot Loader Specification) standard dictates that it takes absolute priority. The script reads only /etc/kernel/cmdline and completely ignores the grubenv file. 
 + 
 +For ollama to work again: 
 +  # nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml 
 +==== Upgrade Fedora ... -> 35 -> 36 -> 37 -> 38 -> 39 -> 40 -> 41 -> 42 -> 43 ====
  
 Following the instructions on https://fedoramagazine.org/upgrading-fedora-31-to-fedora-32/ and https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/ Following the instructions on https://fedoramagazine.org/upgrading-fedora-31-to-fedora-32/ and https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/
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 python3-iso-639 # For fedora 40 
 +  # dnf remove python2-pillow # For fedora 41 
 +  # dnf remove scala # For fedora 43 
 +  # dnf system-upgrade download --releasever=43 # Did not work on Saturdays due to 404 for lacking rpmfusion files, waiting for mirroring and retrying on Sunday worked.
 You may need the "--allowerasing" flag or possibly force uninstall of some packages using "rpm -e --nodeps <package>" to get this to pass. You may need the "--allowerasing" flag or possibly force uninstall of some packages using "rpm -e --nodeps <package>" to get this to pass.
  
 Then reboot this way to do the actual upgrade: Then reboot this way to do the actual upgrade:
-  # sudo dnf system-upgrade reboot+  # dnf5 offline 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" if you have upgraded since really old fedora versions. There is a file/folder in /boot that triggers this issue. See end of "efi partition too small" chapter.
   - 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/masked the lvm2 service using "systemctl mask lvm2-monitor.service" and switched back to RST in the next boot.   - 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/masked the lvm2 service using "systemctl mask lvm2-monitor.service" and switched back to RST in the next boot.
   - 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 "systemd.unified_cgroup_hierarchy=0" to GRUB_CMDLINE_LINUX in /etc/default/grub and run "grub2-mkconfig" to start using v1 again. You will probably want to upgrade to podman later though and start using new cgroups.   - 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 "systemd.unified_cgroup_hierarchy=0" to GRUB_CMDLINE_LINUX in /etc/default/grub and run "grub2-mkconfig" to start using v1 again. You will probably want to upgrade to podman later though and start using new cgroups.
   - 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 /etc/lxdm/lxdm.conf for fedora 37.+  - Autologin had to be reconfigured in /etc/lxdm/lxdm.conf for at least fedora 37, 40, 42, 43. Just add back the autologin line, see the .rpmsave file. 
 +  - The mailserver got disabled for fedora 42, run "systemctl start postfix && systemctl enable postfix".
   - Maybe clean up old unmaintained packages using "remove-retired-packages 36" or similar. You may also use "dnf repoquery --unsatisfied" and "dnf repoquery --duplicates" to check for broken/duplicates. See fedora upgrade docs for more info.   - Maybe clean up old unmaintained packages using "remove-retired-packages 36" or similar. You may also use "dnf repoquery --unsatisfied" and "dnf repoquery --duplicates" to check for broken/duplicates. See fedora upgrade docs for more info.
 +
  
linux64.1721249800.txt.gz · Last modified: by bengt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki