Author Topic: May Have Bricked 3100  (Read 10330 times)

barryg

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
    • http://web.kssp.upd.edu.ph/barry/zaurus/
May Have Bricked 3100
« Reply #15 on: September 13, 2005, 06:49:21 pm »
Good Day!
Quote
After trying both of the procedures, I still get the same error message on boot up: "HDD1 Error!!"
[div align=\"right\"][a href=\"index.php?act=findpost&pid=95675\"][{POST_SNAPBACK}][/a][/div]

Please attache the  /mnt/home/etc/rc.d/rc.rofilesys file to verify.

Mabuhay! barryg

Shaka

  • Newbie
  • *
  • Posts: 19
    • View Profile
May Have Bricked 3100
« Reply #16 on: September 14, 2005, 06:57:13 am »
Here is a copy of the rc.rofileysys as it is on my zaurus, and then copied to a CF so that I can copy/paste it to here:

#!/bin/bash

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

LINUXFMT=ext2
#LINUXFMT=ext3
MKE2FSOPT=
if [ "$LINUXFMT" = "ext3" ]; then
   MKE2FSOPT=-j
fi

#
# get device pcmcia_slot
#     format: get_dev_pcmcia_slot [slot number]
#                 slot number: 0, 1
#     output: device name (hda or hdc)
#
get_dev_pcmcia()
{
while read SOCKET CLASS DRIVER INSTANCE DEVS MAJOR MINOR;
do
    echo $DEVS
done
}
get_dev_pcmcia_slot()
{
    grep "^$1" /var/lib/pcmcia/stab | get_dev_pcmcia
}

RW_MTD_LINE=`cat /proc/mtd | grep "home" | tail -n 1`
if [ "$RW_MTD_LINE" = "" ]; then
    RW_MTD_LINE=`cat /proc/mtd | grep "\<NAND\>.*\<2\>" | tail -n 1`
fi
RW_MTD_NO=`echo $RW_MTD_LINE | cut -d: -f1 | cut -dd -f2`
RW_MTD_SIZE_HEX=`echo $RW_MTD_LINE | cut -d" " -f2`
RW_MTD=/dev/mtd$RW_MTD_NO
RW_MTDBLK=/dev/mtdblock$RW_MTD_NO
RW_MTD_SIZE=`dc 0x$RW_MTD_SIZE_HEX 1024 /`
initlog -s $"found $RW_MTD ${RW_MTD_SIZE}\"Kbyte\""

#echo "ZAURUS_RESET=$ZAURUS_RESET RW_MTD_NO=$RW_MTD_NO RW_MTD_SIZE_HEX=$RW_MTD_SIZE_HEX"
#ZAURUS_RESET=HARD
if [ "$ZAURUS_RESET" = "HARD" ]; then

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

# mount /home
/sbin/eraseall $RW_MTD 2> /dev/null > /dev/null
mount -t jffs2 -o rw,noatime $RW_MTDBLK /home
cd /
tar xf /root/.home_default.tar

# mount /dev
dd if=/dev/zero of=/dev/ram1 bs=1024 count=64 2> /dev/null > /dev/null
mkfs.minix -i 512 /dev/ram1 64 2> /dev/null > /dev/null
mount -t minix /dev/ram1 /dev
(cd /home ; tar cf - dev | (cd / ; tar xf -))

# mount /tmp
mount -t tmpfs -o size=1m none /dev/shm
mkdir /dev/shm/tmp
chmod 4777 /dev/shm/tmp
mkdir /dev/shm/run
touch /dev/shm/run/utmp
mkdir /dev/shm/run/usb

/etc/ledmode reset

# mount HDD
/etc/rc.d/init.d/pcmcia start
while [ "$IDE1" = "" ]; do
   IDE1=`get_dev_pcmcia_slot 1`
done

if [ "$HDDCLEAR" = "YES" ]; then
   dd if=/dev/zero of=/dev/${IDE1}2 > /dev/null 2> /dev/null
fi
mke2fs $MKE2FSOPT /dev/${IDE1}2 2> /dev/null > /dev/null
e2fsck -p /dev/${IDE1}2 > /dev/null
if [ "$HDDCLEAR" = "YES" ]; then
   dd if=/dev/zero of=/dev/${IDE1}3 > /dev/null 2> /dev/null
fi
##mkfs.vfat -F 32 /dev/${IDE1}3 2> /dev/null > /dev/null
mount -t $LINUXFMT -o ro,noatime /dev/${IDE1}1 /hdd1
rc=$?
if [ "$rc" != "0" ]; then
   echo -n "HDD1 Error!! "
   /bin/ledctl ledmode 0
   /bin/ledctl alarm 1
   while [ "$DUMMY" = "" ]; do
      sleep 1
   done
fi
mount -t $LINUXFMT -o noatime /dev/${IDE1}2 /hdd2
rc=$?
if [ "$rc" != "0" ]; then
   echo -n "HDD2 Error!! "
   /bin/ledctl ledmode 0
   /bin/ledctl alarm 1
   while [ "$DUMMY" = "" ]; do
      sleep 1
   done
fi
##mount -t vfat -o noatime,quiet,umask=000,iocharset=utf8 /dev/${IDE1}3 /hdd3
rc=$?
if [ "$rc" != "0" ]; then
   echo -n "HDD3 Error!! "
   /bin/ledctl ledmode 0
   /bin/ledctl alarm 1
   while [ "$DUMMY" = "" ]; do
      sleep 1
   done
fi
if [ ! -f /hdd1/.sys/hdimage2.tgz ]; then
    echo "Error!! HDD is not initialized!"
fi
cd /
gzip -dc /hdd1/.sys/hdimage2.tgz | tar xf -

sltime -clear

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

else
### SW Reset !

#STRING=$"Checking filesystem: "

# mount /home
mount -t jffs2 -o rw,noatime $RW_MTDBLK /home

# mount /dev
dd if=/dev/zero of=/dev/ram1 bs=1024 count=64 2> /dev/null > /dev/null
mkfs.minix -i 512 /dev/ram1 64 2> /dev/null > /dev/null
mount -t minix /dev/ram1 /dev
(cd /home ; tar cf - dev | (cd / ; tar xf -))


if [ -f /home/etc/restorepc ]; then
   RESTORE_CONNECTION=`cat /home/etc/restorepc`
else
   RESTORE_CONNECTION=""
fi
if [ "$RESTORE_CONNECTION" != "" ]; then

   cp /home/etc/restoreip /dev/restoreip 2> /dev/null > /dev/null
   cp /home/zaurus/Settings/Security.conf /dev/Security.conf 2> /dev/null > /dev/null
   umount $RW_MTDBLK
   /sbin/eraseall $RW_MTD 2> /dev/null > /dev/null
   mount -t jffs2 -o rw,noatime $RW_MTDBLK /home
   mount -t tmpfs -o size=1m none /dev/shm
   mkdir /dev/shm/tmp
   chmod 4777 /dev/shm/tmp
   mkdir /dev/shm/run
   touch /dev/shm/run/utmp
   mkdir /dev/shm/run/usb
   cd /
   tar xf /root/.home_default.tar
   rm -rf /home/zaurus/Applications/Contents/

   /etc/ledmode reset

   # mount HDD
   /etc/rc.d/init.d/pcmcia start
   while [ "$IDE1" = "" ]; do
      IDE1=`get_dev_pcmcia_slot 1`
   done

   mount -t $LINUXFMT -o ro,noatime /dev/${IDE1}1 /hdd1
   rc=$?
   if [ "$rc" != "0" ]; then
      echo -n "HDD1 Error!! "
      /bin/ledctl ledmode 0
      /bin/ledctl alarm 1
      while [ "$DUMMY" = "" ]; do
         sleep 1
      done
   fi
   
   mke2fs $MKE2FSOPT /dev/${IDE1}2 2> /dev/null > /dev/null
   e2fsck -p /dev/${IDE1}2 > /dev/null
   mount -t $LINUXFMT -o noatime /dev/${IDE1}2 /hdd2
   rc=$?
   if [ "$rc" != "0" ]; then
      echo -n "HDD2 Error!! "
      /bin/ledctl ledmode 0
      /bin/ledctl alarm 1
      while [ "$DUMMY" = "" ]; do
         sleep 1
      done
   fi
   cd /
   # Documents files are discarded...
   gzip -dc /hdd1/.sys/hdimage2.tgz | tar xf -

##   mount -t vfat -o noatime,quiet,umask=000,iocharset=utf8 /dev/${IDE1}3 /hdd3
   rc=$?
   if [ "$rc" != "0" ]; then
      echo -n "HDD3 Error!! "
      /bin/ledctl ledmode 0
      /bin/ledctl alarm 1
      while [ "$DUMMY" = "" ]; do
         sleep 1
      done
   fi
   if [ ! -f /hdd1/.sys/hdimage2.tgz ]; then
      echo -n "Error!! HDD is not initialized!"
      /bin/ledctl ledmode 0
      /bin/ledctl alarm 1
      while [ "$DUMMY" = "" ]; do
         sleep 1
      done
   fi

   rm /home/zaurus/Settings/route.conf 2>/dev/null >/dev/null
   echo -n $RESTORE_CONNECTION > /home/zaurus/Settings/route.conf
   touch /home/etc/restorepc
   mv /dev/restoreip /etc/hotplug/usbdnet.conf 2> /dev/null > /dev/null
   mv /dev/Security.conf /home/zaurus/Settings/Security.conf 2> /dev/null > /dev/null

else
   # mount /tmp
   mount -t tmpfs -o size=1m none /dev/shm
   mkdir /dev/shm/tmp
   chmod 4777 /dev/shm/tmp
   mkdir /dev/shm/run
   touch /dev/shm/run/utmp
   mkdir /dev/shm/run/usb

   /etc/ledmode reset

   # mount HDD
   /etc/rc.d/init.d/pcmcia start
   while [ "$IDE1" = "" ]; do
      IDE1=`get_dev_pcmcia_slot 1`
   done

   mount -t $LINUXFMT -o ro,noatime /dev/${IDE1}1 /hdd1
   rc=$?
   if [ "$rc" != "0" ]; then
      echo -n "HDD1 Error!! "
      /bin/ledctl ledmode 0
      /bin/ledctl alarm 1
      while [ "$DUMMY" = "" ]; do
         sleep 1
      done
   fi
   mount -t $LINUXFMT -o noatime /dev/${IDE1}2 /hdd2
   rc=$?
   if [ "$rc" != "0" ]; then
      echo -n "HDD2 Error!! "
      /bin/ledctl ledmode 0
      /bin/ledctl alarm 1
      while [ "$DUMMY" = "" ]; do
         sleep 1
      done
   fi
##   mount -t vfat -o noatime,quiet,umask=000,iocharset=utf8 /dev/${IDE1}3 /hdd3
   rc=$?
   if [ "$rc" != "0" ]; then
      echo -n "HDD3 Error!! "
      /bin/ledctl ledmode 0
      /bin/ledctl alarm 1
      while [ "$DUMMY" = "" ]; do
         sleep 1
      done
   fi
   if [ ! -f /hdd1/.sys/hdimage2.tgz ]; then
      echo -n "Error!! HDD is not initialized!"
      /bin/ledctl ledmode 0
      /bin/ledctl alarm 1
      while [ "$DUMMY" = "" ]; do
         sleep 1
      done
   fi

fi
fi
echo $LAUNCH > /home/sharp/etc/launch.default

Shaka

  • Newbie
  • *
  • Posts: 19
    • View Profile
May Have Bricked 3100
« Reply #17 on: September 16, 2005, 07:01:08 am »
Well, I've take care of the problem.  After countless hours of searching on these forums, I managed to find this post: https://www.oesf.org/forums/index.php?showtopic=14351 regarding how to restore the hard drive so that Qtopia would boot.  I did have to flash the NAND again in order to do this properly, I'm assuming because we altered the rc.rofilesys.  But thankfully everything went smoothly.

Now I get to start all over again, this time I'll remember *not* to remove the bootloader.

Will update once OpenBSD has been finalised