shell scripts

Status
Not open for further replies.

Ashootosh

Broken In
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???
 

pradeep_chauhan

Cyborg Agent
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

In the zone
(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

FooBar Guy
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
 

grub

Broken In
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
 
Status
Not open for further replies.
Top Bottom