Thursday, March 16, 2017

Linux log




After fiddling about a bit this morning I was able to join a WebEx meeting
using Chrome. Type in the URL bar:

chrome://apps/

And click on the Cisco WebEx app.

If it's not there click on Web Store then select "App" on the left button
and search for "WebEx".  Install the app. (the APP, not the extension!!)

Another way I commonly use WebEx is from my Android phone and tablet.



https://www.theregister.co.uk/2017/03/21/dns_records_more_revealing_than_you_think_says_german_boffin/

uas_eh_abort_handler = many drive problems, issue went away when I swapped cables.

This happen with a brand new cable.  Over many years as a sys admin I've seen the bad SCSI (now USB) cable issue pop up again and again, with no rhyme or reason.  Known good cables fail out of the blue.  New out of the bag cables are bad.  Lesson learned, always have spare cables on hand, not just as many as you need, always buy extras, from different sources, and keep them handy.

openSUSE Tumbleweed RPMs install on Fedora 25, who knew!?!?!

There's lots of advice out there as to how to change your default boot kernel, and none of it works. At least not on Fedora 25.  What does work is install "grub-customizer" and use that to change the boot order.  No need to "update MBR", I didn't and the order stuck.

There is an issue with kernel 4.13.16-100, doesn't see my second monitor like 4.9.6-200 does.  So I'm just staying with 4.9.6-200 until I do the F25 to F27 upgrade, then I'll dig into the hows/whys if my second monitor isn't seen.

yum updateinfo list - very useful command, had not used before, try and see.

Today's PSA:

[568049.151349] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[568364.120021] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[568679.139156] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready

Unreadable time stamps on your dmesg (Captain's log) output?

This is what we call "Unix Stardates", or seconds since the kernel started. There's an easy solution,
use "dmesg -T" to produces a coherent time/date format:

[Fri Mar 23 14:33:20 2018] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[Fri Mar 23 14:38:35 2018] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[Fri Mar 23 14:43:50 2018] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready

Not to be confused with "Unix Time" (seconds since 1 January 1970), which is really a Doctor Who thing.

Mounting Nero! This maybe a disc image with .nrg or .cdi, the file comand shows:

locnar<80># file Image1.cdi
Image1.cdi: Nero CD image at 0x4B000 UDF filesystem data (version 1.5) '071215_0244'

Mount as shown below:

mount -o "loop,offset=307200" imagename.nrg /mount-point
mount -o "loop,offset=307200" Image1.cdi /mnt/sysimage







Tuesday, January 31, 2017

Fedora 21 to Fedora 25, 30, 31, 32, 33, 44 upgrade, the saga continues




Major changes happened with KDE between F21 and F22, and my .kde configs didn't work, so I stayed on F21 for a long time.  Also I was bit by the enforcement of UID must be greater than 1000 policy, if UID is under 1000 you can't login.  Took ages to figure out what was going on with this. /etc/sddm.conf has a bug.  It seems the format changed, and when you do an upgrade it saves your old sddm.conf and renames the newer version to sddm.conf.rpmnew.  How nice.  Except, the old sddm.conf file doesn't seem to work right with the new sddm.  Manually editing sddm.conf.rpmnew and adding the one whole option I wanted (allow UIDs under 1000 to login via the GUI) then mv sddm.conf.rpmnew to sddm.conf fixed the problem.  This is of course KDE 5 on Fedora 25.

Another KDE change that was a time waster to figure out, no longer can you just copy .kde to move your GUI setup to a new system, you need to copy .local and .config as well, exactly which files in those directories KDE uses I've yet to figure out.

Fedora 34! Major changes! Btrfs with compression is default. PipeWire replaces PulseAudio. Wayland replaces X11. "Things happen" with the NVIDIA driver.

Fedora 44 - root is gone! Or, disabled by default.

DON'T Upgrade?!? But I have to!!!

ALL of this sound like a headache? Happy with the version you're on? But need that one thing that's only available in a later release? Don't upgrade (or at least delay it) by launching a new release as a VM! Or, a flatpack 
youtube-dl comes to mind.....

Three easy commands for the upgrade:

dnf upgrade --refresh
dnf install dnf-plugin-system-upgrade
dnf system-upgrade download --refresh --releasever=35 --allowerasing -y
dnf system-upgrade reboot

(Below is only a problem if you try to skip ahead a few version, like F21 to F25)

And again, bit by the invalid keys issues!  Had to grab the keys and put them into /etc/pki/rpm-gpg/ by hand, then run the dnf system-upgrade again.  Also had to add the --allowerasing due to a problem with a couple of RPMs.

Get the F25 keys here, 4 in total, free, nonfree, primary, secondary:

https://rpmfusion.org/keys
https://getfedora.org/keys/

RPM-GPG-KEY-fedora-25-primary
RPM-GPG-KEY-fedora-25-secondary
RPM-GPG-KEY-rpmfusion-free-fedora-25-primary
RPM-GPG-KEY-rpmfusion-nonfree-fedora-25-primary

Add links and stir:

cd /etc/pki/rpm-gpg/
ln -s RPM-GPG-KEY-fedora-25-primary RPM-GPG-KEY-fedora-25
ln -s RPM-GPG-KEY-fedora-25-primary RPM-GPG-KEY-fedora-25-x86_64
ln -s RPM-GPG-KEY-rpmfusion-free-fedora-25-primary RPM-GPG-KEY-rpmfusion-free-fedora-25
ln -s RPM-GPG-KEY-rpmfusion-nonfree-fedora-25-primary RPM-GPG-KEY-rpmfusion-nonfree-fedora-25



Final step:
dnf system-upgrade reboot

And we're done!  Besides the key thing, Fedora Linux upgrades are pretty smooth, a few commands, one reboot and you're there, no need to wipe the disks, insert dvds, backup/restore, none of that stuff.  All data files, home dirs, network configs are preserved threw each version upgrade.  There's probably a GUI button to do as well.
Best to be on a wired connection though, as the upgrade pulls in about 3,000 packages, at least a GB of data.

Well, almost, have just done another F21 to F25 upgrade, I had to throw in a --exclude=packagename
to get by a problem.  That happens when you install weird repos with oddball packages like I do.

Now I'm up to F31, 5000+ packages to download!

My Acer Aspire i7-8700/ NVMe desktop took less than 10 minutes to upgrade from F30 to F31!

As of F37 you can still choose X11 or Wayland at login, at least with KDE. I've had strangeness running Kodi under Wayland. 

In a hurry? Upgrades taking too long? Think about removing large non-essential packages first, like LibreOffice, GIMP and friends. If you're 5 releases behind you're going to end up downloading and reinstalling those big packages 5 times. More efficient to remove and reinstall one time, after you're up and running in multiuser. One solution could be for DNF to have 2 classes of packages, OS and User. The User package upgrade could happen after the OS upgrade completes and you're rebooted and running in multiuser mode. 

USB stick boot fun, issues, gotchas


If you need to instal a new system, always use a USB stick, not the SD slot, not a SD card in a reader.

Avoid the "liveusb-creator" GUI's and use the DD command. 

Step 1, down some Fedora release as a .iso.  Plug in your USB stick, use dmesg to see what drive letter the computer assigned to the USB stick.  Use DD to write the .iso to the stick, as root or sudo.

Keep in mind, if you pick the wrong drive letter you may wipe out your internal drive!!!  The below output tells us the Samsung USB stick got drive letter B, as in /dev/sdb.

oralab<19>% dmesg

[ 3609.068811] scsi host6: usb-storage 4-2:1.0
[ 3610.403164] scsi 6:0:0:0: Direct-Access     Samsung  Flash Drive FIT  1100 PQ: 0 ANSI: 6
[ 3610.404016] sd 6:0:0:0: Attached scsi generic sg1 type 0
[ 3610.405254] sd 6:0:0:0: [sdb] 250626566 512-byte logical blocks: (128 GB/120 GiB)
[ 3610.405373] sd 6:0:0:0: [sdb] Write Protect is off
[ 3610.405376] sd 6:0:0:0: [sdb] Mode Sense: 43 00 00 00
[ 3610.405503] sd 6:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 3610.405506] sd 6:0:0:0: [sdb] Optimal transfer size 0 bytes < PAGE_SIZE (4096 bytes)
[ 3610.407571]  sdb: sdb1 sdb2 sdb3
[ 3610.408389] sd 6:0:0:0: [sdb] Attached SCSI removable disk

Take a look at df -k, make doubly certain you understand what your live file systems are!

Next step:

oralab<33># dd if=Fedora-KDE-Live-x86_64-29-1.2.iso of=/dev/sdb bs=8M status=progress oflag=direct

This may take some time, like 5 minutes for a USB2 stick, and 1 minute for a USB3 stick, and look for the "SS" letters on the computer USB port, those are your USB3 ports. Btw I'm using tcsh shell.

dd: failed to open '/dev/sdb': No medium found
Note - there are differences between umount and eject that can bite you! umount from the command line, don't use the GUI!

locnar<38># dd if=Fedora-KDE-Live-x86_64-31-1.9.iso  of=/dev/sdb bs=8M status=progress oflag=direct
221+1 records in
221+1 records out
1854996480 bytes (1.9 GB, 1.7 GiB) copied, 22.5527 s, 82.3 MB/s


oralab<33># eject /dev/sdb

Next comes the fun part, Legacy vs UEFI boot.  You *may* need to get into the BIOS (hold down F12 or enter key or del while powering up) and change the boot options, possibly set USB device to boot first, maybe change the security tab UEFI options, it depends on the machine, how old it is, what BIOS rev it has.  Also turn on virtualization support when you're in the BIOS.

Put the USB stick in (hopefully) a USB3 port and power on. Fedora releases generally make you click on the Install Disk item and select the drive to use, and/or reclaim space. Very likely you'll need to DOUBLE CLICK the drive icon and get a highlight check on the drive. This drive selection step confuses a lot of users. 

Final step, reboot from the Fedora Live menu, DON'T just the turn the computer off and on again! 


Fedora 29 Linux on Acer Aspire TC-885-UR17 Desktop with NVME, hold down Delete key while booting, BIOS/peripheral setting and change the SSD/NVME to ahci, by default a lot of laptops now have them set in RAID which doesn't work right in Linux.

Just installed an Acer Aspire TC-1660-UA92, the only hard part was finding the ahci setting in the BIOS/boot menu.

terminate called after throwing an instance of 'libdnf::ModulePackageContainer::EnableMultipleStreamsException'
Cannot enable multiple streams for module

What this goop means is something to do with  "dnf module", this is the fix:

dnf module reset gimp
dnf module reset maven

The above was seen when going from F30 to F31.

  dnf system-upgrade download --refresh --releasever=35 --allowerasing -y --nogpgcheck --exclude=clang12-libs-12.0.1-3.fc35
 dnf system-upgrade download --refresh --releasever=36 --allowerasing -y --exclude="compat-ffmpeg4*"
yum erase libavutil56-1:4.4.4-1.fc37 

New installs, first command:


sudo systemctl start sshd
sudo systemctl enable sshd

flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo


Sunday, December 4, 2016

Combining audio with different sample and bit rates with a video track


There's lots of way to go about changing sample rates, bit rates, merging files, and most result in noise.  There likely is a way to do it all in one sox command line, if one has a lifetime to play with sox flags, and most wav merge tools I tried produced static, but conversion to a Matroska container just worked.   The below steps are simple, and they provide the wanted result.

Audio from one source (Cannon SX260HS camera, in file 16-edgeofsteel.wav ) is at 16bit 48khz and audio from another source (Zoom H4N, in file 16-edgeofsteel2.wav) is at 24bit 96khz.  Video track is 1080p from the Cannon SX260HS (in file edgeofsteel.mov).

1) Up sample 16-edgeofsteel2.wav from 48k to 96k using sox:

sox 16-edgeofsteel2.wav 16-edgeofsteel-96.wav rate 96000

2) Put both .wav files into to a .mkv container using ffmpeg:

ffmpeg -i 16-edgeofsteel.wav  -acodec aac -strict -2 -b:a 500k 16-edgeofsteel3.mkv

ffmpeg -i 16-edgeofsteel-96.wav -acodec aac -strict -2 -b:a 500k 16-edgeofsteel4.mkv

3) Merge the .mkv files using mkvmerge:

mkvmerge -o 16-edgeofsteel-final.mkv 16-edgeofsteel3.mkv +16-edgeofsteel4.mkv

4) Combine the audio and video tracks into one file:

ffmpeg -i 16-edgeofsteel-final.mkv -i edgeofsteel.mov -acodec copy -vcodec copy 16-edgeofsteel.mkv -y

Here the results below, the transition is at 4:20:



  • --------

    Some more tricks, I mixed a track from a CD in with a live clip and kept the last 29 seconds of the live sound:

    1) Put final 29 seconds from video into aac file:

    ffmpeg -i 20140503_195452.mp4 -ss 00:04:40 -t 00:05:09 -acodec copy wolf2.aac -y

    2) Convert to FLAC:

    ffmpeg -i wolf2.aac -f flac wolf2.flac

    3) Cut 4:40 out of the studio track:

    ffmpeg -i 11.Wolf_and_Dog.flac -ss 00:00:01 -t 00:04:41 -acodec copy wolf.flac -y
    4) Convert to 48k so it matches the sample rate of the video:

    sox wolf.flac wolf48.flac rate 48000
    5) Combine the two audio tracks:

    sox wolf48.flac wolf2.flac wolftotal.flac

    6) Combine the video and complete audio track:

    ffmpeg -i wolftotal.flac -i 20140503_195452.mp4 -acodec copy -vcodec copy wolf.mkv -y

    Results below, sound transition at 4:40


    ReVamp - Wolf and Dog Live Slim's San Francisco


    Replacing audio on a video:

    ffmpeg -i 01_Sonata_Arctica_-_Wolf_And_Raven_2001.VOB -i 16_-_Wolf___Raven__Remake_2008_.flac -vcodec copy -acodec copy -map 0:v -map 1:a -strict -2 output.mp4


    Wednesday, November 2, 2016

    Bit perfect sound on Linux

    "bit perfect" means the sound comes out of your speakers without being downgraded by the computer.  "Hi-res audio" is generally rates above 16/44, like 192/24 and DSD audio.

    Jack audio
    Kodi
    Disable pulse
    Fedora JAM spin
    Audiophile Linux

    Matricom G-Box MX2 Combo Dual Core XBMC TV Box 8GB Android 4.2.2

    Intel Compute Stick STCK1A8LFC

    MOC

    wtfplay

    Monday, October 24, 2016

    Getting USB label maker working in Linux

    Fedora 21 - Phase 1, installation, first do:
    yum install glabels cups-devel gcc
    Next grab the drivers, although F21 had Dymo drivers they didn't work, if the below URL doesn't work then google dymo-labelwriterlabelmanager-sdk
    http://developers.dymo.com/2012/02/21/announcing-dymo-labelwriterlabelmanager-sdk-1-4-0-for-linux/
    tar xfv dymo-cups-drivers-1.4.0.tar.gz
    cd dymo-cups-drivers-1.4.0.5, ./configure. make all, make install as root.
    Next add the printer, either with System Settings/Printer or
    http://localhost:631/admin (login root, and your root pw)

    Phase 2, making labels. 
    Nice write up for Ubuntu below, on Fedora you can skip the apt-get steps.  
    http://www.smartfruit.com/?p=188
    (Or google Dymo LabelManager PnP on Linux CUPS smartfruit)
    The important point is the how to use glabels to create your label.

    Major gotchas were not having cups-devel installed, and wasting time trying print labels with LibreOffice and lpr - don't! Use glabels only!!



    Sunday, October 23, 2016

    genisoimage: No such file or directory. Invalid node

    genisoimage: No such file or directory. Invalid node

    I've found and fixed this before and forgotten how.

    When ripping CD/DVD whatever one gets the mystery error:

    "genisoimage: No such file or directory. Invalid node"

    And/or the more puzzling:

    "input-charset not specified, using utf-8"

    mkisofs, genisoimage, etc all give the same error, and from what the forums
    say no one has a clue what to do about it.

    Although the error message is utterly useless the cause is very simple.
    mkisofs, genisoimage, etc are unhappy about /tmp, I expect it's a space
    issue, whatever, just delete /tmp/kde-user and ln -s it off to a larger
    filesystem.  Or change the app settings to use another tmp location.  Or the
    much harder route of increasing /tmp size.

    CD ripper "rflac"

    #!/bin/bash

    cd /locnar-ex/Audio/Music

    #abcde -o flac -q high -N -x
    abcde -o flac -N -x

    NEWCD=`ls -hFt | head -1`
    export NEWCD
    echo $NEWCD; cd $NEWCD ; pwd
    NEWCD=`ls -hFt | head -1`
    echo $NEWCD; cd $NEWCD ; pwd

    #parallel --gnu ffmpeg -i {} -qscale:a 0 {.}.mp3 ::: *.flac

    #mkdir `pwd`MP3
    #mv *mp3 `pwd`MP3

    #basename `pwd`