You are not logged in.

#1 2008-05-14 06:58:46

Flapjack
Member
Registered: 2008-05-08
Posts: 33

How to gain access to second Linux partition

Hi,

Before I start, I'd just like to say how impressed I am with Arch! I've only been using it for a week now, a bit less in fact, but it's already wowing me enough to make me think about changing my loyalties from Debian to Arch - something I thought would be impossible even a few weeks back!
Anyway, my problem is, should be a simple one this, how to access my Arch partition from Debian and vice versa. In Debian, I can see the Arch partition in Dolphin, but when I click on it I get a permission denied message. When I try to mount this device (in Dolphin not with the command line) I get the same message. Now, in the bad old days when I shared my Linux computer with Windows, I was able to access my FAT32 partition by simply going into /media, finding the partition (let's say hda2) and chmod-ing it, ie chmod 0777 /media/hda2. I wanted to see if this would work with my Arch partition, but I don't even see it in /media/ Instead I went into /dev and tried changing permission there, but to no avail. I've tried tinkering around with the fstab file, but I'm very much an amateur at this, and now I don't know what to try. Here is the result of fdisk -l (hda1 is Debian):

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        7047    56604996   83  Linux
/dev/hda2            9447        9729     2273197+   5  Extended
/dev/hda3            7048        9446    19269967+  83  Linux
/dev/hda5            9447        9729     2273166   82  Linux swap / Solaris

And here is the fstab file (I have myself entered the line for hda3):

debian:/home/james# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hda1       /               ext3    defaults,errors=remount-ro 0       1
/dev/hda3       /               ext3    defaults, errors=remount-ro 0 0 2
/dev/hda5       none            swap    sw              0       0
/dev/hdc        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/hdd        /media/cdrom1   udf,iso9660 user,noauto     0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0

/dev/sdb1 /media/usb0 vfat rw,user,users,noauto,noatime,noauto 1 2

Can anyone help me with this?

Thanks a lot in advance.

Offline

#2 2008-05-14 08:04:06

toliman
Member
Registered: 2008-05-14
Posts: 11

Re: How to gain access to second Linux partition

You should change your mount point of '/dev/hda3' to something like '/media/arch' in '/etc/fstab' and create this directory with 'mkdir /media/arch'. For now '/dev/hda1' and '/dev/hda3' will be mounted to '/', the root folder. This is not possible.
After making this changes in Debian everything should work just fine.

I wouldn't suggest you to set the mode '777' to '/media/arch', since it is the root folder of your arch system and you'll defenetly not want to give everybody write access to it. Set this mode to a sub folder in there '/media/arch/home/mylogin/share'. Or use the root account if you need to change some system files in arch.

Setting the mode on any file in '/dev/*' won't last long. After you reboot the system the permission will be lost. The content of '/dev' will be generated on the fly. You'll have to set-up udev to have the mode set permanently.

Offline

#3 2008-05-14 15:06:23

Flapjack
Member
Registered: 2008-05-08
Posts: 33

Re: How to gain access to second Linux partition

Thanks for your reply toliman. I've tried doing what you suggested but it still doesn't work. Here is my new fstab file:

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hda1       /               ext3    defaults,errors=remount-ro 0       1
/dev/hda3       /media/arch     ext3    defaults, errors=remount-ro 0 0 2
/dev/hda5       none            swap    sw              0       0
/dev/hdc        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/hdd        /media/cdrom1   udf,iso9660 user,noauto     0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0

/dev/sdb1 /media/usb0 vfat rw,user,users,noauto,noatime,noauto 1 2

And here is the result of ls -l /media:

drwxr-xr-x 2 root root  4096 2008-05-14 16:43 arch
lrwxrwxrwx 1 root root     6 2007-06-07 17:13 cdrom -> cdrom0
drwxr-xr-x 2 root root  4096 2007-06-07 17:13 cdrom0
drwxr-xr-x 2 root root  4096 2007-06-07 17:13 cdrom1
lrwxrwxrwx 1 root root     7 2007-06-07 17:13 floppy -> floppy0
drwxr-xr-x 2 root root  4096 2007-06-07 17:13 floppy0
drwxr-xr-x 2 root root  4096 2008-04-03 14:17 IOMEGA_HDD
drwxr-xr-x 2 root root  4096 2008-01-10 14:56 sda1
drwxrwxrwx 2 root cdrom 4096 2007-12-15 20:44 usb0

Still the same issues: pemissions denied when I try to open or mount hda/3 with dolphin. When I try to mount as root using the command line I get:

debian:/home/james# mount /dev/hda3
[mntent]: line 6 in /etc/fstab is bad
mount: can't find /dev/hda3 in /etc/fstab or /etc/mtab

Thanks once again.

Offline

#4 2008-05-14 16:04:36

Aaron
Member
From: PA, USA
Registered: 2007-12-19
Posts: 108
Website

Re: How to gain access to second Linux partition

Just a hunch, but on your /dev/hda3 line, you have 3 parameters at the end for the "DUMP" "PASS" section.  You should only have 2 numbers at the end, not 3.

Also, try using the command "sudo mount -a", that should re-read your fstab and remount all partitions.

Last edited by Aaron (2008-05-14 16:05:42)

Offline

#5 2008-05-14 16:08:39

Gruntz
Member
From: Haskovo, Bulgaria
Registered: 2007-08-31
Posts: 291

Re: How to gain access to second Linux partition

I thing you have too many parameters on that row.

Replace:
/dev/hda3       /media/arch     ext3    defaults, errors=remount-ro   0    0    2

with
/dev/hda3       /media/arch     ext3    defaults, errors=remount-ro   0    2

I hope that will help.

Edit:
Aaron was faster big_smile

Last edited by Gruntz (2008-05-14 16:09:48)

Offline

#6 2008-05-14 18:07:24

Flapjack
Member
Registered: 2008-05-08
Posts: 33

Re: How to gain access to second Linux partition

That's it! Thanks a million guys!
But the first time I tried I got the same problem. Then I looked at the /dev/hda3 line and noticed that the spaces between the 0 and 2 were smaller than those in the /dev/hda1 line. So I simply copied the line from hda1 and changed the 1 to a 2. When I ran su mount -a, it all worked after that. Forgive me for asking what might seem like a simple question, but how do you separate each element in this file? It looks to me that the items are separated by a tab. Is this it?

Last edited by Flapjack (2008-05-14 18:08:05)

Offline

#7 2008-05-14 19:11:44

Aaron
Member
From: PA, USA
Registered: 2007-12-19
Posts: 108
Website

Re: How to gain access to second Linux partition

Flapjack wrote:

Forgive me for asking what might seem like a simple question, but how do you separate each element in this file? It looks to me that the items are separated by a tab. Is this it?

I've actually been confused by this issue as well, some distro's I've tried only use a single tab, while others use a space, or others use 4 spaces!

I believe the separating factor is whitespace, the preference over tab or space is merely stylistic.  I've had both mixed into my /etc/fstab without any noticeable ill effects.  Try to keep it consistent though.

If anyone knows for sure the difference between using a tab and a space in /etc/fstab, feel free to correct me. cool

Offline

#8 2008-05-14 20:19:01

Zepp
Member
From: Ontario, Canada
Registered: 2006-03-25
Posts: 334
Website

Re: How to gain access to second Linux partition

Aaron wrote:
Flapjack wrote:

Forgive me for asking what might seem like a simple question, but how do you separate each element in this file? It looks to me that the items are separated by a tab. Is this it?

I've actually been confused by this issue as well, some distro's I've tried only use a single tab, while others use a space, or others use 4 spaces!

I believe the separating factor is whitespace, the preference over tab or space is merely stylistic.  I've had both mixed into my /etc/fstab without any noticeable ill effects.  Try to keep it consistent though.

If anyone knows for sure the difference between using a tab and a space in /etc/fstab, feel free to correct me. cool

You can use tab or spaces, or any combination of the two to separate two fields.

The problem was you had a space after the comma in line 3 (it wasn't there in line 2) that is why it still did not work.

Offline

Board footer

Powered by FluxBB