Help - Search - Members - Calendar
Full Version: /hdd3 As Ext2?
OESF Forums > Distros, Development, and Model Specific Forums > Model Specific Forums > C1000/3x00 General discussions
daniel3000
Hello,

due to file system problems (filesystem panic, FAT error, drive was always remounted read only automatically) I had to reformat my /hdd3 (SL-C3000) and restore a backup. fsck.vfat didn't help anymore.

I unmounted it and did a mkdosfs -F 32 /dev/hda3

Well, now I'm afraid that I'll have file system problems again, and I really don't want to go through this procedure once more.

So I wondered if I can easily instead format it with ext2 or even ext3 without having problems. Anyone knows?

I don't see any point in making this drive vfat. I think this is only important if the drive is read by a Windows machine, which is never the case in the SL-C3000.
Even if the contents are provided by Samba through the network, the file system doesn't matter. Only (maybe?) if the usbstorage PC link setting is used, but I avoid that anyway.

Thanks a lot

daniel
crstophr
Yes you can but you will need to edit the ro.filesys script (I think that's it) to change the mount commands to be ext3 instead of vfat. If you do that it will work just fine, with the exception that a windows box won't be able to mount it as usual.

--Chris

QUOTE(daniel3000 @ Aug 20 2005, 04:33 AM)
Hello,

due to file system problems (filesystem panic, FAT error, drive was always remounted read only automatically) I had to reformat my /hdd3 (SL-C3000) and restore a backup. fsck.vfat didn't help anymore.

I unmounted it and did a mkdosfs -F 32 /dev/hda3

Well, now I'm afraid that I'll have file system problems again, and I really don't want to go through this procedure once more.

So I wondered if I can easily instead format it with ext2 or even ext3 without having problems. Anyone knows?

I don't see any point in making this drive vfat. I think this is only important if the drive is read by a Windows machine, which is never the case in the SL-C3000.
Even if the contents are provided by Samba through the network, the file system doesn't matter. Only (maybe?) if the usbstorage PC link setting is used, but I avoid that anyway.

Thanks a lot

daniel
*
daniel3000
QUOTE(crstophr @ Aug 21 2005, 02:15 AM)
Yes you can but you will need to edit the ro.filesys script (I think that's it) to change the mount commands to be ext3 instead of vfat.  If you do that it will work just fine, with the exception that a windows box won't be able to mount it as usual.

--Chris

*


hmm - no such script here, at least I couldn't find it.
So you know its location or does anyone know if it's called differently in cacko ROM?

thanks


daniel
Cyril92
QUOTE(daniel3000 @ Aug 21 2005, 02:13 PM)
QUOTE(crstophr @ Aug 21 2005, 02:15 AM)
Yes you can but you will need to edit the ro.filesys script (I think that's it) to change the mount commands to be ext3 instead of vfat.  If you do that it will work just fine, with the exception that a windows box won't be able to mount it as usual.

--Chris

*


hmm - no such script here, at least I couldn't find it.
So you know its location or does anyone know if it's called differently in cacko ROM?

thanks


daniel
*


Did you try a reinstallation of Sharp Rom v1.11JP ?

OR with menu on+OK , option 3 then 1. (reset /hdd3 to factory settings)
daniel3000
[quote=Cyril92,Aug 22 2005, 02:08 PM]
hmm - no such script here, at least I couldn't find it.
So you know its location or does anyone know if it's called differently in cacko ROM?

thanks


daniel
*

[/quote]
Did you try a reinstallation of Sharp Rom v1.11JP ?

OR with menu on+OK , option 3 then 1. (reset /hdd3 to factory settings)
*

[/quote]

No, I backed up all data and did a mkfs.vfat -F32 /dev/hda3.
But I think that is what happens if the hdd3 is set to factory defaults (and some standard directories may be created, but they are in my backup already, so no need to let them create).

I also found the script now, it is called /etc/rc.d/rc.rofilesys, but it contains only the line

CODE
#exit 0


Is there any other config file / script holding the relevant information or is the filesystem type determinded automatically under Cacko ROM?

daniel
bam
found this http://thegrinder.ws/zaurus/conver-t-hdd3-...xt3-filesystem/ , its a nice how-to, it is not mine but I put it up on my site anyways, let me know if it turns out ok.
bam
I started looking into this too, I too only found one line of code, how unusual.
bam
Some more nfo, everything I have read so far says the first poting I did is correct.

CODE
$ diff rc.rofilesys.orig rc.rofilesys
84c84
< mkfs.vfat -F 32 /dev/${IDE1}3 2> /dev/null > /dev/null
---
> mke2fs $MKE2FSOPT /dev/${IDE1}3 2> /dev/null > /dev/null
105c105
< mount -t vfat -o noatime,quiet,umask=000,iocharset=utf8 /dev/${IDE1}3 /hdd3
---
> mount -t $LINUXFMT -o noatime /dev/${IDE1}3 /hdd3
202c202
<       mount -t vfat -o noatime,quiet,umask=000,iocharset=utf8 /dev/${IDE1}3 /hdd3
---
>       mount -t ext3 -o noatime /dev/${IDE1}3 /hdd3
264c264
<       mount -t vfat -o noatime,quiet,umask=000,iocharset=utf8 /dev/${IDE1}3 /hdd3
---
>       mount -t ext3 -o noatime /dev/${IDE1}3 /hdd3


you can see where its forcing the fs to be ext3
bam
seems you have to compile the rc.rofilesys
CODE
Procedure:
1. /root/etc/rc.d/rc.rofilesys compilation
# mount -o remount and rw /
# cd /root/etc/rc.d
# cp -p rc.rofilesys rc.rofilesys.org
# vi rc.rofilesys


and then make the 4 changes for your hdd.
bam
this one is interesting, it actually does a fsck during boot, no more maintenance menu

from a A300(btw)

CODE
#!/bin/bash

#export PATH=$PATH:/usr/sbin.rom:/usr/bin.rom

KERNEL_MODULE=/lib/modules.rom/`/bin/uname -r`/kernel

RAM_MTD_NO=`cat /proc/mtd | grep mtdram | tail -n 1 | cut -d: -f1 | cut -dd -f2`
RAM_MTD=/dev/mtd$RAM_MTD_NO
RAM_MTDBLK=/dev/mtdblock$RAM_MTD_NO
RAM_MTD_SIZE_HEX=`cat /proc/mtd | grep mtdram | tail -n 1 | cut -d" " -f 2`
RAM_MTD_SIZE=`dc 0x$RAM_MTD_SIZE_HEX 1024 /`
initlog -s $"found $RAM_MTD ${RAM_MTD_SIZE}\"Kbyte\""

SD_HOME=/dev/mmcda2

shponmode=$(oncheck)
#
## HW reset or SW reset ?
#
if [ "$shponmode" = "HW Reset" ]; then
### HW Reset !

if [ -x /sbin/insmod ]; then
   action "Loading devinfo:" /sbin/insmod ${KERNEL_MODULE}/arch/arm/mach-cotulla/devinfo.o
   action "Loading SD driver:" /sbin/insmod ${KERNEL_MODULE}/drivers/block/sharp_mmcsd_m.o
fi

if /bin/mount -t ext2 $SD_HOME /home 2> /dev/null; then
   SD_EXIST=yes
   echo $"OK, SD (/dev/mmcda2) is mounted to /home"
   rm -f /home/.not_sd
   mount -t tmpfs /dev/shm /tmp
else
   SD_EXIST=no
  /sbin/rmmod sharp_mmcsd_m
  /sbin/rmmod devinfo

  mount -t tmpfs /dev/shm /home
  cd /
  tar xf /root/.home_default.tar
  mount -o bind /home/tmp /tmp
  touch /home/.not_sd
fi

dd if=/dev/zero of=$RAM_MTD bs=1024 count=$RAM_MTD_SIZE 2> /dev/null > /dev/null

STRING=$"Starting filesystem: "
msg -n $STRING

if [ `expr "$RAM_MTD_SIZE" \>\= 10240` != "0" ]; then
    BYTES_PER_INODE="2048"
else
    BYTES_PER_INODE="1024"
fi
mke2fs -b 1024 -i $BYTES_PER_INODE $RAM_MTDBLK $RAM_MTD_SIZE 2> /dev/null > /dev/null

mount -t ext2 -o sync $RAM_MTDBLK /var
cd /
tar xf /root/.var_default.tar
# cd /var
# tar xf /root/.dev_default.tar
mount -o bind /var/dev /dev


rc=$?
if [ "$rc" = "0" ]; then
   success "$STRING"
else
   failure "$STRING"
fi
msg
oncheck -clear > /dev/null 2>&1
#


else
### SW Reset.

STRING=$"Checking filesystem: "
msg -n $STRING

initlog -c "e2fsck -y -f $RAM_MTDBLK"

rc=$?
if [ "$rc" = "0" ]; then
   success "$STRING"
   msg
elif [ "$rc" = "1" ]; then
   passed $"$STRING"
   msg
else
   failure "$STRING"

   echo
   echo
   echo $"*** An error occurred during"
   echo $"*** the file system check."
   echo $"*** Dropping you to a shell;"
   echo $"*** the system will reboot"
   echo $"*** when you leave the shell."

   PS1=$"(Repair FS) \# # "; export PS1
   sulogin

   echo $"Unmounting file systems"
   umount -a
   mount -n -o remount,ro /
   echo $"Automatic reboot in progress."
   reboot -f
fi
mount -t ext2 -o sync $RAM_MTDBLK /var
# mkdir /var/dev  2> /dev/null > /dev/null
# cd /var
# tar xf /root/.dev_default.tar
mount -o bind /var/dev /dev


if [ -x /sbin/insmod ]; then
   action "Loading devinfo:" /sbin/insmod ${KERNEL_MODULE}/arch/arm/mach-cotulla/devinfo.o
   action "Loading SD driver:" /sbin/insmod ${KERNEL_MODULE}/drivers/block/sharp_mmcsd_m.o
fi

if /bin/mount -t ext2 $SD_HOME /home 2> /dev/null; then
   SD_EXIST=yes
   echo $"OK, SD (/dev/mmcda2) is remounted to /home"
   rm -f /home/.not_sd
   mount -t tmpfs /dev/shm /tmp
else
   SD_EXIST=no
  /sbin/rmmod sharp_mmcsd_m
  /sbin/rmmod devinfo

  mount -t tmpfs /dev/shm /home
  cd /
  tar xf /root/.home_default.tar
  mount -o bind /home/tmp /tmp
  touch /home/.not_sd
fi


oncheck -clear > /dev/null 2>&1

fi


I might actually do that.....
bam
maybe someone with more experience can explain that one, a fsck would be great during a hard reset.
daniel3000
QUOTE(bam @ Aug 22 2005, 07:51 PM)
found this http://thegrinder.ws/zaurus/conver-t-hdd3-...xt3-filesystem/ , its a nice how-to, it is not mine but I put it up on my site anyways, let me know if it turns out ok.
*


I get "This post is password-protected"...

Thanks for posting all the details. once I can read the article the puzzle will become complete I hope <g>.

I agree that an fsck during a hard reset would be great. However, maybe not during every hard reset but only after a crash (i.e. if the filesystem is not flagged clean) and after so-and-so many mounts.

daniel
bam
unpassword protected it, oops....
bam
no-one tried the fsck yet? well I might as well try it....
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.