mythbox:~$ sudo vim /usr/local/bin/restartmyth.sh
## Automatically restart mythfrontend if it fails.
## Loop the call of mythfrontend.
while [ /bin/true ]
mythfrontend -v playback >> /tmp/mythfrontend.log
mythbox:~$ sudo chmod 755 /usr/local/bin/restartmyth.sh
First enable Automatic login from the gnome Settings panel.
Schedule the script to start after login (using gnome)
mythbox:~$ vim .config/autostart/restartmythtv.desktop
Comment=Restart mythtfrontend when it crashes
Restart the computer
Note: this blog was previously written for XBOX media centre (XBMC). It has been replaced by Kodi since a long time. Please read kodi instead of xbmc below.
In 2010 I wrote:
I recently tried XBMC on one of my mytfrontends. I must say, I was impressed by the user interface.
To run xbmc besides mythfrontend I had to do some tweaking to this mythbuntu frontend. To install, first add these lines to /etc/apt/sources.list
deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu jaunty main
Kodi can nowadays be found in the stable repository of Debian.
# vim /usr/share/mythtv/themes/MythCenter-wide/osd.xml
<fontdef name=”medium” face=”Droid Sans”>
The progress bar will show up on top of the screen. This will keep the subtitles visible when pausing and unpausing recordings.
Recently I moved from Win 8.1 to W10. Unfortunately I forgot to save my office product key…..Happily I had an fog image of this machine.
Question, can one restore the files inside this container without using fog? (which restores it back to the original device)
YES you can.
First decompress the “fog” file and write it to a file in raw file:
# apt-get install partclone pigz
# cat d1p2.img | pigz -d -c | partclone.ntfs -C -r -s -O foo.img –restore_raw_file
- d1p2.img = the original image
- pigz = to decompress the image
- partclone.ntfs = to restore the image to a ntfs partition type
Partclone v0.2.73 http://partclone.org
Starting to restore image (-) to device (foo.img)
Calculating bitmap… Please wait… done!
File system: NTFS
Device size: 109.2 GB = 26655231 Blocks
Space in use: 48.6 GB = 11859567 Blocks
Free Space: 60.6 GB = 14795664 Blocks
Block size: 4096 Byte
Elapsed: 00:00:04, Remaining: 00:09:40, Completed: 0.68%, 4.99GB/min,
current block: 90541, total block: 26655231, Complete: 0.34%
Then mount foo.img with OSFmount
Next use the productkey viewer from Nirsoft to open the SOFTWARE registry hive.
(Note: The Nirsoft tool needs to be started with Admin rights)
After upgrading of my e-mailbox running courier-imap-ssl, I discovered that connecting with Thunderbird just failed.
imapd-ssl: couriertls: accept: error:14094417:SSL routines:SSL3_READ_BYTES:sslv3 alert illegal parameter
In Thunderbird, pressing
CTRL+SHIFT+J shows the Thunderbird error console. It showed me information that something was wrong with some DH-parameter.
Following: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787579, I generated a new keyfile using:
# export DH_BITS=2048 && mkdhparams
After generating a new “/etc/courier/dhparams.pem” and restarting courier-ssl by executing: /etc/init.d/courier-imap-ssl restart, I still could not connect with Thunderbird…
Then I discovered that in: /etc/courier/imapd-ssl, the parameter TLS_DHPARAMS could be set. I suspected that the pem-file for some reason could not be found by courier-imap-ssl. A bit strange of course, because it had never been a problem, until now.
So I added:
After restarting courier-imap-ssl once again I discovered that this addition indeed solved my problem.
For future convenience I changed the BITS value in /usr/sbin/mkdhparams
Its purpose is to keep the computer current with the latest security (and other) updates automatically. If you plan to use it, you should have some means to monitor your systems, such as installing the apt-listchanges package and configuring it to send you emails about updates. And there is always /var/log/dpkg.log, or the files in /var/log/unattended-upgrades.
To install these packages, run the following command as root:
apt-get install unattended-upgrades apt-listchanges
To activate unattended-upgrades, you need to ensure that the apt configuration stub /etc/apt/apt.conf.d/50auto-upgrades contains at least the following lines:
This file can be created manually or by running the following command as root:
dpkg-reconfigure -plow unattended-upgrades
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = “UTF-8”,
LANG = “en_US.UTF-8”
are supported and installed on your system.
sudo dpkg-reconfigure locales
Log off and log on again
We will place “trim” scripts in four places:
/etc/rc.local = This will run at every boot no matter what.
/etc/rc0.d/ = This will run at shutdown only.
/etc/rc6.d/ = This will run on restart only.
/etc/cron.hourly/ = This will run every hour the system is running.
Useful after systemcrash:
When Mysql is not running:
myisamchk –silent –force –fast –update-state /var/lib/mysql/bugs/*.MYI
myisamchk –safe-recover –force –sort_buffer_size=2G –key_buffer_size=2G /var/lib/mysql/*/*.MYI
-s, –silent option: Prints only errors. You can use two -s to make myisamchk very silent.
-f, –force option: Restart myisamchk automatically with repair option -r, if there are any errors in the table.
-F, –fast option: Check only tables that haven’t been closed properly.
-U –update-state option: Marks tables as crashed, when it finds any error.
When Mysql is running (which is kind of slow)
mysqlcheck –repair –all-databases
To switch of the autoverify feature on a 3ware controller which can be a real performance killer do the following:
From the console, enter the 3ware cli and first check the current status
tw_cli /c0/u0 show autoverify
/c0/u0 Auto Verify Policy = on
As you can see the autoverify feature is on Auto Verify Policy = on. If your raid controller is also c0 and you unit is u0 you may use the following command. Please check this first with the command:
tw_cli /c0 show
Do not just copy and paste. If c0 doesn’t work try a higher number it depends on which pci slot your controller is in.
tw_cli /c0/u0 set autoverify=off
Setting Auto-Verify Policy on /c0/u0 to [off] … Done.
Check the autoverify settings:
tw_cli /c0/u0 show autoverify
/c0/u0 Auto Verify Policy = off
That’s it no more autoverify. Please make sure to check you raid status regularly to detect problems.