Welcome! Log In Create A New Profile

Advanced

Dockstar stopped booting after power failure

Posted by geodog 
Dockstar stopped booting after power failure
January 17, 2011 03:52PM
I have had a Dockstar running Jeff's debian from a flashdrive for several months. Went away and had a power failure while I was gone. Restarted Dockstar, and got a blinking yellow light and no boot into debian -- instead still seems to be Pogo.

fw_printenv gives:

Quote

root@Pogoplug:~ $fw_printenv
ethact=egiga0
bootdelay=3
baudrate=115200
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_installed=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_init=run usb_scan
usb_device=0:1
usb_root=/dev/sda1
usb_rootfstype=ext2
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
ethaddr=00:10:75:1A:AE:A2
arcNumber=2097

Can anyone offer assistance on next steps to recover my working dockstar? I looked for an FAQ, but couldn't find one.

Thanks in advance
Re: Dockstar stopped booting after power failure
January 17, 2011 04:19PM
Good news / bad news.
After doing an fsck on my flash drive, successfully booted into debian.
Unfortunately, filesystem was pretty hosed, but that had nothing to do with Jeff's or Debian software.
Thanks
Re: Dockstar stopped booting after power failure
January 17, 2011 07:51PM
geodog, what type file system are you running? I run an ext2 filesystem on my SheevaPlug (Ubuntu 9.04). It seems quite stable when running, but I notice that after a power failure it usually requires manual intervention during the fsck phase. I've never had a problem with other Unixes, so I'm at a loss to explain what is going on, but there is often significant corruption, although nothing that has not been correctable. On my Dockstar, I converted to using an ext3 FS on my harddrive. That seems better behaved in response to power failures, but I still see occasional corruption. I don't have the serial port hardwired on the Dockstar, but it's easy enough to pull the HD and fsck it externally if it won't boot.

Just curious: what are others seeing in this regard?
Re: Dockstar stopped booting after power failure
January 17, 2011 08:09PM
It was an ext3 filesystem on a 4GB flash drive, and it was very badly corrupted, so badly I am having to start over from scratch. Some of my apps wouldn't work again, and I got to a state where I couldn't un-install or install new versions, and my lost+found was filled with files. Maybe someone with more Linux skills could have recovered, but I decided to start with a new flash drive, and be better about backing up.

I also saw an article linked to somewhere on this forum about the perils of using Ext3 on flash drives, but not sure how much credence to put in it, or what alternatives are. Would be interested in other people's thoughts.

Thanks,



Edited 1 time(s). Last edit at 01/17/2011 09:58PM by geodog.
Re: Dockstar stopped booting after power failure
January 17, 2011 11:46PM
There is no reason why an ext3 file system should not work fine on a thumb drive or SDcard (or any storage device which presents a block interface). The reason people tend to avoid it with NAND technology is that it is more write-intensive than an ext2 file system and thus there is some fear that it may shorten the life of the underlying flash memory. Also, NAND writes are inherently slow, and thus there may also be a performance issue. Obviously, neither ext2 nor ext3 would work on raw flash, such as the internal NAND memory.

There really does seem to be some problem with data corruption in the Marvel environment, though. Perhaps it is a latent software bug or perhaps the glue-code on the thumb drive or SDcard device that presents a block level interface is not bullet proof. After all, Unix probably hits these devices in a way they were never designed for. However, if I do a:
Quote

sync; tune2fs -l /dev/xxx | grep state
where 'xxx' is the root file system, it always indicates 'clean' on my desktop, but it is always 'not clean' on my SheevaPlug, and I don't understand why.
Re: Dockstar stopped booting after power failure
January 18, 2011 01:42AM
This thread provoked me to pose my question about data corruption in the plugcomputer.org forum, and one of the more knowledgeable users made a suggestion that seems to have immediately helped. In a nutshell, if the root file system type is not specified correctly in the /etc/fstab file, the root file system may not be unmounted on shutdown correctly, leading to file system corruption. This may be applicable to you, too, geodog. You can read the whole thread here:

http://plugcomputer.org/plugforum/index.php?topic=4587.0
Re: Dockstar stopped booting after power failure
January 18, 2011 02:14AM
Restamp, thanks for the research.
In my case, I have what it defaults to from initial install:

Quote

# <file system> <mount point> <type> <options> <dump> <pass>
/dev/root / ext2 noatime,errors=remount-ro 0 1
/dev/sda2 none swap sw 0 0
tmpfs /tmp tmpfs defaults 0 0

Funnily enough, it seems to be set up as ext2 instead of ext3. Would you recommend changing the fstab entry, or the filesystem on the card?
Re: Dockstar stopped booting after power failure
January 18, 2011 01:15PM
geodog, it looks to me as if, even though you created the file system as an ext3, you are mounting and using it as an ext2. I say this because you have "usb_rootfstype=ext2" in your uBoot environment, and this will cause an ext2 mount. You can verify this by "cat /proc/mounts".

The good news: This should not be a problem: The salient difference between ext2 and ext3 is the addition of a "journal" on ext3 file systems. The journal ensures that multi-block updates are made atomically. If you mount an ext3 fs as ext2, the journal is simply not used.

The bad news: It appears that you are specifying the file system correctly, so your problem doesn't appear to be the same as mine.

If you'd like to try really running on an ext3 fs, you could remove the "usb_rootfstype" from your uBoot environment (or change it to "ext3"), and change /etc/fstab similarly. It might make for an interesting experiment, but I would not necessarily recommend this as your permanent configuration if your root partition is on flash memory.

Good luck.
Re: Dockstar stopped booting after power failure
January 19, 2011 01:09AM
Thanks for taking the time to reply. I'll probably leave it as it is for now. I took someone's advice on this board, and bought a Seagate GO drive, which I will try and install as the boot drive once it arrives.
Re: Dockstar stopped booting after power failure
January 19, 2011 12:47PM
I also had a filesystem failure before.

Is a hdd safer than an USB-Stick or a CF-Card ?

Thanks
Re: Dockstar stopped booting after power failure
January 19, 2011 02:07PM
I am currently running my Dockstar off of a GO drive and it works well. There are pros and cons, which I've commented on before. The pros are that it's simpler and the writes are faster. The cons are that there are pauses when the disk needs to spin up and the reads are slower (largely due to rotational delays).

Is it safer? Well, it's largely a matter of what works for you. I've never found that "perfect" USB stick that reliably warm boots and cold boots...

YMMV.
Re: Dockstar stopped booting after power failure
January 19, 2011 06:45PM
Interestingly, although painfully enough, something seems wrong with my filesystem at the end of this. du shows only 600 MB used out of a 3.5GB partition, but df shows the partitition as full.

Something is wrong, but I don't have a clue what. Doing an FSCK on the flash drive, and thinking that maybe this whole thing was a bad idea.
Re: Dockstar stopped booting after power failure
January 20, 2011 11:00AM
I use a DIGISOL 47201 Cardreader with a CompactFlash card (8GB Sandisk Extreme IV )

No problems so far with cold / warm booting, but I had a filesystem crash after power failure once.

Another question:

What is the easiest way to make a full filesystem backup ?
Is there a tool that creates an image or something like that ?

Is an Online Backup (while running the system) possible or do I have to boot the Rescue System ?


Thanks



Edited 1 time(s). Last edit at 01/20/2011 11:04AM by d1dd1.
Re: Dockstar stopped booting after power failure
January 20, 2011 07:11PM
Personally, I power down my Dockstar occasionally, take the hard drive (I boot off of a Seagate GO drive, but a thumb drive would work similarly) over to another box, and back up the file systems in the conventional manner. I also force fsck at this point to detect and correct any latent errors. If I want to snapshot the root fs while running, I use the method described here: http://forum.doozan.com/read.php?2,3425,3426

YMMV.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: