Question : Script to mount drives on boot or via a script file

Hi I am running Ubuntu Lucid Lynx and would like to know how I can get it to automatically mount additional partitions of my primary drive.
I have five partitions on my drive and would ideally like to mount them via a script file.  In addition I would like to mount the 5th partition on boot and have an icon on the desktop appear for the drive.

Additionally how can I install a desktop shortcut for the Computer function, enabling me to browse the drives?

My partitions are;
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xdf81dcc2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              13        7012    56217600    7  HPFS/NTFS
/dev/sda3            7012       10837    30720000    7  HPFS/NTFS
/dev/sda4           10837       60802   401344512    f  W95 Ext'd (LBA)
/dev/sda5           10837       60802   401343488    7  HPFS/NTFS


Many thanks,

Kerj

Answer : Script to mount drives on boot or via a script file

Use the Synaptics Package manager in Ubuntu and search for "smbfs".
If not already installed, install it

Then add entries in /etc/fstab file like this:
//192.168.10.1/share   /mnt/drive_X   cifs   guest,_netdev   0 0

If you have password enabled share, add an entry like this:
//192.168.10.1/share   /mnt/drive_Y   cifs   username=xxxx,password=xxxxx,_netdev   0 0

There are no "Drives" in Linux, there are "mount points".
mount points are directories, so X: equivalent would be directory /mnt/drive_X where your share is mounted.
Random Solutions  
 
programming4us programming4us