Primary Source: OR in an OB World
- Install Mythbuntu From Usb Drive
- Install Mythbuntu From Usb Wireless Adapter
- Install Mythbuntu From Usb Pc Camera
- Install Mythbuntu From Usb Flash Drive
Boot Mythbuntu 16.04.1 installation image via USB Flash drive created with Startup Disk Creator from Ubuntu 16.04 system, or installation CDROM. Ensure the host name you enter during the install is identical to that on the old system so the restored database will work. Install standard options, some noted below: a. Download updates. Took me a while, but I got a fresh install on Mythbuntu 14.04.03 64 bit on my NUC, then restored my DB backups. All recordings, videos and rules preserved, looks good. Running kernel 3.16.something Thanks for the advice. Nb: Cannot recommend a Intel Celeron NUC for future builds - even with. Select your USB drive letter (the size will appear at the end as seen in the screenshot above). Click on Create. Wait for it to successfully burn the.iso file to the USB stick. Finally, Ubuntu image has been burnt to your USB drive, meaning its now ready to be used in live mode or to be used to run a full installation to your computer. Installing Mythbuntu The K45 doesn't have a slot for a CD drive, so I decided to install from a USB drive (my MP3 player). I downloaded the Mythbuntu 8.10 x86 ISO, and tried to use usb-creator to write it to the MP3 player. Nothing happened. The program just hung.
I’m in the (slow, painful) process of configuring a new PC to act as a video recorder. This post contains some notes on how I got it connected to my home WiFi network.
First, a note to self/strong suggestion to others: before screwing with anything that is likely to cause reboots, go into Applications > System > Mythbuntu Control Center > Startup behaviors and uncheck the box that starts the MythTV front end automatically at boot. Turn that back on only after all configuration agony is behind you. This is particularly important with the keyring nag (below), in which the front end started (and wiped out my access to the nag) before I could type the password, and then promptly froze the system.
The machine came with a flavor of Windows, but I immediately downloaded the latest version of Mythbuntu, burned the ISO file onto a DVD (using Brasero), and installed it on the PC, wiping away any vestige of Windows. I then rebooted and tried to configure Mythbuntu (but I’m pretty sure I will need to redo that later).
The PC comes with onboard Ethernet (one jack) but no WiFi. I will spare you the gory details (and myself the painful memories) of three failed attempts to add a USB WiFi adapter. Let’s just say there were compatibility issues.
I finally ordered an Edimax EW-7811Un adapter. The Edimax is incredibly small, even more incredibly cheap (about a quarter the cost of some of the adapters I tried), and is advertised to be compatible with most Linux systems. With the power off, I plugged it into a USB slot and booted the new PC.
Oops. No network connection. Running lsusb in a terminal showed the Edimax device, but Settings > Network Connections showed two Ethernet connections and no WiFi connections. I don’t think either of the “Ethernet” connections was the Edimax, but if it was, that was unhelpful, because my home LAN is secured (meaning the PC needs a password to get on it).
So I unplugged the Edimax. The Settings > Network Connections application still showed two Ethernet connections. I deleted both, not needing the onboard one and thinking the other was spurious. Big mistake. My external TV tuner is a Hauppauge WinTV-DCR, which MythTV mistakes for an HDHomeRun Prime (close enough). The first connection (which I eventually restored), eth0, was indeed the onboard Ethernet adapter. The second connection, eth1, was actually the Hauppauge tuner (even though it is coming in via a USB cable and not into an Ethernet jack). I wasted a lot of time unsuccessfully trying to install a channel lineup before it finally dawned on me that MythTV could not talk to the tuner because I had disconnected it. Fortunately, restoring the connection fixed that.
With the PC rebooted (and Settings > Network Connections showing no connections at all), I plugged in the Edimax. This time, the system immediately gave me a notification that a secured WiFi network was available. Back in Settings > Network Connections, I added a new connection, set it to WiFi, filled in my home LAN’s SSID, set the security to “WPA & WPA2 Personal” and filled in the network password. Just like that, I had working WiFi.
To finish (hah! I should be so lucky) the job, I further edited the connection and made the IP address (obtained by running ifconfig in a terminal, and confirmed by looking at the status screen for my network modem) static, with mask 255.255.255.0 and gateway 192.168.1.254. I got those values by connecting my (Linux Mint) laptop to the WiFi network and running route -n in a terminal.
Next problem: on every reboot or log-in, I was nagged to type in a password to unlock the default keyring. (The correct password is my login password.) This was more than just annoying; it was fatal, as the front end would start without waiting for the password and then frequently freeze the system. Failure to unlock the keyring also seemed to keep the machine from gaining access to the WiFi network (at least I think that was the culprit). The solution I found was as follows:
- Unlock the bleeping keyring so that I could connect to WiFi.
- Install the “Passwords and Keys” application using the Ubuntu Software Center. (Seems to me this should be installed by default, even if the installation is purely a networked backend server.)
- Go to Applications > Settings > Passwords and Keys, and right-click the Default keyring entry.
- Select “Change password” and enter the current (login) password as the “old” password.
- Leave the new password blank (horrors! — a major security hole!) and finish.
After a restart, the bloody keyring nag was gone and the machine connected to my WiFi LAN.
After all this, I found that I could ping outside servers by IP address but not by name. My LAN uses a (now obsolete?) 2Wire wireless DSL modem. Turns out I had to go back to Settings > Network Connections, edit the WiFi connection, and enter the gateway address (192.168.1.254, same as before) in the field for DNS servers. With that, I finally had a useable WiFi connection (which has survived a few reboots).
Sadly, there is still a lot of configuring to do.
The following two tabs change content below.I'm an apostate mathematician, retired from a business school after 33 years of teaching mostly (but not exclusively) quantitative methods courses. My academic interests lie in operations research. I also study Tae Kwon Do a bit on the side.
- Reversing Differences - February 19, 2020
- Collections of CPLEX Variables - February 19, 2020
- Generic Callback Changes in CPLEX 12.10 - February 3, 2020
introduction
criterea
Mythtv 0.22 on my ASRock ION 330 system using Mythbuntu 9.10
installing mythbuntu 9.10
networking
update system
udev setup
graphics setup
Sudo setup
MythWelcome
Sound
HDMI Sound
Remote Control
Path Settings
Other settings
vdpau
connecting the ASRock to the TV
saving power with the Gembird silvershield SIS-PMS
20X4 LCD Smartie USB display
Bugfixing
contact
For a few years now, I'm an happy user of MythTV. The First MythTV system I build (usering a Pundit-R and Fedora Core 2) took me 3 months to run smoothly. The second one (Fedora Core 5) was ready in about a week. This 3-tuner Mythtv system runs for three years now and I'm very happy with it. But there are some improvements to make:criterea
Mythtv 0.22 on my ASRock ION 330 system using Mythbuntu 9.10
installing mythbuntu 9.10
networking
update system
udev setup
graphics setup
Sudo setup
MythWelcome
Sound
HDMI Sound
Remote Control
Path Settings
Other settings
vdpau
connecting the ASRock to the TV
saving power with the Gembird silvershield SIS-PMS
20X4 LCD Smartie USB display
Bugfixing
contact
- The system uses to much (100 Watt) power.
- I have a separate network harddisk for backup of my websites and storage of media and files that need to be accessible 24/7.
- The systems makes to much noise (although it was selected as hardware that is quite).
- My Linux knowledge can use a refresh. Building a MythTV system is always good for some extra knowledge.
- Record analog (PAL) video. The system should be able to record 3 programs simultaneously and playback 2 at te same time.
- Act as an FTP server for my web backups
- Run a UPnP server for my kitchen webradio to stream mp3 files
- Store presonal data for my home pc's
- Run 24/7. (no more waiting for MythTV to startup).
- Playback DVD and if possible Full HD content.
power up the ASRock Ion
If you can't read the menu that displays in a split second, here it is:
F2 is BIOS setup (from BIOS version > 1.60 you can also use the DEL key for setup)
F6 is BIOS flash tool
F11 boot menu
BIOS update
before starting to install the system, first check to see if there are any BIOS updates from the manufacturer. Mine got delivered with P1.50 but ASRock had P1.50 as latest stable BIOS so I flashed this one. The process of flashing a new BIOS is very simple:
Dowload the latest BIOS from the ASRock website (make sure you have the right one!!!)
- Save the BIOS files on a device such as USB disk, hard disk.
- Press
during POST to get into BIOS setup menu. - Select the utility under [Smart] menu to execute it.
- ASRock Instant Flash will automatically detect all devices and only list those BIOS versions which are suitable for your motherboard.
- Select the suitable BIOS version and flash.
BIOS settings
One of the settings I made was that this system starts after the power is switched in (you don't want to shut down a server after a short power loss)
This manual give's an overview of how I installed Mythtv 0.22 on my ASRock ION 330 system using Mythbuntu 9.10
Besides the ASRock ION 330 I use
- 3 Hauppauge USB tuners
- 1 Hauppauge remote control
- 1 Silvershield powerswitch with USB
- 1 fast USB hub with external power supply and
- 1 USB IR receiver
Read also these separate pages:
introduction
criteria
hardware selection
silencing the ASROck ION 330
BIOS update
Download Mythbuntu and check MD5SUM
burn to CD or use UNetbootin to create a bootable USB stick from the iso (this saves you a CD :-)
/dev/sda1 ext3 /boot 200 MB
/dev/sda2 ext4 / 20000MB
/dev/sda3 swap 3000MB
/dev/sda4 ext4 /data rest
name : asrock
computername: asrock
installation type: Prim. backend with frontend
services:
enable
VNC
SSH
Samba
NFS
Mythtv
Enable a remote control:
Hauppauge TV card
Selected video dirver: Nvidia
install..
shutdown system, remove USB stick and power on.
----
Setup screen apears
language: English
host: localhost
db: mythconverg
user: mythtv
password: MLW6EkdS
network
First, check out what your current settings are.
ifconfig -a
Take a note what your current broadcast, subnet mask, and gateway settings are. Also, have you decided on an IP address for your Mythbuntu box yet?
Neo geo roms full set 181 games download. Next, issue this command to modify the Mythbuntu box its network settings.
sudo vi /etc/network/interfaces
You probably only see a set of 'lo', or loopback, settings. Add a new set for 'eth0' so that the whole content of the file looks something like the following. Note your addresses may be different.
Finally, restart the network card with the following command.
sudo /etc/init.d/networking restart
--Use update manager to update all software
reboot
When you hook up multiple pvrusb2 tuners to your ASRock they show up as /dev/video0, /dev/video1, /dev/video2... etc.
I've had some problems with tuners not unregistering themselves correctly. For example /dev/video1 was still there even if all three tuners were powered down. After the tuners got powered on again I ended up with
/dev/video0
/dev/video1
/dev/video2
/dev/video3
When mythbackend started to record from /dev/video1 it produces an error (from the mythbackend log):
Channel(/dev/video1)::Open(): Can't open video device, error 'Input/output error'
I've googled the Internet and found a solution from Steve Gudmundson:
He shows how to use fixed device names based on the serial numbers of the USB device instead of creating a 'random' number. Below is a (slightly modified) copy of his files:
create a file:
/etc/udev/rules.d/pvrusb2.rules:
KERNEL'video[0-9]*', PROGRAM='/usr/local/bin/udev-pvrusb2.sh %m', SYMLINK+='video_%c', OWNER='mythtv', GROUP='mythtv'
and a script:
/usr/local/bin/udev-pvrusb2.sh
#!/bin/bash
# author: Steve Gudmundson
pvrusb2=/sys/class/pvrusb2
search=$pvrusb2/sn-*
timeout=15
# find the serial number for this device #
count_seconds=0
minor_num=-1
until [ $count_seconds -gt $timeout ]
do
sleep 1
count_seconds=`expr $count_seconds + 1`
for file in $search
do
minor_num=`cat $file/v4l_minor_number`
if [ $minor_num -eq $1 ]
then
serial_num=.${file//$pvrusb2//}.
echo $serial_num
exit 0
fi
done
done
echo unknown_$1
exit 0
Power on the tuners and look for the device names. You need these in the next step
ls /dev/video-sn*
tuner setup
connect al 3 tuners and check if you get /dev/video0.2
Start mythbuntu control center from the Applications->System menu
Startup behavior
- automaticly login asrock
- disable frontend startup (we are going to use mythwelcome)
Services
- enable ssh, samba, nfs and vnc
MySQL
- enable daily optimaize repair
- enable perf. tweaks
Start mythtv setup
General:
- TV Format = PAL
- Channel freq. teable = europe west
Capture cards
- new capture card
WARNING: If you follow this installation consecutive than you're find.
If you have installed the Silvershield switch and then perform this action you're in trouble. Starting mythtv-setup will close down Mythbackend AND power down the tuners. With no tuners attached there are no /dev/video* devices and you can't install them.
capturecard setup
(plug in the Hauppauge USB devices before adding capture cards!)
card type: IVTV MPEG-2 encoder card (The card type is a little strange since it's no ivtv card but an v4l card but it works :-))
tuner 1: /dev/video_.sn-8086011. (default input=television)
tuner 2: /dev/video_.sn-8038312. (default input=television)
tuner 3: /dev/video_.sn-7771497. (default input=television)
add video source
video source name: tvguide
listings grabber: no grabber (we use direct db import)
input connection
[MPEG: /dev/video_.sn-8086011.] (television) -> tvguide
[MPEG: /dev/video_.sn-8038312.] (television) -> tvguide
[MPEG: /dev/video_.sn-7771497.] (television) -> tvguide
(I accidentally set the Preset Tuner To Channel to 4 in stead of the Starting Channel and could not record or play live TV. In the mythbackend.log I got:
2009-11-13 19:55:08.882 TVRec(1) Error: Failed to set channel to 4. Reverting to kState_None
After removing the Preset Tuner To Channel value it worked fine)
don't use the channel editor but import xmltv data
wget http://domain/mythtv/
mythfilldatabase --file 1 data.xmltv
fill in the rest via mythweb (settings->tv->channel info):
http://localhost/
add channel number, frequency and comm. flag
setup cron job to get tvlistings
getting TV guide info:
you can also add one line to your /etc/rc.local so that after a reboot, the data gets imported (so you don't have to wait for the cron job to kick in.
create a script: /usr/local/bin/getXmlTv.sh
#!/bin/sh
#
# Name: getXmlTv.sh
Install Mythbuntu From Usb Drive
# Function: get xml tv data as one gzip file from external site# Date: 2009/09/06
# Created:
# Modified:
xmltvURL=http:...
cd /tmp
# get the data
wget ${xmltvURL}data.xmltv.gz
# unzip it
gunzip -f data.xmltv.gz
# import it into the MySQL database
mythfilldatabase --file 1 data.xmltv
rm data.xmltv
edit /etc/X11/xorg.conf file:
configure widescreen (Acer AT3202 1360x768 60Hz)
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 1.0 ([email protected]) Sun Oct 4 01:58:07 UTC 2009
Section 'ServerLayout'
Identifier 'Layout0'
Screen 0 'Screen0' 0 0
InputDevice 'Keyboard0' 'CoreKeyboard'
InputDevice 'Mouse0' 'CorePointer'
EndSection
Section 'Files'
EndSection
Section 'Module'
Load 'dbe'
Load 'extmod'
Load 'type1'
Load 'freetype'
Load 'glx'
EndSection
Section 'ServerFlags'
Option 'Xinerama' '0'
EndSection
Section 'InputDevice'
# generated from default
Identifier 'Mouse0'
Driver 'mouse'
Option 'Protocol' 'auto'
Option 'Device' '/dev/psaux'
Option 'Emulate3Buttons' 'no'
Option 'ZAxisMapping' '4 5'
EndSection
Section 'InputDevice'
# generated from default
Identifier 'Keyboard0'
Driver 'kbd'
EndSection
Section 'Monitor'
# HorizSync source: edid, VertRefresh source: edid
Identifier 'Monitor0'
VendorName 'Unknown'
ModelName 'Unknown'
HorizSync 31.0 - 60.0
VertRefresh 55.0 - 75.0
Option 'DPMS'
EndSection
Section 'Device'
Identifier 'Device0'
Driver 'nvidia'
VendorName 'NVIDIA Corporation'
BoardName 'Unknown'
EndSection
Section 'Screen'
Identifier 'Screen0'
Device 'Device0'
Monitor 'Monitor0'
DefaultDepth 24
Option 'TwinView' '0'
Option 'TwinViewXineramaInfoOrder' 'CRT-0'
Option 'metamodes' '1360x768_60 +0+0'
SubSection 'Display'
Depth 24
EndSubSection
EndSection
start nvidia settings
X server display configuration
Save to X config file (do not use old settings)
setup sudo so that asrock user doesn't need a password to use sudo
# sudo visudo
add this as the last line:
asrock ALL=NOPASSWD: ALLasrock ALL=NOPASSWD: ALL
Use the Session and Settings tool (in XFCE menu) to configure startup applications
Uncheck:
- Bluetooth
- network manager
- Update notifier
- XFCE Volume daemon
Add:
/usr/bin/mythtwelcome
create /usr/local/bin/myMythFrontend
#!/bin/sh
sudo /usr/local/bin/silvershield.sh -o &
/usr/bin/mythfrontend
Start mythwelcome setup:
# mythwelcome -s
Frontend: /usr/local/bin/myMythFrontend
Start reboot en shutdown with sudo (user asrock has no permission to shutdown)
Do not start mythfrondend when mythwelcome is started:
hit i in mythwelcome to configure not to start the frontend whent mythwelcome is started
I use the analog Sound output on my ASRock.
Open Mixer (Applications->MultiMedia->Mixer
Click select controles and select Front
Increase to max.
Test plugin a headset and start:
# play /usr/share/sounds/alsa/*
HDMI Sound
For audo to HDMI and line out at the same time, create /home/asrock/.asoundrc
Hauppauge remote works without any modifications
configure jumppoints:
start mythweb en go to settings->key bindings
Program Guide: Ctrl+g
TV Recording Playback: Ctrl+p
Main menu: Ctrl+m
edit /home/asrock/.lirc/mythtv and add:
begin
remote = Hauppauge_350
prog = mythtv
button = Videos
config = Ctrl+p
repeat = 0
delay = 0
end
begin
remote = Hauppauge_350
prog = mythtv
button = Guide
config = Ctrl+g
repeat = 0
delay = 0
end
begin
remote = Hauppauge_350
prog = mythtv
button = Go
config = Ctrl+m
repeat = 0
delay = 0
end
begin
# add delete button to the remote
remote = Hauppauge_350
prog = mythtv
button = red
config = d
repeat = 0
delay = 0
end
# add two buttons to solve the 'Allow Channel Jumping in Guide' bug in 0.22
# key 1 and 7 don't go one day back/forward so we use two extra buttons for that
begin
remote = Hauppauge_350
prog = mythtv
button = yellow
config = Home
repeat = 0
delay = 0
end
begin
remote = Hauppauge_350
prog = mythtv
button = blue
config = End
repeat = 0
delay = 0
end
# add button to get the menu back in the Watch Recording page that displays several options
# Before 0.22 you would get this menu by hitting the right key on a recording.
begin
remote = Hauppauge_350
prog = mythtv
button = Prev.Ch
config = I
repeat = 0
delay = 0
end
The default location for mytthv files is /var/lib/mythtv. I want to store all data on a separte /data/ partition:
# sudo cp -R /var/lib/mythtv /data/
# sudo rm -rf /var/lib/mythv
# sudo ln -s /var/lib/mythtv /data/mythtv
# sudo chown -R asrock.asrock /data/mythtv
mkdir /data/video
mkdir /data/music
mkdir /data/photo
chown asrock:asrock /data/*
You can modify the recording location with mythtv-setup (Option 6. Storage directories)
frontend settings:
video settings->general->path that holds videos: /data/video/
utilities->setup->tv settings->playback->next:
on playback exit: save position and exit
utilities->setup->tv settings->Guide
2/2 Guide starts at channel: 6
Default always record some extra time
utilities->setup->tv settings->general
start recording -120sec
end recording +600sec
enable vdpau for tv In mythfrontend
utilities / setup-> Setup -> TV Settings -> playback -> next -> next
Select video playback profile VDPAU Normal
My TV doesn't have a HDMI plug, only some scart plugs, analog audio/video and a PC VGA + audio plug.
The use the menu's in high res, I choose to use the VGA and audio.
The TV resolutions is 1366 x 768 (also called HD-Ready)
The prefered frequency for the VGA input is 60Hz
widescreen playback
recordings
utilities->setup->tv settings->playback->next: zoom=full
videos
utilities->setup->media-video->player: replace -fs -zoom with -x 1360 -y 768 (HD Ready)
In the old days, X could be restarted by CTRL ALT BCKSP, now use Right Alt + PrintScreen (SysRq) + kconfigure jumppoints:
start mythweb en go to settings->key bindings
Program Guide: Ctrl+g
TV Recording Playback: Ctrl+p
Main menu: Ctrl+m
edit /home/asrock/.lirc/mythtv and add:
begin
remote = Hauppauge_350
prog = mythtv
button = Videos
config = Ctrl+p
repeat = 0
delay = 0
end
begin
remote = Hauppauge_350
prog = mythtv
button = Guide
config = Ctrl+g
repeat = 0
delay = 0
end
begin
remote = Hauppauge_350
prog = mythtv
button = Go
config = Ctrl+m
repeat = 0
delay = 0
end
begin
# add delete button to the remote
remote = Hauppauge_350
prog = mythtv
button = red
config = d
repeat = 0
delay = 0
end
# add two buttons to solve the 'Allow Channel Jumping in Guide' bug in 0.22
# key 1 and 7 don't go one day back/forward so we use two extra buttons for that
begin
remote = Hauppauge_350
prog = mythtv
button = yellow
config = Home
repeat = 0
delay = 0
end
begin
remote = Hauppauge_350
prog = mythtv
button = blue
config = End
repeat = 0
delay = 0
end
# add button to get the menu back in the Watch Recording page that displays several options
# Before 0.22 you would get this menu by hitting the right key on a recording.
begin
remote = Hauppauge_350
prog = mythtv
button = Prev.Ch
config = I
repeat = 0
delay = 0
end
The default location for mytthv files is /var/lib/mythtv. I want to store all data on a separte /data/ partition:
# sudo cp -R /var/lib/mythtv /data/
# sudo rm -rf /var/lib/mythv
# sudo ln -s /var/lib/mythtv /data/mythtv
# sudo chown -R asrock.asrock /data/mythtv
mkdir /data/video
mkdir /data/music
mkdir /data/photo
chown asrock:asrock /data/*
You can modify the recording location with mythtv-setup (Option 6. Storage directories)
frontend settings:
video settings->general->path that holds videos: /data/video/
utilities->setup->tv settings->playback->next:
on playback exit: save position and exit
utilities->setup->tv settings->Guide
2/2 Guide starts at channel: 6
Default always record some extra time
utilities->setup->tv settings->general
start recording -120sec
end recording +600sec
enable vdpau for tv In mythfrontend
utilities / setup-> Setup -> TV Settings -> playback -> next -> next
Select video playback profile VDPAU Normal
My TV doesn't have a HDMI plug, only some scart plugs, analog audio/video and a PC VGA + audio plug.
The use the menu's in high res, I choose to use the VGA and audio.
The TV resolutions is 1366 x 768 (also called HD-Ready)
The prefered frequency for the VGA input is 60Hz
widescreen playback
recordings
utilities->setup->tv settings->playback->next: zoom=full
videos
utilities->setup->media-video->player: replace -fs -zoom with -x 1360 -y 768 (HD Ready)
start the external tuners when
- a program needs to be recorded
- the frontend is started
Install the software to control the Gembird Silver Shield SIS-PMS:
# sudo apt-get install sispmctl
test it
# sudo sispmctl -o 1 (switch port 1 on)
# sudo sispmctl -f 1 (switch it off)
.. see man sispmctl for all options
install mythtv-status:
apt-get install mythtv-status
remove the cronjob /etc/cron.d/mythtv-status or comment out the mythtv-status line (we are building our own monitoring tool).
create script:
Add Pre and Post script to upstart conf file of mythtv-backend (/etc/init/mythtv-backend.conf)
pre-start script
# power on the tuners before staring mythbackend
/usr/local/bin/silvershield.sh -o
sleep 5
end script
post-stop script
Install Mythbuntu From Usb Wireless Adapter
# power off the tuners after stopping mythbackend/usr/local/bin/silvershield.sh -f
end script
I don't want MythTV to waste it's time on commercial flagging (creating heat and sound).
Disable commercial flagging:
It's in Utilities/Setup->Setup->TV Settings->General. On the third screen,
labeled 'General (Jobs)', there are checkboxes for default JobQueue settings
for new recordings. The very first one is 'Run commercial flagger'.
power saving options:
recommended reading:
http://www.spencerstirling.com/computergeek/powersaving.html
http://www.linuxjournal.com/article/7539
the HD led flashes every second (only in Mythbuntu 9.04):
disable mtd
# sudo vi /usr/share/mythbuntu/session.sh
comment the lines:
#If we have mtd around (and not running), good idea to start it too
#if ! `pgrep mtd>/dev/null`; then
# if [ -x /usr/bin/mtd ]; then
# /usr/bin/mtd -d
# fi
#fi
after that every 2 seconds the led flashes
This is caused by the hal daemon. It probes for a SATA dvd.
The haldaemon polls any cd/dvd drives for inserted media, every 2 seconds.
If you have a cd/dvd drive on the same controller as the hard drive, that will
also cause the light to flash, even though it isn't the hard drive being accessed.
If you have a cd/dvd drive on the same controller as the hard drive, that will
also cause the light to flash, even though it isn't the hard drive being accessed.
To disable polling of the cd/dvd drive, run
'lshal |grep info.udi|grep storage>hal.txt' In the hal.txt file, find the line
for your cd/dvd and run (as root)
# hal-disable-polling --udi '/org/freedesktop/Hal/devices/storage_model_DVD_RW__DVR_111D'
replace the udi string, with the one for your cd/dvd.
Note you'll have to manually mount/umount the cd/dvd, after this change. 'lshal |grep info.udi|grep storage>hal.txt' In the hal.txt file, find the line
for your cd/dvd and run (as root)
# hal-disable-polling --udi '/org/freedesktop/Hal/devices/storage_model_DVD_RW__DVR_111D'
replace the udi string, with the one for your cd/dvd.
Install Mythbuntu From Usb Pc Camera
If you want to re-enable the device polling, delete the file it created from
/etc/hal/fdi/information/
If you remove the swap partition from the /etc/fstab, the system won't access the disk for swap. (Linux sometimes swaps even if it has enough memory). The system has 2G which is MORE than enough for a MythTv system.
During the installation process of mythbuntu we have chosen for the Hauppauge remote. That created a set of lirc config files. These work for the Hauppauge PVRUSB2 tuners. We cat 3 ir devices (/dev/lirc0 . lirc2). The problem with saving power by switching off the tuners is that you can't use the build in ir receivers to start mythfrontend with your remote. So we need an USB IR receiver that is not switched off. I use the Philips OVU412000 for that. It's a good looking device which is very sencitive so you don't need to point your remote excactly to the device for a good reception.
After connecting this device you get an extra (/dev/lirc3) device. The problem is, that after switching of the tuners, lirc crashes. And if you restart lirc, the device now has a new device number (/dev/o lirc0). This results in unpredictable behavior. One solution is to disable the Hauppauge IR receivers by not loading the kernel modules. Therefore /etc/lirc/hardware.conf file was modified:
REMOTE_MODULES='lirc_dev lirc_i2c'
was changed to:
REMOTE_MODULES='lirc_dev lirc_mceusb'
After that, the IR of the build in tuners no longer work and we only have one /dev/lirc file that won't change.
sudo vi /usr/local/bin/mythmon
#!/bin/bash
#
# /usr/local/bin/mythmon
# This is run from cron every 10 minutes.
#
# check for mythbackend running
ps -C mythbackend > /dev/null && exit 0;
# also check for mythtv-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` /usr/local/bin/mythmon: mythbackend not running!!!'
>> /var/log/mythtv/mythbackend.log;
echo '`date +%Y-%m-%d %T.%-3N` /usr/local/bin/mythmon: mythbackend not running!!!'
>> /var/log/mythtv/mythmon.log
service mythtv-backend start > /dev/null
exit 1;
(be sure that you've modified the mythtv-backend upstart file to power on the tuners before starting mythbackend)
sudo chmod 755 /usr/local/bin/mythmon
#
# monitor the mythbacked service and restart it if it exists
# reboot weekly to clean up
#
#
# m = minute (0-59)
# h = hour (0-23)
# dom = day of the month (1-31)
# mon = month (1-12)
# dow = day of the week (0-7)
#
# m h dom mon dow user command
01,11,21,31,41,51 * * * * root /usr/local/bin/mythmon
0 3 * * 7 root /usr/local/bin/weekly_reboot
# sudo vi /usr/local/bin/weekly_reboot
#!/bin/bash
#
# /usr/local/bin/weekly_reboot
# reboot the system once every week to clean up
# (only reboot if no recordings are busy)
#
minutesToNextRecording()
{
mythStatus=`/usr/bin/mythtv-status --noencoders
--noschedule-conflicts --nototal-disk-space
--nodisk-space --noguide-data --noauto-expire
--nostatus --noscheduled-recordings`
#echo $mythStatus >> /tmp/silvershield.log
isRecording=`echo $mythStatus |
grep 'Recording Now:'`
if [ '$isRecording' = ' ]
then
Install Mythbuntu From Usb Flash Drive
nrMinutes=`echo $mythStatus |grep 'Next Recording In:' |
sed 's/.*Next Recording In: //' |
awk '{ if ( $2 'Minutes' ) print $1; else print '999' }'`
# if this doesn't result in a valid nr. of minutes, fill in 999
if [ '$nrMinutes' = ' ]
then
nrMinutes=999
fi
else
nrMinutes=0
fi
}
# check recording and frontend status
frontendRunning=`ps -ef | grep mythfrontend.real | grep -v grep`
# if frontend is running do nothing (try again next week :-)
if [ '$frontendRunning' = ' ]
then
# frontend is not running
# check if mythtv is recording or about to start a recording
minutesToNextRecording
if [ '$nrMinutes' -gt 5 ]
then
reboot
fi
fi
Mythtv UPNP does not work with Lenco IR-2100
The mythtv backend uses UPNP to stream video to the frontend, so don't disable mythtv upnp
install ushare (geexbox lightweight UPNP server)
# apt-get install ushare
# vi /etc/ushare.conf
USHARE_DIR=/data/music
# /etc/init.d/ushare start
Before you start playing music it is highly recommended that you configure the MythMusic Player to show your entire music tree. This is probably the single biggest reason that people struggle with MythMusic GUI. You can set this in Utilities/Setup->Setup->Media Settings->Music Settings->Player Settings->show entire music tree
create music dir /data/music
copy mp3 files to /data/music
Point MythMusic at the directory in which your music collection is, by changing the location of your music library:
* Utilities/Setup → Setup →Media Settings-> Music Settings → General settings.
Then:
* Utilities/Setup → Music tools → Scan for New Music.
MythTV will then scan for music and add the information into the MythTV database.
You can change the way MythMusic displays your music collection, goto Utilities/Setup->Setup->Media Settings->Music Settings->General Settings->Tree Sorting.
Possible values here are space-separated list of genre, splitartist, splitartist1, artist, album, and title OR the keyword 'directory' (without the quotes) to indicate that the onscreen tree mirrors the file system.
share data (music, videos, docs..) for Windows systems
# vi /etc/samba/smb.conf
[global]
server string = ASRock
max log size = 1000
panic action = /usr/share/samba/panic-action %d
security = share
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
[data]
path = /data
read only = no
force user = userx
# share external disk
comment = ASRock External Data
browsable = yes
writable = yes
# media share is read only accessible for guests. This is done because XMBC (wich is used as one of the MythTv clients, does nog support encrypted passwords anymore
# The other alternative is to set 'encrypt passwords = no' in the /etc/samba/smb.conf file but this has the disadvantage of having to modify M$ XP installations to be able to connect using plain text passwords.
[media]
browsable = yes
public = yes
write list =
share data for linux systems
# sudo vi /etc/exports
add the export for example: /data 192.168.2.4(rw,async,no_root_squash,no_subtree_check)
if nfs is already running: reread /etc/exports
# sudo exportfs -ra
Mythbuntu uses UUID instead of disk labels. This means you can't simply create an image of a system and restore it on a new harddisk. I prever to use disk labels. First we list our current partitions:
asrock@mythtv:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda5 19228276 2922252 15329276 17% /
/dev/sda1 186663 47207 129819 27% /boot
/dev/sda4 285359900 31075884 239788568 12% /data
# sudo e2label /dev/sda5 root
# sudo e2label /dev/sda1 boot
# sudo e2label /dev/sda4 data
change /etc/fstab
LABEL=root / ext4 relatime,errors=remount-ro 0 1
LABEL=boot /boot ext3 relatime 0 2
LABEL=data /data ext4 relatime 0 2
/dev/sda3 none swap sw 0 0
change /etc/default/grub
uncomment: #GRUB_DISABLE_LINUX_UUID=true
update /boot/grub/grub.cfg:
sudo grup-mkconfig > /boot/grub/grub.cfg
Mythtv now uses an internal player for most parts. If you want to be able to use mplayer, install it whith the command:
#sudo apt-get install mplayer
Execute /usr/local/sbin/LCDd, and you should get a Clients: 0 and Screens: 0 on the LCD display.
To see something more interesting, start a client application. For example, start 'lcdproc -f' on the command line.
backup
now is a good time to create a backup of the boot and root partition. We created a ext4 root partition so we can't use partimage for that.You CAN use fsarchiver for that.
Reboot from a sysrescue cd, plug-in a backup USB disk and mount it. For example:
mkdir /mnt/usbdisk
mount /dev/sdc2 /mnt/usbdisk
![Install Mythbuntu From Usb Install Mythbuntu From Usb](/uploads/1/1/9/8/119846024/667076559.png)
create the backup
fsarchiver -j3 savefs /mnt/usbdisk/root.fsa /dev/sda5 (check what device contains your root)
fsarchiver -j3 savefs /mnt/usbdisk/boot.fsa /dev/sda1 (check what device contains your boot)
Adding an extra frontend
I wanted to use my old mythtv as an extra frontend to use elsewhere in the house. Besides installing the frontend I had to change this to the ASRock mythtv backend:Start mythtv backend setup from the control center
Set local backend IP address 192.168.2.6 (your IP may be different)
Set security pin to 0000
Set master backend IP address to 192.168.2.6
Read this pagefor the installation of this frontend
If you want to send me an email send it to gacmb5 at gmail dot com.