DIGIT-ARC read-only archive · snapshot: July 23, 2026

shell scripts

5 posts · originally from https://geek.digit.in/community/threads/shell-scripts.6963/

A
Ashootosh Original post #1
Mar 15, 2005 at 8:16 PM
hello everyone, i recently installed PCQlinux..........but the thing that i dont like is to mount the ntfs filesystem each n every time(to listen to songs)......... i want to know how can i make a shell script which automatically runs when i start my linux (i.e. mount -t ntfs /dev/hda5 /root/abc command automatically runs).
i mean i want to put this script in startup.......any ideas???
P
Mar 15, 2005 at 8:19 PM
There is no need to make a shell script for this just make an entry in the /etc/fstab and it will be done automatically. For details check the forum this has been explained in great detail 'n' times.
hafees
hafees #3
Mar 16, 2005 at 12:35 AM
(u should be root)
edit ur fstab using
vi /etc/fstab
then add the line (press i)
mount -t ntfs /dev/hda /root/abc
now save the file(wq)
U r done!
GNUrag
GNUrag #4
Mar 16, 2005 at 8:55 PM
Okay, so this was fstab , and it got solved. If you have anything other problem that needs to be executed everytime you reboot, then place it in a file, chmod it to +x and put it inside /etc/rcS.d

like this..
Code:
# echo "mount /mnt/whatever" > /etc/rcS.d/S90mnt
# chmod a+x /etc/rcS.d/S90mnt
G
grub #5
Mar 18, 2005 at 10:29 AM
hello everyone, i recently installed PCQlinux..........but the thing that i dont like is to mount the ntfs filesystem each n every time(to listen to songs)......... i want to know how can i make a shell script which automatically runs when i start my linux (i.e. mount -t ntfs /dev/hda5 /root/abc command automatically runs).
i mean i want to put this script in startup.......any ideas???

follow the steps
Code:
 # vi  /etc/fstab
add the following line
Code:
 /dev/hda5    ntfs    /root/abc    users,owner,ro  0  0
save ur work and issue the command
[code[
# mount -a
[/code]
or u can restart ur system , next time ur partition will mount automatically