LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 04-30-2009, 03:41 PM   #1
FLCL
Member
 
Registered: Jan 2009
Posts: 36

Rep: Reputation: 0
Boot.local wont launch sh


opensuse 11.1

So i've edited my boot.local file to launch an sh script on startup so it temporarily mounts my other drives for the session. Though when i logged off and logged back in to test it, nothing worked. I had to do it all manually.

Have I done something wrong, or missing something? Also does anyone know if it is possible to run kicker through cli? without having to F2 and type kicker for it to launch, I want the kicker to launch on start up as well but not sure how to do this. Please help.
Code:
#! /bin/sh
#
# Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany.  All rights reserved.
#
# Author: Werner Fink <werner@suse.de>, 1996
#         Burchard Steinbild, 1996
#
# /etc/init.d/boot.local
#
# script with local commands to be executed from init on system startup
#
# Here you should add things, that should happen directly after booting
# before we're going to the first run level.
#
sh /home/mine/Documents/Storage.sh
 
Old 05-01-2009, 06:21 PM   #2
BruceCadieux
Member
 
Registered: Apr 2002
Location: Wales MA.
Distribution: openSuSE 11.1
Posts: 409

Rep: Reputation: 32
I recently ran into a similar problem.

Moving my script to the /opt directory and making sure it was executable solved my problem.
 
Old 05-05-2009, 09:44 PM   #3
FLCL
Member
 
Registered: Jan 2009
Posts: 36

Original Poster
Rep: Reputation: 0
Well i would try it, but now the script isnt even working for some reason. When i try to execute it from terminal i get the following

Code:
$LogFile indicates unclean shutdown (0, 0)
Failed to mount '/dev/sdc1': Operation not supported
Mount is denied because NTFS is marked to be in use. Choose one action:

Choice 1: If you have Windows then disconnect the external devices by
          clicking on the 'Safely Remove Hardware' icon in the Windows
          taskbar then shutdown Windows cleanly.

Choice 2: If you don't have Windows then you can use the 'force' option for
          your own responsibility. For example type on the command line:

            mount -t ntfs-3g /dev/sdc1 /media/Storage -o force

    Or add the option to the relevant row in the /etc/fstab file:

            /dev/sdc1 /media/Storage ntfs-3g force 0 0
I have never seen that since I made the script, but now all of the sudden I boot up to linux and launch it and behold. Can anyone tell me why all of the sudden Im geting this and how I would fix it?
 
Old 05-20-2009, 11:42 PM   #4
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by BruceCadieux View Post
I recently ran into a similar problem.

Moving my script to the /opt directory and making sure it was executable solved my problem.
A couple of observations:

First, since you were explicitly passing the name of the script to "sh" it really didn't need to be made executable itself.

Second, the comment at the bottom of the boot.local file indicates that that script is run before the system has even entered run level "1". I believe the only filesystem you can count on being available at that time is the root filesystem. If /opt was not a separate filesystem but rather part of the root filesystem, it would explain why your script worked when you put it in /opt instead of /home. (I'd bet that the boot process displayed a "file not found" error when the script was sitting under /home.)

Another option would have been to leave the low-level boot script alone (it'll almost certainly get overwritten when you upgrade) and write a script, say "do_local_stuff", that you keep in /etc/init.d/ (or even better, if /usr/local is a separate filesystem, in /usr/local/etc/init.d/ to keep it safe during upgrades or reinstalls) and link to it in the rc3.d directory: "ln -s /etc/init.d/do_local_stuff S99do_local_stuff". The "S99" prefix should cause it to run last (or darned near) in the initialization process. That way you can rely on everything in the system being available for your script to use.

Finally, wouldn't the mounting that you're doing be done more easily by just adding the appropriate lines to /etc/fstab? Doing the mounts as part of some other script that's going to get run anyway during the boot process is going to always mount the drives just like they would via /etc/fstab. Just a thought...

Anyway, hope some of this helps.


--
Rick
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Modified the /etc/rc.local file. Now fedora wont boot h8null Linux - General 6 07-27-2009 08:20 AM
installed FC5 - but desktop wont launch crmpicco Linux - Software 8 08-31-2006 06:26 AM
X wont launch after botched pkg install drlouis Slackware 6 04-18-2006 03:33 AM
Kopete Upgrade wont launch Commando464 SUSE / openSUSE 5 12-22-2004 04:25 AM
Kvirc wont launch gazza Linux - Newbie 0 09-09-2003 12:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 01:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration