Saturday, February 19, 2022

Alternatives to Spotify

 For all the well known reasons (Joe Rogan, poor payment to musicians) I decided to drop my Spotify Premium account.

What to use instead? Here are some unstructured notes on the applications I tried

Magnatune

Magnatune is a small publisher. They seem to treat their artists well. They were one of the early internet music sites and they have not updated the interface.

Good music and well curated.

Pandora

You have to pay to get to change songs. Still a pretty good selection.

Youtube Music

  • Mobile app works well
  • web app works well
  • chrome cast works best with video capable devices but Chromecast clients work fine.

Amazon Music Unlimited

  • HD and Ultra HD content is nice and does sound slightly better through my receiver (5.1)
  • Pretty good selection
  • Mobile and Web UI are really, really bad
    • follow/favorite buttons for artists don't change state when pressed or show current status
    • casting to Fire Stick 4K works until it gets unsynchronized and then you have to reboot the Fire Stick
    • Each app is an island and can't control a player. You can share via chromecast until that stops working 


Tuesday, November 17, 2015

browser performance sucks on NFS -- "waiting on cache"

I've got a server where all the drives live and use NFS to export home directories to other machines. You might do the same with a NAS.

After updating one of the client machines to Ubuntu 15.10 I noticed the browser performance was terrible. Lots of time "waiting on cache". I checked the load on the server and it is not CPU bound. Clearing the cache did not help ('cause its Unix not DOS).

So I tried tuning NFS to see if that helped. Since I have NFS v4, pretty much all the advice was already in place. Added async,relatime to the mount options which helped but not much.

As it happens, most of the stuff our browser saves ends up in a folder/directory called .cache (this is at least true on Ubuntu). So I set up a bind mount on the client so that folder is on local disk and not on NFS. Performance is now back to normal.

What the bind mount does is mount part of a local file system on part of a remote file system. You have to do this on the client as it is not something the server can do for you. That is nice as you only have to have it where you need it. But it means setting this up on each client and for each user.

Here are the steps:

  1. Create a place for local caches for as many users as you might have. Should be under /var. /var/cache exists so I created /var/usercache/ and changed the owner ship to the user
    sudo mkdir /var/usercache/
    sudo chown : /var/usercache/
  2. Copy the existing .cache over:
    cp -rp ~/.cache/* /var/usercache/
  3. Edit /etc/fstab to add the bind mount:
    sudo vi /etc/fstab
  4. append to the end of the file:
    /var/usercache/ /home//.cache none bind
  5. mount /home//.cache or reboot

Friday, January 17, 2014

Back up to Blu-Ray on Linux

It seems there is a bit of confusion on how to properly burn a blu-ray disk on Linux.

I've looked at the following web pages on this topic:
http://www.troubleshooters.com/linux/blu-ray-backup.htm
http://allgood38.io/burn-bluray-data-disks-on-linux-minimize-coasters.html

but, if you read carefully, the solution to burning is found here:
http://fy.chalmers.se/~appro/linux/DVD+RW/Blu-ray/

The problem seems to be that the blu-ray standard allocates some of the disk to recovering from bad sectors. So if you burn a full 25GB UDF image to the disk you end up over-writing the space reserved for bad sector relocation and the image is incomplete and pretty much useless.

growisofs respects this and will format a blank BD-R with 256GB of space for relocation.

So all you need to do is create a UDF file system of the right size:
25GB - 256MB - 2 sectors for padding
or
25000000000 - (256000000 + 2 * 2048)
which comes out to:
24743995904 bytes

So just modify the instructions on the referenced pages to create the correct size UDF file system:
truncate -s 24743995904
and then follow the rest of the instructions.

I've done this to back up my music collection and it seems to work well. I create the UDF file system and then build an index of the file contents and their MD5 sums. You can use that to verify that the files are all intact.

To build an index of a UDF file system:
cd to the file system's mount point
find . -type f \! -name Index.md5 -a \! -name \*.par2 -exec md5sum "{}" \; > Index.md5

To verify the disk after burning:
cd to the disk image
md5sum --check Index.md5 | grep -v "OK$"
All the valid files get written out as lines ending in OK. So the result is any invalid files.

Thursday, January 31, 2013

Destroying a Disk

http://www.noah.org/wiki/Dd_-_Destroyer_of_Disks
Is wrong when he dismisses the need for more than overwriting a file with zeros 
but he is correct that this is slow:
dd if=/dev/urandom of=/dev/drive-to-destory
so here is a faster way to lay down a more or less random bit pattern on a drive partition:

disk=$1
dd  bs=1K count=1000 if=/dev/urandom of=/tmp/randomJunk$$
{ while : ; do cat /tmp/randomJunk ; done; } | sudo dd bs=1M of=${disk}
rm /tmp/randomJunk$$


It takes a bit to generate the 1M file from /dev/urandom but the overwrite of the partition goes well.

If you want to be sure the disk is still usable, you want to erase the existing partition table and 
then create one full disk partition. Use the script above to overwrite the new partition. 
This preserves the MBR and other stuff at the front of the drive.

Wednesday, November 21, 2012

Configure Linksys WRT400N as an access point

The WRT400N is a rather basic router so I use another router with more memory and a faster processor to connect to the internet. I had originally configured the 400N on its own subnet. Today I tried configuring it to be on the same subnet as my main router.

I found useful advice here: http://homecommunity.cisco.com/t5/Wireless-Routers/How-to-configure-WRT400n-as-an-access-point/m-p/277101/highlight/true#M144970

To summarize:

  • Turn off DHCP Server on the 400N 
    • still want the 400N to get it's IP via DHCP 
  • Turn of NAT and the stateful fire wall settings 
    • not sure this is essential after you move the Ethernet cable below. 
    • NAT is in Setup, Advanced Routing 
    • Stateful fire wall is in Security as SPI Firewall protection 
  • be sure the Network Setup shows the same subnet mask as your main router. 
  • I set the IP address to the address reserved for the 400N on the other router. 
    • some suggest using a class C address you are _not_ using. 
  • save your settings 
  • move the Ethernet patch (straight through) cable used to connect the 400N to your main router from the yellow WAN socket to one of the 4 regular sockets. 
    • at this point the router will no longer see any traffic from what it thinks of as the outside world. So it may not matter if you turn of NAT, ... above.

Saturday, July 3, 2010

Transferring iPod Touch to new computer

Moving your iTunes account to a new machine is inordinately difficult.

iTunes does not do it for you. There are no instructions in iTunes help.

The best instructions I could find are here:
http://forums.macrumors.com/showthread.php?t=526316

And this link describes how to make AppData folder visible on Win7:
http://forums.techarena.in/operating-systems/1170550.htm


In summary:
  1. install iTunes on the new box and shut it down prior to it searching for music.
  2. copy your old music, iTunes data, and iTunes setting data to the new machine to the correct folders.
  3. start iTunes and sync

If all goes well the new version if iTunes will not warn you about backing up on more than one machine.









Folder TypeLocation on Windows XPLocation Win 7
iTunes data%USERPROFILE%\My Documents\My Music\iTunes%USERPROFILE%\My Music\iTunes
iTunes settings%USERPROFILE%\Application Data\Apple Computer\iTunes%USERPROFILE%\AppData\Apple Computer\iTunes


Your music is usually in the iTunes data directory but I keep mine in a separate place as I download music from other sources than iTunes.

%USERPROFILE% can move but the default on XP is
c:/Documents and Settings/your name here/
and on Win 7
c:/Users/your name here/

Friday, July 2, 2010

Gigabyte GA-870A-UD3

I recently built a new system with this mother board. Went together well. Seems well designed.

One oddity: the on board NIC got stuck. Would not connect. No LEDs. BIOS has a nifty test tool to check the connection. It thought no cable. Swapped cable, ..., no joy. Turned in a trouble report to Gigabyte. Still waiting on that.

Just to try everything, I turned off power on the system from the power supply. This turns off everything including the trickle of power to the NIC. This solved the problem. Now the NIC is happy and useful.