Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Where is the startup file for OpenSuSE 11.1 located?

  1. #1

    Default Where is the startup file for OpenSuSE 11.1 located?

    I have a mount command that I want executed every single time the computer reboots so that the folder is always mounted when I need it. What file would I have to edit in order to accomplish this?

  2. #2

    Default Re: Where is the startup file for OpenSuSE 11.1 located?

    You can just write a line in /etc/fstab to mount the device:
    The following example will mount sda8 (an ext4 filesystem) automatically under the mountpoint /data:

    Code:
    /dev/sda8               /data     ext4         defaults          1   2
    * you have to be root to edit /etc/fstab

  3. #3
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Where is the startup file for OpenSuSE 11.1 located?

    abacabb, you did not specify what you are trying to mount. please_try_again has specified the most direct approach with an example. In order to edit your fstab file, if you use the KDE desktop, you would use this command:

    Code:
    kdesu kwrite /etc/fstab
    However what I wanted to add was that you can use the YaST / System / Partitioner to add the drive and its folder for you automatically. Once fired up (The Partitioner, You must answer Yes to the first question), and with your new drive or partition attached beforehand, find the new drive/partition in the listing on the right window as sdb or sdc (or what ever it is called) and right click on it and select add partition. In the add partition window, select the partition type and elect to format it if it is not formatted. The default for existing partitions is to NOT format them. I use ext4 for new Linux partitions and NTFS for new Windows partitions, but you can not create a NTFS partition here and must do that in Windows if you wanted that. Finally, at the bottom is a mount selection point. Here is where you add where to be mounted, like /Software or /data for instance. The cool part is once done with the Partitioner, your drive will be added to the fstab file for you automatically, ready for your next reboot and mounted for you the moment you exit the partition program, ready for use right away.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  4. #4

    Default Re: Where is the startup file for OpenSuSE 11.1 located?

    It's a windows share that I'm mounting. I'm using the mount -t cifs command.

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Where is the startup file for OpenSuSE 11.1 located?

    On 2010-10-29 16:06, abacabb wrote:
    >
    > It's a windows share that I'm mounting. I'm using the mount -t cifs
    > command.


    Then you could define the mount in "/etc/samba/smbfstab". It may require you to enable service
    "/etc/init.d/smbfs"

    If that doesn't work, and you want to use an script, the quickest place is "/etc/init.d/after.local".

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  6. #6

    Default Re: Where is the startup file for OpenSuSE 11.1 located?

    I found the file /etc/init.d/boot.local

    Thanks though!

  7. #7
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Where is the startup file for OpenSuSE 11.1 located?

    On 2010-10-30 16:06, abacabb wrote:
    >
    > I found the file /etc/init.d/boot.local


    That one will not work. Do what I said.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  8. #8

    Default Re: Where is the startup file for OpenSuSE 11.1 located?

    Quote Originally Posted by robin_listas View Post
    On 2010-10-30 16:06, abacabb wrote:
    >
    > I found the file /etc/init.d/boot.local


    That one will not work. Do what I said.


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)
    My distro does not seem to have an after.local. I did a "find / -name after.local" and nothing came up. As far as samba, not running samba on that machine. It's not an option for my scenario. :-(


    any ideas?

  9. #9

    Default Re: Where is the startup file for OpenSuSE 11.1 located?

    Quote Originally Posted by abacabb View Post
    My distro does not seem to have an after.local. I did a "find / -name after.local" and nothing came up. As far as samba, not running samba on that machine. It's not an option for my scenario. :-(
    any ideas?
    That file doesn't exist by default. You have to create it :-(

    Code:
    #!/bin/sh
    #
    # /etc/init.d/rclocal
    #
    # rc.local replacement for openSUSE
    #
    ### BEGIN INIT INFO
    # Provides: rclocal
    # Required-Start: cifs
    # Should-Start:   
    # Required-Stop:  
    # Should-Stop:    
    # Default-Start:   3 5 
    # Default-Stop:
    # Description:    rc.local equivalent
    ### END INIT INFO
    
    # Source SuSE config
    . /etc/rc.status
    
    case "$1" in
        start)
    # Add your commands below!
    ;;
        stop)
    ;;
        restart)
    	## Stop the service and regardless of whether it was
    	## running or not, start it again.
    	$0 start
    
    	# Remember status and be quiet
    	rc_status
    ;;
        status)
    ;;
        *)
    	echo "Usage: $0 {start|stop|status|restart}"
    	exit 1
    ;;
    esac
    rc_exit
    copy/paste the code above, add your commands, save as /etc/rc.d/rclocal (or /etc/rc.d/after.local or any name you like), then, as root, do the following to enable it:

    Code:
    chmod 754 /etc/rc.d/rclocal
    chown root:root /etc/rc.d/rclocal
    insserv rclocal

  10. #10
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Where is the startup file for OpenSuSE 11.1 located?

    On 2010-10-31 01:06, please try again wrote:
    >
    > abacabb;2246239 Wrote:
    >> My distro does not seem to have an after.local. I did a "find / -name
    >> after.local" and nothing came up. As far as samba, not running samba on
    >> that machine. It's not an option for my scenario. :-(
    >> any ideas?

    >
    > That file doesn't exist by default. You have to create it :-(


    Why the sad smiley? Of course it does not exist, it is your local file,
    your property, YOU create it. With any content you wish, as long as it
    is a valid bash script.

    Just create the file, make it executable, done. It will automatically
    run at the end of the sequence.

    > Code:
    > --------------------
    > #!/bin/sh
    > #
    > # /etc/init.d/rclocal


    ....

    > copy/paste the code above, add your commands, save as /etc/rc.d/rclocal
    > (or /etc/rc.d/after.local or any name you like), then, as root, do the
    > following to enable it:


    No, no, don't use rclocal on a suse system. Use suse methods. And don't
    try to insert an after.local file, it will run twice.


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •