9iAS R2 Automatic Startup at Boot time on Windows

How to successfully start the 9iAS R2 Application Server at boot time.
Many of you are still struggling with the problem of 9iAS R2 not automatically starting up properly when your system is restarted. I've been fighting this issue for several weeks and have found the problems, and pitfalls, involved with fixing it. It really is a race condition of things trying to start up before something it depends on is fully functioning, or some application starting out of sequence.
There is a bug associated with this problem; BUG 2511270 ( 9IASV2 Need Ability to Restart All Components in Instance After a Reboot). The bug report itself has very little useful information in it other than to say it doesn't work, and manually starting the components is the only known fix. If you're like me. this isn't a good enough answer.
Your mileage may vary.
My configuration has a 9.2.0.1 customer database, and a 9.0.1.3.1 infrastructure database that is also the application server database, including portals, all installed on the same system which is a Pentium 4, Windows 2000 machine, with 1.5GB of memory. I only use a single LISTENER, which runs out of the 9.2 DB ORACLE_HOME.
Chapter 5 (Starting and Stopping the Application Server) of the Oracle9i Application Server Administrator's Guide shows all of the commands necessary, in the proper order, to manually start the infrastructure and application server. Unfortunately, there is also some incorrect information in this document.
Part 1c in the section Starting an Infrastructure Using Commands on Windows, using SQLPlus to connect to and start the database, does not work unless oracle.exe is already running (which means that you recently shutdown the database by command, not with "services>stop"). If your system is rebooting, oracle.exe is not running. This exact same information is documented in the Database Administrators Guide, Chapter 4, Starting a Database. If you don't have these manuals handy the offending commands are as follows:
ORACLE_HOME\bin\sqlplus /nologsql> connect sys/password_for_sys as sysdba
sql> startup
sql> quit
Since we can't put some variant of the above in a command script to manually start the databases and wait for it to open, the only option left is to let the databases come up in "automatic" mode when the system boots, and run the remaining commands when they are open. If your system is like mine, that can take several minutes, even after you've logged on and gotten your first cup of coffee.
If you set up a command script to run at startup, you don't have any control over when the script gets run, more than likely, in this case, before the databases are open. Unfortunately, Microsoft does not have anything resembling a sleep (timer, wait, delay, etc) command that can be used in a script. There may be something somewhere, but I can't find it. So I wrote one in Perl, which does have a sleep command. You can use anything you have available to you that will function as needed. We obtained our Perl distribution from http://aspn.activestate.com/ASPN/Perl.
The next issue has to do with starting the Oracle Internet Directory. The documentation shows two commands to execute, but in reality, only the first one is required, it automatically takes care of the second one. Refer to the command file below for the correct one.
The last issue deals with running the dcmctl commands. If you run these commands one at a time in a command window, you won't notice anything askew. If you run them, as shown, in a script, they will stop execution of the script when they complete, and there will be no indication that anything wrong has happened. The CMD.exe still exists, it just isn't running. They must be run in there own cmd command as shown below.
Now, let's review the steps necessary to get all this to work.
Put the two scripts shown below in there target directories and edit any necessary changes for your system.
In Start>Settings>Control Panel>Administrative Tools>Services set the OracleServiceSID's and the OracleOraHomeTNSListener to Automatic Startup Type. All other Oracle* services should be set to Manual.
In Start>Programs>Accessories>System Tools>Scheduled Tasks double click on the Add Scheduled Task item,
select Next,
Browse to where your startup script resides,
double click the file name,
select "When my computer starts",
select Next,
Enter a user name and password (that has ORA_DBA privileges)
select Next, then Finish.
Uncomment the first exit in the iasStartup.cmd script.
Reboot your system.
Compare the database open time stamp in each database alert log to the time recorded in the iasStartup.log file to determine you first time delay. Add 10-20 seconds or more to this difference just to be safe. If you add services at a later time, this number may need to be increased.
Edit the iasStartup.cmd file to include this time delay for the first sleep command and comment out the first exit command.
Reboot your system.
After several minutes, all infrastructure and application server processes should be up and running. You can check this in several ways; Look at the log file to see if all commands were run, Look at the Windows Task Manager to see if all expected tasks are running, Look at Services to see what is running. Finally, you can look at the Infrastructure Enterprise Manager Website and click on each instance to determine the current status of each system component. On mine, the component Portal:portal:7779 always shows as down but in reality it is functioning.
The following command script only starts the minimum set of processes that I require. Your requirements may be different so refer to the documentation for additional commands.
Enjoy.
******** iasStartup.cmd ********
REM # iasStartup.cmd
REM # Command script to start the infrastructure and application server at system boot
REM # Mike Bukaty
REM # Sandia National Laboratories
REM # [email protected]
REM # set default directory that contains the log and sleep.pl files.
cd E:\Oracle\admin
echo Starting iasStartup.cmd > iasStartup.log
time /t >> iasStartup.log
REM # Uncomment the following command to determine the time delay for your system
REM # exit
REM # This delay is determined by looking at the times from the alert logs
REM # for when the database was opened and the time recorded above.
REM # SLEEP is a perl script to do just that (in seconds) since Windows doesn't have one.
sleep.pl -delay=120
time /t >> iasStartup.log
REM #Start the infrastructure first
REM #The SID for the infrastructure must be set
set ORACLE_HOME=E:\Oracle\as9inf
set ORACLE_SID=iasdb
echo Starting as9inf oidmon >> iasStartup.log
%ORACLE_HOME%\bin\oidmon start
echo Starting as9inf EMWebsite >> iasStartup.log
net start Oracleas9infEMWebsite
REM # Have to wait for all of the website process to finish
sleep.pl -delay=40
REM # All calls to dcmctl must be in there own CMD environment,
REM # or they will halt this one when they complete
echo Starting as9inf dcmctl ohs >> iasStartup.log
cmd /c %ORACLE_HOME%\dcm\bin\dcmctl start -ct ohs
sleep.pl -delay=5
echo Starting as9inf dcmctl OC4J_DAS >> iasStartup.log
cmd /c %ORACLE_HOME%\dcm\bin\dcmctl start -co OC4J_DAS
REM # Start the application server
set ORACLE_HOME=E:\Oracle\ora9ias
echo Starting ora9ias webcachectl >> iasStartup.log
%ORACLE_HOME%\bin\webcachectl start >> iasStartup.log
echo Starting ora9ias dcmctl ohs >> iasStartup.log
cmd /c %ORACLE_HOME%\dcm\bin\dcmctl start -ct ohs
sleep.pl -delay=10
echo Starting ora9ias dcmctl OC4J >> iasStartup.log
cmd /c %ORACLE_HOME%\dcm\bin\dcmctl start -ct OC4J
REM # The above command starts all existing OC4J processes.
REM # You can now stop any that aren't necessary.
echo Stopping ora9ias dcmctl OC4J_Demos >> iasStartup.log
cmd /c %ORACLE_HOME%\dcm\bin\dcmctl stop -co OC4J_Demos
time /t >> iasStartup.log
echo Finished iasStartup.cmd >> iasStartup.log
exit
******** sleep.pl ********
#!/usr/local/bin/perl
## Author: Mike Bukaty
##               Sandia National Laboratories
##               [email protected]
## Program: sleep.pl
$| = 1;
use strict;
use Getopt::Long;
Getopt::Long::Configure("no_ignore_case");
GetOptions(
"delay=s" => \ my $delay,
# Set default options
if( not defined($delay) ) { $delay = 1; }
sleep $delay;
exit 1;

New information:
When I originally wrote this, the command script worked as advertised. That was yesterday. I've since had to add the following lines just BEFORE the call to start the oidmon.
echo Starting as9inf oidctl >> iasStartup.log
%ORACLE_HOME%\bin\oidctl server=oidldapd configset=0 instance=1 start
Sometimes me thinks that Oracle reconfigures itself at night when I'm not watching.
Enjoy.

Similar Messages

  • Oracle automatic startup at boot time

    Hello all,
    I need one help.I need oracle db server automatic startup at boot time in solaris 10 environment.
    I need to know also location of ORATAB .
    Thanks in advance.

    Oh no, it is not very urgent.
    In a forum of volunteers there is no such thing as 'very urgent', and using 'very urgent' is considered insulting and rude.
    It is even more insulting as you expect to do me what you refuse to do: consult the documentation.
    As you failed to mention a version I can't even look up the documentation, nor will I do that: I'm not going to stand in voluntarily to do for either people for free what they get paid for: their work
    Sybrand Bakker
    Senior Oracle DBA

  • 2011 MacBook progress bar on startup, increased boot time (15-20mins)

    A few months ago I was given a MacBook through my school, and it's been operating fine up until now.
    Within the last week, I have noticed extended load time for OSX and a grey loading bar below the usual apple logo and spinning ring on startup.
    Luckily for me, I have bootcamped this MacBook with Windows 7, and am using that operating system to write this message.
    I did some research and found that often what caused the grey loading bar are problems with the hard disk, which can be solved by doing a disk repair with the OSX Install CD, but when this is done, i recieve the error "Incorrect number of thread records," and it tells me that the utility is unable to repair the disk.
    I need to use OSX at school, because it's where all of my schoolwork is stored, and i'd like to be able to use it at a reasonable speed.
    Any help would be much appreciated.
    John

    The disk may have a few bad sectors, probably where the OS files are stored. You can try to repair it using a third party utility such as Disk Warrior. But be sure to backup everything first.

  • Automate startup/shutdown thru script on windows

    WIndows 2003
    oracle 9.2.0.7
    I am new to oracle on windows.
    Is there way to automated startup/shutdown database thru script on windows?
    I want to schedule this task at perticuler time.
    Thanks

    You have to come up with your own script to shutdown.
    There's a sample here
    [Start / Shut Oracle with a Click (Windows Script) |http://it.toolbox.com/wiki/index.php/Start_/_Shut_Oracle_with_a_Click_(Windows_Script)]
    Edited by: yingkuan on Oct 9, 2008 5:05 PM

  • Automatic startup of AIR application on Windows startup

    Does AIR provide any mechanism to make my AIR application
    startup automatically when Windows starts up?

    Yes. See this topic in the AIR documentation:
    For Flex developers:
    http://help.adobe.com/en_US/AIR/1.5/devappsflex/WS5b3ccc516d4fbf351e63e3d118676a5d46-8000. html#WS5b3ccc516d4fbf351e63e3d118666ade46-7cd5
    For Flash developers:
    http://help.adobe.com/en_US/AIR/1.5/devappsflash/WS5b3ccc516d4fbf351e63e3d118676a5d46-8000 .html#WS5b3ccc516d4fbf351e63e3d118666ade46-7cd5
    For HTML developers:
    http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118676a5d46-8000. html#WS5b3ccc516d4fbf351e63e3d118666ade46-7cd5

  • How do I AUTOMATICALLY (i.e., every time) restore windows & tabs when re-opening Firefox 5.0?

    If I close Firefox, I want the previous windows and tabs to automatically reappear. I does not do this now.

    You should be able to set this in options.
    orange Firefox button ''or'' Tools menu > Options > General tab
    When Firefox starts => Show my windows and tabs from last time
    Does that work?

  • Y40 Windows 10 post update boot time problem

    Hey Guys, I have a Y40 with 8GB RAM and 2 GB AMD Graphics and I updated my Windows 8 to Windows 10. I encountered the Power error which was dealt with earlier in another thread. I was able to fix it. Thanks. Now, I have another boot up related issue.I used to get 25-30 second boot time with Windows 8. But now, it takes 3 minutes to get to the login screen and another 3 minutes to start doing anything on the desktop. I get the normal lenovo log in screen once I press the power button. Then, the screen becomes black and stays that way for about 2 minutes doing nothing. I get the cursor that can move around and that is it. Even after login, It takes a long time to settle down and let me start working. I checked the startup menu and pushed the startup items to the bare minimum. Is anybody else experiencing the same problems?  If so Is there a way I can fix it?

    I'll add to this by saying I am having similar lengthened boot and login times, but it appears that since resolving the graphics driver issue my boot times have sped up. Login times still take about 30 seconds longer than before. I'm assuming this is a Windows related issue, not a hardware-related issue.  Are you using a fusion drive or just a straight-up hard drive? I'm assuming my laptop is booting/logging in faster now because the fusion service Lenovo provides is learning what should be assigned to flash storage and what should be kept on the HDD. Give it another day or two and see if you notice a speed increase at all.

  • Windows partition ignored by macos, long boot times

    So, after boot camp refused to resize my Windows partition, I decided to use the old standby of using GParted off of a linux live cd. I just kinda assumed there would be no problem, but after the fact I've discovered there could be some problems. The most specific thing I can find is that the "msftrees" flag will be set on the partition you make and that it can also cause some trouble with updating the GPT and MBR.
    Anyway, here are my symptoms:
    1. MacOS pretty much ignores the Windows partition (It's Windows 7). It doesn't appear in the startup menu at all and I don't have access to the drive. You might be able to mount it manually, I haven't tried.
    2. Very slow boot times for windows. You can select the option to boot from the Windows partition by holding down option at boot, but the boot takes a very long time. When you select the windows partition, it goes to a blank screen with a blinking underscore character in the upper left for 2~3 minutes and then finally shows the windows loading screen and continues to boot normally.
    Here is my partition layout:
    * Report for internal hard disk *
    Current GPT partition table:
    # Start LBA End LBA Type
    1 40 409639 EFI System (FAT)
    2 409640 560668499 Mac OS X HFS+
    3 560668500 625137344 MS Reserved
    Current MBR partition table:
    # A Start LBA End LBA Type
    1 1 409639 ee EFI Protective
    2 409640 560668499 af Mac OS X HFS+
    3 * 560668500 625137344 07 NTFS/HPFS
    MBR contents:
    Boot Code: Unknown, but bootable
    Partition at LBA 40:
    Boot Code: None (Non-system disk message)
    File System: FAT32
    Listed in GPT as partition 1, type EFI System (FAT)
    Partition at LBA 409640:
    Boot Code: None
    File System: HFS Extended (HFS+)
    Listed in GPT as partition 2, type Mac OS X HFS+
    Listed in MBR as partition 2, type af Mac OS X HFS+
    Partition at LBA 560668500:
    Boot Code: Windows BOOTMGR (Vista)
    File System: NTFS
    Listed in GPT as partition 3, type MS Reserved
    Listed in MBR as partition 3, type 07 NTFS/HPFS, active
    Thanks in advance.

    Check out this thread, I posted a possible solution.
    http://discussions.info.apple.com/thread.jspa?threadID=2224948

  • How to check registry to calculate system boot time ?

    Recently i want to read the registry of "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power" to calculate the system boot time.But i found it is different between Windows 8 and Windows 7.In Windows 8,i can read the key
    of FwPOSTTime to get the bios post time,and read the key of TotalHibernateTime to get the boot time.But they do not exist in Windows 7.Can i find similar key to get the system boot time  in Windows 7?tks.

    Hello,
    The Windows Desktop Perfmon and Diagnostic tools forum is to discuss performance monitor (perfmon), resource monitor (resmon), and task manager, focusing on HOW-TO, Errors/Problems, and usage scenarios.
    Since your post is off-topic, I am moving it to the
    off topic forum.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book:
    Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • Arch vs Others Boot Time

    When I had Fedora 11 on my box, it booted in roughly 15 seconds. I have a Macbook 4.1 Do any recent converts have any knowledge on the difference between fedora 11 and ubuntu boot times in comparison to arch?
    Last edited by duke11235 (2009-10-14 04:59:04)

    For me, Arch takes about 15 seconds on a 1GHz Athlon, with an additional 10-30 seconds to gain a network connection with net-profiles.
    Ubuntu 9.04 takes about 1 minute to boot, not establishing a connection.  Fedora 10 takes about 1:15, also not establishing a connection (1 minute for Fedora 11).  OpenSUSE 11.1 takes about 1:30-2:00 to boot.
    And just for laughs, with Windows 7, I get about 3 minutes for boot time.  Windows 2000 takes 1 minute, and Windows XP takes about two minutes.  Add another 1-3 minutes to that after login if I have any anti-virus software running (otherwise, it's instant).
    Last edited by RetroX (2009-10-19 00:58:04)

  • OSX 10.6 .8 -- Firefox automatically starts when I boot up (MacBook Pro Intel). It is not in the Startup Items in System Preferences, and automatic startup is not checked in Firefox Options. Don't know where else to look.

    How do I keep Firefox automatically starts when I boot up (OSX 10.6 .8 -- MacBook Pro Intel). It is not in the Startup Items in System Preferences, and automatic startup is not checked in Firefox Options.

    Hi fullrun-
    Once Firefox is open, you should be able to open the Right click context menu on the icon. From there you select 'Options' and then de-select 'Open at Login'. Hope that helps.

  • Hp pavilion pv 6700 booting time off and turn on automatically.view hardware problem

    hp pavilion pv 6700 booting time off and turn on automatically.view hardware problem

    the fan is not working will or the processur part drae

  • Ufw not loading automatically at boot time

    Hi,
    I discovered issuing a "sudo ufw enable" or doing a "su (then) ufw enable" activates ufw for the very session it's invoqued but does not make ufw run automatically at next boot as it should do (Firewall is active and enabled on system startup)
    I know Linux is secure enough at the point of render a software firewall almost useless (I'm even behind a router with it's own firewalling) but I'm intrigued about what can be happening here. Sorry if this if this question is dumb but I'm a Ubuntu converted and needs to learn LOT about Linux and specially Arch internals to catch you up guys.

    Add ufw to your daemons list in /etc/rc.conf (at the last line).
    In my rc.conf I put ufw just before crond.

  • Optical Drive/s eject on startup - SSD Slow Boot time also

    Hi guys,
    Been researching this problem over and over with no avail.
    I have installed a 240GB OWC 6GB SSD in this machine:
    Mac Pro MID 2010
    32 GB RAM
    240 SSD
    3 x 1T 7200 RPM Drives (bays 2 - 4)
    8-Core 2.4
    DVD Super drive
    LG BluRay Drive
    Sonnet USB 3.0 Card  -  (Nothing plugged in)
    Black Magic Intensity Pro -  (Nothing plugged in)
    Stock Graphics Card
    USB Keyboard (mac)
    Trackpad
    Wacom Bamboo Tablet
    Software:
    FCPX / Motion
    Adobe Suite
    Lion 10.7.3 FRESH / CLEAN
    I have done a fresh install of lion 10.7.3!
    I have selected my SSD as started up disk
    I have reset the PRAM
    I have reset SMC
    I have no apps running at startup
    I have trashed the prefs
    I have run disk utility and repair permisions on the SSD boot Drive
    I have let Onyx do its thing with cleanup etc.
    When I boot, the white screen appears for upto 30sec - 1.5mins, once I see the apple logo, it takes about 10sec to give me desktop and all is good. Everything is lightning fast, and I couldn't imagine my machince lacking performance in any way besides boot time. Shutdown is approx 2 seconds.
    It appears that it waits for other possible boot drives, then gives up and boots from the SSD.
    Sometimes my optical drives open during white screen on boot???
    Any suggestions to solve this?
    Thanks

    Me brain-storming & thinking out loud about how I would go about troubleshoot this:
    Every time you zap pram you need to reset the default boot volume.
    I never use Onyx after looking at it and keeping it around for awhile, I have mixed idea that people are looking for a problem to fix and do I trust it? gets mentioned enough.
    LG BR - can you take that out of the picture to test with it not connected?
    Wacom Tablet - take it out of the equation for testing
    USB3 - CallDigit? that has USB3 + SATA and looks and sounds good.
    Try w/o it also.
    Just because there is nothing connected - I've seen a cable that just by being plugged in was the cause of slow boot.
    Clone the OS to SSD? sounds like you didn't do that which in the past has had mixed results (sometimes with bad consequences and hard to know why, too many variables) but a clean install should be perfect. One person's though took "ages" to do what should have been very quick.
    I assume you would also clone the SSD to backup as image or to another drive.
    How does it boot from a 300GB partition off a platter?
    3 x 1TB: are these an array? do any of them have a system on it? sounds like you don'[t as it might otherwise choose non-SSD boot drive.
    An SSD from restart sometimes is fast(er) but from cold boot the system may not know it is there and how to send a signal to it?
    What does OWC say? about SSD, about the USB3 card.
    Even having 32GB RAM can take longer to POST.

  • How to get a lower boot time in eee?

    I've managed to lower my boot time to 14 seconds on the asus eee, but I know it can get lower that that... Apart from recompiling the kernel (which I intend to do last), can you suggest anything else might help?
    Bootchart
    My rc.conf
    # /etc/rc.conf - Main Configuration for Arch Linux
    # LOCALIZATION
    # LOCALE: available languages can be listed with the 'locale -a' command
    # HARDWARECLOCK: set to "UTC" or "localtime"
    # USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
    # TIMEZONE: timezones are found in /usr/share/zoneinfo
    # KEYMAP: keymaps are found in /usr/share/kbd/keymaps
    # CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
    # CONSOLEMAP: found in /usr/share/kbd/consoletrans
    # USECOLOR: use ANSI color sequences in startup messages
    LOCALE="en_US.utf8"
    HARDWARECLOCK="UTC"
    USEDIRECTISA="no"
    TIMEZONE="Europe/Athens"
    KEYMAP="us"
    CONSOLEFONT=
    CONSOLEMAP=
    USECOLOR="yes"
    # HARDWARE
    # MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
    # MOD_BLACKLIST: Prevent udev from loading these modules
    # MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
    # NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
    MOD_AUTOLOAD="yes"
    #MOD_BLACKLIST=() #deprecated
    MODULES=()
    # Scan for LVM volume groups at startup, required if you use LVM
    USELVM="no"
    # NETWORKING
    # HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
    HOSTNAME="asuseee"
    # Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
    # Interfaces to start at boot-up (in this order)
    # Declare each interface then list in INTERFACES
    # - prefix an entry in INTERFACES with a ! to disable it
    # - no hyphens in your interface names - Bash doesn't like it
    # DHCP: Set your interface to "dhcp" (eth0="dhcp")
    # Wireless: See network profiles below
    eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
    INTERFACES=(eth0)
    # Routes to start at boot-up (in this order)
    # Declare each route then list in ROUTES
    # - prefix an entry in ROUTES with a ! to disable it
    gateway="default gw 192.168.0.1"
    ROUTES=(!gateway)
    # Enable these network profiles at boot-up. These are only useful
    # if you happen to need multiple network configurations (ie, laptop users)
    # - set to 'menu' to present a menu during boot-up (dialog package required)
    # - prefix an entry with a ! to disable it
    # Network profiles are found in /etc/network.d
    # This now requires the netcfg package
    #NETWORKS=(main)
    # DAEMONS
    # Daemons to start at boot-up (in this order)
    # - prefix a daemon with a ! to disable it
    # - prefix a daemon with a @ to start it up in the background
    DAEMONS=(syslog-ng @crond @hal gdm)
    My rc.sysinit
    #!/bin/bash
    # /etc/rc.sysinit
    . /etc/rc.conf
    . /etc/rc.d/functions
    echo " "
    printhl "Arch Linux\n"
    printhl "${C_H2}http://www.archlinux.org"
    printhl "Copyright 2002-2007 Judd Vinet"
    printhl "Copyright 2007-2009 Aaron Griffin"
    printhl "Distributed under the GNU General Public License (GPL)"
    printsep
    # mount /proc, /sys and our RAM /dev
    /bin/mount -n -t ramfs none /dev
    /bin/mount -n -t proc none /proc
    /bin/mount -n -t sysfs none /sys
    # Create our default nodes that minilogd may need
    /bin/mknod /dev/null c 1 3
    /bin/mknod /dev/zero c 1 5
    /bin/mknod /dev/console c 5 1
    # More initial /dev setup that udev doesn't do
    /bin/ln -snf /proc/self/fd /dev/fd
    /bin/ln -snf /proc/self/fd/0 /dev/stdin
    /bin/ln -snf /proc/self/fd/1 /dev/stdout
    /bin/ln -snf /proc/self/fd/2 /dev/stderr
    /bin/ln -snf /proc/kcore /dev/core
    /bin/mkdir /dev/pts
    /bin/mkdir /dev/shm
    # start up our mini logger until syslog takes over
    /sbin/minilogd
    # anything more serious than KERN_WARNING goes to the console
    # 'verbose' cmdline parameter enables more messages
    if /bin/grep -q " verbose" /proc/cmdline; then
    /bin/dmesg -n 8
    else
    /bin/dmesg -n 3
    fi
    # enable rtc access
    /sbin/modprobe rtc-cmos >/dev/null 2>&1
    RTC_MAJOR=$(/bin/grep -w rtc /proc/devices 2>/dev/null); RTC_MAJOR="${RTC_MAJOR%% *}"
    if [ -n "$RTC_MAJOR" ]; then
    /bin/mkdir /dev/misc/
    /bin/mknod /dev/misc/rtc0 c $RTC_MAJOR 0
    /bin/ln -s /dev/misc/rtc0 /dev/rtc
    fi
    HWCLOCK_PARAMS="--hctosys"
    if [ "$HARDWARECLOCK" = "UTC" ]; then
    HWCLOCK_PARAMS="$HWCLOCK_PARAMS --utc"
    else
    HWCLOCK_PARAMS="$HWCLOCK_PARAMS --localtime"
    fi
    if [ "$USEDIRECTISA" = "yes" -o "$USEDIRECTISA" = "YES" ]; then
    HWCLOCK_PARAMS="$HWCLOCK_PARAMS --directisa"
    fi
    # Set clock early to fix some bugs with filesystem checks
    # Clock is set again later to match rc.conf
    if [ -f /etc/localtime ]; then
    /sbin/hwclock $HWCLOCK_PARAMS --noadjfile
    fi
    echo > /proc/sys/kernel/hotplug
    if [ -x /sbin/udevadm -a -d /sys/block ]; then
    # We have udev and /sys appears to be mounted, use UDev
    stat_busy "Starting UDev Daemon"
    /sbin/udevd --daemon
    /sbin/udevadm trigger
    stat_done
    else
    # Static /dev, our last resort
    status "Using static /dev filesystem" true
    fi
    # Load modules from the MODULES array defined in rc.conf
    if ! [ "$load_modules" = "off" ]; then
    if [ -f /proc/modules ]; then
    stat_busy "Loading Modules"
    for mod in "${MODULES[@]}"; do
    if [ "$mod" = "${mod#!}" ]; then
    /sbin/modprobe $mod
    fi
    done
    stat_done
    fi
    if [ -d /proc/acpi ]; then
    stat_busy "Loading standard ACPI modules"
    ACPI_MODULES="ac battery button fan processor thermal"
    k="$(echo $BLACKLIST ${MOD_BLACKLIST[@]} | /bin/sed 's|-|_|g')"
    j="$(echo ${MODULES[@]} | /bin/sed 's|-|_|g')"
    #add disabled MODULES (!) to blacklist - much requested feature
    for m in ${j}; do
    [ "$m" != "${m#!}" ] && k="${k} ${m#!}"
    done
    # add disablemodules= from commandline to blacklist
    k="${k} $(echo ${disablemodules} | /bin/sed 's|-|_|g' | /bin/sed 's|,| |g')"
    for n in ${ACPI_MODULES}; do
    if ! echo ${k} | /bin/grep "\<$n\>" 2>&1 >/dev/null; then
    /sbin/modprobe $n > /dev/null 2>&1
    fi
    done
    stat_done
    fi
    fi
    # run udev uevents
    if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then
    stat_busy "Loading UDev uevents"
    udevstart="$(/bin/date +%s%0N)"
    # /sbin/udevadm trigger
    /sbin/udevadm settle
    stat_done
    udevend="$(/bin/date +%s%0N)"
    printhl " UDev uevent processing time: $((($udevend-$udevstart)/1000000))ms"
    fi
    # bring up the loopback interface
    if [ -d /sys/class/net/lo ]; then
    stat_busy "Bringing up loopback interface"
    /sbin/ifconfig lo 127.0.0.1 up
    if [ $? -ne 0 ]; then
    stat_fail
    else
    stat_done
    fi
    fi
    # If necessary, find md devices and manually assemble RAID arrays
    #if [ -f /etc/mdadm.conf -a "$(/bin/grep ^ARRAY /etc/mdadm.conf 2>/dev/null)" ]; then
    # # udev won't create these md nodes, so we do it ourselves
    # for dev in $(/bin/grep ^ARRAY /etc/mdadm.conf | /bin/awk '{print $2}'); do
    # path=$(echo $dev | /bin/sed 's|/[^/]*$||')
    # node=$(echo $dev | /bin/sed "s|^$path/||")
    # minor=$(echo $node | /bin/sed 's|^[^0-9]*||')
    # [ ! -e $path/$node ] && /bin/mknod $path/$node b 9 $minor
    # done
    # status "Activating RAID arrays" /sbin/mdadm --assemble --scan
    #fi
    if [ "$USELVM" = "yes" -o "$USELVM" = "YES" ]; then
    if [ -x /sbin/lvm -a -d /sys/block ]; then
    # Kernel 2.6.x, LVM2 groups
    /sbin/modprobe -q dm-mod 2>/dev/null
    stat_busy "Activating LVM2 groups"
    /sbin/lvm vgscan --ignorelockingfailure --mknodes >/dev/null
    /sbin/lvm vgchange --ignorelockingfailure -a y >/dev/null
    if [ $? -ne 0 ]; then
    stat_fail
    else
    stat_done
    fi
    fi
    fi
    # Set up non-root encrypted partition mappings
    #if [ -f /etc/crypttab -a -n "$(/bin/grep -v ^# /etc/crypttab | /bin/grep -v ^$)" ]; then
    # /sbin/modprobe -q dm-mod 2>/dev/null
    # stat_busy "Unlocking encrypted volumes:"
    # csfailed=0
    # CS=/sbin/cryptsetup.static
    # do_crypt() {
    # if [ $# -ge 3 ]; then
    # cname="$1"
    # csrc="$2"
    # cpass="$3"
    # shift 3
    # copts="$*"
    # stat_append "${cname}.."
    # # For some fun reason, the parameter ordering varies for
    # # LUKS and non-LUKS devices. Joy.
    # if [ "${cpass}" = "SWAP" ]; then
    # # This is DANGEROUS! The only possible safety check
    # # is to not proceed in case we find a LUKS device
    # # This may cause dataloss if it is not used carefully
    # if $CS isLuks $csrc 2>/dev/null; then
    # false
    # else
    # $CS -d /dev/urandom $copts create $cname $csrc >/dev/null
    # if [ $? -eq 0 ]; then
    # stat_append "creating swapspace.."
    # /sbin/mkswap -L $cname /dev/mapper/$cname >/dev/null
    # fi
    # fi
    # elif [ "${cpass}" = "ASK" ]; then
    # printf "\nOpening '${cname}' volume:\n"
    # if $CS isLuks $csrc 2>/dev/null; then
    # $CS $copts luksOpen $csrc $cname < /dev/console
    # else
    # $CS $copts create $cname $csrc < /dev/console
    # fi
    # elif [ "${cpass:0:1}" != "/" ]; then
    # if $CS isLuks $csrc 2>/dev/null; then
    # echo "$cpass" | $CS $copts luksOpen $csrc $cname >/dev/null
    # else
    # echo "$cpass" | $CS $copts create $cname $csrc >/dev/null
    # fi
    # else
    # if $CS isLuks $csrc 2>/dev/null; then
    # $CS -d $cpass $copts luksOpen $csrc $cname >/dev/null
    # else
    # $CS -d $cpass $copts create $cname $csrc >/dev/null
    # fi
    # fi
    # if [ $? -ne 0 ]; then
    # csfailed=1
    # stat_append "failed "
    # else
    # stat_append "ok "
    # fi
    # fi
    # while read line; do
    # eval do_crypt "$line"
    # done </etc/crypttab
    # if [ $csfailed -eq 0 ]; then
    # stat_done
    # else
    # stat_fail
    # fi
    # # Maybe someone has LVM on an encrypted block device
    # if [ "$USELVM" = "yes" -o "$USELVM" = "YES" ]; then
    # if [ -x /sbin/lvm -a -d /sys/block ]; then
    # /sbin/lvm vgscan --ignorelockingfailure --mknodes >/dev/null
    # /sbin/lvm vgchange --ignorelockingfailure -a y >/dev/null
    # fi
    # fi
    #fi
    status "Mounting Root Read-only" /bin/mount -n -o remount,ro /
    FORCEFSCK=
    [ -f /forcefsck ] && FORCEFSCK="-- -f"
    NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,noshfs,nofuse,nofuseblk"
    if [ -x /sbin/fsck ]; then
    stat_busy "Checking Filesystems"
    if /bin/grep -qw quiet /proc/cmdline; then
    /sbin/fsck -A -T -C -a -t $NETFS $FORCEFSCK >/dev/null 2>&1
    else
    /sbin/fsck -A -T -C -a -t $NETFS $FORCEFSCK 2>/dev/null
    fi
    fsckret=$?
    if [ ${fsckret} -gt 1 ]; then
    stat_fail
    if [ $((${fsckret}&2)) -eq 2 ]; then
    echo
    echo "********************** REBOOT REQUIRED *********************"
    echo "* *"
    echo "* The system will be rebooted automatically in 15 seconds. *"
    echo "* *"
    echo "************************************************************"
    echo
    /bin/sleep 15
    else
    echo
    echo "***************** FILESYSTEM CHECK FAILED ****************"
    echo "* *"
    echo "* Please repair manually and reboot. Note that the root *"
    echo "* file system is currently mounted read-only. To remount *"
    echo "* it read-write type: mount -n -o remount,rw / *"
    echo "* When you exit the maintenance shell the system will *"
    echo "* reboot automatically. *"
    echo "* *"
    echo "************************************************************"
    echo
    /sbin/sulogin -p
    fi
    echo "Automatic reboot in progress..."
    /bin/umount -a
    /bin/mount -n -o remount,ro /
    /sbin/reboot -f
    exit 0
    fi
    stat_done
    fi
    stat_busy "Mounting Local Filesystems"
    /bin/mount -n -o remount,rw /
    /bin/rm -f /etc/mtab*
    # make sure / gets written to /etc/mtab
    /bin/mount -o remount,rw /
    # Write /proc, /sys and /dev to /etc/mtab
    if [ -e /proc/mounts ]; then
    /bin/grep -e "/proc " -e "/sys " -e "/dev " /proc/mounts >> /etc/mtab
    fi
    # now mount all the local filesystems
    /bin/mount -a -t $NETFS
    stat_done
    #status "Activating Swap" /sbin/swapon -a
    stat_busy "Configuring System Clock"
    if [ ! -f /var/lib/hwclock/adjtime ]; then
    echo "0.0 0 0.0" > /var/lib/hwclock/adjtime
    fi
    if [ "$TIMEZONE" != "" -a -e "/usr/share/zoneinfo/$TIMEZONE" ]; then
    /bin/rm -f /etc/localtime
    /bin/cp "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
    fi
    /sbin/hwclock $HWCLOCK_PARAMS
    stat_done
    if [ -f /var/run/random-seed ]; then
    stat_busy "Initializing Random Seed"
    /bin/cat /var/run/random-seed >/dev/urandom
    stat_done
    fi
    stat_busy "Removing Leftover Files"
    /bin/rm -f /etc/nologin &>/dev/null
    /bin/rm -f /etc/shutdownpid &>/dev/null
    /bin/rm -f /var/lock/* &>/dev/null
    /bin/rm -rf /tmp/* /tmp/.* &>/dev/null
    /bin/rm -f /forcefsck &>/dev/null
    (cd /var/run && /usr/bin/find . ! -type d -exec /bin/rm -f -- {} \; )
    : > /var/run/utmp
    /bin/chmod 0664 /var/run/utmp
    # Keep {x,k,g}dm happy with xorg
    /bin/mkdir /tmp/.ICE-unix && /bin/chmod 1777 /tmp/.ICE-unix
    /bin/mkdir /tmp/.X11-unix && /bin/chmod 1777 /tmp/.X11-unix
    stat_done
    #status "Updating Shared Library Links" /sbin/ldconfig
    if [ "$HOSTNAME" != "" ]; then
    status "Setting Hostname: $HOSTNAME" /bin/hostname $HOSTNAME
    fi
    # Set the NIS domain name, if necessary
    [ -f /etc/conf.d/nisdomainname ] && . /etc/conf.d/nisdomainname
    if [ "$NISDOMAINNAME" != "" ]; then
    status "Setting NIS Domain Name: $NISDOMAINNAME" /bin/nisdomainname $NISDOMAINNAME
    fi
    status "Updating Module Dependencies" /sbin/depmod -A
    # Flush old locale settings
    : >/etc/profile.d/locale.sh
    /bin/chmod 755 /etc/profile.d/locale.sh
    # Set user defined locale
    [ -z "$LOCALE" ] && LOCALE="en_US"
    stat_busy "Setting Locale: $LOCALE"
    echo "export LANG=$LOCALE" >>/etc/profile.d/locale.sh
    stat_done
    if echo "$LOCALE" | /bin/grep -qi utf ; then
    stat_busy "Setting Consoles to UTF-8 mode"
    # UTF-8 consoles are default since 2.6.24 kernel
    # this code is needed not only for older kernels,
    # but also when user has set vt.default_utf8=0 but LOCALE is *.UTF-8.
    for i in $(/usr/bin/seq 0 63); do
    /usr/bin/kbd_mode -u < /dev/vc/${i}
    printf "\e%%G" > /dev/vc/${i}
    done
    # the $CONSOLE check helps us avoid this when running scripts from cron
    echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e%%G"; fi' >>/etc/profile.d/locale.sh
    stat_done
    [ -n "$KEYMAP" ] && status "Loading Keyboard Map: $KEYMAP" /bin/loadkeys -q -u $KEYMAP
    else
    stat_busy "Setting Consoles to legacy mode"
    # make non-UTF-8 consoles work on 2.6.24 and newer kernels
    for i in $(/usr/bin/seq 0 63); do
    /usr/bin/kbd_mode -a < /dev/vc/${i}
    printf "\e%%@" > /dev/vc/${i}
    done
    # the $CONSOLE check helps us avoid this when running scripts from cron
    echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e%%@"; fi' >>/etc/profile.d/locale.sh
    stat_done
    [ -n "$KEYMAP" ] && status "Loading Keyboard Map: $KEYMAP" /bin/loadkeys -q $KEYMAP
    fi
    if [ -n "$CONSOLEFONT" ]; then
    stat_busy "Loading Console Font: $CONSOLEFONT"
    #CONSOLEMAP in UTF-8 shouldn't be used
    if [ -n "$CONSOLEMAP" ] && echo "$LOCALE" | /bin/grep -qi utf ; then
    CONSOLEMAP=""
    fi
    for i in $(/usr/bin/seq 0 63); do
    if [ -n "$CONSOLEMAP" ]; then
    /usr/bin/setfont -m $CONSOLEMAP $CONSOLEFONT -C /dev/vc/${i} >/dev/null 2>&1
    else
    /usr/bin/setfont $CONSOLEFONT -C /dev/vc/${i} >/dev/null 2>&1
    fi
    done
    if [ $? -ne 0 ]; then
    stat_fail
    else
    for i in $(/usr/bin/seq 0 63); do
    printf "\e(K" > /dev/vc/${i}
    done
    # the $CONSOLE check helps us avoid this when running scripts from cron
    echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e(K"; fi' >>/etc/profile.d/locale.sh
    stat_done
    fi
    fi
    # Adding persistent network/cdrom generated rules
    #if [ -f "/dev/.udev/tmp-rules--70-persistent-cd.rules" ]; then
    # stat_busy "Adding persistent cdrom udev rules"
    # /bin/cat /dev/.udev/tmp-rules--70-persistent-cd.rules >> /etc/udev/rules.d/70-persistent-cd.rules
    # stat_done
    #fi
    if [ -f "/dev/.udev/tmp-rules--70-persistent-net.rules" ]; then
    stat_busy "Adding persistent network udev rules"
    /bin/cat /dev/.udev/tmp-rules--70-persistent-net.rules >> /etc/udev/rules.d/70-persistent-net.rules
    stat_done
    fi
    # Save our dmesg output from this boot
    if [ -f /var/log/dmesg.log ]; then
    /bin/rm /var/log/dmesg.log
    fi
    /bin/dmesg > /var/log/dmesg.log
    # End of file
    # vim: set ts=2 noet:

    DreamAxe wrote:
    quarkup wrote:Once the modules are all loaded,  by enabling this option I "consume" only  ~70ms
    I see that you mention milliseconds again, how exactly do you count these milliseconds? Since my last message, I've tried other I/O schedulers and three out of four get the same result. I believe that there IS a difference among schedulers but since bootchart displays the results in seconds, I can't compare them. If you could just tell me how you count in ms I could compare them and see which one is faster at booting the eee. In case you're wondering, noop is the slowest, requiring 16sec to boot the eee while cfq, anticipatory and deadline require 14sec according to bootchart.
    I'm talking about "loading" modules, not the full-boot time..
    After turning on the PC, there will be shown on the virtual terminal the time taken by Udev to load all modules.
    as you can see
    Last edited by quarkup (2009-02-20 13:49:55)

Maybe you are looking for