View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 8 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sun Jul 20, 2008 8:32 pm 
Offline
Joined: Fri Jul 29, 2005 1:22 am
Posts: 232
Location: SF East Bay, CA
Hats off to the KnoppMyth Developers and testers! KM just keeps getting better and better!

This Blow-by-Blow report is my way of contribution to the group. I welcome any comments or corrections! I have done a few installs and a few upgrades. I am no expert by any stretch of the imagination. You'll notice that there are aspects of the process in which I have no clue about what's going on. I'll uses phrases like "I think", "I guess", and "???" to indicate my level of confusion. The process is becoming less intimidating to me as I come to understand the system better, and as the process is improved by developers, testers and feedback from the KM community.

I have two machines that run KM. This blow-by-blow is on my first machine.. as follows:
ASUS P5P800
Intel P4 3Ghz
500 GB PATA HD
nVidia FX5200 AGP card
Hauppauge PVR-350 w/ "grey" remote
IR Blaster
Comcast Digital Cable - Motorola DCT2244

Machine #2 consists of:
ASUS P5K-V
Intel P4 Core2 Duo
Intel G33 chipset
Intel Graphics Media Accelerator 3100
500 GB SATA HD
Hauppauge PVR-350 w/ "grey" remote
IR Blaster
Comcast Digital Cable - Motorola DCT2244

Although there are some differences in these two machines, I intend to configure them to look the same. The first machine has an nVidia AGP card in it, the second machine has an integrated Intel graphics chip on the motherboard. Yet, both machines have the Hauppauge PVR-350 that will be configured for all video out to the TV.

In addition, the first machine has a PATA (IDE) drive, whereas the second machine has a SATA drive. I had intended for the second machine to be "so like" the first machine that the components would be more-or-less interchangeable. This difference pretty much limits that.

ABSOLUTELY see the proper reference materials:

Project Changelog:
http://www.mysettopbox.tv/CHANGELOG.txt

"The Pamphlet": Overview document:
http://www.mysettopbox.tv/pamphlet.html
or
ftp://knoppmyth.net/R5/pamphlet.pdf

Note that I've noticed some dated information in "the pamphlet" in two areas:
1. The TV program listing site is "Schedules Direct" (see URL below) instead of zap2it.com
Schedules Direct
http://www.schedulesdirect.org/
2. The pamphlet lists a /cache partition. This in no longer needed.
You only need a / (root) a /swap and a /myth partition.

Note that it says that "Auto install will only work on /dev/hda." I think that I would make that wording a bit stronger: your hard disk must be /dev/hda IDE (PATA) or SATA drives are supported. Some newer motherboards that support both types of drives will force the SATA drives at /dev/hda whereas some motherboards will put the PATA drives at /dev/hda.

Well, of course, I guess that it's the Linux Kernel that makes the actual assignment.

Now that I've stated that.. hold on to your hats, cowboys. My secondary machine, with the SATA drives will complicate matters, as you'll see below.
Machine #2 setups up the SATA drive as /dev/sda1. (and it gets worse!)

(There you go, I have already used an "I think" and an "I guess".)

Of course, we are upgrading here.. so my notes on the pamphlet don't entirely apply to us!

tjc's "R5.5 Hints" - Primary Hint Page for installing this version (R5.5)
http://mysettopbox.tv/phpBB2/viewtopic.php?t=18453


I have compiled this blow-by-blow from the "auto-upgrade" of both machines. Except as noted, the results appear to be the same.

I recommend that you take detailed notes during your install or upgrade process, so go get a tablet and a pen.

I decided that I wanted to get re-familiar with my system setup.. so, beyond tjc recommendations.. I suggest the following:
(commands as root user)

000 ~~~~~~~~~~~~~~~~~~~~~~~~~~
I ssh into my system as the root user..

Note about the squiggly section header. The numbering on the left side is my sequence number, the numbering on the right is a reference to tjc's document.

001 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Code:
ls -l /etc/irblaster

total 16
-rwxr-xr-x 1 root root 252 Feb 24 17:17 channel_change.sh
-rw-r--r-- 1 root root 151 Feb 24 12:20 hardware.conf
-rw-r--r-- 1 root root 6012 Feb 24 17:23 irblasterd.conf
Code:
cat /etc/irblaster/channel_change.sh

Code:
cat /etc/irblaster/hardware.conf

Code:
cat /etc/irblaster/irblasterd.conf

Code:
ls -l /etc/lirc

total 24
-rw-r--r-- 1 root root 466 Feb 24 12:19 hardware.conf
-rw-r--r-- 1 root root 465 Oct 1 2005 hardware.conf.1st
-rw-r--r-- 1 root root 465 Aug 13 2006 hardware.conf.orig
-rw------- 1 root root 672 Nov 4 2006 lirc-modules-source.conf
-rw-r--r-- 1 root root 2838 Feb 24 12:19 lircd.conf
-rw-r--r-- 1 root root 465 Aug 6 2004 lircmd.conf
Code:
cat /etc/lirc/hardware.conf

Code:
cat /etc/lirc/lircd.conf


To go one step further.. I decided to just make a "safety copy" of these config files. Note that these will be "destroyed" during the first part of the core upgrade/install and will be restored from your "backup".. as long as you did these before you executed your backup!

002 ~~~~~~~~~~~~~~~~~~~~~~~~~~
In the /root directory as root user:
Code:
cd /root
mkdir irblaster_config_R5F27
cd irblaster_config_R5F27
cp /etc/irblaster/* .

and
003 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Code:
cd /root
mkdir lirc_config_R5F27
cd lirc_config_R5F27
cp /etc/lirc/* .


004 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Review the networking bits:
Code:
cat /etc/hosts

Code:
cat /etc/network/interfaces

Code:
cat /etc/resolv.conf


005 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Code:
cd /root
mkdir network_config_R5F27
cd network_config_R5F27
cp /etc/hosts .
cp /etc/network/interfaces .
cp /etc/resolv.conf .


Later I found that I messed up on gateway address during the install on Machine #1 and so my /etc/network/interfaces had the bad gateway address. This made it so getting to the outside world didn't work. This backup copy helped.

During the actual upgrade, I noticed some grumbling about not reaching some site.. pretty sure it was a debian.org reference. This did not stop the upgrade. Possibly the patcher script failed. ???

I didn't fully realize that there was a networking issue until I ran a "apt-get update" at the end for Machine #1.

With a bad gateway address, I could ping out and ssh into the machine. but I think that the /etc/resolv.conf file was likewise useless. I updated this from by backup as well. (I barely understand how networking actually work.. netmask, network, broadcast, gateway .. OK, I'll admit that I'm lost. I guess that networking worked between my machines within my local network, but I didn't have access to the internet.

networking can be restarted real easy!
Code:
/etc/init.d/networking restart



tjc: Phase 0 - Before you upgrade:
006 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Code:
cat /etc/KnoppMyth-version

Quote:
KnoppMyth R5F27


007 ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1.1)
Code:
mythbackup

Here's a segment of the output from Machine #1
Quote:
.
.
.
./etc/iceape/pref/
./etc/iceape/pref/base.js
./etc/mail.rc
./etc/passwd-
./var/www/mythweb/.htaccess
/bin/tar: ./var/lib/alsa/asound.state: Cannot stat: No such file or directory
/bin/tar: Error exit delayed from previous errors
Sanity checking your backup...

Checking for the existence of the backup tar file...
Using file /myth/backup/savedfiles.tar.gz
Backup tar file exists. Checking the compression...
Compression looks OK. Checking backup tar file contents...
Generating a list of the backup contents...
/bin/tar: ./var/lib/alsa/asound.state: Not found in archive
/bin/tar: Error exit delayed from previous errors
Generating a list of the directory contents...
/usr/bin/find: ./var/lib/alsa/asound.state: No such file or directory
Comparing directory versus backup contents...
Live and saved file lists match.

Checking for the existence of the DB dump file...
Using file /myth/backup/mythconverg.sql.gz
DB dump file exists. Checking the compression...
Compression looks OK. Checking DB dump contents...
Generating a list of tables and record counts in the DB dump...
Generating a list of tables and record counts in the live DB...
Comparing live versus saved tables...
Live and saved table lists match.

Backup passes all checks.


008 ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1.2)
Code:
checkbackup

More output segments from Machine #1
Quote:
Checking for the existence of the backup tar file...
Using file /myth/backup/savedfiles.tar.gz
Backup tar file exists. Checking the compression...
Compression looks OK. Checking backup tar file contents...
Generating a list of the backup contents...
/bin/tar: ./var/lib/alsa/asound.state: Not found in archive
/bin/tar: Error exit delayed from previous errors
Generating a list of the directory contents...
/usr/bin/find: ./var/lib/alsa/asound.state: No such file or directory
Comparing directory versus backup contents...
Live and saved file lists match.

Checking for the existence of the DB dump file...
Using file /myth/backup/mythconverg.sql.gz
DB dump file exists. Checking the compression...
Compression looks OK. Checking DB dump contents...
Generating a list of tables and record counts in the DB dump...
Generating a list of tables and record counts in the live DB...
Comparing live versus saved tables...
Live and saved table lists match.


Obviously there is something wrong with my ALSA setup.. everything seems to be working correctly, so I'm not sure what this means. (Except that I don't get any sound from a nuvexport session ???, but that's an excuse for doing an upgrade! I'll be checking that later!) These errors are not "show stoppers". I had this same error on Machine #2.

009 ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1.3
Check for multiple compression formats..
Code:
ls -l /myth/backup/savedfiles.tar* /myth/backup/mythconverg.sql* |
>  sed '/\.[0-9]*$/d'

Quote:
-rw------- 1 root root 21686422 Jul 12 18:01 /myth/backup/mythconverg.sql.gz
-rw------- 1 root root 59940189 Jul 12 18:02 /myth/backup/savedfiles.tar.gz



010 ~~~~~~~~~~~~~~~~~~~~~~~~~~ 2)
tjc: "Make a list of any add ons"

This is beautifully understated. The Auto-Upgrade will wipe-out everything on the root volume, and likely loose reference to things that you have added to the /myth volume. Whenever you add anything to your mythbox, it's a good idea to log your additions someplace. I use my hand-written install/upgrade notes as a place for these. I did suggest that you grab a tablet and pen before.

011 ~~~~~~~~~~~~~~~~~~~~~~~~~~ 3)
Code:
hostname

Machine #1, Really!
Quote:
BgBertha

Machine #2, JIm Cramer/Mad Money fans, anyone?
Quote:
BaBaBooyah



012 ~~~~~~~~~~~~~~~~~~~~~~~~~~
This would be a good time to review all of those setting on the GUI.. frontend and backend. If the auto-upgrade goes well, it's likely that these notes won't be needed. These are needed when things go horribly bad, and you find yourself installing from scratch. (If this fails, you might have to check into a twelve-step program. .. Let's hope not.)

013 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Frontend settings: (Use <Alt-M> to fire-up the frontend menu.)

On the menu: >> Utilities/Setup >> Setup >> General
Quote:
Hostname: localhost
Database: mythconverg
User: Mythtv
Password: *****
Database Type: mysql

>> Appearance:
Quote:
GUI Width: 637
GUI Height: 453
GUI X-Offset: 34
GUI Y-Offset: 14
X - Use GUI Size for TV Player

The actual GUI settings are slightly different for my Machine #1 & Machine #2. It's noted to keep things in the ballpark.

014 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Exit the Frontend, Use <Alt-2> to stop the backend.
Use <Alt-S> to start the backend menu
>> 1. General ... note the IP address and the Master IP address. On my Machine #2,
I had experimented with a "Job #1" setting for transcoding for the i-pod. I made a note
of it on my tablet.
>> 2. Capture card ..
Quote:
/dev/video0
PVRX50
Tuner 0

>> 3. Video Sources:
Quote:
Comcast Cable Box
Schedule Direct
User ID & Password for schedulesdirect.org

>> 4. Input Connetions:
Quote:
/dev/video0 >> Comcast Cable Box
/etc/irblaster/channel_change.sh
Preset Tuner: 4


They made fun of Woodrow Wilson for his "fourteen points".. So we move on..

Exit the Backend Menu and Use <Alt-3> to restart the backend.
015 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Use <Alt-M> to bring up the frontend menu.
Go to the Knoppmyth menu and "Power Off" the machine.

016 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Since my machines run "headless".. I take a moment to get out my
wireless keyboard and mouse and attach a monitor to the vga plug
on the back of the machine.

Let the fun begin!

tjc: Phase 1 - When you boot from the CD:
017 ~~~~~~~~~~~~~~~~~~~~~~~~~~ Phase 1. 1)
boot on the R5.5 CD

018 ~~~~~~~~~~~~~~~~~~~~~~~~~~ Phase 1. 1.1)
use the "testcd" option

019 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Auto-Upgrade

During this phase, the root volume is re-formatted, and the KM program material is copied form the CD to the hard disk drive.

tjc: Phase 2 - After the install from the CD and reboot
020 ~~~~~~~~~~~~~~~~~~~~~~~~~~ Phase 2
Reboot

tjc: Phase 2a. Before entering the root password to start the setup dialogs:
021 ~~~~~~~~~~~~~~~~~~~~~~~~~~ Phase 2a
If needed, this would be a good place to switch out of the upgrade and check things out.

This is where I came in on my re-try on Machine #2 to make sure that my /myth volume was properly mounted. (see below)
Code:
cat /etc/fstab


This is also one place where you might see tjc's message
INIT: Id "c7" respawning too fast: disabled for 5 minutes

I thought that my Machine #1 might get this, since it's an nVidia card. I do see this later, as the machine(s) switch to TV-out on my PVR-350. (see below)

022 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Quote:
Enter the root password



Here is where the important questions come up!

023 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Quote:
Use DHCP Broadcast? No.

During a prior install or upgrade, I had answered "yes" to this question. That results in a dynamic IP Address configuration. My weak knowledge of Linux networking comes from manually reconfiguring to a static IP address.

Quote:
IP Address: 192.168.1.111

That would be 192.168.1.112 for my Machine #2.

Quote:
Net Mask: 255.255.255.0


Quote:
Broadcast: 192.168.1.255


Quote:
Default Gateway: 192.168.1.1

Here's one place that I goofed up on Machine #1. I had entered 192.168.1.255.

Quote:
Name Server: 192.168.1.1

Here's another place that I goofed up on Machine #1. I had entered 192.168.1.255.

Here is the script for reconfiguring your network .. It's an old tjc answer to one of my questions!:
Code:
netcardconfig --force



024 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Quote:
Use Boot Splash? No.

If you change your mind, you can use the script:
Code:
/usr/local/bin/config_bootsplash.sh


025 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Quote:
Enable RDD? Yes.

Then the script allows you to select the areas for RDD to monitor.
Looks like the re-do on this choice is:
Code:
/usr/local/bin/rrd_Configure.sh


026 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Quote:
Serial Port IR Blaster? Yes.

Mine in on COM1 for both machines.
I select the device "Motorola DCT2244" for my cable box.
Here's the script:
Code:
/usr/local/bin/irblaster.sh


027 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Quote:
ROM DB? Yes.

It does display a warning about loading the database to categorize games for MythGame. .. and the do-over script: (If you said "yes", I doubt that you have an easy do-over to "no".)
Code:
/usr/local/bin/load_romdb.sh


028 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Quote:
Enable Screensaver? No.

.. and the do-over script:
Code:
/usr/local/bin/configure_xscreensaver.sh


029 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Quote:
Enter your MythTV Password:

This might not be the exact wording.. but if you see this.. Danger: Will Robinson!. This should be a red flag that something bad is going on! In my case, it was on my Machine #2. I did a <Ctrl-Alt-F1> to get a terminal session, logged in as "root" and executed a
Code:
df -ah
to discover that my /myth volume was not mounted. This is where I discovered that the Linux Kernel had identified and mounted the first partition to /dev/sda1, and this was good and alright! BUT, it also had misidentified and could not mount the /myth volume as /dev/hda3. Therefore, the upgrade script could not read the existing database to figure out the mythtv password.. so it had to ask! As far as I could tell (guess), at this point, the upgrade script would be hopelessly lost.. so my only option would be to reboot on the CD and start again and stop to check things at step 021 (tjc's Phase 2a.)

030 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Quote:
Folding@Home? Yes.

Let's save the planet! .. or at least get a leg up on some incurable disease.

031 ~~~~~~~~~~~~~~~~~~~~~~~~~~
At this point, things churn about, and everything should get properly configured for you.

I noticed here, on my Machine #1 that there were some warnings about attempting to get data from debian.org.. and I knew that there was something going wrong with my networking.

To fix this on my Machine #1, I used <Ctrl-Alt-F1> to get me into a terminal session, and I corrected the networking

My #1 guess is that it is attempting to run the Patcher.. (SSH into the machine or use <Ctrl-Alt-F1> to get to a terminal session and log in as root)
Code:
/usr/local/bin/LivePatch.sh


When I manually run the patcher, I find that I am up-to-date.

032 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Here's where the fun really gets going. The machine(s) begins the switch-over to TV-out for my PVR-350 card. I get the INIT: Id "c7" respawning too fast: disabled for 5 minutes error message.

In his hint notes under "Known Issues" section 2.1.3), tjc calls for a solution to the PVR-350 problem and tags a ??? to the issue. Although it's not pretty, I found that if I get to a terminal session as root and execute
Code:
/usr/local/bin/setup_350.sh

followed by a reboot (Using <Ctrl-Alt-Bksp> doesn't do it.) the switch-over to the PVR-350 completes and the problem goes away. I make no other adjustments that tjc suggests.

Reminders:
Use <Ctrl-Alt-F1> to switch to a terminal session.
Use <Alt-F7> to switch back to the GUI desktop

034 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Check the log file:
[code]more /var/log/mythtv/KnoppMyth-run.log[code]

035 ~~~~~~~~~~~~~~~~~~~~~~~~~~
[code]apt-get update[/code]

036 ~~~~~~~~~~~~~~~~~~~~~~~~~~
The last thing to do is test out the functionality.
1. check out the existing recordings
2. test the "Watch TV"
3. check out the listings/schedule
4. does the remote for the TV card work properly?
5. does the IR blaster channel change work properly?

037 ~~~~~~~~~~~~~~~~~~~~~~~~~~
I found that the remote for the TV card worked!

038 ~~~~~~~~~~~~~~~~~~~~~~~~~~
My IR Blaster did not work (both machines).
1. in /etc/irblaster/channel_change.sh, I found that the parameter REMOTE_NAME= was blank.
so I fixed it to [code]REMOTE_NAME=DCT2244[/code]
2. my /etc/irblaster/irblasterd.conf file was completely missing.
so I copied my backup copy of the file into /etc/irblaster .. Problem solved. This suggests that my selection of the Motorola DCT2244 during the upgrade does not work. ???

tjc: Phase 3 - Post install setup:
039 ~~~~~~~~~~~~~~~~~~~~~~~~~~ Phase 3
Review the recommendations in tjc's Hints for Post Installation topics.

040 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Two problems that came up on my machines under R5F27 that seem to be persistent with R5.5:

1. Occasional screen lockup while watching or editing a recording. The only way out is to reboot the machine. Hopefully, rebooting from the frontend menu (if that can be accessed) or from an SSH session. Hitting the hardware reset button or system power switch can cause filesystem or database corruption. (that would be bad!) ???

2. Creating a DVD of recordings via nuvexport or "archive" results in a recording that has video image but no sound. This seems to be a problem with ffmpeg. A direct playback of the mpg file is without sound. One wild guess is that my ALSA config was corrupted at some point in time in the past, and the upgrade just passed this problem along. (The /var/lib/alsa folder is empty.) The mythbackup/checkbackup reported a missing /var/lib/alsa/asound.state file.
This is a problem on both machines. Some older mpg files have sound and will write to a DVD properly. ??? (certainly worth of a separate thread)

I hope this is useful to someone. Again, I invite any comments, corrections or additions. I have made some attempt to plug in the scripts at points that would allow a recofiguration of a step. Most of the scripts can be seen by executing:
[code]ls -l /usr/local/bin/*.sh[/code]

Best Wishes to All.

_________________
// Brian - Hardware:
ASUS P5P800 - P4 3Ghz, 500 GB PATA HD
ASUS P5K-V - P4 Core2 Duo, 500 GB SATA HD
Hauppauge PVR-350, IR Blaster, Comcast Digital Cable
http://tech.groups.yahoo.com/group/KnoppMyth/
KnoppMyth R5F27 >> R5.5


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 20, 2008 10:41 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
The warnings about missing files like this are harmless:
Code:
/bin/tar: ./var/lib/alsa/asound.state: Not found in archive

The backup list includes a number of optional things like this, where if people have them, they should be saved and restored, but if they don't it doesn't matter.

Auto-upgrade should work on /dev/sda these days, on the other hand it's possible there was some inconsistency between the device names in your old /etc/fstab and the the way the new kernel sees your SATA drive. Cecil actually reverted a change that would have made even PATA drives be seen as /dev/sd? due to the huge potential confusion it would cause.

OBTW - you really shouldn't need to make extra copies of things. I didn't see anything which shouldn't have already been in your backup from the standard list, but you can always add things via /myth/backup/backup.list as described here http://knoppmyth.net/phpBB2/viewtopic.p ... 490#112490 There are even directions for extracting extra files from the backup as needed. (There are actually a couple scripts I keep in /myht/backup myself so that I can run them during during phase 2a, but they're just always there.)

Oh! As for the list of add ons... I've actually posted some suggestions in the past for building a list, unfortunately I don't have a link handy. Among the suggestions were using apt-get or dpkg to generate a list of installed debs and using find with it's -newer option to look for things which might have been changed since the install...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 25, 2008 9:34 pm 
Offline
Joined: Fri Jul 29, 2005 1:22 am
Posts: 232
Location: SF East Bay, CA
tjc wrote:
OBTW - you really shouldn't need to make extra copies of things. I didn't see anything which shouldn't have already been in your backup from the standard list, but you can always add things via /myth/backup/backup.list as described here http://knoppmyth.net/phpBB2/viewtopic.p ... 490#112490 There are even directions for extracting extra files from the backup as needed.

tjc: Thanks for the input.. That's a great link for the details on backup & restore. The idea behind the redundant copy is just that it is an easy snapshot for "what worked when I was running R5F27". Not too much disk space wasted!

OK, here's a bit more.. additional Post Install setup...

041 ~~~~~~~~~~~~~~~~~~~~~~~~~~
I noticed that in a short few days, the two machines had drifted apart in the time dimension. So I re-studied the time sync notes:
http://mysettopbox.tv/phpBB2/viewtopic. ... ht=ntpdate

Adapted from http://www.knoppmythwiki.org/index.php?page=TimeSyncNZ

Note: ntpdate is installed as part of R5.5.

Logged in as "root", Create a Time Sync script:
Code:
vi /root/setTime.sh

(or you could use your favorite editor!) Add the code:
Code:
#!/bin/sh

#

echo ============================================== >> /var/log/setTime.log
echo STARTING setTime.sh SCRIPT FILE >> /var/log/setTime.log
date >> /var/log/setTime.log
echo ============================================== >> /var/log/setTime.log
/usr/sbin/ntpdate -u pool.ntp.org >> /var/log/setTime.log 2>> /var/log/setTime.log
echo ============================================== >> /var/log/setTime.log
echo COMPLETE setTime.sh SCRIPT FILE >> /var/log/setTime.log
date >> /var/log/setTime.log
echo ============================================== >> /var/log/setTime.log

Set the permission on the script: (edit: Let's not give worldwide permission!)
Code:
chmod 755 setTime.sh

Set it up in cron to run daily:
Code:
crontab -e

with code:
Code:
0 16 * * * /root/setTime.sh

<< edit: add in a couple of steps, after an apt-get update >>
042 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Very Optional! - GUI tool for apt.
Code:
apt-get install synaptic

043 ~~~~~~~~~~~~~~~~~~~~~~~~~~
Very Optional! - GUI Text Editor.
Code:
apt-get install gedit


Last edited by BluesBrian on Mon Jul 28, 2008 8:08 am, edited 2 times in total.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 27, 2008 10:20 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi
For the time, ntpd shoud be running however if the clock has an excessive amount of error, it will take a while to correct (days).

What I do is add to /etc/init.d/bootmisc.sh at the very bottom this line:

ntpdate -u pool.ntp.org

you should be able to get results with this also.

ntpdate -u us.pool.ntp.org

This will tweak the clock on boot / reboot so that ntpd can keep it honest.
Run the the two suggestions from the command line as root to confirm the syntax, then pick your preference. I get this for a run:
ntpdate -u us.pool.ntp.org
28 Jul 00:18:09 ntpdate[21648]: adjust time server 69.31.13.210 offset 0.023650 sec

If it still falls out of the correct window, there are some video cards that can cause the time slippage issue.
Mike


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 28, 2008 1:25 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
BluesBrian wrote:
Set the permission on the script:
Code:
chmod 777 setTime.sh

Please don't do that, or if you're going to do it, at least keep it in the privacy of your own home, rather than it public where impressionable minds might be influenced by your bad example.

When setting permissions please use the appropriate ones for the job, and If you can't remember the right octal values to do that for the love of Cthulu at least use the symbolic ones. In this case you want:
Code:
chmod a+rx setTime.sh # Add read and execute permissions for all


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 28, 2008 7:47 am 
Offline
Joined: Fri Jul 29, 2005 1:22 am
Posts: 232
Location: SF East Bay, CA
tjc wrote:
When setting permissions please use the appropriate ones for the job, and If you can't remember the right octal values to do that for the love of Cthulu at least use the symbolic ones. In this case you want:
Code:
chmod a+rx setTime.sh # Add read and execute permissions for all

Good point. "755" should do the trick! Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 28, 2008 8:04 am 
Offline
Joined: Fri Jul 29, 2005 1:22 am
Posts: 232
Location: SF East Bay, CA
mjl wrote:
What I do is add to /etc/init.d/bootmisc.sh at the very bottom this line:
ntpdate -u pool.ntp.org
Good Suggestion! Thanks Mike! :D


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 29, 2008 5:42 am 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi,
Glad I could offer something useful!

Please note that this does not work for dialup but can be added in the dialup script to tweak the time each call. I have been doing that for years.

Mike


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: Google [Bot] and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu