User:Trogod/System0Upgrade1204
Contents
- 1 TO-DO list
- 2 download ISO
- 3 update backup
- 4 verify/repair disk drives
- 5 install from CD
- 6 update the backups
- 7 check and repair disks
- 8 burn disk image
- 9 install
- 10 /storage mounting
- 11 restore database
- 12 Wi-Fi Problems
- 13 HDHomeRun networking
- 14 lircd
- 15 restore backup cron jobs
- 16 Samba
- 17 MythNetTV
- 18 other software
TO-DO list
- recover recordings since the date of my restored database
download ISO
I downloaded the iso via bittorrent
d536a1c08472e2832a752418d18bbe27 *mythbuntu-12.04-desktop-amd64.iso
and I checked the md5sum like this, following http://www.brunolinux.com/01-First_Things_To_Know/Md5sum_of_Burned_CDs.html
:~$ isoinfo -d -i /dev/cdrom CD-ROM is in ISO 9660 format System id: Volume id: Mythbuntu 12.04 amd64 Volume set id: Publisher id: Data preparer id: XORRISO-1.0.8 2011.04.14.073001, LIBISOBURN-1.0.8, LIBISOFS-1.0.8, LIBBURN-1.0.6 Application id: Copyright File id: Abstract File id: Bibliographic File id: Volume set size is: 1 Volume set sequence number is: 1 Logical block size is: 2048 Volume size is: 357014 El Torito VD version 1 found, boot catalog is in sector 416 Joliet with UCS level 3 found Rock Ridge signatures version 1 found Eltorito validation header: Hid 1 Arch 0 (x86) ID '' Key 55 AA Eltorito defaultboot header: Bootid 88 (bootable) Boot media 0 (No Emulation Boot) Load segment 0 Sys type 0 Nsect 4 Bootoff 4E473 320627 :~$ dd if=/dev/cdrom bs=2048 count=357014 conv=notrunc,noerror | md5sum 357014+0 records in 357014+0 records out 731164672 bytes (731 MB) copied, 71.1673 s, 10.3 MB/s d536a1c08472e2832a752418d18bbe27 -
update backup
$ sudo service mythtv-backend stop $ /etc/cron.daily/mythconverg-backup $ tail /var/log/mythtv/mythconverg_backup.log $ sudo /etc/cron.daily/rsync-backup $ tail /var/log/mythtv/rsync-backup.log
looks good!
verify/repair disk drives
ubuntu@ubuntu:~$ sudo parted -l Model: ATA SAMSUNG SP0822N (scsi) Disk /dev/sda: 80.1GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 32.3kB 1287MB 1287MB primary ext2 boot 2 1287MB 10.3GB 9052MB primary linux-swap(v1) 3 10.3GB 26.5GB 16.1GB primary ext3 4 26.5GB 47.9GB 21.5GB primary ext3 Model: ATA SAMSUNG HD204UI (scsi) Disk /dev/sdb: 2000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 1049kB 2000GB 2000GB jfs Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only. Error: /dev/sr0: unrecognised disk label <ev/sda1 ; sudo fsck.ext3 -p /dev/sda3 ; sudo fsck.ext3 -p /dev/sda4 fsck.jfs version 1.1.12, 24-Aug-2007 processing started: 8/19/2012 4.29.43 The current device is: /dev/sdb1 Block size in bytes: 4096 Filesystem size in blocks: 488378368 **Phase 0 - Replay Journal Log **Phase 1 - Check Blocks, Files/Directories, and Directory Entries **Phase 2 - Count links **Phase 3 - Duplicate Block Rescan and Directory Connectedness **Phase 4 - Report Problems **Phase 5 - Check Connectivity **Phase 6 - Perform Approved Corrections **Phase 7 - Rebuild File/Directory Allocation Maps **Phase 8 - Rebuild Disk Allocation Maps 1953513472 kilobytes total disk space. 315090 kilobytes in 141844 directories. 1454311933 kilobytes in 869171 user files. 0 kilobytes in extended attributes 1029553 kilobytes reserved for system use. 498487076 kilobytes are available for use. Filesystem is clean. ....|.... real 3m46.207s user 0m4.860s sys 0m3.000s fsck.jfs version 1.1.12, 24-Aug-2007 processing started: 8/19/2012 4.33.37 The current device is: /dev/sdb1 Block size in bytes: 4096 Filesystem size in blocks: 488378368 **Phase 1 - Check Blocks, Files/Directories, and Directory Entries **Phase 2 - Count links **Phase 3 - Duplicate Block Rescan and Directory Connectedness **Phase 4 - Report Problems **Phase 5 - Check Connectivity **Phase 6 - Perform Approved Corrections **Phase 7 - Verify File/Directory Allocation Maps **Phase 8 - Verify Disk Allocation Maps 1953513472 kilobytes total disk space. 315090 kilobytes in 141844 directories. 1454311933 kilobytes in 869171 user files. 0 kilobytes in extended attributes 1029553 kilobytes reserved for system use. 498487076 kilobytes are available for use. File system checked READ ONLY. Filesystem is clean. real 3m32.753s user 0m5.240s sys 0m2.320s /dev/sda1: clean, 229/628320 files, 155774/1256416 blocks /dev/sda3: clean, 182759/983488 files, 1087266/3933916 blocks /dev/sda4: clean, 16931/1313280 files, 1061967/5242880 blocks
install from CD
I'm doing a clean install from the CD. however, I'm disconnecting the hard drive that contains my recordings, first
update the backups
2003 sudo service mythtv-backend stop 2004 /etc/cron.daily/mythconverg-backup 2005 tail /var/log/mythtv/mythconverg_backup.log 2006 ls /storage/backups/myth/ | tail 2007 ls -Ftl /storage/backups/myth/ | head sudo /etc/cron.daily/rsync-backup 2008 tail /var/log/mythtv/rsync-backup.log
from the logs
Started nice -19 rsync --archive --delete-during --hard-links --numeric-ids --exclude /proc --exclude /sys --exclude /var/tmp --exclude /tmp --exclude /storage --exclude /dev --exclude /lib/init/rw --exclude /mnt --exclude /cdrom --exclude /media / /storage/backups/daily/ on Sat Oct 20 23:33:41 PDT 2012 Finished nice -19 rsync --archive --delete-during --hard-links --numeric-ids --exclude /proc --exclude /sys --exclude /var/tmp --exclude /tmp --exclude /storage --exclude /dev --exclude /lib/init/rw --exclude /mnt --exclude /cdrom --exclude /media / /storage/backups/daily/ on Sat Oct 20 23:35:22 PDT 2012
and
Started /home/xxx/mythconverg_backup.pl --directory /storage/backups/myth/ --rotate 20 on Sat Oct 20 23:34:25 PDT 2012 Finished /home/xxx/mythconverg_backup.pl --directory /storage/backups/myth/ --rotate 20 on Sat Oct 20 23:34:28 PDT 2012
check and repair disks
20 Oct 2012
ubuntu@ubuntu:~$ sudo parted -l Model: ATA SAMSUNG SP0822N (scsi) Disk /dev/sda: 80.1GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 32.3kB 1287MB 1287MB primary ext2 boot 2 1287MB 10.3GB 9052MB primary linux-swap(v1) 3 10.3GB 26.5GB 16.1GB primary ext3 4 26.5GB 47.9GB 21.5GB primary ext3 Model: ATA SAMSUNG HD204UI (scsi) Disk /dev/sdb: 2000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 1049kB 2000GB 2000GB jfs Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only. Error: /dev/sr0: unrecognised disk label <ev/sda1 ; sudo fsck.ext3 -p /dev/sda3 ; sudo fsck.ext3 -p /dev/sda4 fsck.jfs version 1.1.12, 24-Aug-2007 processing started: 10/21/2012 6.48.52 The current device is: /dev/sdb1 Block size in bytes: 4096 Filesystem size in blocks: 488378368 **Phase 0 - Replay Journal Log **Phase 1 - Check Blocks, Files/Directories, and Directory Entries **Phase 2 - Count links **Phase 3 - Duplicate Block Rescan and Directory Connectedness **Phase 4 - Report Problems **Phase 5 - Check Connectivity **Phase 6 - Perform Approved Corrections **Phase 7 - Rebuild File/Directory Allocation Maps **Phase 8 - Rebuild Disk Allocation Maps 1953513472 kilobytes total disk space. 316101 kilobytes in 141867 directories. 1555499416 kilobytes in 871961 user files. 0 kilobytes in extended attributes 1032185 kilobytes reserved for system use. 397297972 kilobytes are available for use. Filesystem is clean. |........ real 3m50.689s user 0m4.940s sys 0m3.070s fsck.jfs version 1.1.12, 24-Aug-2007 processing started: 10/21/2012 6.52.47 The current device is: /dev/sdb1 Block size in bytes: 4096 Filesystem size in blocks: 488378368 **Phase 1 - Check Blocks, Files/Directories, and Directory Entries **Phase 2 - Count links **Phase 3 - Duplicate Block Rescan and Directory Connectedness **Phase 4 - Report Problems **Phase 5 - Check Connectivity **Phase 6 - Perform Approved Corrections **Phase 7 - Verify File/Directory Allocation Maps **Phase 8 - Verify Disk Allocation Maps 1953513472 kilobytes total disk space. 316101 kilobytes in 141867 directories. 1555499416 kilobytes in 871961 user files. 0 kilobytes in extended attributes 1032185 kilobytes reserved for system use. 397297972 kilobytes are available for use. File system checked READ ONLY. Filesystem is clean. real 3m33.905s user 0m5.270s sys 0m2.550s /dev/sda1: clean, 229/628320 files, 155774/1256416 blocks /dev/sda3: clean, 182580/983488 files, 1114640/3933916 blocks /dev/sda4: clean, 17374/1313280 files, 2006734/5242880 blocks ubuntu@ubuntu:~$ history 1 sudo parted -l 2 time sudo fsck.jfs -f /dev/sdb1 ; time sudo fsck.jfs -n /dev/sdb1 ; sudo fsck.ext2 -p /dev/sda1 ; sudo fsck.ext3 -p /dev/sda3 ; sudo fsck.ext3 -p /dev/sda4
burn disk image
use =gnomebaker=
install
before I installed, I disconnected power from my 2 TB hard drive that stores my TV shows
I ran the installation from the CD and made a clean install
Before any post-installation configuration, I shut down and reconnected the hard drive. Next,
/storage mounting
~$ diff /etc/fstab-orig /etc/fstab 16a17,19 > # manually added 21 Oct 2012 by TDG > UUID=d70970b0-e22c-47ae-a9e0-5d9c637aa073 /storage jfs defaults 0 2 >
when I rebooted, I saw an error message about checking /storage. I realized that I didn't have fsck.jfs. I did 'sudo apt-get update' and then 'sudo apt-get install jfs-utils'
~$ sudo apt-get install jfsutils Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: jfsutils 0 upgraded, 1 newly installed, 0 to remove and 113 not upgraded. Need to get 271 kB of archives. After this operation, 1,098 kB of additional disk space will be used. Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main jfsutils amd64 1.1.15-2 [271 kB] Fetched 271 kB in 1s (136 kB/s) Selecting previously unselected package jfsutils. (Reading database ... 96274 files and directories currently installed.) Unpacking jfsutils (from .../jfsutils_1.1.15-2_amd64.deb) ... Processing triggers for man-db ... Setting up jfsutils (1.1.15-2) ...
restore database
$ cp -pr /storage/backups/daily/home/xxx/.mythtv/backuprc ~/.mythtv/. $ ls -a ~/.mythtv . 3rdParty channels lircrc themecache tmp .. backuprc config.xml mysql.txt themes
and then
$ ./mythconverg_restore.pl --drop_database --create_database --filename mythconverg-1254-20121020233426.sql Successfully restored backup. Argument "" isn't numeric in numeric gt (>) at ./mythconverg_restore.pl line 1504. $ /usr/share/mythtv/mythconverg_restore.pl --drop_database --create_database --filename mythconverg-1254-20121020233426.sql Successfully restored backup. Argument "" isn't numeric in numeric gt (>) at /usr/share/mythtv/mythconverg_restore.pl line 1504.
ugh, that doesn't look real good
$ ./mythconverg_restore.pl --drop_database --create_database --verbose --filename mythconverg-1254-20121020233426.sql Configuring environment: - username: trdg - HOME: /home/trdg - MYTHCONFDIR: /home/trdg/.mythtv Parsing configuration files: - checking: /home/trdg/.mythtv/config.xml parsing: /home/trdg/.mythtv/config.xml - checking: /home/trdg/.mythtv/backuprc parsing: /home/trdg/.mythtv/backuprc Applying command-line arguments. Checking configuration. Database Information: DBHostName: localhost DBPort: 3306 DBUserName: mythtv DBPassword: XXX DBName: mythconverg DBSchemaVer: DBBackupDirectory: /storage/backups/myth/ DBBackupFilename: mythconverg-1254-20121020233426.sql drop_database: yes create_database: yes Executables: mysql_client: mysql uncompress: gzip -d Miscellaneous: partial_restore: no restore_xmltvids: no change_hostname: no Checking database. Preparing initial database. Dropping database. Creating database. Setting database character set. Found 0 tables in the database. Backup file is uncompressed. Attempting to use supplied password for mysql command-line client. Any [client] or [mysql] password specified in the MySQL options file will take precedence. Executing command: 'mysql' --defaults-extra-file='/tmp/coM8GrBrpN' --host='localhost' --port='3306' --user='mythtv' 'mythconverg' mysql exited with status: 0 Restored 16 of 16 lines. Successfully restored backup. Unable to retrieve DBSchemaVer from database. Argument "" isn't numeric in numeric gt (>) at ./mythconverg_restore.pl line 1504.
I tried the optimize script
$ /usr/share/doc/mythtv-backend/contrib/maintenance/optimize_mythdb.pl MasterServerIP or MasterServerPort not found! You may need to check your settings.php file or re-run mythtv-setup.
that's not real good :(
so it's pretty clear that my previous database backups were no good!
$ ls -Ftl /storage/backups/myth/ -rw-r--r-- 1 root root 809 Oct 21 00:23 mythconverg-1254-20121021002312.sql -rw-r--r-- 1 trdg trdg 809 Oct 20 23:34 mythconverg-1254-20121020233426.sql -rw-r--r-- 1 root root 809 Oct 20 08:03 mythconverg-1254-20121020080314.sql -rw-r--r-- 1 root root 809 Oct 19 07:51 mythconverg-1254-20121019075114.sql -rw-r--r-- 1 root root 809 Oct 18 07:50 mythconverg-1254-20121018075050.sql -rw-r--r-- 1 root root 809 Oct 17 08:06 mythconverg-291-12.sql -rw-r--r-- 1 root root 809 Oct 17 08:03 mythconverg-1254-20121017080302.sql -rw-r--r-- 1 root root 809 Oct 16 07:48 mythconverg-1254-20121016074839.sql -rw-r--r-- 1 root root 809 Oct 15 08:04 mythconverg-1254-20121015080441.sql -rw-r--r-- 1 root root 809 Oct 14 07:41 mythconverg-1254-20121014074154.sql -rw-r--r-- 1 root root 809 Oct 13 08:28 mythconverg-1254-20121013082859.sql -rw-r--r-- 1 root root 809 Oct 12 07:54 mythconverg-1254-20121012075423.sql -rw-r--r-- 1 root root 809 Oct 11 07:57 mythconverg-1254-20121011075721.sql -rw-r--r-- 1 root root 809 Oct 10 07:49 mythconverg-284-12.sql -rw-r--r-- 1 root root 809 Oct 10 07:46 mythconverg-1254-20121010074623.sql -rw-r--r-- 1 root root 809 Oct 9 07:39 mythconverg-1254-20121009073943.sql -rw-r--r-- 1 root root 809 Oct 8 08:05 mythconverg-1254-20121008080555.sql -rw-r--r-- 1 root root 809 Oct 7 08:04 mythconverg-1254-20121007080414.sql -rw-r--r-- 1 root root 809 Oct 6 07:44 mythconverg-1254-20121006074406.sql -rw-r--r-- 1 root root 809 Oct 5 07:55 mythconverg-1254-20121005075521.sql -rw-r--r-- 1 root root 809 Oct 4 07:40 mythconverg-1254-20121004074017.sql -rw-r--r-- 1 root root 809 Oct 3 01:46 mythconverg-277-12.sql -rw-r--r-- 1 root root 809 Oct 3 01:43 mythconverg-1254-20121003014337.sql -rw-r--r-- 1 root root 23993417 Sep 26 07:55 mythconverg-1254-20120926075522.sql.gz -rw-r--r-- 1 root root 23950846 Sep 25 07:54 mythconverg-269-12.sql.gz -rw-r--r-- 1 root root 23950858 Sep 25 07:51 mythconverg-1254-20120925075124.sql.gz -rw-r--r-- 1 root root 24161603 Sep 24 07:48 mythconverg-1254-20120924074748.sql.gz
All of those with size "809" and not gzipped are, apparently, bad. I think I restored from mythconverg-1254-20120926075522.sql.gz
Wi-Fi Problems
initial problems
I've had problems with my wi-fi dropping out. I did some checking around
- http://ubuntuforums.org/showthread.php?t=1986712&page=1
- http://ubuntuforums.org/showthread.php?t=1986712&page=2
I believe my error message was like this:
$ dmesg | grep rt2 [ 8.507951] rt2800pci 0000:01:05.0: PCI INT A -> Link[APC1] -> GSI 16 (level, low) -> IRQ 16 [ 8.754886] Registered led device: rt2800pci-phy0::radio [ 8.754904] Registered led device: rt2800pci-phy0::assoc [ 8.754920] Registered led device: rt2800pci-phy0::quality [ 19.916160] phy0 -> rt2800pci_mcu_status: Error - MCU request failed, no response from hardware
I also had
$ sudo lshw -C network *-network description: Wireless interface product: RT2760 Wireless 802.11n 1T/2R vendor: Ralink corp. physical id: 5 bus info: pci@0000:01:05.0 logical name: wlan0 version: 00 serial: 00:0d:0a:00:1e:df width: 32 bits clock: 33MHz capabilities: pm bus_master cap_list ethernet physical wireless configuration: broadcast=yes driver=rt2800pci driverversion=3.2.0-29-generic firmware=0.34 ip=192.168.1.55 latency=32 link=yes maxlatency=4 mingnt=2 multicast=yes wireless=IEEE 802.11bgn resources: irq:16 memory:e5000000-e500ffff *-network description: Ethernet interface product: MCP79 Ethernet vendor: NVIDIA Corporation physical id: a bus info: pci@0000:00:0a.0 logical name: eth0 version: b1 serial: 00:24:1d:1d:8d:24 size: 100Mbit/s capacity: 1Gbit/s width: 32 bits clock: 66MHz capabilities: pm msi bus_master cap_list ethernet physical mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=forcedeth driverversion=0.64 duplex=full latency=0 link=yes maxlatency=20 mingnt=1 multicast=yes port=MII speed=100Mbit/s resources: irq:41 memory:e5186000-e5186fff ioport:c400(size=8) memory:e5187000-e51870ff memory:e5188000-e518800f
I updated with the backports package via the "apt install" link that I reached through http://www.ubuntuupdates.org/package/core/precise/main/proposed/linux-backports-modules-cw-3.3-precise-generic
had head about this from forum posts:
- http://ubuntuforums.org/showthread.php?s=71ddac0852d638f2660b0b10c0a4ebe2&t=1986712&page=3
- http://ubuntuforums.org/showpost.php?p=11908967&postcount=6
I rebooted after backports and received an error message that I've forgotten :( and my monitor resolution was incorrect. I ran the Ubuntu "Update Manager" and now the resolution seems fine. The network dropouts seem to be mostly gone. There has been one in a few hours since the use of backports. Before backports, it would dropout after just minutes of use.
now, I get
$ sudo lshw -C network *-network description: Wireless interface product: RT2760 Wireless 802.11n 1T/2R vendor: Ralink corp. physical id: 5 bus info: pci@0000:01:05.0 logical name: wlan0 version: 00 serial: 00:0d:0a:00:1e:df width: 32 bits clock: 33MHz capabilities: pm bus_master cap_list ethernet physical wireless configuration: broadcast=yes driver=rt2800pci driverversion=3.2.0-32-generic firmware=0.34 ip=192.168.1.55 latency=32 link=yes maxlatency=4 mingnt=2 multicast=yes wireless=IEEE 802.11bgn resources: irq:16 memory:e5000000-e500ffff *-network description: Ethernet interface product: MCP79 Ethernet vendor: NVIDIA Corporation physical id: a bus info: pci@0000:00:0a.0 logical name: eth0 version: b1 serial: 00:24:1d:1d:8d:24 size: 100Mbit/s capacity: 1Gbit/s width: 32 bits clock: 66MHz capabilities: pm msi bus_master cap_list ethernet physical mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=forcedeth driverversion=0.64 duplex=full latency=0 link=yes maxlatency=20 mingnt=1 multicast=yes port=MII speed=100Mbit/s resources: irq:41 memory:e5186000-e5186fff ioport:c400(size=8) memory:e5187000-e51870ff memory:e5188000-e518800f
I think the difference is "driverversion=3.2.0-29-generic" became "driverversion=3.2.0-32-generic"
I'm pretty sure that this is after backports:
NetworkManager Tool State: connected (global) - Device: eth0 ----------------------------------------------------------------- Type: Wired Driver: forcedeth State: disconnected Default: no HW Address: 00:24:1D:1D:8D:24 Capabilities: Carrier Detect: yes Speed: 100 Mb/s Wired Properties Carrier: on - Device: wlan0 [Tribe Network 84D] ------------------------------------------- Type: 802.11 WiFi Driver: rt2800pci State: connected Default: yes HW Address: 00:0D:0A:00:1E:DF Capabilities: Speed: 14 Mb/s Wireless Properties WEP Encryption: yes WPA Encryption: yes WPA2 Encryption: yes Wireless Access Points (* = current AP) Tribe Guest: Infra, 2A:CF:DA:AD:3A:C0, Freq 2412 MHz, Rate 54 Mb/s, Strength 74 WPA2 *Tribe Network 84D: Infra, 28:CF:DA:AD:3A:C9, Freq 2412 MHz, Rate 54 Mb/s, Strength 66 WPA2 IPv4 Settings: Address: 192.168.1.55 Prefix: 24 (255.255.255.0) Gateway: 192.168.1.1 DNS: 192.168.1.1
28 Nov 2012
I think this problem occasionally causes mythfilldatabase to fail. Either way, I do find that sometimes my mythtv has fallen off the network. So, I went looking for a script to help. I found some info at http://alexsleat.co.uk/2011/01/09/a-more-elegant-solution-to-ubuntu-wi-fi-reconnecting-issue/ but using =ifconfig= didn't always seem to cause the connection to toggle. Then I found http://manpages.ubuntu.com/manpages/natty/man1/nmcli.1.html, so here's my script
#!/bin/bash # http://alexsleat.co.uk/2011/01/09/a-more-elegant-solution-to-ubuntu-wi-fi-reconnecting-issue/ # http://manpages.ubuntu.com/manpages/natty/man1/nmcli.1.html LOG='/var/log/mythtv/wifi-test.log' if (iwconfig wlan0 | grep -q "Access Point: Not-Associated") || (ping -w 3 -c 2 192.168.0.1 |& grep -qE "(0 received)|(Network is unreachable)") then echo >> ${LOG} echo >> ${LOG} echo '>> ' wi-fi problem detected on `date` >> ${LOG} echo '>> ' iwconfig wlan0 >> ${LOG} iwconfig wlan0 >> ${LOG} echo '>> ' ping -w 3 -c 2 192.168.0.1 >> ${LOG} ping -w 3 -c 2 192.168.0.1 >> ${LOG} echo '>> ' nmcli nm wifi >> ${LOG} nmcli nm wifi >> ${LOG} nmcli nm wifi off >> ${LOG} 2>&1 sleep 20 >> ${LOG} 2>&1 nmcli nm wifi on >> ${LOG} 2>&1 sleep 20 >> ${LOG} 2>&1 echo '>> ' nmcli nm wifi >> ${LOG} nmcli nm wifi >> ${LOG} echo '>> ' finished `date` >> ${LOG} fi
which I execute with root's cron:
$ sudo crontab -l */5 * * * * /home/troy/bin/wifi-test.sh
1 Mar 2014 - I have restored wired ethernet and no longer run this script. I've removed it from root's cron
HDHomeRun networking
before doing any changes:
$ cat /etc/network/interfaces auto lo iface lo inet loopback $ ifconfig -a eth0 Link encap:Ethernet HWaddr 00:24:1d:1d:8d:24 inet6 addr: fe80::224:1dff:fe1d:8d24/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:95 errors:0 dropped:0 overruns:0 frame:0 TX packets:35 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:32490 (32.4 KB) TX bytes:7885 (7.8 KB) Interrupt:41 Base address:0xc000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:673 errors:0 dropped:0 overruns:0 frame:0 TX packets:673 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:314873 (314.8 KB) TX bytes:314873 (314.8 KB) wlan0 Link encap:Ethernet HWaddr 00:0d:0a:00:1e:df inet addr:192.168.1.55 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::20d:aff:fe00:1edf/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:27562 errors:0 dropped:0 overruns:0 frame:0 TX packets:48795 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2679663 (2.6 MB) TX bytes:60196183 (60.1 MB)
So, I re-implemented what I had before:
$ cat /etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 169.254.1.5 netmask 255.255.0.0 $ sudo /etc/init.d/networking restart * Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces * Reconfiguring network interfaces... ssh stop/waiting ssh start/running, process 3491 $ ifconfig -a eth0 Link encap:Ethernet HWaddr 00:24:1d:1d:8d:24 inet addr:169.254.1.5 Bcast:169.254.255.255 Mask:255.255.0.0 inet6 addr: fe80::224:1dff:fe1d:8d24/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:219 errors:0 dropped:0 overruns:0 frame:0 TX packets:46 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:74898 (74.8 KB) TX bytes:11895 (11.8 KB) Interrupt:41 Base address:0xc000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:916 errors:0 dropped:0 overruns:0 frame:0 TX packets:916 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:333911 (333.9 KB) TX bytes:333911 (333.9 KB) wlan0 Link encap:Ethernet HWaddr 00:0d:0a:00:1e:df inet addr:192.168.1.55 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::20d:aff:fe00:1edf/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:31213 errors:0 dropped:0 overruns:0 frame:0 TX packets:52124 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3243162 (3.2 MB) TX bytes:62288968 (62.2 MB) $ hdhomerun_config discover hdhomerun device 10172423 found at 169.254.193.43
lircd
backup the existing stuff
$ tar cvzf lirc-bak.tar.gz .lircrc .lirc .lircrc .lirc/ .lirc/mythtv .lirc/totem .lirc/xine .lirc/elisa .lirc/vlc .lirc/xmame .lirc/mplayer .lirc/xmess
and restore my settings
$ ls -Ftl /storage/backups/daily/home/trdg/.lirc total 164 -rw-r--r-- 1 trdg trdg 10253 Apr 8 2011 mythtv -rw-r--r-- 1 trdg trdg 10142 Feb 28 2011 mythtv.bak9 -rw-r--r-- 1 trdg trdg 10142 Feb 28 2011 mythtv.bak8 -rw-r--r-- 1 trdg trdg 9379 Oct 31 2010 mythtv-ed -rw-r--r-- 1 trdg trdg 9283 Oct 31 2010 mythtv.bak6 -rw-r--r-- 1 trdg trdg 7386 Aug 17 2010 mythtv.bak5 -rw-r--r-- 1 trdg trdg 7386 Aug 17 2010 mythtv.bak7 drwxr-xr-x 2 trdg trdg 4096 Aug 17 2010 RCS/ -rw-r--r-- 1 trdg trdg 16384 Jul 4 2010 mythtv-corrupt-maybe -rw-r--r-- 1 trdg trdg 6581 Jul 4 2010 mythtv.bak4 -rw-r--r-- 1 trdg trdg 6644 Jul 4 2010 mythtv.bak3 -rw-r--r-- 1 trdg trdg 6648 Jul 7 2009 mythtv.bak2 -rw-r--r-- 1 trdg trdg 6648 Jul 6 2009 mythtv.bak -rw-r--r-- 1 trdg trdg 126 Jun 28 2009 backup-mythtv -rw-r--r-- 1 trdg trdg 126 Jun 28 2009 elisa -rw-r--r-- 1 trdg trdg 126 Jun 28 2009 mplayer -rw-r--r-- 1 trdg trdg 126 Jun 28 2009 totem -rw-r--r-- 1 trdg trdg 126 Jun 28 2009 vlc -rw-r--r-- 1 trdg trdg 126 Jun 28 2009 xine -rw-r--r-- 1 trdg trdg 126 Jun 28 2009 xmame -rw-r--r-- 1 trdg trdg 126 Jun 28 2009 xmess $ diff .lircrc /storage/backups/daily/home/trdg/.lircrc $ cd .lirc $ cp -pr /storage/backups/daily/home/trdg/.lirc/RCS . $ cp -pr /storage/backups/daily/home/trdg/.lirc/mythtv . $ ls -Ftl total 72 -rw-r--r-- 1 trdg trdg 6979 Oct 21 01:28 elisa -rw-r--r-- 1 trdg trdg 6636 Oct 21 01:28 mplayer -rw-r--r-- 1 trdg trdg 5746 Oct 21 01:28 totem -rw-r--r-- 1 trdg trdg 7101 Oct 21 01:28 vlc -rw-r--r-- 1 trdg trdg 6876 Oct 21 01:28 xine -rw-r--r-- 1 trdg trdg 6434 Oct 21 01:28 xmame -rw-r--r-- 1 trdg trdg 6434 Oct 21 01:28 xmess -rw-r--r-- 1 trdg trdg 10253 Apr 8 2011 mythtv drwxr-xr-x 2 trdg trdg 4096 Aug 17 2010 RCS/
Adding irexec per https://help.ubuntu.com/community/LIRC#irexec. I went to Applications -> Settings -> Session and Startup -> Application Autostart. I added an entry for "irexec -d"
and reconfigured support for my IR receiver.
output from "cat /proc/bus/input/devices"
I: Bus=0003 Vendor=1784 Product=0011 Version=0100 N: Name="Media Center Ed. eHome Infrared Remote Transceiver (1784:0011)" P: Phys=usb-0000:00:04.0-2 S: Sysfs=/devices/pci0000:00/0000:00:04.0/usb3/3-2/3-2:1.0/rc/rc0/input4 U: Uniq= H: Handlers=kbd event4 B: PROP=0 B: EV=100013 B: KEY=fff 0 200108fc32e 237605100000000 0 700158000 419200004001 8e968000000000 10000000 B: MSC=10
and some settings
$ diff --unified=3 /etc/lirc/hardware.conf /storage/backups/daily/etc/lirc/hardware.conf --- /etc/lirc/hardware.conf 2012-10-21 01:28:09.000000000 -0700 +++ /storage/backups/daily/etc/lirc/hardware.conf 2011-10-09 22:27:11.000000000 -0700 @@ -1,13 +1,14 @@ # /etc/lirc/hardware.conf # #Chosen Remote Control -REMOTE="Windows Media Center Transceivers/Remotes (all)" -REMOTE_MODULES="lirc_dev mceusb" +REMOTE="None" +REMOTE_MODULES="mceusb" REMOTE_DRIVER="" REMOTE_DEVICE="/dev/lirc0" REMOTE_SOCKET="" -REMOTE_LIRCD_CONF="mceusb/lircd.conf.mceusb" +REMOTE_LIRCD_CONF="" REMOTE_LIRCD_ARGS="" +# the -r is from http://www.mythtv.org/wiki/Hulu_Desktop_Integration #Chosen IR Transmitter TRANSMITTER="None" $ cd /etc/lirc/ $ sudo cp hardware.conf hardware.conf.old2 $ sudo vi hardware.conf $ diff --unified=3 hardware.conf.old2 hardware.conf --- hardware.conf.old2 2012-10-23 00:27:13.000000000 -0700 +++ hardware.conf 2012-10-23 00:28:09.000000000 -0700 @@ -2,11 +2,12 @@ # #Chosen Remote Control REMOTE="Windows Media Center Transceivers/Remotes (all)" -REMOTE_MODULES="lirc_dev mceusb" +REMOTE="Media Center Ed. eHome Infrared Remote Transceiver (1784:0011)" +REMOTE_MODULES="mceusb" REMOTE_DRIVER="" REMOTE_DEVICE="/dev/lirc0" REMOTE_SOCKET="" -REMOTE_LIRCD_CONF="mceusb/lircd.conf.mceusb" +REMOTE_LIRCD_CONF="" REMOTE_LIRCD_ARGS="" #Chosen IR Transmitter
restore backup cron jobs
$ sudo cp -pr /storage/backups/daily/etc/cron.daily/mythconverg-backup /etc/cron.daily/. $ sudo cp -pr /storage/backups/daily/etc/cron.daily/rsync-backup /etc/cron.daily/. $ sudo cp -pr /storage/backups/daily/etc/cron.weekly/mythconverg-backup /etc/cron.weekly/. $ sudo cp -pr /storage/backups/daily/etc/cron.weekly/rsync-backup /etc/cron.weekly/.
I cleared out some of the old, bad backups:
$ cat mythconverg-1254-20121021002312.sql -- MySQL dump 10.13 Distrib 5.1.61, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: mythconverg -- ------------------------------------------------------ -- Server version 5.1.61-0ubuntu0.10.10.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; $ diff mythconverg-1254-20121021002312.sql mythconverg-1254-20121020233426.sql $ rm mythconverg-1254-20121020233426.sql mythconverg-1254-20121020080314.sql mythconverg-1254-20121019075114.sql mythconverg-1254-20121018075050.sql mythconverg-291-12.sql mythconverg-1254-20121017080302.sql mythconverg-1254-20121016074839.sql mythconverg-1254-20121015080441.sql mythconverg-1254-20121014074154.sql mythconverg-1254-20121013082859.sql mythconverg-1254-20121012075423.sql mythconverg-1254-20121011075721.sql mythconverg-284-12.sql mythconverg-1254-20121010074623.sql mythconverg-1254-20121009073943.sql mythconverg-1254-20121008080555.sql mythconverg-1254-20121007080414.sql mythconverg-1254-20121006074406.sql mythconverg-1254-20121005075521.sql mythconverg-1254-20121004074017.sql mythconverg-277-12.sql
Samba
$ sudo cp smb.conf smb.conf-bak $ sudo cp /storage/backups/daily/etc/samba/smb.conf /etc/samba/smb.conf $ diff --unified=4 smb.conf-bak smb.conf --- smb.conf-bak 2012-10-22 23:36:29.000000000 -0700 +++ smb.conf 2012-10-22 23:36:44.000000000 -0700 @@ -9,9 +9,9 @@ security = share [recordings] comment = TV Recordings -path = /var/lib/mythtv/recordings +path = /storage/mythtv/recordings public = yes writable = no create mask = 0777 directory mask = 0777 @@ -19,9 +19,9 @@ force group = nogroup [videos] comment = Videos -path = /var/lib/mythtv/videos +path = /storage/mythtv/videos public = yes writable = yes create mask = 0660 directory mask = 0770 @@ -29,9 +29,9 @@ force group = mythtv [music] comment = Music -path = /var/lib/mythtv/music +path = /storage/mythtv/music public = yes writable = yes create mask = 0660 directory mask = 0770 @@ -39,9 +39,9 @@ force group = mythtv [pictures] comment = Pictures -path = /var/lib/mythtv/pictures +path = /storage/mythtv/pictures public = yes writable = yes create mask = 0660 directory mask = 0770