Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Absolute Beginner Talk
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Absolute Beginner Talk
The perfect starting place to find out more about computers, Linux and Ubuntu.

 
Thread Tools Display Modes
Old October 31st, 2009   #1
JamesParnell
Way Too Much Ubuntu
 
Join Date: Oct 2009
Location: Chesterfield, UK
Beans: 261
Ubuntu 9.10 Karmic Koala
Send a message via MSN to JamesParnell Send a message via Yahoo to JamesParnell
How do i auto mount a partition??

i have a separate partition for my music which i would like to be mounted when i start up, how would i go about doing this?
JamesParnell is offline   Reply With Quote
Old October 31st, 2009   #2
Zoot7
Has an Ubuntu Drip
 
Zoot7's Avatar
 
Join Date: Sep 2008
Location: Cork, Ireland
Beans: 717
Re: How do i auto mount a partition??

What type of file system does the partition have? ext3? ntfs? fat32?

Also can you post the output of
Code:
sudo fdisk -l
__________________
Zoot7 is offline   Reply With Quote
Old October 31st, 2009   #3
JamesParnell
Way Too Much Ubuntu
 
Join Date: Oct 2009
Location: Chesterfield, UK
Beans: 261
Ubuntu 9.10 Karmic Koala
Send a message via MSN to JamesParnell Send a message via Yahoo to JamesParnell
Re: How do i auto mount a partition??

Code:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0a0b9548

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3916    31455238+  83  Linux
/dev/sda2            3917        6527    20972857+  83  Linux
/dev/sda3            6528        6788     2096482+  82  Linux swap / Solaris
and they are all EXT4
JamesParnell is offline   Reply With Quote
Old October 31st, 2009   #4
Zoot7
Has an Ubuntu Drip
 
Zoot7's Avatar
 
Join Date: Sep 2008
Location: Cork, Ireland
Beans: 717
Re: How do i auto mount a partition??

Firstly make a mount point for the partition.

Code:
sudo mkdir /media/<name>
Then edit fstab
Code:
gksudo gedit /etc/fstab
Assuming /dev/sda1 is the partition of interest, add in the following line at the end of the file:
Code:
/dev/sda1 /media/<mount point name> ext4	defaults	0   0
Then to test it do
Code:
sudo mount -a
Then browse to wherever you mounted it to investigate. Any problems, post them back here.
__________________

Last edited by Zoot7; October 31st, 2009 at 04:37 PM..
Zoot7 is offline   Reply With Quote
Old October 31st, 2009   #5
SuperSonic4
Chocolate-Covered Ubuntu Beans
 
SuperSonic4's Avatar
 
Join Date: Jul 2008
Location: Birmingham, England
Beans: 2,334
Re: How do i auto mount a partition??

Which one is music? I'm gonna assume it's sda2 because it's non-boot

Create a mount pount, again I will say /mnt/Music

Code:
sudo mkdir /mnt/Music
Open fstab as root:

Code:
gksu gedit /etc/fstab

Add in the line (tabs and/or spaces - both are good)

Code:
/dev/sda2 /mnt/Music ext4 defaults 0 0
Save and exit and then run
Code:
sudo mount -a
More hints and explanation: http://wiki.archlinux.org/index.php/Fstab (ignore the fact it's for arch - it still works and fstab is a common file with the same config options across GNU/Linux)
__________________
"Freedom is the freedom to say that two plus two make four. If that is granted, all else follows".
George Orwell - Nineteen Eighty-Four
SuperSonic4 is offline   Reply With Quote
Old November 6th, 2009   #6
agoodliffe
First Cup of Ubuntu
 
Join Date: Mar 2008
Location: N'Djamena Chad
Beans: 11
Xubuntu 9.10 Karmic Koala
Re: How do i auto mount a partition??

Hello I am encoutnering the same problem.

Here is my fdisk -l
adrian@adrian-laptop:~$ sudo fdisk -l
[sudo] password for adrian:

Disk /dev/sda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf1d6f1d6

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1912 15358108+ 7 HPFS/NTFS
/dev/sda2 3129 11061 63721822+ c W95 FAT32 (LBA)
/dev/sda3 1913 3128 9767520 83 Linux
/dev/sda4 11813 12161 2803342+ 82 Linux swap / Solaris

Partition table entries are not in disk order
adrian@adrian-laptop:~$ ^C
adrian@adrian-laptop:~$
I want to mount the /dev/sda2 and the /dev/sda1
I created two folders in /media one called sda1 and the other windows
Then I did gksudo gedit /etc/fstab
Then I did /dev/sda1 /media/sda1 ext4 defaults 0 0
and the reply was sudo: /dev/sda1: Permission denied
ANy suggestions and yes I am a newbie to this as you can see
Thanks
agoodliffe is offline   Reply With Quote
Old November 6th, 2009   #7
harish4linux
5 Cups of Ubuntu
 
Join Date: Apr 2009
Beans: 18
Re: How do i auto mount a partition??

Fire up a terminal, to do this click Applications > Accessories > Terminal
Then type (or copy/paste) the following - 1 line at a time

Code:
sudo aptitude update
sudo aptitude install ntfs-config

Ok so when that returns you to user@pcname, that should be it installed

Next, make sure you have NO drives mounted (they'll usually appear on your desktop). And then run the program from Applications > System Tools

Note: In Ubuntu 9.04 (Jaunty) it appears that the configuration tool has moved to System > Administration.

Enter your password when prompted - and then choose the drives that you want to be automounted. Click Apply.

Now simply make sure that "Enable Write Support for Internal Drives" and click OK.

Enjoy your automounted NTFS Drives
harish4linux is offline   Reply With Quote
Old November 6th, 2009   #8
agoodliffe
First Cup of Ubuntu
 
Join Date: Mar 2008
Location: N'Djamena Chad
Beans: 11
Xubuntu 9.10 Karmic Koala
Re: How do i auto mount a partition??

thanks for the advice but I am not connected to the internet. ANy way to manually do it in Terminal? Or is it to dangerous/confusing
agoodliffe is offline   Reply With Quote
Old November 6th, 2009   #9
Zoot7
Has an Ubuntu Drip
 
Zoot7's Avatar
 
Join Date: Sep 2008
Location: Cork, Ireland
Beans: 717
Re: How do i auto mount a partition??

Quote:
Originally Posted by agoodliffe View Post
thanks for the advice but I am not connected to the internet. ANy way to manually do it in Terminal? Or is it to dangerous/confusing
Almost the same as I posted above.

Firstly make a mount point for the partition.
(Lets say Windows..)
Code:
sudo mkdir /media/Windows
Then edit fstab
Code:
kdesu kate /etc/fstab
Add the following line at the end and save.
Code:
/dev/sda1 /media/Windows ntfs-3g	defaults	0   0
Then to test it do
Code:
sudo mount -a
Browse to /media/Windows to test if it worked.

The terminal takes a bit of getting used to especially if you've never really used it much, but it's well worth it. It's without doubt an extremely powerful tool once you get the hang of it.
__________________

Last edited by Zoot7; November 6th, 2009 at 06:45 PM..
Zoot7 is offline   Reply With Quote
Old November 6th, 2009   #10
synicalx
5 Cups of Ubuntu
 
synicalx's Avatar
 
Join Date: Feb 2009
Location: ~/
Beans: 41
Ubuntu 9.04 Jaunty Jackalope
Re: How do i auto mount a partition??

Quote:
Originally Posted by harish4linux View Post
Fire up a terminal, to do this click Applications > Accessories > Terminal
Then type (or copy/paste) the following - 1 line at a time

Code:
sudo aptitude update
sudo aptitude install ntfs-config

Ok so when that returns you to user@pcname, that should be it installed

Next, make sure you have NO drives mounted (they'll usually appear on your desktop). And then run the program from Applications > System Tools

Note: In Ubuntu 9.04 (Jaunty) it appears that the configuration tool has moved to System > Administration.

Enter your password when prompted - and then choose the drives that you want to be automounted. Click Apply.

Now simply make sure that "Enable Write Support for Internal Drives" and click OK.

Enjoy your automounted NTFS Drives
Just browsing around and I saw this - thanks!

I've been having a bit of trouble with my MSI Wind's NTFS partition, this fixed it right up
__________________
Main Ubuntu Machine - MSI Wind U100 running 9.04
Gaming PC - AMD x3 720 @ 3ghz, 4gb DDR2, WD 1TB + Seagate 2.5" 40gb OS install, GTX280, Windows 7 (sigh)
synicalx is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:06 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry