LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   i cant open/mount brand spanking new partitions! (https://www.linuxquestions.org/questions/linux-software-2/i-cant-open-mount-brand-spanking-new-partitions-650134/)

jamwaffles 06-18-2008 01:41 PM

i cant open/mount brand spanking new partitions!
 
hi

any help here would be better than a blank brain! my problem is i have created a new 'Photos' partition under ebian 4.0 using gparted. gparted returned no errors, but nautilus says

unable to mount the selected volume

libhal-storage.c 1401 : info: called libhal_free_dbus_error but dbuserror was not set.

process 10243: applications must not close shared connections - see dbus_connection_close() docs. this is a bug in the application.

error: device /dev/hda2 is not removable

error: could not execute pmount

as you can see, the device is on /dev/hda2, but i cannot work out for the life of me why i cant mount it. HEEELP!

ps. if ive missed anything out (bar punctuation lol), please let me know

james waples, 14

TB0ne 06-18-2008 02:23 PM

You created the partition, but did you create the file system on it?

farslayer 06-18-2008 02:39 PM

Yep a bare partition with no file system can not be mounted..

man mkfs.ext3

mkfs.ext3 /dev/hda2

jamwaffles 06-19-2008 09:50 AM

umm... i dont think so. thanks so much for your help. i didnt think of that, so the saying 'you learn something new every day' really does work then!

thanks

james

jamwaffles 06-19-2008 09:54 AM

i have just tried that to no avail. would it be because the partition has no mount point. gparted also reads it as ext3, so my question is: how do i change the mount point of the partition?

thanks

james

farslayer 06-19-2008 11:28 AM

can you manually mount the partition ?


Open a shell and as root, try the following

mkdir /media/photos
mount /dev/hda2 /media/photos
cd /media/photos
mount


Does mount show the drive as mounted now ?
Can you create a file on the drive ?

If that works then you can edit your /etc/fstab file to add a mount point that will be available automatically at boot time.



If that Doesn't work ywould you post the output of the following commands here ?

mount

fdisk -l


Then we can see what is mounted and what drives and partitions are available on your system.

jomen 06-19-2008 11:37 AM

A partition without filesystem cannot be mounted - and if mounted mkfs would refuse to work.
You could try the -f switch to mkfs.
gparted reads it as ext3 because before the space belonged to a partition with ext3 on it(?)

It could be that you solve this by rebooting - not like the fix-all-solution for windows...but:
the partition table (layout) has changed - it could be that the kernel has problems even seeing the new partition - and thus cannot work on it.
After rebooting the creation of a filesystem there should be no problem.
There could be a way without rebooting - but I don't know it.

jamwaffles 06-20-2008 04:21 AM

thanks very much.

i have tried the

mkdir /media/photos
mount /dev/hda2 /media/photos
cd /media/photos
mount

solution and it seems to work, so ta muchly, people!

farslayer 06-20-2008 08:51 AM

so now if you wish for that to mount automatically at every boot, you need to add an entry in your /etc/fstab file.

If you wish for PHOTOS to mount in a different location, say for instance under your home directory, you need to create a folder for it to use as a mount point in your home directory, then alter your fstab so that partition mounts to that folder..

As your normal user..

mkdir ~/photos

As root edit your /etc/fstab file

cp /etc/fstab /etc/fstab.bak - Back up your fstab file before starting
nano /etc/fstab - Edit the file using nano, pico, vi or whatever you feel comfortable with

Add a line at the end of your /etc/fstab file like the following
Code:

/dev/hda2      /home/username/photos          ext3    defaults        0      0
after that the partition should mount as /home/username/photos automatically every time you boot your machine.

jamwaffles 06-21-2008 04:12 AM

yeah. i have done that already and everything is working fantastically. thanks for all the help lads. i feel like such an idiot, but i had no second clue, so thanks again.

james


All times are GMT -5. The time now is 05:58 PM.