It is not exactly by copying an ISO to the USB key, however it's almost as simple. The instructions are located here: How to create a bootable USB stick on Windows Ubuntu. Afterwards you can boot from the USB as if you booted from a CD and proceed to install Ubuntu on your hard disk. Boot from the Windows system repair disc USB drive (or a Windows installation or rescue CD-ROM / DVD-ROM). Select Repair your computer. Select the operating system and click Next. Choose Command Prompt. In the command prompt run diskpart sel disk 0 list vol; Verify that the EFI partition is using the FAT32 file system. Among the boot options, we can mention the ability to try the distribution without installing anything on your computer, check the disc for defects (only if using a DVD media), run a memory diagnostic test, boot an existing operating system from the first disk drive, and install Mythbuntu on a local disk. Boot Mythbuntu 14.04.4 installation image via USB Flash drive created with Startup Disk Creator from Ubuntu 14.04 system, or installation CDROM. DO NOT use 14.04.5 because you will get a new kernel and X version that will not work with my Sony/Onkyo AV receiver. I used the UEFI USB. Boot the computer from your USB flash drive. Install Ubuntu as you would from a normal boot CD. A running Ubuntu 8.04 or any ubuntu version installation. A USB device (stick, pen-drive, USB hard disk) that has already been formatted with FAT32 and has enough free space to hold your Ubuntu installation image.
- Install Mythbuntu From Usb Wireless Adapter
- Install Mythbuntu From Usb Flash Drive
- Install Mythbuntu From Usb Pc Camera
- Install Mythbuntu From Usb Drive
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?
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
# 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'
![Mythbuntu Mythbuntu](https://i.ytimg.com/vi/pqcP_94Y5SM/maxresdefault.jpg)
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
# 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.
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
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
![Install Mythbuntu From Usb Install Mythbuntu From Usb](https://www.datapro.net/images/80-6199.jpg)
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.Install Mythbuntu From Usb Wireless Adapter
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
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.
This is a step by step tutorial shows you how to install the real Ubuntu OS on USB stick to create a ‘Windows To Go’ style USB drive. Tested with Ubuntu 14.04
Requirements:
Before getting started, you need to prepare something:
- A 8GB+ USB Drive.
- A Ubuntu Live CD/DVD/USB. In the case below, I created a bootable Ubuntu Live USB from the .iso image.
- A computer with an operating system installed.
And always backup your data on the USB flash drive!
To get started:
In my case I have a newly bought 16GB USB stick, a 4GB old USB stick, and a laptop multi-boot with Ubuntu based systems.
1. I don’t have a Ubuntu CD/DVD, so I decided to burn the Ubuntu .iso image into the old USB stick. To do so:
- Download Ubuntu image: releases.ubuntu.com
- Download UNetbootin: unetbootin.sourceforge.net. For Ubuntu, install it from Software Center.
- Plug in the USB stick.
- Start UNetbootin, and burn the .iso image into USB
If you need more hints, follow this screenshot tutorial to create bootable Ubuntu Live USB
2. Plug in the bootable USB drive to your computer and boot into the Live Ubuntu system.
IMPORTANT: For Windows 8 pre-installed machine, you have to disable “fast startup” and “secure boot” features.
To disable “fast startup”, go to Control Panel > Hardware and Sound > Power Options > System Settings > Choose what the power buttons do and uncheck the Turn on fast startup box.
To disable “secure boot”, follow this screenshot tutorial.
3. Now you’re in the Ubuntu Live system. Plug in the 8GB+ USB stick. Then launch Gparted from the Unity Dash.
In the top-right drop-down box select the USB drive (16GB in my case), and you should see something like below:
I have two USB flash drives plugged in the computer, the Hard Disk is /dev/sda, 4GB Live USB is /dev/sdb, and the 16GB USB drive is /dev/sdc.
4. From the right-click context menu, un-mount partitions on the USB drive and then delete them. How to install door flashing tape.
Click the green check mark button to apply changes, finally you have an unallocated flash drive, like:
When done, close Gparted partition manager.
5. Click the desktop shortcut “Install Ubuntu” to bring up the Ubuntu installation wizard.
Follow the wizard until it asks you to choose where to install Ubuntu. Select the last option “Something else” and click Continue to bring up partition table.
6. In the partition table, scroll down and highlight the “free space” under the USB drive (/dev/sdc in the case) and click the plus sign to create below partitions one by one:
Install Mythbuntu From Usb Flash Drive
- a FAT32 (or fat16) partition (required)
- must be /dev/sdc1 (or sdX1)
- mount point /NAME_HERE (/UDISK in the case)
- set the memory size by yourself, it can be used for normal data storage.
- leave others default.
- a EXT4 partition for Ubuntu (required)
- mount point “/” (without quotes)
- memory size 5G+
- leave others default.
- a swap partition (optional).
- You can skip this if RAM is large enough and you don’t need hibernation feature.
And very important is select install boot-loader to the USB flash drive (/dev/sdc in the case).
Install Mythbuntu From Usb Pc Camera
7. When everything’s done, click Install Now and confirm to format the partitions (Pay attention on which partitions to be formatted).
Install Mythbuntu From Usb Drive
Click continue and finish the wizard. Once the installation complete, restart your computer and boot with the ‘Ubuntu To Go’ USB drive and enjoy!