Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mount ext2 file system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
sir-innuendo
n00b
n00b


Joined: 16 Jun 2006
Posts: 12
Location: Italy

PostPosted: Mon Jun 26, 2006 9:35 am    Post subject: Mount ext2 file system Reply with quote

I created an ext2 file system on /dev/hda2.
My fstab entry is
/dev/hda2 /data ext2 defaults,umask=000,rw 0 0

When I try
notebook ~ # mount /dev/hda2
mount: wrong fs type, bad option, bad superblock on /dev/hda2,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

Why? My intention is to create a partition (/dev/hda2) mounted so as to ALL users can rwx. I tried fat32 file system and all it work, but I need ext2 file system!
Back to top
View user's profile Send private message
derverstand
Guru
Guru


Joined: 15 Dec 2005
Posts: 511
Location: /dev/null

PostPosted: Mon Jun 26, 2006 11:20 am    Post subject: Reply with quote

First point: Error message
This error message normally occurs only and only if on this partition there is ext2! Are you sure, it's the right partition?
Try
Code:

fdisk /dev/hda

And then "p" for printing the partition table. If theres a partition /dev/hda2 try to redo the mkfs.ext2 (by the way: why not journaling with ext3?).

Second point: User access
I think its not a good idea to set the rights in the fstab. Why don't you just make a
Code:

chmod o+rwx <mountpoint>/.

as root? Then every user could create new directories/files.

Best regards!
Back to top
View user's profile Send private message
sir-innuendo
n00b
n00b


Joined: 16 Jun 2006
Posts: 12
Location: Italy

PostPosted: Mon Jun 26, 2006 11:40 am    Post subject: Reply with quote

We have had the same idea!! I want to make

Code:
chmod a=rwx <mountpoint>/.


I think to make an initscripts called "mymount"

Code:

#!/bin/sh

depend() {
        before *
}

start() {
        ebegin "Change access permissions of /data"
        chmod -R a=rwx /data
        eend $?
}


Put it into /etc/init.d/ and make

Code:

notebook ~ # rc-update add mymount boot
 * mymount added to runlevel boot
 * rc-update complete.


The problem now are boot messages like

Code:

* Could not get dependency info for "mymount"!
* Please run:

* # /sbin/depscan.sh

* to try and fix this.


Ok! I run this command but...nothing is changed.
Back to top
View user's profile Send private message
derverstand
Guru
Guru


Joined: 15 Dec 2005
Posts: 511
Location: /dev/null

PostPosted: Mon Jun 26, 2006 11:49 am    Post subject: Reply with quote

Hi,

With an init-script it doesn't make sense in my opinion too. If everybody could write to the disk, why forbit him to make files readonly etc? If you got a multiuser-environment you could change the default-permissions with
Code:

umash go+rwx

somewhere in the systemdefault .bashrc / .profile ! And if you still want to make everything read-/write-able to everybody, then a init-script would not help (you could even write a cron-job :)...

If you intend only to have a simple insecure scratch partition, why don't you just use fat32? It sould be good enough for this... Maybe I don't get your point! What the advantage of ext2 in your case?

Best regards!
Back to top
View user's profile Send private message
sir-innuendo
n00b
n00b


Joined: 16 Jun 2006
Posts: 12
Location: Italy

PostPosted: Mon Jun 26, 2006 12:23 pm    Post subject: Reply with quote

I must use ext2 partition because I see thunderbird has problems when I share mail between windows/linux (When I will find solution I will make a post, many people have this problem!).
Before I used fat32 file system but I see the problem is resolved with ext2 partition.
NOW problem is make a boot script like

Code:

#!/bin/sh

chmod -R a=rwx /data


executed obviously from root. So where I can put it?
Back to top
View user's profile Send private message
derverstand
Guru
Guru


Joined: 15 Dec 2005
Posts: 511
Location: /dev/null

PostPosted: Mon Jun 26, 2006 12:29 pm    Post subject: Reply with quote

Okay; if this is the only problem, take a look in:
Code:

/etc/init.d/local

And put the commands to be executed at startup in
Code:

/etc/init.d/local.start


Then adjust the /etc/fstab-entry to:
Code:

/dev/hda2 /data ext2 defaults,user,auto 0 0


Best regards:
Back to top
View user's profile Send private message
sir-innuendo
n00b
n00b


Joined: 16 Jun 2006
Posts: 12
Location: Italy

PostPosted: Mon Jun 26, 2006 1:39 pm    Post subject: Reply with quote

Thank you, all it work!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum