[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

9976.0. "Trouble setting date to 31-DEC-1999" by FORTY2::JONES (Neil) Thu May 29 1997 09:04

    
    Hello,
    
    I am trying to set the system date on my Alphastation 255 so that
    it thinks its 31-DEC-1999. I don't seem to have had much success so far
    so I was wondering whether someone could point out my mistake.
    
    I am using UNIX V4.0B
    
    Here's what I type...
    
    # shutdown now              ! to go to single user mode
    # date # date 199912	! 31-DEC-1999 12:00
    # date			! to check I set the date correctly, and it
    				! is correct!
    # mount -u /	        ! because the man page said I should if
                                ! changing the year
    # shutdown -r now           ! to reboot
    
    I log in, via the Common Desktop Environment, When my system comes back 
    up but when I type the date command it shows good olde 29-MAY-97.
    
    Neil
T.RTitleUserPersonal
Name
DateLines
9976.1should have said...FORTY2::JONESNeilThu May 29 1997 09:109
    
    Something wierd happened in the editor the date commands should say
    
    # date 199912311200
    # date
    
    Thanks
    
    Neil
9976.2up to singeluser-modeNNTPD::"[email protected]"Lucius SchmidThu May 29 1997 09:3412
Hi

Is it possible that you go from the multi-user mode down to the single-user
mode?
But you have to go up from the console to the single-user mode to update the
new 
year into the superblock on the system disk.
The other steps are correct.

Regards
Lucius
[Posted by WWW Notes gateway]
9976.3rdate or ntpNNTPD::"[email protected]"Lucius SchmidThu May 29 1997 09:497
Hi

An other possibility is that you run ntp or rdate is configered!

Regards
Lucius
[Posted by WWW Notes gateway]
9976.4how do I boot to single user mode?FORTY2::JONESNeilThu May 29 1997 09:5517
    
    Lucius,
    
    Thanks for the quick response. 
    
    So if I understand I have to do...
    
    # shutdown -h now
    >>> b
    You are now in single user mode
    # date 199929051200
    
    But what's the boot command I need to get to single user mode?
    
    Thanks
    
    Neil
9976.5boot to singleNNTPD::"[email protected]"Lucius SchmidThu May 29 1997 10:0120
Hi

Boot to single-user mode

>>>b -fl s

fl=flag  s=single-user

then in single-user mode

# date 199929051200
# mount -u / 

init 3 to multi-user mode or reboot or what you want.

Regards
Lucius


[Posted by WWW Notes gateway]
9976.6finder.uvo.dec.com::COFFEYJLa Feline Flooz - a unix catThu May 29 1997 11:597
># date 199929051200
># mount -u / 

I would guess those two go the other way around - 
otherwise you're writing the date on a read only 
file system... if it trys to record it anywhere then it 
will fail.. 
9976.7HELIX::SONTAKKEThu May 29 1997 12:4721
    Talking about date, I had really tough time setting up the timezone on
    X4.0D system.  System complained that I had not set the timezone and
    asked to consult zic man pages.  Having worked with UNIX for only 5
    years, I could not figure out how to change the timezone from the zic
    command.
    
    The timezone command itself would ask all the right questions but would
    NEVER change the timezone.  I tried it from both multi and single user
    mode.
    
    After looking at another system with correctly configured timezone, I
    was able to deduce that system needed a file called 
    /etc/zoneinfo/localtime.  When I more'd /etc/zoneinfo/localtime on a
    correctly setup system, it was a binary file.  Fortunately,
    ls -l /etc/zoneinfo/localtime showed me that it was a softlink to 
     ./US/Eastern and then the light bulb went on!
    
    The only thing more difficult than this is setting up your Exchange
    account :-)
    
    - Vikas
9976.8thanksFORTY2::JONESNeilThu May 29 1997 12:5316
    
    re: .6
    
    I thought that also, however it made no difference.
    
    The man page date(1) says...
    
    "enter the command mount -u / *after* you enter a date containing a new
    year"
    
    So if you're correct then there's a documentation bug.
    
    By the way, thanks for all the suggestions I'll let you know how I get
    on...
    
    Neil
9976.9my date didn't show up :-)FORTY2::JONESNeilThu May 29 1997 13:2125
    
    Hello,
    
    I have booted single-user and done the date command and init 3.
    I have done this twice, once with the mount command first and once
    with the mount command second.
    
    When I get to my terminal window the date is still today and not 1999.
    
    I have not configured NTP and as far as I know I am not running rdate.
    I did a 
    
    ps auxw | grep rdate
    ps auxw | grep ntp
    
    and no daemons showed up.
    
    I checked the log files in /var/adm/syslog.dated but didn't find any
    clues.
    
    I am going to back and double check everything but there must be
    something else that I am not doing. Do I need to add any flags to
    the date command?
    
    Neil
9976.10tomorrow never comes...FORTY2::JONESNeilThu May 29 1997 13:275
    
    I just tried setting the date to tomorrow. Less ambitious than 1999 but
    it was worth a try. This didn't work either...
    
    Neil
9976.11What are your boot messagesNNTPD::"[email protected]"Brian HaleyThu May 29 1997 14:4115
Hi,

Have you sat there and watched the machine boot and see all the messages
go by?  If so, did you ever see the date get printed out?  Usually when
the date is changed, someone prints the new date out.

If you have rdate configured you won't see a daemon running, it's just a
command.  Check /etc/rc.config for RDATE_CONF=YES.

The only way to totally guarantee another machine isn't giving you the
time is to disconnect the network cable.  It might take a long time to
boot (daemons don't like it), but it would help isolate the problem.

-Brian
[Posted by WWW Notes gateway]
9976.12Sum it up (may be)NNTPD::"[email protected]"SriThu May 29 1997 17:52132
Hi,
	
When you do shutdown, your root partition is still read and write.
You would rather want to come UP to single user mode from
console mode, thus making sure that root partition is
mounted read only then setting the date command works alright. 
There is an article available in STARS database by Martin Moore.

Enclosing it over here..

TITLE: [dUNIX] Steps on Changing the Year Portion of the System D
ate
  EDITORIAL_REVIEWED,FIELD_READABLE,NOFLASH,TECHNICAL_REVIEWED,READY)
Copyright (c) Digital Equipment Corporation 1995. All rights reserved.

PRODUCT: Digital UNIX [R] Versions 3.0 and higher

SOURCE: Digital Equipment Corporation

PROBLEM:

The system date is sometimes in the year 2036 (or 2020 or some other
year).  After attempting to change the year with the date
m command, the
wrong year returns after the next reboot.



SOLUTION:

Digital UNIX stores the year portion of the date in the superb
lock
of the root filesystem.  A date of 2020 or 2036 can be generated by
incorrectly entering the year portion of the date as '00'.  Th
e
correct format is

    date MMddhhmm.ssyy where:

    +  MM is the month number (01=January).

    +  dd is the number of the day in the month.

    +  hh is the hour in the day (using a 24-hour clock).

    +  mm is the minute number.

    +  ss is the number of seconds.

    +  yy is the last two numbers of the year.

   For example, to set the date to December 25, 1995, 1:30 pm, the command
   should be:

        # date 12251330.0095

   However, entering

        # date 12251330.0000

   will cause a future date (usually 2020 or 2036) to be set.


   To correct the date, the superuser should reset the date in singl
e-
   -user mode only.  Changing the date in multiuser mode could cause
   the creation and modifications dates for user files to be inconsistent.

   As the man page for 'date' notes, to change the year, the s
ystem
   disk must be updated with the new year information.  To change
   the year, in single-user mode enter the command

       mount -u /

   after you enter a date containing a new year.  The mount -u / com
mand
   writes the new year into the superblock on the system disk.  Note also
   that the root filesystem is now mounted read/write.

   The man page does not mention one important point: the root filesystem
   must be in read-only mode for the superblock to be updated.  As such,
   it is necessary to enter single-user mode directly from a halted state.
   Shutting down to single-user mode from multi-user mode leaves the root
   filesystem mounted read/write; as such, 'mount -u /' will not update
   the superblock, and the new year information will not be stored.

   The following sequence of steps can be used to change the system yea
r.

   NOTE: It is important to perform these steps in exactly this sequence.

        # shutdown -h now               ! shutdown and halt the system
           (system shuts down)
           ... system halted

        >>> BOOT -FL S                  ! boot to single-user mode
            (system boots to single-user)
        INIT: single-user mode

        # date                          ! show incorrect date

        Wed Dec 14 13:18:26 EST  2036

        # date -n 11081320.0095         ! set new date with differ
ent year

        # date                          ! verify new date
        Wed Nov  8 13:20:04 EST 1995

        # mount -u /                    ! update system disk with new year

        # sync                          !
        # sync                          ! halt the system again
        # halt                          !

        >>> BOOT                        ! reboot normally
            (system boots)

        # date                          ! verify date is set corre
ctly
        Wed Nov  8 13:23:16 EST 1995    ! after reboot


   It is also worth noting that the console 'date' command has no effect
   on the system date in Digital Unix.

[R]  UNIX is a registered trademark in the United States and other countries
     licensed exclusively through X/Open Company Limited.


[Posted by WWW Notes gateway]
9976.13it is being zapped by the network...FORTY2::JONESNeilFri May 30 1997 07:1291
    
    Pulling the network cable out did the trick. 
    
    The problem is that the next time I reboot with the network cable
    plugged-in the date resets itself.
    
    I checked /etc/rc.config for rdate and its not specified. I do however
    have DECnet OSI installed, so could it be DTSS that is causing me the 
    problem?
    
    After setting the date to Jan 1 1999 with the network cable out, I
    plugged it in and did a reboot. I checked /var/adm/messages and I saw 
    the following...

    Note that the date suddenly changes between dna_xti being configured
    and the SuperLat entry.

    Neil
    
-------------------------------------------------------------------------
Jan  1 12:27:24 segvio vmunix: Alpha boot: available memory from 0x1048000
to 0x
5ffe000
Jan  1 12:27:24 segvio vmunix: Digital UNIX V4.0B  (Rev. 564); Thu Apr 24
17:02:
35 GMT 1997
Jan  1 12:27:24 segvio vmunix: physical memory = 96.00 megabytes.
Jan  1 12:27:24 segvio vmunix: available memory = 79.72 megabytes.
Jan  1 12:27:24 segvio vmunix: using 361 buffers containing 2.82 megabytes
of me
mory
Jan  1 12:27:24 segvio vmunix: AlphaStation 255/300 system
Jan  1 12:27:24 segvio vmunix: DECchip 21071
Jan  1 12:27:24 segvio vmunix: 82378IB (SIO) PCI/ISA Bridge
Jan  1 12:27:24 segvio vmunix: Firmware revision: 6.4
Jan  1 12:27:24 segvio vmunix: PALcode: OSF version 1.46
Jan  1 12:27:24 segvio vmunix: pci0 at nexus
Jan  1 12:27:24 segvio vmunix: psiop0 at pci0 slot 6
Jan  1 12:27:25 segvio vmunix: Loading SIOP: script 801800, reg 82008000,
data 4
06ef730
Jan  1 12:27:25 segvio vmunix: scsi0 at psiop0 slot 0
Jan  1 12:27:25 segvio vmunix: rz0 at scsi0 target 0 lun 0 (LID=0) (DEC    
RZ26
N    (C) DEC 1103)
Jan  1 12:27:25 segvio vmunix: rz1 at scsi0 target 1 lun 0 (LID=1) (DEC    
RZ28
D    (C) DEC 0010)
Jan  1 12:27:25 segvio vmunix: rz4 at scsi0 target 4 lun 0 (LID=2) (DEC    
RRD4
6   (C) DEC  0557)
Jan  1 12:27:25 segvio vmunix: isa0 at pci0
Jan  1 12:27:25 segvio vmunix: gpc0 at isa0
Jan  1 12:27:25 segvio vmunix: ace0 at isa0
Jan  1 12:27:25 segvio vmunix: ace1 at isa0
Jan  1 12:27:25 segvio vmunix: lp0 at isa0
Jan  1 12:27:25 segvio vmunix: fdi0 at isa0
Jan  1 12:27:25 segvio vmunix: msb0 at isa0
Jan  1 12:27:25 segvio vmunix: tga0 at pci0 slot 13
Jan  1 12:27:25 segvio vmunix: tga0: depth 8, map size 2MB, 1280x1024
Jan  1 12:27:25 segvio vmunix: tga0: ZLXp2-E, Revision: 34
Jan  1 12:27:25 segvio vmunix: tu0: DECchip 21040-AA: Revision: 2.4
Jan  1 12:27:25 segvio vmunix: tu0 at pci0 slot 14
Jan  1 12:27:25 segvio vmunix: tu0: DEC TULIP Ethernet Interface, hardware
addre
ss: 00-00-F8-24-A4-6D
Jan  1 12:27:25 segvio vmunix: tu0: console mode: selecting 10BaseT (UTP)
port:
half duplex
Jan  1 12:27:25 segvio vmunix: lvm0: configured.
Jan  1 12:27:25 segvio vmunix: lvm1: configured.
Jan  1 12:27:25 segvio vmunix: kernel console: tga0
Jan  1 12:27:26 segvio vmunix: dli: configured
Jan  1 12:27:26 segvio vmunix: ATM Subsystem configured with 1 restart
threads
Jan  1 12:27:26 segvio vmunix: ATM UNI 3.x signalling: configured
Jan  1 12:27:26 segvio vmunix: ATM IP interface: configured
Jan  1 12:27:29 segvio vmunix: Node ID is 00-00-f8-24-a4-6d (from device
tu0)
Jan  1 12:27:29 segvio vmunix: dna_netman: configured
Jan  1 12:27:30 segvio vmunix: Node UID is
582d83de-a175-11d2-989e-0000f824a46d
Jan  1 12:27:31 segvio vmunix: wan_utilities: configured
Jan  1 12:27:32 segvio vmunix: ctf_base: configured
Jan  1 12:27:32 segvio vmunix: dna_dli: configured
Jan  1 12:27:33 segvio vmunix: dna_base: configured
Jan  1 12:27:53 segvio vmunix: dna_xti: configured
May 30 09:27:24 segvio vmunix: SuperLAT. Copyright 1994 Meridian Technology
Corp
. All rights reserved.