View previous topic :: View next topic |
Author |
Message |
sir-innuendo n00b
Joined: 16 Jun 2006 Posts: 12 Location: Italy
|
Posted: Mon Jun 26, 2006 9:35 am Post subject: Mount ext2 file system |
|
|
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 |
|
|
derverstand Guru
Joined: 15 Dec 2005 Posts: 511 Location: /dev/null
|
Posted: Mon Jun 26, 2006 11:20 am Post subject: |
|
|
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
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 |
|
|
sir-innuendo n00b
Joined: 16 Jun 2006 Posts: 12 Location: Italy
|
Posted: Mon Jun 26, 2006 11:40 am Post subject: |
|
|
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 |
|
|
derverstand Guru
Joined: 15 Dec 2005 Posts: 511 Location: /dev/null
|
Posted: Mon Jun 26, 2006 11:49 am Post subject: |
|
|
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
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 |
|
|
sir-innuendo n00b
Joined: 16 Jun 2006 Posts: 12 Location: Italy
|
Posted: Mon Jun 26, 2006 12:23 pm Post subject: |
|
|
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 |
|
|
derverstand Guru
Joined: 15 Dec 2005 Posts: 511 Location: /dev/null
|
Posted: Mon Jun 26, 2006 12:29 pm Post subject: |
|
|
Okay; if this is the only problem, take a look in:
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 |
|
|
sir-innuendo n00b
Joined: 16 Jun 2006 Posts: 12 Location: Italy
|
Posted: Mon Jun 26, 2006 1:39 pm Post subject: |
|
|
Thank you, all it work!! |
|
Back to top |
|
|
|