Welcome! Log In Create A New Profile

Advanced

Ramdisk Corrupt or Invalid

Posted by sparks 
Ramdisk Corrupt or Invalid
December 01, 2019 10:34AM
While I was away on holidays, my home suffered a power outage. When I came home and tried to access my GoFlexHome (that I usually turn off when going away), I couldn't. The NC Console showed me this:

Found bootable drive on usb 0
Bootargs = console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data) init=/bin/systemd
loading uImage ...
5102272 bytes read in 1603 ms (3 MiB/s)
loading uInitrd ...
12593467 bytes read in 2124 ms (5.7 MiB/s)
loading DTB /boot/dts/kirkwood-goflexhome.dtb ...
10249 bytes read in 1138 ms (8.8 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.3.2-kirkwood-tld-1
   Created:      2019-12-01  15:21:21 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5102208 Bytes = 4.9 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.3.2-kirkwood-tld-1
   Created:      2019-12-01  15:22:11 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    12593403 Bytes = 12 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... Bad Data CRC
Ramdisk image is corrupt or invalid

NAND read: device 0 offset 0x100000, size 0x400000
 4194304 bytes read: OK
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.3.2-kirkwide
   Created:      2012-10-29  22:52:12 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3627768 Bytes = 3.5 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK


Starting kernel ...

I tried recreating initrd.img-5.3.2-kirkwood-tld-1 and uInitrd several times and came up with the same result. I haven't changed my u-boot env variables in months and a checked the ones mentioned in the install-a-new-kernel-instructions looked good. I don't know what to do next. Is what being tagged as bad uInitrd? Suggestions?

sparks
Re: Ramdisk Corrupt or Invalid
December 01, 2019 09:18PM
sparks,

> While I was away on holidays, my home suffered a
> power outage. When I came home and tried to access
> my GoFlexHome (that I usually turn off when going
> away), I couldn't.

You need to take this USB rootfs to another Linux box and fix any error in the file system. If the USB drive is assigned sdb1:

umount /dev/sdb1
e2fsck /dev/sdb1

And then recreate uInitrd. See if it boots pass the kernel file loading.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Ramdisk Corrupt or Invalid
December 03, 2019 08:26AM
I did as you suggested. I even added the 'c' option for fsck. The check did modify the filesystem. I reinstalled the kernel to create a new initrd.img... and then recreated uInitrd. No joy. I went and made a new usb boot drive from the Debian image and copied non-boot files from the bad drive. It works but apt-get and dpkg are a little wonky. They don't recognize some packages as installed or fail when doing a reinstall (another story). I guess the filesystem was hosed up but I have it working doing it's main job which doing backups (using borgbackup). The shameful irony is I didn't have a backup of the UBS boot drive.

I reformatted the bad drive and installed the Debian image. It boots fine. It seems the filesystem took a hit from the power outage and couldn't be recovered. The lesson is that if one installs the Debian image and then mods it for special use, have a backup so one doesn't have to do reinstalls and other mods which can be very time consuming.

sparks
Re: Ramdisk Corrupt or Invalid
December 03, 2019 02:25PM
sparks,

> I did as you suggested. I even added the 'c'
> option for fsck. The check did modify the
> filesystem. I reinstalled the kernel to create a
> new initrd.img... and then recreated uInitrd.

Did you chroot into it to install kernel?

> No
> joy. I went and made a new usb boot drive from the
> Debian image and copied non-boot files from the
> bad drive. It works but apt-get and dpkg are a
> little wonky. They don't recognize some packages
> as installed or fail when doing a reinstall
> (another story). I guess the filesystem was hosed
> up but I have it working doing it's main job which
> doing backups (using borgbackup). The shameful
> irony is I didn't have a backup of the UBS boot
> drive.
>
> I reformatted the bad drive and installed the
> Debian image. It boots fine. It seems the
> filesystem took a hit from the power outage and
> couldn't be recovered.

Did you use Ext3 or Ext4 for the format? usually each of these formats can recover from power outage by itself. I never have file system that cannot be recovered from power outage using Ext3 or Ext4. Power outage happens a few times a year for me. For a test box, sometime I'm in a hurry and just power it off and it works fine rebooting.

> The lesson is that if one
> installs the Debian image and then mods it for
> special use, have a backup so one doesn't have to
> do reinstalls and other mods which can be very
> time consuming.

Very true!

Edited:Typos

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 12/03/2019 06:13PM by bodhi.
Re: Ramdisk Corrupt or Invalid
December 03, 2019 09:06PM
> Did you chroot into it to install kernel?

Yes, I did.

> Did you use Ext3 or Ext4 for the format?

I used ext3 for the bad USB stick. I am also surprised that it didn't recover but I don't know how else to explain it. Everything is running well enough so no use spending any more time on 'what happened?'.

I've been a lurker for several years and would like to say ( I think this is my first post) that I really appreciate all the work that has gone into this board and all the sage advice it provides.

sparks
Author:

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: