PDA

Bekijk de volledige versie : mkdir: Cannot create directory `/opt/etc'



cristian.ene
05-02-2010, 20:37
Dear all,

First of all.... i'm such a noob and a newbie, but, i kind of want this to work.
I am good at directions so,.. i will take good directions :D

I'm stuck at this step:

"mkdir /opt/etc
mkdir /opt/etc/init.d
vi /opt/etc/init.d/rc.unslung"

"Remark: If you get a "mkdir: Cannot create directory `/opt/etc': Read-only file system" your HDD (here the IPKG pertition) is NOT mounted."

I have this error, and i don't know what to do next! please help me!

al37919
05-02-2010, 21:13
to be able to create something in /opt, you should first mount something there (external hdd, flashdrive, etc.). See, e.g. wengi's guide for details

cristian.ene
05-02-2010, 21:56
to be able to create something in /opt, you should first mount something there (external hdd, flashdrive, etc.). See, e.g. wengi's guide for details

I have an external hdd, 250 gb partitioned in 5 GB 2 GB and rest...

So... what can i do?

L.E. I was in part 5 in wengi's guide, startup scripts. :) and i'm stuck
http://extremeportal.hi2.ro/pictures/acd2e335e8e5d0fe5fc029b0ad3b1f79.jpg

cristian.ene
05-02-2010, 22:17
I have an external hdd, 250 gb partitioned in 5 GB 2 GB and rest...

So... what can i do?

L.E. I was in part 5 in wengi's guide, startup scripts. :) and i'm stuck
http://extremeportal.hi2.ro/pictures/acd2e335e8e5d0fe5fc029b0ad3b1f79.jpg

Picture here (http://extremeportal.hi2.ro/pictures/acd2e335e8e5d0fe5fc029b0ad3b1f79.jpg)

cristian.ene
05-02-2010, 22:19
I skipped this part thought!

There is a script to keep the file system clean:
Code:

vi /usr/local/sbin/pre-mount

with this content:
Code:

#! /bin/sh

swapon -a

for i in `awk '/ext3/{print($1)}' /etc/fstab` ; do
if [ -b $i ] ; then
grep -q $i /proc/mounts || e2fsck -p $i 2>&1 | logger -t e2fsck
else
logger -t fstab "$i is not attached"
fi
done

pre-mount will start e2fsck if needed. My WL-HDD with its 80GB HDD takes some hours to do this check! It is possible that your router is switched on and the HDD becomes available hours later. You can leave pre-mount empty to prevent this, but your file system will have to be checked from time to time. Your decision. I have this activated.
post-mount is executed after pre-mount

cristian.ene
05-02-2010, 22:29
DF command

http://extremeportal.hi2.ro/pictures/3614e081f82387ed4557f22da3cb1da7.jpg