Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was using Ubuntu 5.04 for AMD 64 and now switched to the 32 bit version. Both my IDE and SATA disks used to automount fine. To the best of my knowledge I did not do anything different.
During startup, my IDE drives automounts nicely. However for my SATA drive, during startup the system would complain that it couldn't find the volume. However, Konqueror is able to detect them, and I can login as root to mount those drives and they would be mounted according to the path I have specified in /etc/fstab.
The same thing goes with USB drives, it detects them but not mount them, fortunately I don't need to login as root to do this.
Typically USB and SATA modules are not included in the initial ram disk (initrd) and therefore get loaded after the boot process mounts the filesystems via fstab. This is why you can see it in Konqueror but fails during boot.
You can add the noauto option to the fstab file so the filesystems are not mounted during bootup. Also adding the user option will let your regular users mount the filesystems too.
If you want the drives mounted at boot you can add the modules to the initrd or since Ubuntu does not use a rc.local file you can add a startup script to /etc/init.d and link to the runlevel directory. Use update-rc.d to create the proper links to rcN.d directories. Using a high number will ensure the script runs last. The defaults option automatically configures runlevels 2-5. If you look in one of the rcN.d directories you will find files like s##scriptname. The s## is the order in which the files are executed.
Originally posted by michaelk Typically USB and SATA modules are not included in the initial ram disk (initrd) and therefore get loaded after the boot process mounts the filesystems via fstab. This is why you can see it in Konqueror but fails during boot.
You can add the noauto option to the fstab file so the filesystems are not mounted during bootup. Also adding the user option will let your regular users mount the filesystems too.
If you want the drives mounted at boot you can add the modules to the initrd or since Ubuntu does not use a rc.local file you can add a startup script to /etc/init.d and link to the runlevel directory. Use update-rc.d to create the proper links to rcN.d directories. Using a high number will ensure the script runs last. The defaults option automatically configures runlevels 2-5. If you look in one of the rcN.d directories you will find files like s##scriptname. The s## is the order in which the files are executed.
For example:
update-rc.d foo defaults 50
Thanks a lot for your help.
Would you mind if you elaborate more on it? (pardon me for being a newbie)
Assuming that I am going the route of putting a startup script to /etc/init.d.
How do I add a startup script to /etc/init.d? Can I just name it anyhow I like? Or this file is just a link to a script somewhere in /rcN.d?
How do I make the script in /rcN.d? Which directory should I put it in? for the s##scriptname, what number would you suggest me putting? Again can I name it anyhow I like?
The script can be named anything. You do not need to create a script in any rcN.d directory because that is what the update-rc.d utility does.
Create a script to mount the SATA drive partitions using any text editor. You need to be root to save files in /etc.
Code:
#!/bin/sh
mount /storage/win-games
mount /storage/win-programs
Save it to /etc/init.d directory. You can name it anything. i.e. my_script
Change its permissions. This will change the permissions and allow the script to execute:
chmod 755 my_script
To create the links in rcN.d:
update-rc.d my_script defaults 99
The 99 will cause this script to execute last. If you look in the rc2.d,rc3.d, rc4.d directories you should see a link called s99my_script.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.