User:Trogod/System0Setup

From MythTV Official Wiki
Jump to: navigation, search

what's the deal?

2009-07-03 23:20:03.072 lirc init success using configuration file: /home/trogod/.mythtv/lircrc
2009-07-03 23:20:04.114 Specified base font 'medium' does not exist for font clock
2009-07-03 23:20:04.114 Specified base font 'medium' does not exist for font small
2009-07-03 23:20:04.114 Specified base font 'medium' does not exist for font medium
2009-07-03 23:20:04.114 Specified base font 'medium' does not exist for font large
2009-07-03 23:20:04.348 Registering Internal as a media playback plugin.
2009-07-03 23:20:04.559 MonitorRegisterExtensions(0x100, gif,jpg,png)
2009-07-03 23:20:05.012 Failed to run 'cdrecord --scanbus'
2009-07-03 23:20:05.019 Failed to run 'cdrecord --scanbus -dev=ATA'
2009-07-03 23:20:05.022 Failed to run 'cdrecord --scanbus -dev=ATAPI'
2009-07-03 23:20:05.039 MonitorRegisterExtensions(0x40, ogg,mp3,aac,flac)

Non-default settings

  • I had to activate my HDHomeRun's IR receiver, myself
  • I used to have to restart the backend and run lircd, manually, but I have that figured out now, see http://www.mythtv.org/wiki/User:Trogod/System0Setup#lircd
  • set MythTV frontend > "Utilities / Setup" > Setup > General > page 3 General. The setting is "System Exit key:" I changed it to "Alt-ESC". The default setting of ESC wasn't vey nice because, so often I would accidentally get the "do you really want to exit MythTV?" dialog
  • set MythTV frontend > "Utilities / Setup" > Setup > Appearance > page 1 Theme. The setting "Paint Engine:" I changed from "Qt" to "OpenGL". I was hoping my checkboxes would start looking better, but they didn't. In any case, if OpenGL uses the graphics card, then I think it's the better choice.
  • set MythTV frontend > "Utilities / Setup" > Setup > Appearance > page 1 Theme. The setting "Qt Style:" I changed to "Platinum" per advice from the mythtv-users mailing list. I believe the idea was that I would be using "Paint Engine: Qt", but I'll keep this setting, anyway.
  • set MythTV frontend > "Utilities / Setup" > Setup > TV Settings > General. checked "Change channels immediately without select" my wife wanted this
  • set MythTV frontend > "Utilities / Setup" > Setup > TV Settings > General. checked "Allow live TV to move scheduled shows". Wow! this just makes sense to me - why wouldn't this be checked to begin with?

Partitioning

see also File_storage, User:Trogod/System0

I used "fdisk -l" to show me which hard drive is which. I have two (2) drives: an 80 GB and a TB drive for storing the media files..

I want to partition for multiple MythTV installations, so I can try out different installations and different versions. See

  • "A /home & swap partition you share between all distro's. Then +/- 5 GB (I would say 7 GB is better though, because of the space log files can take) for each distro."
  • "Personally I resized my 120 GB hd into a bunch of 13-14 GB partitions that all share the same swap."

80 GB:

  • /boot 100 MB -- It must be of type 0x83 "Linux native". -- must be contained within the first 1024 cylinders of the drive
  • swap 10 GB -- It must be of type 0x82 "Linux swap".
  • / 1 15 GB
  • / 2 15 GB
  • / 3 15 GB
  • home 20 GB
  • total 75 GB

TB:

  • one big JFS partition

command-line:

/dev/sda is my TB
parted /dev/sda 
(parted) mklabel gpt

fsck.jfs

9 Jan 2012 -- I had to install fsck.jfs

$ sudo apt-get install jfsutils
[sudo] password for xxxx: 
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 7 not upgraded.
Need to get 272kB of archives.
After this operation, 1,155kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ maverick/main jfsutils amd64 1.1.12-2.1 [272kB]
Fetched 272kB in 11s (23.9kB/s)                                                          
Selecting previously deselected package jfsutils.
(Reading database ... 149175 files and directories currently installed.)
Unpacking jfsutils (from .../jfsutils_1.1.12-2.1_amd64.deb) ...
Processing triggers for man-db ...
Setting up jfsutils (1.1.12-2.1) ...

More

$ /usr/bin/mythbackend --version
Please include all output in bug reports.
MythTV Version   : 19961
MythTV Branch    : branches/release-0-21-fixes
Library API      : 0.21.20080304-1
Network Protocol : 40
Options compiled in:
 linux profile using_oss using_alsa using_jack using_backend using_dbox2 using_dvb using_firewire using_frontend using_hdhomerun using_iptv using_ivtv using_joystick_menu using_libfftw3 using_lirc using_opengl_vsync using_opengl_video using_v4l using_x11 using_xrandr using_xv using_xvmc using_xvmcw using_xvmc_vld using_glx_proc_addr_arb using_bindings_perl using_bindings_python using_opengl using_ffmpeg_threads using_libavc_5_3 using_live

I've had problems getting digital audio over HDMI with my GA-E7AUM-DS2H. I've found some things to try, though.


Also, i found some other interesting links...


I've noticed that when mythtv starts up, my HDHomeRun isn't detected. There's a discussion at http://www.gossamer-threads.com/lists/mythtv/users/341416 "Unable to send discovery request" "eno: Network is unreachable"

interesting for playing music out of selected speakers: ALSA_upmixing


  453  mkdir -p /storage/mythdvd/temp
  454  ls -Ftl /storage/
  455  sudo chown -R mythtv:mythtv /storage

Sound Configuration

problem

I'm having trouble configuring my digital audio over HDMI. I've fiddled with the settings, googled for help, looked at http://www.mythtv.org/wiki?title=AllensDigitalAudioHowto, but to no avail :(

While watching live or recorded ATSC TV, I can get stereo-only sound over HDMI and I can get digital (AC3 passthrough) over my optical connection (Toslink S/PDIF), but I can't seem to figure out the AC3-passthrough over HDMI.

I'm using a GIGABYTE GA-E7AUM-DS2H, NVIDIA GeForce 9400. I installed MythBuntu from mythbuntu-9.04-desktop-amd64.iso. I'm using NVIDIA driver 180.44, according to "NVIDIA X Server Settings".

I've connected the HDMI from the motherboard to my TV (Panasonic Viera TH-42PZ80U) and optical Toslink from the TV to my receiver (Sony STR-DE635) (it has only one optical audio input jack).

My Audio settings are: Audio output device: ALSA:hdmi Passthrough output device: Default Max Audio Channels: Stereo Upmix: Passive _ Enable AC3 to SPDIF passthrough _ Enable DTS to SPDIF passthrough _ Aggressive Sound card buffering _ User internal volume controls (none of those are checked)

If I turn on the AC3 and DTS passthrough, I get only noise, a digital, choppy, fluttery noise over HDMI. If I use the optical connection (S/PDIF) and change to "Passthrough output device: ALSA:iec958:{ AES0 0x02 }", the light on my receiver turns on and I get 5.1 audio.

After installing MythBuntu and getting absolutely no audio, I discovered that I had to un-mute "IEC958 1" (I think it was that one) in alsamixer.

My motherboard's BIOS has settings "Onboard Audio Function" and "HDMI Audio", both of which are set to "Auto" (which, according to the "Help", means enabled -- the only other setting is "Disabled").

research

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC883 Analog [ALC883 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC883 Digital [ALC883 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


$ aplay -L
front:CARD=NVidia,DEV=0
    HDA NVidia, ALC883 Analog
    Front speakers
surround40:CARD=NVidia,DEV=0
    HDA NVidia, ALC883 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=NVidia,DEV=0
    HDA NVidia, ALC883 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=NVidia,DEV=0
    HDA NVidia, ALC883 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=NVidia,DEV=0
    HDA NVidia, ALC883 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=NVidia,DEV=0
    HDA NVidia, ALC883 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=NVidia,DEV=0
    HDA NVidia, ALC883 Digital
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, NVIDIA HDMI
    HDMI Audio Output
null
    Discard all samples (playback) or generate zero samples (capture)
$ amixer controls  # output sorted by hand
numid=1,iface=MIXER,name='Front Playback Volume'
numid=2,iface=MIXER,name='Front Playback Switch'
numid=3,iface=MIXER,name='Surround Playback Volume'
numid=4,iface=MIXER,name='Surround Playback Switch'
numid=5,iface=MIXER,name='Center Playback Volume'
numid=6,iface=MIXER,name='LFE Playback Volume'
numid=7,iface=MIXER,name='Center Playback Switch'
numid=8,iface=MIXER,name='LFE Playback Switch'
numid=9,iface=MIXER,name='Side Playback Volume'
numid=10,iface=MIXER,name='Side Playback Switch'
numid=11,iface=MIXER,name='Headphone Playback Switch'
numid=12,iface=MIXER,name='Mic Playback Volume'
numid=13,iface=MIXER,name='Mic Playback Switch'
numid=14,iface=MIXER,name='Front Mic Playback Volume'
numid=15,iface=MIXER,name='Front Mic Playback Switch'
numid=16,iface=MIXER,name='Line Playback Volume'
numid=17,iface=MIXER,name='Line Playback Switch'
numid=18,iface=MIXER,name='Mic Boost'
numid=19,iface=MIXER,name='Front Mic Boost'
numid=20,iface=MIXER,name='Capture Volume'
numid=21,iface=MIXER,name='Capture Switch'
numid=22,iface=MIXER,name='Capture Volume',index=1
numid=23,iface=MIXER,name='Capture Switch',index=1
numid=24,iface=MIXER,name='Input Source'
numid=25,iface=MIXER,name='Input Source',index=1
numid=26,iface=MIXER,name='IEC958 Playback Con Mask'
numid=27,iface=MIXER,name='IEC958 Playback Pro Mask'
numid=28,iface=MIXER,name='IEC958 Playback Default'
numid=29,iface=MIXER,name='IEC958 Playback Switch'
numid=30,iface=MIXER,name='IEC958 Default PCM Playback Switch'
numid=31,iface=MIXER,name='IEC958 Capture Switch'
numid=32,iface=MIXER,name='IEC958 Capture Default'
numid=33,iface=MIXER,name='Master Playback Volume'
numid=34,iface=MIXER,name='Master Playback Switch'
numid=35,iface=MIXER,name='IEC958 Playback Con Mask',index=1
numid=36,iface=MIXER,name='IEC958 Playback Pro Mask',index=1
numid=37,iface=MIXER,name='IEC958 Playback Default',index=1
numid=38,iface=MIXER,name='IEC958 Playback Switch',index=1
numid=39,iface=MIXER,name='PCM Playback Volume'
$ amixer contents
numid=34,iface=MIXER,name='Master Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=33,iface=MIXER,name='Master Playback Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=64,step=0
  : values=61
  | dBscale-min=-64.00dB,step=1.00dB,mute=0
numid=11,iface=MIXER,name='Headphone Playback Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on
numid=39,iface=MIXER,name='PCM Playback Volume'
  ; type=INTEGER,access=rw---RW-,values=2,min=0,max=255,step=0
  : values=245,245
  | dBscale-min=-51.00dB,step=0.20dB,mute=0
numid=19,iface=MIXER,name='Front Mic Boost'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0
  : values=0,0
  | dBscale-min=0.00dB,step=10.00dB,mute=0
numid=15,iface=MIXER,name='Front Mic Playback Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=14,iface=MIXER,name='Front Mic Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
  : values=0,0
  | dBscale-min=-34.50dB,step=1.50dB,mute=0
numid=2,iface=MIXER,name='Front Playback Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on
numid=1,iface=MIXER,name='Front Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=64,step=0
  : values=52,52
  | dBscale-min=-64.00dB,step=1.00dB,mute=0
numid=4,iface=MIXER,name='Surround Playback Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on
numid=3,iface=MIXER,name='Surround Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=64,step=0
  : values=0,0
  | dBscale-min=-64.00dB,step=1.00dB,mute=0
numid=7,iface=MIXER,name='Center Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=5,iface=MIXER,name='Center Playback Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=64,step=0
  : values=0
  | dBscale-min=-64.00dB,step=1.00dB,mute=0
numid=8,iface=MIXER,name='LFE Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=6,iface=MIXER,name='LFE Playback Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=64,step=0
  : values=0
  | dBscale-min=-64.00dB,step=1.00dB,mute=0
numid=17,iface=MIXER,name='Line Playback Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=16,iface=MIXER,name='Line Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
  : values=0,0
  | dBscale-min=-34.50dB,step=1.50dB,mute=0
numid=18,iface=MIXER,name='Mic Boost'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0
  : values=0,0
  | dBscale-min=0.00dB,step=10.00dB,mute=0
numid=13,iface=MIXER,name='Mic Playback Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=12,iface=MIXER,name='Mic Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
  : values=0,0
  | dBscale-min=-34.50dB,step=1.50dB,mute=0
numid=21,iface=MIXER,name='Capture Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on
numid=23,iface=MIXER,name='Capture Switch',index=1
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on
numid=20,iface=MIXER,name='Capture Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=46,step=0
  : values=0,0
  | dBscale-min=-16.00dB,step=1.00dB,mute=0
numid=22,iface=MIXER,name='Capture Volume',index=1
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=46,step=0
  : values=0,0
  | dBscale-min=-16.00dB,step=1.00dB,mute=0
numid=30,iface=MIXER,name='IEC958 Default PCM Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=26,iface=MIXER,name='IEC958 Playback Con Mask'
  ; type=IEC958,access=r-------,values=1
  : values=[AES0=0x0f AES1=0xff AES2=0x00 AES3=0x00]
numid=35,iface=MIXER,name='IEC958 Playback Con Mask',index=1
  ; type=IEC958,access=r-------,values=1
  : values=[AES0=0x0f AES1=0xff AES2=0x00 AES3=0x00]
numid=27,iface=MIXER,name='IEC958 Playback Pro Mask'
  ; type=IEC958,access=r-------,values=1
  : values=[AES0=0x0f AES1=0x00 AES2=0x00 AES3=0x00]
numid=36,iface=MIXER,name='IEC958 Playback Pro Mask',index=1
  ; type=IEC958,access=r-------,values=1
  : values=[AES0=0x0f AES1=0x00 AES2=0x00 AES3=0x00]
numid=28,iface=MIXER,name='IEC958 Playback Default'
  ; type=IEC958,access=rw------,values=1
  : values=[AES0=0x04 AES1=0x82 AES2=0x00 AES3=0x02]
numid=37,iface=MIXER,name='IEC958 Playback Default',index=1
  ; type=IEC958,access=rw------,values=1
  : values=[AES0=0x04 AES1=0x00 AES2=0x00 AES3=0x00]
numid=29,iface=MIXER,name='IEC958 Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=38,iface=MIXER,name='IEC958 Playback Switch',index=1
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=32,iface=MIXER,name='IEC958 Capture Default'
  ; type=IEC958,access=r-------,values=1
  : values=[AES0=0x04 AES1=0x00 AES2=0x00 AES3=0x00]
numid=31,iface=MIXER,name='IEC958 Capture Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=24,iface=MIXER,name='Input Source'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'Mic'
  ; Item #1 'Front Mic'
  ; Item #2 'Line'
  : values=0
numid=25,iface=MIXER,name='Input Source',index=1
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'Mic'
  ; Item #1 'Front Mic'
  ; Item #2 'Line'
  : values=0
numid=10,iface=MIXER,name='Side Playback Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on
numid=9,iface=MIXER,name='Side Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=64,step=0
  : values=0,0
  | dBscale-min=-64.00dB,step=1.00dB,mute=0

about my TV

A couple of things I've come across that make me wonder if the Panasonic TH-42PZ80U really can do the passthrough:

in it's manual http://service.us.panasonic.com/OPERMANPDF/TH42PZ80U.PDF, on page 42, I quote "If you connect equipment that has "HDAVI Control 2" (or more) function to the TV with HDMI cable, the sound from DIGITAL AUDIO OUT terminal can be output as multi channel surround."

and, from http://www.amazon.com/Panasonic-Viera-TH-42PZ80U-1080p-Plasma/dp/B00142MUDS/ref=sr_1_1?ie=UTF8&s=electronics&qid=1246951218&sr=8-1 a reviewer (M. Hadeishi "synthetic zero") wrote "Another thing I really like about the set is it passes through Dolby 5.1 sound from the HDMI connector to the optical digital out --- which I then pass into my Logitech Z-5500 THX speakers (an inexpensive way to get surprisingly good home theater sound) --- the Sharp didn't pass through the signal from our PS3 Blu-Ray player. "


My current theory is that the PS3 transmits this HDAVI data and then the TV allows the digital passthrough. HDAVI, however, is only supposed to be for remote-control functions, so this seems rather odd. HDAVI is Panasonic's name for CEC, see http://en.wikipedia.org/wiki/HDMI

Another curious note from page 38 of the manual: "When audio from other equipment connected to this unit via HDMI is output using "DIGITAL AUDIO OUT" of this unit, the system switches to 2CH audio. (When connecting to an AV amp via HDMI, you can enjoy higher sound quality.)"

That contradicts page 42. I guess I'll have to call Panasonic's customer service http://www.panasonic.com/accessibility/aces_cus.asp and see if they can tell me anything...

analysis

I think that my current configuration is sending analog sound through my HDMI somehow. I can only get 2 channels of sound through my HDMI connection.

$ speaker-test -D hw:0,3 -c 2

speaker-test 1.0.18

Playback device is hw:0,3
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 16384
Period size range from 32 to 8192
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
 0 - Front Left
 1 - Front Right
Time per period = 5.632911
 0 - Front Left
^C
$ speaker-test -D hw:0,3 -c 3

speaker-test 1.0.18

Playback device is hw:0,3
Stream parameters are 48000Hz, S16_LE, 3 channels
Using 16 octaves of pink noise
Channels count (3) not available for playbacks: Invalid argument
Setting of hwparams failed: Invalid argument

I saw mention of using plughw, and I was able to send 6 channels through that, but I only heard the front-left and front-right speakers in that test.

$ speaker-test -D plughw:0,3 -c 6

speaker-test 1.0.18

Playback device is plughw:0,3
Stream parameters are 48000Hz, S16_LE, 6 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 16384
Period size range from 32 to 8192
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
 0 - Front Left
 4 - Center
 1 - Front Right
 3 - Rear Right
 2 - Rear Left
 5 - LFE
Time per period = 17.580031
 0 - Front Left
^C

test with mplayer, from http://www.nvnews.net/vbulletin/showthread.php?t=123616

mplayer -ao alsa:device=hdmi


Hmmm, I just noticed an item named "IEC958 Default PCM Playback Switch" and it seems to be set to 'off'. Maybe if I turn that on.... See man page for amixer, like http://linux.die.net/man/1/amixer

$ amixer cget numid=30
numid=30,iface=MIXER,name='IEC958 Default PCM Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
$ amixer cset numid=30 on
numid=30,iface=MIXER,name='IEC958 Default PCM Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on

Turning that on didn't seem to affect HDMI audio.

Optical Audio, Toslink S/PDIF works

  • I turned on 'IEC958 Default PCM Playback Switch'
  • set MythTV Front end as follows
Audio output device: ALSA:hdmi
Passthrough output device: ALSA:iec958:{ AES0 0x02 }
Max Audio Channels: Stereo
Upmix: Passive
X Enable AC3 to SPDIF passthrough
X Enable DTS to SPDIF passthrough
_ Aggressive Sound card buffering
_ Use internal volume controls

I have a file /etc/asound.conf

$ cat /etc/asound.conf 
pcm.!default {
    type hw
    card 0
    device 3
}

I've tried altering the MythTV frontend audio settings with and without this file, rebooting when I changed it, and it hasn't seemed to help.

Digital Audio over HDMI still not working

None of these has given me 5.1 audio over my receiver...

sound with chromium

I haven't been able to get sound from the chromium web browser. I found this advice at http://askubuntu.com/questions/284202/chromium-doesnt-play-sound

sudo apt-get install chromium-codecs-ffmpeg-extra

I figure I'll have to restart chromium to test it. It *did* *not* work :(

Configuring my IR Remote

I have a TiVo Series 2 remote and a One-For-All URC-7800B00 Cinema 7

I downloaded info for my TiVo Series 2 remote from http://lirc.sourceforge.net/remotes/tivo/TIVO_Series_2 - that file mentioned that a setup file for MythTV could be had at http://home.comcast.net/~johnfdeluca/lircrc.txt so I downloaded it, too.

I downloaded an lircrc for the TiVo Series 2 and Mythtv and put it where it seemed it should go:

$ cd ~
$ wget  http://home.comcast.net/~johnfdeluca/lircrc.txt
$ cd ~/.lirc
$ mv mythtv backup-mythtv
$ cp ~/lircrc.txt mythtv
$ ls -l ~/.lircrc ~/.lirc/mythtv ~/.mythtv/lircrc
-rw-r--r-- 1 trogod trogod 6698 2009-07-03 22:51 ~/.lirc/mythtv
-rw-r--r-- 1 trogod trogod  296 2009-06-28 23:47 ~/.lircrc
lrwxrwxrwx 1 trogod trogod   15 2009-07-03 22:51 ~/.mythtv/lircrc -> ../.lirc/mythtv
$ cd /etc/lirc/
$ sudo mv lircd.conf backup-lircd-conf
$ sudo mv /home/trogod/TIVO_Series_2 lircd.conf
$ sudo chown root:root lircd.conf

his file didn't work for me because it was for "dvr 1"

  464  perl -p -i.bak -e 's/button = 1_/button = /g' mythtv 


$ hdhomerun_config discover
hdhomerun device 12345678 found at 1.2.3.4
$ hdhomerun_config 12345678 set /ir/target "1.2.3.5:5000 no_clear"
$ sudo killall lircd
[sudo] password for trogod: 
lircd: no process killed
$ sudo lircd -H udp -d 5000
$ irw
00000000a10cc40b 00 PAUSE Tivo_S2
00000000a10cc40b 01 PAUSE Tivo_S2
00000000a10cc40b 02 PAUSE Tivo_S2
00000000a10c840b 00 PLAY Tivo_S2
00000000a10c840b 01 PLAY Tivo_S2
00000000a10c840b 02 PLAY Tivo_S2
00000000a10c7807 00 CH/PAGE_UP Tivo_S2
00000000a10c7807 01 CH/PAGE_UP Tivo_S2
00000000a10c7807 02 CH/PAGE_UP Tivo_S2
00000000a10cf807 00 CH/PAGE_DOWN Tivo_S2
00000000a10cf807 01 CH/PAGE_DOWN Tivo_S2
00000000a10cf807 02 CH/PAGE_DOWN Tivo_S2
00000000a10c0807 00 TV_POWER Tivo_S2
00000000a10c0807 01 TV_POWER Tivo_S2


  461  cd
  462  ls
  463  mkdir irtemp
  464  cd irtemp/
  465  irrecord CINEMA7
  466  sudo killall lircd
  467  irrecord CINEMA7
  468  history 
  469  history | grep lircd
  470  sudo lircd -H udp -d 5000
  471  ps auxwww | grep -i lirc
  472  irrecord CINEMA7
  473  irrecord -H upd -d 5000 CINEMA7
  474  irrecord -H udp -d 5000 CINEMA7
  475  ls ~
  476  cat ~/restart-backend.txt 
  477  sudo /etc/init.d/mythtv-backend restart
  478  sudo killall lircd
  479  irrecord -H udp -d 5000 CINEMA7
  480  rm CINEMA7 
  481  irrecord -H udp -d 5000 CINEMA7
  482  rm CINEMA7 
  483  ls
  484  irrecord -H udp -d 5000 CINEMA7
  485  rm CINEMA7 
  486  irrecord -H udp -d 5000 CINEMA7
  487  less CINEMA7
  488  vi CINEMA7
  489  cd ..
  490  cd /etc/lirc/
  491  ls -Ftl
  492  cp -
  493  cp lircd.conf backup2-lircd-conf
  494  sudo cp lircd.conf backup2-lircd-conf
  495  sudo cat ~/irtemp/CINEMA7 >> lircd.conf
  496  sudo bash
  497  vi lircd.conf
  498  sudo vi lircd.conf
  499  history 
  500  irw

disabling update monitor

July 23 2009 based on info from http://ubuntuforums.org/showthread.php?t=1130181

$ gconftool -g /apps/update-notifier/auto_launch
true
$  gconftool -s --type bool /apps/update-notifier/auto_launch false
$ gconftool -g /apps/update-notifier/auto_launch
false

July 25 2009

$ gconftool-2 -a /apps/update-manager 
 autoclose_install_window = true
 first_run = false
 show_versions = false
 remind_reload = true
 window_size = (664,600)
 show_details = true
 launch_time = 1248540255
 check_dist_upgrades = true
$ gconftool-2 -s --type bool  /apps/update-manager/remind_reload false
$ gconftool-2 -a /apps/update-manager 
 autoclose_install_window = true
 first_run = false
 show_versions = false
 remind_reload = false
 window_size = (664,600)
 show_details = true
 launch_time = 1248540255
 check_dist_upgrades = true

edit Samba

I had to change the /etc/samba/smb.conf to point to the directories on my 2nd drive. I think I didn't set this properly in the initial configuration of mythtv

diff --unified=4 smb.conf-bak smb.conf

--- smb.conf-bak	2009-10-04 01:21:48.000000000 -0700
+++ smb.conf	2009-11-28 21:56:46.000000000 -0800
@@ -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

system crash

July 26, 2009

foo

July 30, 2009

  • changing log rotation
$ pwd
/etc/cron.daily
$ diff --unified=3 /home/trogod/sysklogd sysklogd 
--- /home/trogod/sysklogd	2009-07-30 23:39:44.000000000 -0700
+++ sysklogd	2009-07-30 23:41:15.000000000 -0700
@@ -38,7 +38,7 @@
 for LOG in $logs
 do
    if [ -s $LOG ]; then
-      savelog -g adm -m 640 -u ${USER} -c 7 $LOG >/dev/null
+      savelog -g adm -m 640 -u ${USER} -c 100 $LOG >/dev/null
    fi
 done
 
$ pwd
/etc/logrotate.d
$ diff --unified=3 /home/trogod/mythtv-frontend mythtv-frontend 
--- /home/trogod/mythtv-frontend	2009-07-30 23:33:51.000000000 -0700
+++ mythtv-frontend	2009-07-30 23:34:07.000000000 -0700
@@ -1,7 +1,7 @@
 /var/log/mythtv/mythfrontend.log {
         daily
 	size=10M
-        rotate 7
+        rotate 52
         notifempty
         copytruncate
 	missingok
@@ -10,7 +10,7 @@
 /var/log/mythtv/mythwelcome.log {
         daily
 	size=10M
-        rotate 7
+        rotate 52
         notifempty
         copytruncate
         missingok
$ diff --unified=3 /home/trogod/mythtv-backend mythtv-backend 
--- /home/trogod/mythtv-backend	2009-07-30 23:34:53.000000000 -0700
+++ mythtv-backend	2009-07-30 23:35:06.000000000 -0700
@@ -1,7 +1,7 @@
 /var/log/mythtv/mythbackend.log {
         daily
 	size=10M
-        rotate 7
+        rotate 52
         notifempty
         copytruncate
 }
$ diff --unified=3 /home/trogod/unattended-upgrades unattended-upgrades 
--- /home/trogod/unattended-upgrades	2009-07-30 23:36:21.000000000 -0700
+++ unattended-upgrades	2009-07-30 23:36:31.000000000 -0700
@@ -1,5 +1,5 @@
 /var/log/unattended-upgrades/unattended-upgrades.log {
-  rotate 6
+  rotate 52
   monthly
   compress
   missingok
  • my mythtbackend crashed today!
2009-07-30 15:00:01.013 Finished recording Hawaii Five-0 "One Born Every Minute": channel 1561
*** glibc detected *** /usr/bin/mythbackend: malloc(): memory corruption (fast): 0x000000000286212f ***
======= Backtrace: =========
/lib/libc.so.6[0x7f0438d28cb8]
/lib/libc.so.6[0x7f0438d2c351]
/lib/libc.so.6(__libc_malloc+0x98)[0x7f0438d2d828]
/usr/lib/libstdc++.so.6(_Znwm+0x1d)[0x7f04395879bd]
/usr/lib/libqt-mt.so.3(_ZN7QStringC1EPK5QCharj+0x60)[0x7f043aba99a0]
[SNIP]

Here's the crashes I see so far

$ grep -A 1 -B 3 -Hn glibc *
mythbackend.log-34127-2009-07-30 15:00:00.841 TVRec(2): Changing from RecordingOnly to None
mythbackend.log-34128-2009-07-30 15:00:01.013 Finished recording Guiding Light: channel 1021
mythbackend.log-34129-2009-07-30 15:00:01.013 Finished recording Hawaii Five-0 "One Born Every Minute": channel 1561
mythbackend.log:34130:*** glibc detected *** /usr/bin/mythbackend: malloc(): memory corruption (fast): 0x000000000286212f ***
mythbackend.log-34131-======= Backtrace: =========
--
mythbackend.log.1-19704-2009-07-13 06:01:03.385 AFD: Opened codec 0xecd0b0, id(AC3) type(Audio)
mythbackend.log.1-19705-2009-07-13 06:01:03.386 AFD: codec AC3 has 2 channels
mythbackend.log.1-19706-2009-07-13 06:01:03.392 AFD: Opened codec 0xecd6f0, id(AC3) type(Audio)
mythbackend.log.1:19707:*** glibc detected *** /usr/bin/mythbackend: malloc(): memory corruption (fast): 0x00007f8b209c177f ***
mythbackend.log.1-19708-======= Backtrace: =========
--
mythbackend.log.3-7269-2009-07-04 00:03:35.814 Scheduled 1 items in 0.4 = 0.21 match + 0.19 place
mythbackend.log.3-7270-2009-07-04 00:03:35.829 Reschedule requested for id 0.
mythbackend.log.3-7271-2009-07-04 00:03:35.841 Scheduled 1 items in 0.0 = 0.00 match + 0.01 place
mythbackend.log.3:7272:*** glibc detected *** /usr/bin/mythbackend: malloc(): memory corruption (fast): 0x00007fc72c2754af ***
mythbackend.log.3-7273-======= Backtrace: =========

I decided to implement a script from Status_Monitoring_How_To

$ sudo crontab -l
# m h  dom mon dow   command
#
# monitor the mythbacked service and restart it if it exists
*/5 * * * *     root    /usr/myextras/bin/mythmon || /etc/init.d/mythtv-backend restart
$ cat /usr/myextras/bin/mythmon 
#!/bin/bash
#
# mythmon
# This is run from cron every 5 minutes.
#
# from http://www.mythtv.org/wiki/Status_Monitoring_How_To

# check for mythbackend running
ps -C mythbackend > /dev/null && exit 0;

# also check for mytv-setup running (it closes the backend)
ps -C mythtv-setup > /dev/null && exit 0;

# append message to log files ...

echo "`date +%Y-%m-%d\ %T.%-3N` mythmon: mythbackend not running!!!" \
         >> /var/log/mythtv/mythbackend.log;
echo "`date +%Y-%m-%d\ %T.%-3N` mythmon: mythbackend not running!!!" \
        >> /var/log/mythtv/mythmon.log

exit 1;

added comment to https://bugs.launchpad.net/ubuntu/+source/mythtv/+bug/267274

Today I found my mythbuntu machine had a load of about 21 and there were several mythcommflag jobs running.

I think that the mythmon job had been trying to start my backend every 5 minutes and then the backend would fail (need to check logs about this)

I did a 'sudo killall mythcommflag' and then I rebooted. However, shortly thereafter the machine came under heavy load again. I guess the job queue reinstated the mythcommflag jobs :(

The computer became unresponsive and I had to reboot it by pressing the button on the front panel.

I then changed the job queue to waith 300 seconds before checking the queue "Jog Queue Check frequency (in seconds)". My "CPU Usage" was already set to "Low"

I have disabled my mythmon cron job because it needs to be changed to protect against repeated restarts like that.

I OKd all the system updates. I was asked about updating the smb.conf file but I kept the one that mythbuntu gave me.

I looked over my logs but I didn't see any messages from my mythmon script. maybe it wasn't the problem! I do see tons of messages about starting "commercial flagging" jobs, I just don't see why my shows got broken up into 5-minute segments like they did. I had to spend several minutes going through my recording history to delete all the little pieces it had recorded (mostly less than 5 minute segments) over that last 24 hours.

mytharchive

I decided I'd try out mytharchive. I think this plugin is part of mythbuntu. I don't think mythbuntu helped me set this up when I did my installation. I had to go to the setup screen and set the following: under Media Settings > Archive Files Settings

  • Myth Archive Temp Directory: /storage/mytharchive/temp
  • Video format: NTSC
  • X Always Encode to AC3 - just sounds like a good idea
  • X Always Use Mythtranscode - either sounded good or was already there from mythbuntu
  • Default Encoder Profile: HQ - sounds like a good idea


In my terminal, I did this:

 sudo mkdir -p /storage/mytharchive/temp/
 sudo chmod -R a+rwx /storage/mytharchive
 ls -l /dev/dvd  # is a symlink to /dev/sr0
 ls -l /dev/sr0
 sudo usermod -a -G cdrom mythtv
 sudo usermod -a -G cdrom trogod
$ ls -l /dev/dvd
lrwxrwxrwx 1 root root 3 2009-07-31 23:27 /dev/dvd -> sr0
$ ls -l /dev/sr0
brw-rw----+ 1 root cdrom 11, 0 2009-07-31 23:27 /dev/sr0

Here I could see that the group I needed to add to was "cdrom"

Now, mytharchive ran, but I got some error messsages

/var/lib/python-support/python2.6/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated
  from sets import ImmutableSet
Using simple_fix_rtl
mythburn.py (0.1.20080726-1-fixes) starting up...
script path:/usr/share/mythtv/mytharchive/scripts
myth share path:/usr/share/mythtv
passed job file: /storage/mytharchive/temp/config/mydata.xml
passed progress log file: /storage/mytharchive/temp/logs/progress.log
mythburn.py (0.1.20080726-1-fixes) starting up...
Found 2 CPUs
Obtaining MythTV settings from MySQL database for hostname mythbxb
temppath: /storage/mytharchive/temp/work
logpath:  /storage/mytharchive/temp/logs
Setting process priority to 17
Processing Mythburn job number 1.
Options - mediatype = 0, doburn = 1, createiso = 0, erasedvdrw = 0
          savefilename = ''
Looking for: /usr/share/mythtv/mytharchive/themes/G.A.N.T./theme.xml
Loading font 0, /usr/share/mythtv/FreeSans.ttf size 18
Loading font 1, /usr/share/mythtv/FreeSans.ttf size 15
Loading font 2, /usr/share/mythtv/FreeSans.ttf size 14
wantIntro: 1, wantMainMenu: 1, wantChapterMenu:1, wantDetailsPage: 1
Final DVD Video format will be ntsc
There are 1 files to process
Pre-processing recording 1: '/storage/mythtv/recordings/1561_20090808170000.mpg'
2009-08-15 23:30:09.481 Opening /storage/mythtv/recordings/1561_20090808170000.mpg
Input #0, mpegts, from '/storage/mythtv/recordings/1561_20090808170000.mpg':
  Duration: 01:59:55.7, start: 44697.153511, bitrate: 12237 kb/s
    Stream #0.0[0x31]: Video: mpeg2video, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 65000 kb/s, 29.97 tb(r)
    Stream #0.1[0x34](eng): Audio: ac3, 48000 Hz, stereo, 192 kb/s
2009-08-15 23:30:09.509 duration = 7195
2009-08-15 23:30:09.509 Extracting details from: 1561_20090808170000.mpg
2009-08-15 23:30:09.510 chanid: 1561 starttime:2009-08-08T17:00:00 
2009-08-15 23:30:09.514 File is a Myth recording.
2009-08-15 23:30:09.514 cutframes = 0
2009-08-15 23:30:09.514 cutduration = 0
streaminfo.xml :-
<?xml version="1.0" ?><!DOCTYPE FILEINFO><file cutduration="7195" duration="7195" filename="/storage/mythtv/recordings/1561_20090808170000.mpg" type="mpegts">    
        <streams count="2">        
                <video aspectratio="1.77778" bitrate="65000000" codec="mpeg2video" ffmpegindex="0" fps="29.97" height="1080" id="49" start_time="4022.786568" streamindex="0" width="1920"/>        
                <audio bitrate="192000" channels="2" codec="ac3" ffmpegindex="1" id="52" language="eng" samplerate="48000" start_time="4022.743816" streamindex="1"/>        
        </streams>    
</file>
          Superman IV: The Quest for Peace
Video resolution is 1920 by 1080
*************************************************************
Processing recording 1: '/storage/mythtv/recordings/1561_20090808170000.mpg'
*************************************************************
File type is 'mpegts'
Video codec is 'mpeg2video'
Running mythtranscode --mpeg2 to fix any errors
2009-08-15 23:30:09.700 Using runtime prefix = /usr
2009-08-15 23:30:09.701 Empty LocalHostName.
2009-08-15 23:30:09.707 New DB connection, total: 1
2009-08-15 23:30:09.711 Closing DB connection named 'DBManager0'
2009-08-15 23:30:09.711 Enabled verbose msgs: important
2009-08-15 23:30:09.725 New DB connection, total: 2
Mux rate: 66.26 Mbit/s
ICE default IO error handler doing an exit(), pid = 12962, errno = 32
Failed while running mythtranscode to cut commercials and/or clean up an mpeg2 file.
Result: 1, Command was mythtranscode --mpeg2 -c 1561 -s 2009-08-08T17:00:00 -o /storage/mytharchive/temp/work/1/newfile.mpg
Failed to run mythtranscode to fix any errors
File will be re-encoded using profile LP
2009-08-15 23:43:32.812 Opening /storage/mythtv/recordings/1561_20090808170000.mpg
Input #0, mpegts, from '/storage/mythtv/recordings/1561_20090808170000.mpg':
  Duration: 01:59:55.7, start: 44697.153511, bitrate: 12237 kb/s
    Stream #0.0[0x31]: Video: mpeg2video, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 65000 kb/s, 29.97 tb(r)
    Stream #0.1[0x34](eng): Audio: ac3, 48000 Hz, stereo, 192 kb/s
2009-08-15 23:43:33.021 duration = 7195
2009-08-15 23:43:33.022 Extracting details from: 1561_20090808170000.mpg
2009-08-15 23:43:33.106 chanid: 1561 starttime:2009-08-08T17:00:00 
2009-08-15 23:43:33.232 File is a Myth recording.
2009-08-15 23:43:33.232 cutframes = 0
2009-08-15 23:43:33.232 cutduration = 0
streaminfo.xml :-
<?xml version="1.0" ?><!DOCTYPE FILEINFO><file cutduration="7195" duration="7195" filename="/storage/mythtv/recordings/1561_20090808170000.mpg" type="mpegts">    
        <streams count="2">        
                <video aspectratio="1.77778" bitrate="65000000" codec="mpeg2video" ffmpegindex="0" fps="29.97" height="1080" id="49" start_time="4022.786568" streamindex="0" width="1920"/>        
                <audio bitrate="192000" channels="2" codec="ac3" ffmpegindex="1" id="52" language="eng" samplerate="48000" start_time="4022.743816" streamindex="1"/>        
        </streams>    
</file>
Preferred audio languages eng and eng
Video id: 0x31, Audio1: [1] 0x34 (AC3, eng), Audio2: [-1] - 0x-1 (N/A, N/A)
Aspect ratio is 16:9
Re-encoding audio and video
Using encoder profiles from /usr/share/mythtv/mytharchive/encoder_profiles/ffmpeg_dvd_ntsc.xml
Encoding profile (LP) found
ffmpeg -threads 2 -v 1 -i "/storage/mythtv/recordings/1561_20090808170000.mpg" -r ntsc -target dvd -b 2344k -s 352x480 -acodec copy -copyts -aspect 16:9 "/storage/mytharchive/temp/work/1/newfile2.mpg" -map 0:0 -map 0:1 
FFmpeg version 0.5-svn17737+3:0.svn20090303-1ubuntu6, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-version=svn17737+3:0.svn20090303-1ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --disable-stripping --disable-vhook --enable-libdc1394 --enable-shared --disable-static
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 0 / 52.20. 0
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Apr 10 2009 23:20:33, gcc: 4.3.3

Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 29.97 (30000/1001)
Input #0, mpegts, from '/storage/mythtv/recordings/1561_20090808170000.mpg':
  Duration: 01:59:55.76, start: 44697.153511, bitrate: 12237 kb/s
  Program 1 
    Stream #0.0[0x31]: Video: mpeg2video, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 65000 kb/s, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0.1[0x34](eng): Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
Assuming NTSC for target.
Unknown encoder 'mpeg2video'
************************************************************
ERROR: Failed while running ffmpeg to re-encode video.
Command was ffmpeg -threads 2 -v 1 -i "/storage/mythtv/recordings/1561_20090808170000.mpg" -r ntsc -target dvd -b 2344k -s 352x480 -acodec copy -copyts -aspect 16:9 "/storage/mytharchive/temp/work/1/newfile2.mpg" -map 0:0 -map 0:1 
************************************************************

chmod: changing permissions of `/storage/mytharchive/temp/': Operation not permitted
Terminated

looks like a similar problem:

It sounds like there's a problem with the version of ffmpeg I have and it's not just me.

kinda scary to install new libraries like that as I don't know how it will affect mythtv. I think I'll get a working backup first!

mythtranscode

After things didn't go so well with mytharchive, I decided to try things manually. I'm using Mythtranscode directly

$ mythtranscode --help
Usage: mythtranscode <--chanid <channelid>>
	<--starttime <starttime>> <--profile <profile>>
	[options]

	--mpeg2          or -m: Perform MPEG2 to MPEG2 transcode.
	--ostream <type> or -e: Output stream type.  Options: dvd, ps.
	--chanid         or -c: Takes a channel id. REQUIRED
	--starttime      or -s: Takes a starttime for the
	                        recording. REQUIRED
	--infile         or -i: Input file (Alternative to -c and -s)
	--outfile        or -o: Output file
	--profile        or -p: Takes a profile number or 'autodetect'
	                        recording profile. REQUIRED
	--honorcutlist   or -l: Specifies whether to use the cutlist.
                          Optionally takes a cutlist as an argument
	                        when used with --infile.
	--inversecut          : Specifies a list of frames to keep
	                        while cutting everything else out.
	                        Only works with --infile.
	--allkeys        or -k: Specifies that the output file
	                        should be made entirely of keyframes.
	--fifodir        or -f: Directory to write fifos to
	                        If --fifodir is specified, 'audout' and 'vidout'
	                        will be created in the specified directory
	--fifosync            : Enforce fifo sync
	--buildindex     or -b: Build a new keyframe index
	                        (use only if audio and video fifos are read independantly)
	--video               : Specifies that this is not a mythtv recording
	                        (must be used with --infile)
	--showprogress        : Display status info to the stdout
	--verbose level  or -v: Use '-v help' for level info
	--help           or -h: Prints this help statement.
$ mythtranscode -v help
Verbose debug levels.
Accepts any combination (separated by comma) of:

  all           - ALL available debug output
  most          - Most debug (nodatabase,notimestamp)
  important     - Errors or other very important messages
  general       - General info
  record        - Recording related messages
  playback      - Playback related messages
  channel       - Channel related messages
  osd           - On-Screen Display related messages
  file          - File and AutoExpire related messages
  schedule      - Scheduling related messages
  network       - Network protocol related messages
  commflag      - Commercial Flagging related messages
  audio         - Audio related messages
  libav         - Enables libav debugging
  jobqueue      - JobQueue related messages
  siparser      - Siparser related messages
  eit           - EIT related messages
  vbi           - VBI related messages
  database      - Display all SQL commands executed
  dsmcc         - DSMCC carousel related messages
  mheg          - MHEG debugging messages
  upnp          - upnp debugging messages
  socket        - socket debugging messages
  xmltv         - xmltv output and related messages
  dvbcam        - DVB CAM debugging messages
  media         - Media Manager debugging messages
  idle          - System idle messages
  timestamp     - Conditional data driven messages
  none          - NO debug output

The default for this program appears to be: '-v important'

Most options are additive except for none, all, and important.
These three are semi-exclusive and take precedence over any
prior options given.  You can however use something like
'-v none,jobqueue' to get only JobQueue related messages
and override the default verbosity level.

The additive options may also be subtracted from 'all' by 
prefixing them with 'no', so you may use '-v all,nodatabase'
to view all but database debug messages.

Some debug levels may not apply to this program.
$
$ ls -Ftl /storage/mythtv/recordings/*20091107*
-rw-rw-rw- 1 mythtv mythtv      66412 2009-11-07 20:27 /storage/mythtv/recordings/1301_20091107200000.mpg.png
-rw-rw-rw- 1 mythtv mythtv      79663 2009-11-07 04:30 /storage/mythtv/recordings/1561_20091107040000.mpg.png
-rw-r--r-- 1 mythtv mythtv  677596556 2009-11-07 04:30 /storage/mythtv/recordings/1561_20091107040000.mpg
-rw-rw-rw- 1 mythtv mythtv      75977 2009-11-07 02:00 /storage/mythtv/recordings/1052_20091107010000.mpg.png
-rw-r--r-- 1 mythtv mythtv 1472963080 2009-11-07 02:00 /storage/mythtv/recordings/1052_20091107010000.mpg
$ ( mythtranscode --verbose important  --chanid 1561 -s 20091107040000 --mpeg2 --honorcutlist --outfile /storage/mythtv/videos/testcode.mpg | tee /storage/mythtv/videos/testcode.log ) &
[1] 9184
$ 2009-11-30 23:17:01.266 Using runtime prefix = /usr
2009-11-30 23:17:01.303 Empty LocalHostName.
2009-11-30 23:17:01.417 New DB connection, total: 1
2009-11-30 23:17:01.462 Closing DB connection named 'DBManager0'
2009-11-30 23:17:01.462 Enabled verbose msgs: important
2009-11-30 23:17:01.464 New DB connection, total: 2
Mux rate: 2.94 Mbit/s

looking back at Mythtranscode, it says that I should start by creating a cutlist. So, I followed the cutlist instructions (now at Removing Commercials?) and loaded the commercial flagging., then I entered my Mythtranscode command:

$ ( mythtranscode --verbose important  --chanid 1561 -s 20091107040000 --mpeg2 --honorcutlist --outfile /storage/mythtv/videos/testcode.mpg | tee /storage/mythtv/videos/testcode.log ) &
[1] 9967
$ 2009-11-30 23:37:49.539 Using runtime prefix = /usr
2009-11-30 23:37:49.540 Empty LocalHostName.
2009-11-30 23:37:49.581 New DB connection, total: 1
2009-11-30 23:37:49.585 Closing DB connection named 'DBManager0'
2009-11-30 23:37:49.586 Enabled verbose msgs: important
2009-11-30 23:37:49.588 New DB connection, total: 2
Mux rate: 2.94 Mbit/s

backup

mythconverg_backup.pl

from Database Backup and Restore

$ cat ~/.mythtv/backuprc 
DBBackupDirectory=/storage/backups/myth/
execute
$ ~/mythconverg_backup.pl --verbose
on 4 May 2011, I added to my
/etc/cron.daily


$ cd /etc/cron.daily/ 
$ ls -Ftl
total 72 
-rwxr-xr-x 1 root root   266 2011-05-04 22:08 mythconverg_backup_cron.sh*
-rwxr-xr-x 1 root root   383 2010-10-05 15:25 samba*
-rwxr-xr-x 1 root root 15655 2010-10-05 07:15 apt*
-rwxr-xr-x 1 root root   189 2010-10-01 05:17 apport*
-rwxr-xr-x 1 root root   633 2010-09-08 05:55 apache2*
-rwxr-xr-x 1 root root   256 2010-09-08 02:50 dpkg*
-rwxr-xr-x 1 root root   293 2010-09-04 23:01 mythvideo*
-rwxr-xr-x 1 root root  3594 2010-08-24 13:45 standard*
-rwxr-xr-x 1 root root  1335 2010-08-17 11:49 man-db*
-rwxr-xr-x 1 root root  1154 2010-08-06 17:36 ntp*
-rwxr-xr-x 1 root root    89 2010-08-05 14:29 logrotate*
-rwxr-xr-x 1 root root   311 2010-06-20 01:11 0anacron*
-rwxr-xr-x 1 root root   502 2010-05-27 02:28 bsdmainutils*
-rwxr-xr-x 1 root root   606 2010-03-24 05:35 mlocate*
-rwxr-xr-x 1 root root  2149 2009-06-16 06:12 popularity-contest*
$ cat mythconverg_backup_cron.sh 
###### optimize_mythdb.sh
#!/bin/sh

OPT_MYTHDB='/home/xxxx/mythconverg_backup.pl --rotate 20'
LOG='/var/log/mythtv/mythconverg_backup.log'

echo "Started ${OPT_MYTHDB} on `date`" >> ${LOG}
${OPT_MYTHDB} >> ${LOG}
echo "Finished ${OPT_MYTHDB} on `date`" >> ${LOG} 

so this should run daily, although there won't be much of a log, it'll do. I added the "rotate 20" because I want there to be plenty of time for me to realize something is wrong before a good database backup is lost

25 May 2011 -- I noticed that it hasn't been running!! I little googling came up with http://www.qc4blog.com/?p=996 "script in /etc/cron.daily/ do not run" which mentioned that the script should not have a dot in the filename.

/etc/cron.daily$ date
Wed May 25 20:51:30 PDT 2011
/etc/cron.daily$ sudo mv mythconverg_backup_cron.sh mythconverg_backup_cron
[sudo] password for troy: 

I also put a copy in /etc/cron.weekly

/etc/cron.weekly$ diff ../cron.daily/mythconverg_backup_cron mythconverg_backup_cron 
4c4,5 
< OPT_MYTHDB='/home/xxxx/mythconverg_backup.pl --rotate 20' 
---
> nametag=`date +%j-%y`
> OPT_MYTHDB='/home/xxxx/mythconverg_backup.pl --filename mythconverg-'$nametag'.sql --rotate -1'

27 May 2011 - maybe they aren't running because of underscores in filenames? let's change it and find out...

/etc/cron.daily$ sudo mv mythconverg_backup_cron mythconverg-backup-cron
/etc/cron.weekly$ sudo mv mythconverg_backup_cron mythconverg-backup-cron

1 Jun 2011 - update

$ ls -Ftl /etc/*/mythconver*
-rwxr-xr-x 1 root root 361 2011-05-29 01:24 /etc/cron.weekly/mythconverg-backup*
-rwxr-xr-x 1 root root 301 2011-05-29 01:23 /etc/cron.daily/mythconverg-backup*
$ cat /etc/cron.daily/mythconverg-backup
#!/bin/sh
###### optimize_mythdb.sh

OPT_MYTHDB='/home/xxxx/mythconverg_backup.pl --directory /storage/backups/myth/ --rotate 20'
LOG='/var/log/mythtv/mythconverg_backup.log'

echo "Started ${OPT_MYTHDB} on `date`" >> ${LOG}
${OPT_MYTHDB} >> ${LOG}
echo "Finished ${OPT_MYTHDB} on `date`" >> ${LOG} 

$ diff /etc/cron.daily/mythconverg-backup /etc/cron.weekly/mythconverg-backup
4c4,5
< OPT_MYTHDB='/home/xxxx/mythconverg_backup.pl --directory /storage/backups/myth/ --rotate 20'
---
> nametag=`date +%j-%y`
> OPT_MYTHDB='/home/xxxx/mythconverg_backup.pl --directory /storage/backups/myth/ --filename mythconverg-'$nametag'.sql --rotate -1'

as of 9 April 2013, my script looked like this

$ cat /etc/cron.weekly/mythconverg-backup 
#!/bin/sh
###### optimize_mythdb.sh

nametag=`date +%j-%y`
LOG='/var/log/mythtv/mythconverg_backup.log'

OPT_MYTHDB='/usr/share/doc/mythtv-backend/contrib/maintenance/optimize_mythdb.pl'

echo "Started ${OPT_MYTHDB} on `date`" >> ${LOG}
${OPT_MYTHDB} >> ${LOG}
echo "Finished ${OPT_MYTHDB} on `date`" >> ${LOG} 

OPT_MYTHDB='/home/troy/mythconverg_backup.pl --directory /storage/backups/myth/ --filename mythconverg-'$nametag'.sql --rotate -1'

echo "Started ${OPT_MYTHDB} on `date`" >> ${LOG}
${OPT_MYTHDB} >> ${LOG}
echo "Finished ${OPT_MYTHDB} on `date`" >> ${LOG} 

Today, 12 February 2014, I changed /etc/cron.weekly/mythconverg-backup to write stderr to the LOG

#!/bin/sh
###### optimize_mythdb.sh

nametag=`date +%j-%y`
LOG='/var/log/mythtv/mythconverg_backup.log'

OPT_MYTHDB='/usr/share/doc/mythtv-backend/contrib/maintenance/optimize_mythdb.pl'

echo "Started ${OPT_MYTHDB} on `date`" >> ${LOG}
${OPT_MYTHDB} &>> ${LOG}
echo "Finished ${OPT_MYTHDB} on `date`" >> ${LOG}

OPT_MYTHDB='/home/troy/mythconverg_backup.pl --directory /storage/backups/myth/ --filename mythconverg-'$nametag'.sql --rotate -1'

echo "Started ${OPT_MYTHDB} on `date`" >> ${LOG}
${OPT_MYTHDB} &>> ${LOG}
echo "Finished ${OPT_MYTHDB} on `date`" >> ${LOG}

I also changed /etc/cron.daily/mythconverg-backup

$ cat /etc/cron.daily/mythconverg-backup
#!/bin/sh
###### optimize_mythdb.sh
LOG='/var/log/mythtv/mythconverg_backup.log'

OPT_MYTHDB='/usr/share/doc/mythtv-backend/contrib/maintenance/optimize_mythdb.pl'

echo "Started ${OPT_MYTHDB} on `date`" >> ${LOG}
${OPT_MYTHDB} &>> ${LOG}
echo "Finished ${OPT_MYTHDB} on `date`" >> ${LOG} 

OPT_MYTHDB='/home/troy/mythconverg_backup.pl --directory /storage/backups/myth/ --rotate 20'

echo "Started ${OPT_MYTHDB} on `date`" >> ${LOG}
${OPT_MYTHDB} &>> ${LOG}
echo "Finished ${OPT_MYTHDB} on `date`" >> ${LOG}

using rsync

mysqldump -u root -p  --all-databases --extended-insert  > /storage/backups/myth/myth.sql.txt

$ sudo mkdir /storage/backups

sudo mkdir -p /storage/backups/0

sudo 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/0/

$ time sudo 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/0/

real	4m47.620s
user	0m26.166s
sys	0m35.374s

$ sudo du -skh /storage/backups/0/*
7.2M	/storage/backups/0/bin
41M	/storage/backups/0/boot
960K	/storage/backups/0/dev
6.6M	/storage/backups/0/etc
218M	/storage/backups/0/home
0	/storage/backups/0/initrd.img
0	/storage/backups/0/initrd.img.old
363M	/storage/backups/0/lib
11M	/storage/backups/0/lib32
0	/storage/backups/0/lib64
0	/storage/backups/0/lost+found
0	/storage/backups/0/opt
72K	/storage/backups/0/root
10M	/storage/backups/0/sbin
0	/storage/backups/0/selinux
0	/storage/backups/0/srv
1.6G	/storage/backups/0/usr
1.7G	/storage/backups/0/var
0	/storage/backups/0/vmlinuz
0	/storage/backups/0/vmlinuz.old

yes, I have a few large log files from a crash

 ls -Ftlh /storage/backups/0/var/log/mythtv/
total 1.2G
-rw-r--r-- 1 mythtv   mythtv 1.7M 2009-08-16 01:18 mythbackend.log
-rw-rw-r-- 1 trogod   mythtv 805K 2009-08-16 01:18 mythfrontend.log
-rw-rw-r-- 1 trogod   mythtv  75M 2009-08-10 06:49 mythfrontend.log.1
-rw-r--r-- 1 mythtv   mythtv  96M 2009-08-10 06:49 mythbackend.log.1
-rw-r--r-- 1 mythtv   mythtv  11M 2009-08-03 06:49 mythbackend.log.2
-rw-r--r-- 1 trogod   mythtv  160 2009-07-31 23:27 mtd.log
-rw-r--r-- 1 mythtv   mythtv  26M 2009-07-26 06:34 mythbackend.log.3
-rw-rw-r-- 1 trogod   mythtv 401M 2009-07-14 06:32 mythfrontend.log.2
-rw-r--r-- 1 mythtv   mythtv  11M 2009-07-08 06:38 mythbackend.log.4
-rw-rw-r-- 1 trogod   mythtv 541M 2009-07-07 06:33 mythfrontend.log.3
-rw-r--r-- 1 mythtv   mythtv  15M 2009-07-07 06:33 mythbackend.log.5
-rw-rw-r-- 1 trogod   mythtv  13M 2009-07-06 06:48 mythfrontend.log.4
-rw-rw-r-- 1 trogod   mythtv    0 2009-06-28 17:16 mythwelcome.log

25 May 2011 -- I added cron entries

/etc/cron.weekly$ cat /etc/cron.daily/rsync-backup 
#!/bin/sh

dest='/storage/backups/daily/'
OPT_MYTHDB='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 / '$dest
LOG='/var/log/mythtv/rsync-backup.log'
echo "Started ${OPT_MYTHDB} on `date`" >> ${LOG} 2>&1
${OPT_MYTHDB} >> ${LOG} 2>&1
echo "Finished ${OPT_MYTHDB} on `date`" >> ${LOG} 2>&1
/etc/cron.weekly$ 
/etc/cron.weekly$ 
/etc/cron.weekly$ diff /etc/cron.daily/rsync-backup /etc/cron.weekly/rsync-backup 
3c3,11
< dest='/storage/backups/daily/'
---
> orig='/storage/backups/weekly/'
> dest='/storage/backups/past-weekly/'
> OPT_MYTHDB='nice -19 rsync --archive --delete-during --hard-links --numeric-ids '$orig' '$dest
> LOG='/var/log/mythtv/rsync-backup.log'
> echo "Started ${OPT_MYTHDB} on `date`" >> ${LOG} 2>&1
> ${OPT_MYTHDB} >> ${LOG} 2>&1
> echo "Finished ${OPT_MYTHDB} on `date`" >> ${LOG} 2>&1
> 
> dest='/storage/backups/weekly/'

something else?

not yet

resize partition

I had to resize the boot partititon. I decided to use gparted

My problem is the boot partition, I want to make it larger because the built-in system-update software seems to be leaving behind a lot of large files.

Here's the version I have

$ mythbackend --version
Please include all output in bug reports.
MythTV Version   : 19961
MythTV Branch    : branches/release-0-21-fixes
Library API      : 0.21.20080304-1
Network Protocol : 40
Options compiled in:
 linux profile using_oss using_alsa using_jack using_backend using_dbox2 using_dvb
 using_firewire using_frontend using_hdhomerun using_iptv using_ivtv using_joystick_menu
 using_libfftw3 using_lirc using_opengl_vsync using_opengl_video using_v4l using_x11
 using_xrandr using_xv using_xvmc using_xvmcw using_xvmc_vld using_glx_proc_addr_arb
 using_bindings_perl using_bindings_python using_opengl using_ffmpeg_threads using_libavc_5_3 using_live
$ uname -a
Linux xxxxx 2.6.28-17-generic #58-Ubuntu SMP Tue Dec 1 21:27:25 UTC 2009 x86_64 GNU/Linux

and here's my disk info:

$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb3              15G  5.5G  8.6G  39% /
tmpfs                 868M     0  868M   0% /lib/init/rw
varrun                868M  356K  867M   1% /var/run
varlock               868M     0  868M   0% /var/lock
udev                  868M  156K  868M   1% /dev
tmpfs                 868M     0  868M   0% /dev/shm
lrm                   868M  2.5M  865M   1% /lib/modules/2.6.28-17-generic/volatile
/dev/sdb1              89M   53M   32M  63% /boot
/dev/sdb4              20G  489M   19G   3% /home
/dev/sda1             932G  839G   93G  91% /storage

so, you can see that my /boot paritition is small. I'm thinking of enlarging it quite a bit. Hmmm, according to http://art.ubuntuforums.org/showthread.php?t=1632250 I could have a problem if my swap partition is right 'behind' my boot partition? will I have this problem?

$ sudo fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1      121602   976762583+  ee  GPT

Disk /dev/sdb: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000830e8

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          12       96358+  83  Linux
/dev/sdb2              13        1257    10000462+  82  Linux swap / Solaris
/dev/sdb3            1258        3216    15735667+  83  Linux
/dev/sdb4            3217        5827    20972857+  83  Linux

$ sudo parted -l
Model: ATA Hitachi HDT72101 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      17.4kB  1000GB  1000GB  jfs                     


Model: ATA SAMSUNG SP0822N (scsi)
Disk /dev/sdb: 80.1GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      32.3kB  98.7MB  98.7MB  primary  ext2         boot 
 2      98.7MB  10.3GB  10.2GB  primary  linux-swap        
 3      10.3GB  26.5GB  16.1GB  primary  ext3              
 4      26.5GB  47.9GB  21.5GB  primary  ext3              

I made a backup before I booted into the gparted live CD

$ sudo mkdir /storage/backups/2
$ time sudo 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/2/

real	8m15.161s
user	0m45.683s
sys	1m1.908s

I think I did it! and I think it worked! Here's my new partition info:

$sudo fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1      121602   976762583+  ee  GPT

Disk /dev/sdb: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000830e8

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1         157     1256416+  83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sdb2             157        1257     8840192   82  Linux swap / Solaris
/dev/sdb3            1258        3216    15735667+  83  Linux
/dev/sdb4            3217        5827    20972857+  83  Linux

$sudo parted -l
Model: ATA Hitachi HDT72101 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      17.4kB  1000GB  1000GB  jfs                     


Model: ATA SAMSUNG SP0822N (scsi)
Disk /dev/sdb: 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        
 3      10.3GB  26.5GB  16.1GB  primary  ext3              
 4      26.5GB  47.9GB  21.5GB  primary  ext3              

My system still boots normally and MythTV runs normally. I don't seem to notice any difference. Great!! Next, I'll be upgrading my Mythbuntu installation...

Upgrade Mythbuntu

new versions

new USB IR receiver

I'm looking at info from http://www.mythtv.org/wiki/LIRC#hardware.conf LIRC#hardware.conf It's model # TSDX-IR14. Info from cat /proc/bus/input/devices


I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="Media Center Ed. eHome Infrared Remote Transceiver (1784:0011)"
P: Phys=usb-0000:00:04.0-2/input0
S: Sysfs=/devices/virtual/rc/rc0/input9
U: Uniq=
H: Handlers=kbd event6 
B: EV=100003
B: KEY=fff 0 108fc326 217604100000000 0 118000 418000100001 9e968000000000 10000000

here are the changes I made to hardware.conf

diff --unified=3 hardware.conf-old2 hardware.conf
--- hardware.conf-old2	2011-04-06 21:45:13.000000000 -0700
+++ hardware.conf	2011-10-09 22:27:11.000000000 -0700
@@ -2,12 +2,12 @@
 #
 #Chosen Remote Control
 REMOTE="None"
-REMOTE_MODULES=""
+REMOTE_MODULES="mceusb"
 REMOTE_DRIVER=""
-REMOTE_DEVICE=""
+REMOTE_DEVICE="/dev/lirc0"
 REMOTE_SOCKET=""
 REMOTE_LIRCD_CONF=""
-REMOTE_LIRCD_ARGS="-r -H udp -d 5000"
+REMOTE_LIRCD_ARGS=""
 # the -r is from http://www.mythtv.org/wiki/Hulu_Desktop_Integration
 
 #Chosen IR Transmitter

I restarted lirc and it works!

$ sudo /etc/init.d/lirc restart
 * Stopping execution daemon: irexec                                                     [ OK ] 
 * Stopping remote control daemon(s): LIRC                                               [ OK ] 
 * Loading LIRC modules                                                                  [ OK ] 
 * Starting remote control daemon(s) : LIRC                                              [ OK ] 
 * Starting execution daemon: irexec                                                     [ OK ] 

new hard drive

I'm worried that my current drive (1 TB) for /storage is going bad, so I want to replace it with a new drive (2 TB). My case doesn't have room for both, so I want to prepare the new drive while it is in an external hard drive enclosure. I am trying to connect to it via USB...

$ 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 Hitachi HDT72101 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      17.4kB  1000GB  1000GB  jfs


Error: /dev/sdc: unrecognised disk label


I installed gparted

$ sudo apt-get install gparted
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libcairomm-1.0-1 libglibmm-2.4-1c2a libgtkmm-2.4-1c2a libpangomm-1.4-1
  libsigc++-2.0-0c2a
Suggested packages:
  xfsprogs reiserfsprogs reiser4progs jfsutils yelp kpartx dmraid
The following NEW packages will be installed:
  gparted libcairomm-1.0-1 libglibmm-2.4-1c2a libgtkmm-2.4-1c2a
  libpangomm-1.4-1 libsigc++-2.0-0c2a
0 upgraded, 6 newly installed, 0 to remove and 13 not upgraded.
Need to get 2,186kB of archives.
After this operation, 8,798kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ maverick/main libsigc++-2.0-0c2a amd64 2.2.4.2-1 [39.2kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ maverick/main libglibmm-2.4-1c2a amd64 2.25.5-0ubuntu1 [380kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ maverick/main libcairomm-1.0-1 amd64 1.8.4-3 [48.6kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ maverick/main libpangomm-1.4-1 amd64 2.26.2-1 [58.7kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ maverick/main libgtkmm-2.4-1c2a amd64 1:2.20.3-1 [1,190kB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ maverick-updates/main gparted amd64 0.6.2-1ubuntu1.1 [470kB]
Fetched 2,186kB in 35s (61.0kB/s)                                              
Selecting previously deselected package libsigc++-2.0-0c2a.
(Reading database ... 123022 files and directories currently installed.)
Unpacking libsigc++-2.0-0c2a (from .../libsigc++-2.0-0c2a_2.2.4.2-1_amd64.deb) ...
Selecting previously deselected package libglibmm-2.4-1c2a.
Unpacking libglibmm-2.4-1c2a (from .../libglibmm-2.4-1c2a_2.25.5-0ubuntu1_amd64.deb) ...
Selecting previously deselected package libcairomm-1.0-1.
Unpacking libcairomm-1.0-1 (from .../libcairomm-1.0-1_1.8.4-3_amd64.deb) ...
Selecting previously deselected package libpangomm-1.4-1.
Unpacking libpangomm-1.4-1 (from .../libpangomm-1.4-1_2.26.2-1_amd64.deb) ...
Selecting previously deselected package libgtkmm-2.4-1c2a.
Unpacking libgtkmm-2.4-1c2a (from .../libgtkmm-2.4-1c2a_1%3a2.20.3-1_amd64.deb) ...
Selecting previously deselected package gparted.
Unpacking gparted (from .../gparted_0.6.2-1ubuntu1.1_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for desktop-file-utils ...
Processing triggers for hicolor-icon-theme ...
Setting up libsigc++-2.0-0c2a (2.2.4.2-1) ...
Setting up libglibmm-2.4-1c2a (2.25.5-0ubuntu1) ...
Setting up libcairomm-1.0-1 (1.8.4-3) ...
Setting up libpangomm-1.4-1 (2.26.2-1) ...
Setting up libgtkmm-2.4-1c2a (1:2.20.3-1) ...
Setting up gparted (0.6.2-1ubuntu1.1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

then

$ sudo gparted

gparted shows me /dev/sdc is 1.82 TiB -- that's it!! I chose /dev/sdc from GParted > Devices, then I chose Partition > New

No partition table found on device /dev/sdc
A partition table is required before partitions can be added.
To create a new partition table choose the menu item: Device --> Create Partition Table.  [OK]

I did so

WARNING: This will ERASE ALL DATA on the ENTIRE DISK /dev/sdc
Default is to create an MS-DOS partition table.
> Advanced         [Cancel] [Apply]

so i did [Apply]

gparted shows the 1.82 TiB as "unallocated". I again chose Partition > New

Minimum size: 1 MiB  Maximum size: 1907728 MiB
Free space preceding MiB: 1        Create as: Primary Partition
New size (MiB): 1907728            File system: ext2
Free space following (MiB): 0      Label:
Align to: MiB                    [Cancel]  [Add]

Hmmm, I better revisit some GParted documentation before I go further...

oh my /storage uses gpt partition table, not msdos, let's do that again:

WARNING: This will ERASE ALL DATA on the ENTIRE DISK /dev/sdc
Default is to create an MS-DOS partition table.
> Advanced     
Select new partition table type: gpt
   [Cancel] [Apply]

I again chose Partition > New

Minimum size: 1 MiB  Maximum size: 1907728 MiB
Free space preceding MiB: 1        Create as: Primary Partition
New size (MiB): 1907728            File system: ext2
Free space following (MiB): 0      Label:
Align to: MiB                    [Cancel]  [Add]

still couldn't choose jfs. Based on http://forums.whirlpool.net.au/archive/916089 I think I have to boot from my live cd for gparted-live-cd-0.8.0-1

OK, I downloaded gparted-live-cd-0.8.0-5, burned it to CD, booted from it and formatted the new drive as JFS. The drive was connected via USB when I did that See System 0 Maintenance

While the machine was shut down, I switched from USB to eSATA and booted up. Because of the maintenance, I had to deal with that menu (forgot what it's called) but it's something about boot recovery or some such :(

Anyway, the eSATA interface seems to work....

$ sudo parted -l
[sudo] password for xxxx: 
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 Hitachi HDT72101 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      17.4kB  1000GB  1000GB  jfs


Model: ATA SAMSUNG HD204UI (scsi)
Disk /dev/sdc: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2000GB  2000GB  jfs


Next, mount the drive... ref http://www.jarrodgoddard.com/linux-web-hosting/mounting-an-external-usb-drive-in-linux

$ sudo mkdir /newstore
$ sudo mount /dev/sdc1 /newstore
$ ls /newstore/
$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              15G  2.9G   12G  20% /
none                  871M  260K  870M   1% /dev
none                  877M     0  877M   0% /dev/shm
none                  877M  348K  877M   1% /var/run
none                  877M     0  877M   0% /var/lock
/dev/sda1             1.2G   38M  1.1G   4% /boot
/dev/sdb1             932G  918G   14G  99% /storage
/dev/sda4              20G  628M   19G   4% /home
/dev/sdc1             1.9T  234M  1.9T   1% /newstore
$ 

next is the rsync command...

$ sudo rsync -av /storage/ /newstore
[sudo] password for xxxxx: 

while that's going on... Seems like this will be helpful to have...

$ sudo ls -aFlR /storage/ > ls-storage-original.txt

mythbuntu repos

clicked the link http://www.mythbuntu.org/files/mythbuntu-repos.deb and saw "Open with GDebi Package Installer (default)"

Version: 9.2-Oubuntu0+mythbuntu-auto20110509004227
Maintainer: MythTV Ubuntu Maintainers <ubuntu-mythtv@lists.ubuntu.com>
Priority: optional
Section; misc
Size: 188 KB

read about it at https://help.ubuntu.com/community/InstallingSoftware#Using%20GDebi%20to%20install%20packages I gave it my admin password...

X Would you like to activate the MythTV Updates repository?

Which version of MythTV would you like to update to?
[ ] 0.23.1
[X] 0.24.x

I saw http://ubuntuforums.org/archive/index.php/t-1749870.html which said that "0.24.x" isn't right, so I'm nervous... maybe should check with the list

static IP address

I have decided to hook up my HDHomeRun directly with an ethernet cable. the HDHomeRun manual at http://www.silicondust.com/hdhomerun/hdhomerun_install.pdf says I don't need a cross over cable but tht I do need to setup a static IP address


$ 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:1432503831 errors:0 dropped:0 overruns:0 frame:0
          TX packets:862345 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1961950873249 (1.9 TB)  TX bytes:352231059 (352.2 MB)
          Interrupt:42 Base address:0xa000 

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:475442 errors:0 dropped:0 overruns:0 frame:0
          TX packets:475442 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:180178275 (180.1 MB)  TX bytes:180178275 (180.1 MB)

wlan0     Link encap:Ethernet  HWaddr 00:0d:0a:00:1e:df  
          inet addr:192.168.1.74  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:302481 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9578 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:71249673 (71.2 MB)  TX bytes:3023312 (3.0 MB)

I first tried putting this in /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 192.168.1.3
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1


I then ran

# sudo /etc/init.d/networking restart
 * Reconfiguring network interfaces...                                          ssh stop/waiting
ssh start/running, process 16551
                                                                         [ OK ]

but it didn't work ?! Oh, I had used eth0 but I need to use wlan0

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet static
	address 192.168.1.3
	netmask 255.255.255.0
	network 192.168.1.0
	broadcast 192.168.1.255
	gateway 192.168.1.1

I tried this with the networking restart. it didn't seem to work

$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:24:1d:1d:8d:24  
          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::224:1dff:fe1d:8d24/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1432503855 errors:0 dropped:0 overruns:0 frame:0
          TX packets:862717 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1961950881457 (1.9 TB)  TX bytes:352260825 (352.2 MB)
          Interrupt:42 Base address:0xa000 

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:475578 errors:0 dropped:0 overruns:0 frame:0
          TX packets:475578 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:180191707 (180.1 MB)  TX bytes:180191707 (180.1 MB)

wlan0     Link encap:Ethernet  HWaddr 00:0d:0a:00:1e:df  
          inet addr:192.168.1.3  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:304729 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11294 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:72871605 (72.8 MB)  TX bytes:3391335 (3.3 MB)

Oh I just noticed that eth0 and wlan0 had the same IP address, maybe that's the problem? I'll try again

that didn't work. I tried

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet static
address 192.168.1.20
netmask 255.255.255.0
gateway 192.168.1.1


now I get

# 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:430 errors:0 dropped:0 overruns:0 frame:0
          TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:147060 (147.0 KB)  TX bytes:4939 (4.9 KB)
          Interrupt:42 Base address:0x6000 

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:549 errors:0 dropped:0 overruns:0 frame:0
          TX packets:549 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:749921 (749.9 KB)  TX bytes:749921 (749.9 KB)

wlan0     Link encap:Ethernet  HWaddr 00:0d:0a:00:1e:df  
          inet addr:192.168.1.20  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:19851 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13323 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:16908496 (16.9 MB)  TX bytes:1410728 (1.4 MB)

I then unplugged the power to the HDHomeRun and plugged it back in

$ hdhomerun_config discover
no devices found

mext I tried

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet static
address 192.168.1.20
netmask 255.255.255.0
gateway 192.168.1.1

auto eth0
iface eth0 inet static
address 169.254.1.5
netmask 255.255.255.0

i deleted the gateway from eth0

and now

$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:24:1d:1d:8d:24  
          inet addr:169.254.1.5  Bcast:169.254.1.255  Mask:255.255.255.0
          inet6 addr: fe80::224:1dff:fe1d:8d24/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:442 errors:0 dropped:0 overruns:0 frame:0
          TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:151164 (151.1 KB)  TX bytes:7754 (7.7 KB)
          Interrupt:42 Base address:0x6000 

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:557 errors:0 dropped:0 overruns:0 frame:0
          TX packets:557 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:750409 (750.4 KB)  TX bytes:750409 (750.4 KB)

wlan0     Link encap:Ethernet  HWaddr 00:0d:0a:00:1e:df  
          inet addr:192.168.1.20  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:20202 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13682 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:17034042 (17.0 MB)  TX bytes:1478840 (1.4 MB)

and

$ hdhomerun_config discover
no devices found

next I rebooted just to check


made other changes:

$ 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

$ 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:255465 errors:0 dropped:0 overruns:0 frame:0
          TX packets:297 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:349811005 (349.8 MB)  TX bytes:30150 (30.1 KB)
          Interrupt:42 Base address:0x6000 

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:304 errors:0 dropped:0 overruns:0 frame:0
          TX packets:304 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:316769 (316.7 KB)  TX bytes:316769 (316.7 KB)

wlan0     Link encap:Ethernet  HWaddr 00:0d:0a:00:1e:df  
          inet addr:192.168.1.74  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:3449 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3074 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3434434 (3.4 MB)  TX bytes:326996 (326.9 KB)

$ hdhomerun_config discover
hdhomerun device 10172423 found at 169.254.100.207