Author Topic: /hdd3 As Ext2?  (Read 4769 times)

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
/hdd3 As Ext2?
« on: August 20, 2005, 08:33:03 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
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

crstophr

  • Newbie
  • *
  • Posts: 18
    • View Profile
/hdd3 As Ext2?
« Reply #1 on: August 20, 2005, 08:15:44 pm »
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
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
[div align=\"right\"][a href=\"index.php?act=findpost&pid=92620\"][{POST_SNAPBACK}][/a][/div]

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
/hdd3 As Ext2?
« Reply #2 on: August 21, 2005, 08:13:19 am »
Quote
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

[div align=\"right\"][a href=\"index.php?act=findpost&pid=92675\"][{POST_SNAPBACK}][/a][/div]

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
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

Cyril92

  • Full Member
  • ***
  • Posts: 122
    • View Profile
/hdd3 As Ext2?
« Reply #3 on: August 22, 2005, 08:08:34 am »
Quote
Quote
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

[div align=\"right\"][a href=\"index.php?act=findpost&pid=92675\"][{POST_SNAPBACK}][/a][/div]

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
[div align=\"right\"][a href=\"index.php?act=findpost&pid=92712\"][{POST_SNAPBACK}][/a][/div]
Did you try a reinstallation of Sharp Rom v1.11JP ?

OR with menu on+OK , option 3 then 1. (reset /hdd3 to factory settings)
SL-C760 (Cacko ROM), 256Mb CF,512Mb SD
Pentopia stylus 3in1,CF wifi , CE-RH1
looking for : SL5500
Previous : C3000,C860 & 6000L.

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
/hdd3 As Ext2?
« Reply #4 on: August 22, 2005, 11:14:31 am »
Quote from: 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
[div align=\"right\"][a href=\"index.php?act=findpost&pid=92712\"][{POST_SNAPBACK}][/a][/div]
Did you try a reinstallation of Sharp Rom v1.11JP ?

OR with menu on+OK , option 3 then 1. (reset /hdd3 to factory settings)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=92829\"][{POST_SNAPBACK}][/a][/div]
[/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: [Select]
#exit 0
Is there any other config file / script holding the relevant information or is the filesystem type determinded automatically under Cacko ROM?

daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
/hdd3 As Ext2?
« Reply #5 on: August 22, 2005, 01:51:29 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.
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
/hdd3 As Ext2?
« Reply #6 on: August 22, 2005, 02:29:04 pm »
I started looking into this too, I too only found one line of code, how unusual.
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
/hdd3 As Ext2?
« Reply #7 on: August 22, 2005, 04:36:29 pm »
Some more nfo, everything I have read so far says the first poting I did is correct.

Code: [Select]
$ 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
« Last Edit: August 22, 2005, 04:38:06 pm by bam »
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
/hdd3 As Ext2?
« Reply #8 on: August 22, 2005, 04:45:14 pm »
seems you have to compile the rc.rofilesys
Code: [Select]
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.
« Last Edit: August 22, 2005, 04:46:00 pm by bam »
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
/hdd3 As Ext2?
« Reply #9 on: August 22, 2005, 04:54:14 pm »
this one is interesting, it actually does a fsck during boot, no more maintenance menu

from a A300(btw)

Code: [Select]
#!/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.....
« Last Edit: August 22, 2005, 04:58:11 pm by bam »
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
/hdd3 As Ext2?
« Reply #10 on: August 22, 2005, 04:57:15 pm »
maybe someone with more experience can explain that one, a fsck would be great during a hard reset.
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
/hdd3 As Ext2?
« Reply #11 on: August 23, 2005, 03:05:38 am »
Quote
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=92874\"][{POST_SNAPBACK}][/a][/div]

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
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
/hdd3 As Ext2?
« Reply #12 on: August 23, 2005, 02:56:56 pm »
unpassword protected it, oops....
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
/hdd3 As Ext2?
« Reply #13 on: August 23, 2005, 11:08:03 pm »
no-one tried the fsck yet? well I might as well try it....
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder