Script for detecting and mounting partitions automatically

Taking care of your Linux box.
Muhammad Saad
Battalion Havaldaar Major
Posts: 273
Joined: Sat Jan 27, 2007 11:07 pm
Location: Dera Ismail Khan, Pakistan
Contact:

Re:

Post by Muhammad Saad »

LinuxFreaK wrote:Dear Muhammad Saad,
Salam,

I think there will be no issue but i do not know how you will going to mount them. As for mounting these partition you need to write another script. Also it will mount current partitions which were already mounted at booting.

Best Regards.
Waalaikum-us-Salam.

Although there are no chances of mounting a partition twice, but if you have any idea, please share it here.
Also I wonder what will happen if one partition is mounted on more than one mount points.
LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Post by LinuxFreaK »

Dear Muhammad Saad,
Salam,
Muhammad Saad wrote:Although there are no chances of mounting a partition twice, but if you have any idea, please share it here.
Also I wonder what will happen if one partition is mounted on more than one mount points.
If you mount a partition which is already mount, e.g. /home and you have remount it at /old/home again then if you have delete any file from /old/home by mistake it will be deleted from /home. Also if you mound partition on / then it will only display content of mounted partition and you can not umount / partition.

Best Regards.

Best Regards.
Farrukh Ahmed
Muhammad Saad
Battalion Havaldaar Major
Posts: 273
Joined: Sat Jan 27, 2007 11:07 pm
Location: Dera Ismail Khan, Pakistan
Contact:

Re:

Post by Muhammad Saad »

LinuxFreaK wrote:Dear Muhammad Saad,
Salam,
Muhammad Saad wrote:Although there are no chances of mounting a partition twice, but if you have any idea, please share it here.
Also I wonder what will happen if one partition is mounted on more than one mount points.
If you mount a partition which is already mount, e.g. /home and you have remount it at /old/home again then if you have delete any file from /old/home by mistake it will be deleted from /home. Also if you mound partition on / then it will only display content of mounted partition and you can not umount / partition.

Best Regards.

Best Regards.
So does it mean that if I know what is mounted where, there are no chances of a disaster?
LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Post by LinuxFreaK »

Dear Muhammad Saad,
Salam,
Muhammad Saad wrote:So does it mean that if I know what is mounted where, there are no chances of a disaster?
Yes, but i am not giving you any guarantee because "rm -rf" will be harmful :)

Best Regards.
Farrukh Ahmed
Muhammad Saad
Battalion Havaldaar Major
Posts: 273
Joined: Sat Jan 27, 2007 11:07 pm
Location: Dera Ismail Khan, Pakistan
Contact:

Re:

Post by Muhammad Saad »

LinuxFreaK wrote:Yes, but i am not giving you any guarantee because "rm -rf" will be harmful :)
:lol:
Post Reply