Skip to main content

Posts

MTP - Oh how I love to hate you....

TL; DR:  I can't sync my android tablet (Nvidia Shield) with Fedora via MTP if I am using a USB Hub? So, in fairness... I don't actually *hate* MTP.  I'm sure it is probably fairly awesome at doing whatever it is that MTP should do.  I'm just miffed at the moment because Android switched (a long time ago, I might add) to MTP for USB connections. Before, I could (essentially) directly mount the SD card in my tablet/phone/toaster and manage it using my archaic methods.  Now.. I have to conform to using the mtp methodology... which is fine. However - now I am stuck.. Feb  3 10:15:18 neo mtp-probe: bus: 1, device: 28 was not an MTP device Fun... Syslog tells me the device is:  /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2.3/1-1.2.3.3 At some point I will need to dig in to the output from... # udevadm test /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2.3/1-1.2.3.  Specifially... /usr/lib/udev/rules.d/50-udev-defau...

You can mount ext2 as ext4 filesytem (just read...)

So - this is tough to even explain.  Imagine all of your build scripts and SOP simply read # mkfs /dev/VolumeGroup/Volume and then you add the following entry to /etc/fstab /dev/VolumeGroup/Volume /directory ext4 defaults 1 2 then when you run # mount -a Everything is cool.  Except .. it's not. That mkfs command created an ext2 filesystem - the crappy part is when mount command is run, even though fstab is expecting ext4, it doesn't care and mounts it anyhow.  So, now we have a filesystem with no Journal and added ext4 features. Worse yet - there is no "supported" upgrade path to ext4.  However, you can add a Journal to make it ext3. # tune2fs -j /dev/VolumeGroup/Volume

fedora 20 finish script (mp3 playback, Google Chrome, ClamAV Anti-Virus)

Once again - revisiting my "finish script" for my workstation... #!/bin/bash PWD=`pwd` DATE=`date +%Y%m%d` ARCH=`uname -p` yum -y install redhat-lsb-core RELEASE=`lsb_release -r | awk '{ print $2 }'` # Setup wheel group for NOPASSWD: sed --in-place 's/^#\s*\(%wheel\s\+ALL=(ALL)\s\+NOPASSWD:\s\+ALL\)/\1/' /etc/sudoers # Configure for fastest repos yum -y install yum-plugin-fastestmirror # REPO MGMT # RPMfusion -  Release independent yum -y localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm # RPMfusion -  Release dependent yum -y localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-${RELEASE}.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-${RELEASE}.noarch.rpm # Adobe yum -y install http://linuxdownload.adobe.com/adob...

Copy Sparse files over network

I have a few physical nodes which I ran KVM guests on.  Occasionally I need to rebuild the host, so I want to copy the VM from one physical node to another.  I use RAW (sparse) disk images and standard scp would copy the image in it's entirety.  Until... I found rsync -S ;-) rsync -Surpolvv * usgtst92:/var/lib/libvirt/images/ *** SOURCE *** usgtst91 images]# for IMG in `find . -name "*.img"`; do qemu-img info $IMG; done image: ./DVGLLVUSGTST82/DVGLLVUSGTST82.img file format: raw virtual size: 44G (47244640256 bytes) disk size: 12G image: ./DVGLLVUSGTST81/DVGLLVUSGTST81.img file format: raw virtual size: 44G (47244640256 bytes) disk size: 4.0G image: ./DVGLLVUSGTST83/DVGLLVUSGTST83.img file format: raw virtual size: 44G (47244640256 bytes) disk size: 3.8G *** DESTINATION *** usgtst92 images]# for IMG in `find . -name "*.img"`; do qemu-img info $IMG; done image: ./DVGLLVUSGTST83/DVGLLVUSGTST83.img file format: raw virtual size: 44G (4724464...

Add CentOS 7 and EPEL 7 to Spacewalk

At some point, most of this will be unnecessary.. I have grown fond of using the spacewalk-common-channels - however, the CentOS7 stuff is not included in Spacewalk 2.2 (as of 2014-10-26). Create a file to append to your spacewalk-common-channels.ini cat << EOF > ~/centos7-spacewalk-common-channels.ini [centos7] archs = %(_x86_archs)s name = CentOS 7 (%(arch)s) gpgkey_url = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7 gpgkey_id = F4A80EB5 gpgkey_fingerprint = 6341 AB27 53D7 8A78 A7C2 7BB1 24C6 A8A7 F4A8 0EB5 yumrepo_url = http://mirrorlist.centos.org/?release=7&arch=%(arch)s&repo=os dist_map_release = 7 [centos7-addons] label = %(base_channel)s-addons archs = %(_x86_archs)s name = CentOS 7 Addons (%(arch)s) base_channels = centos7-%(arch)s yumrepo_url = http://mirrorlist.centos.org/?release=7&arch=%(arch)s&repo=addons [centos7-centosplus] label = %(base_channel)s-centosplus archs = %(_x86_archs)s ...

Rename the Satellite Admin Account

I will build a Satellite (or Spacewalk) occasionally to test some stuff... and I have forgotten (more than once) that the first time you login, you are creating the "Admin User".. which I have erroneously setup as my self. So to fix this, add another user and make them an Organization Administrator. Then... go to https:// <satellite fqdn>/rhn/admin/multiorg/Users.do and click on the check box ;-) Technically you are reassigning the Satellite Administrator role to someone else.

Crontab: the slash (/) explained

This post was taken verbatim from http://binblog.info/2014/10/17/what-does-the-slash-in-crontab-actually-do/ on (2014-10-19) I am simply "archiving" it in case that site disappears someday.  If the owner would like me to remove this content, please let me know. What does the slash in crontab(5) actually do? Filed under: UNIX & Linux — Tags: cron , crontab , linux , unix — martin @ 2:16 pm That’s a bit of a stupid question. Of course you know what the slash in crontab(5) does, everyone knows what it does. I sure know what it does, because I’ve been a UNIX and Linux guy for almost 20 years. Unfortunately, I actually didn’t until recently. The manpage for crontab(5) says the following: It’s clear to absolutely every reader that */5 * * * * in crontab means, run every 5 minutes . And this is the same for every proper divisor of 60, which there actually are a lot of: 2, 3, 4, 5, 6, 10, 12, 15, 20, 30 However, */13 * * * * does not mean th...