PDA

View Full Version : shell scripts


Ashootosh
15-03-2005, 08: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???

pradeep_chauhan
15-03-2005, 08: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
16-03-2005, 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
16-03-2005, 08: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..

# echo "mount /mnt/whatever" > /etc/rcS.d/S90mnt
# chmod a+x /etc/rcS.d/S90mnt

grub
18-03-2005, 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

# vi /etc/fstab

add the following line

/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