Won't boot with initramfs

Was playing with my Khadas VIM2 to install TeslaMate and for some reason it wont boot anymore. when boot it showing initramfs. ./proc/partition showing mmblk0p1-6 and boot0/1 and other one don’t recall the name rpmf i think. how I make it bootable again?

I did use Kresecure and took a dump of the emmc, but don’t know how to open that file in regual ubuntu, as I was trying to get my files.

any help appricated
Majed

@hyphop my rescuer HELP

Unpack this image file by zstd
After u can use losetup and mount image file partitions

Another simple way connect your bord to host machine via usbotg cable and start krescue from SD
After all emmc partitions will be exported as simple USB disks without any manipulation’s

I have decompressed it and used losetup and it didn’t work as it says I/o error when mount. Also krescue didn’t show them also tried mount mmcblk2 and mmcblkboot1 but no luck. I just have scripts in khadas home folder need them deadly

Which OS was installed on emmc?

PS: u must use losetup -Pf image

EMMC has ubuntu 18.04 Bionic image

OK its easy looks like partitions table was rewrited u must restore partition table before mount partitions

how, I recall kernel updated then it stop booting. I have the image in zstd file, in virtual machine with Ubuntu. how I can fix the partition table of the image?

your system was installaed from this image ?

no, I used fenix, also I don’t know if I have the old one, can you please share how I can restore in general or directed me to some website. Many Many thanks

we have emmc dump its your emmc backup - OK!

lets try to restore your board

start krescue from sd goto krescue shell

blkid

show output

I have created new image from Fenux and my board is up and running, I only need the files from my home directory if possible from the img file

ok wait 5-30 min i can write detail manual howto extract files from image

you da man, thanks a lot

OK! how to extract files from backup image

  1. u have VIM2*.img.zstd dont touch it store it to secure place
  2. work only with upacked image VIM2*.img
LOOP=$(losetup --show -o 188743680 -f VIM2*.img)
mkdir rootfs
sudo mount $LOOP rootfs

ls -l1 rootfs/

total 72
drwxr-xr-x   2 root root 4096 Dec 28 00:11 bin
drwxr-xr-x   3 root root 4096 Dec 31 02:25 boot
drwxr-xr-x   2 root root 4096 Dec 31 02:22 dev
lrwxrwxrwx   1 root root   25 Dec 31 02:24 dtb.img -> /boot/dtb/kvim2_linux.dtb
drwxr-xr-x 127 root root 4096 Dec 31 02:22 etc
drwxr-xr-x   3 root root 4096 Dec 31 02:24 home
drwxr-xr-x  20 root root 4096 Dec 31 02:22 lib
drwxr-xr-x   2 root root 4096 Dec 27 23:56 media
drwxr-xr-x   2 root root 4096 Dec 27 23:56 mnt
drwxr-xr-x   2 root root 4096 Dec 27 23:56 opt
drwxr-xr-x   2 root root 4096 Apr 24  2018 proc
drwx------   2 root root 4096 Dec 31 02:24 root
drwxr-xr-x   2 root root 4096 Dec 31 02:22 run
drwxr-xr-x   2 root root 4096 Dec 31 02:24 sbin
drwxr-xr-x   2 root root 4096 Dec 27 23:56 srv
drwxr-xr-x   2 root root 4096 Apr 24  2018 sys
drwxrwxrwt   2 root root 4096 Dec 31 02:24 tmp
lrwxrwxrwx   1 root root   13 Dec 31 02:24 uInitrd -> /boot/uInitrd
drwxr-xr-x  10 root root 4096 Dec 27 23:56 usr
drwxr-xr-x  11 root root 4096 Dec 27 23:56 var
lrwxrwxrwx   1 root root   12 Dec 31 02:24 zImage -> /boot/zImage

OK ! we can copy any files from rootfs/

WELLCOME

1 Like

Man you are genius thank a lot and be safe

some descriptions and manuals about krescue usage - sometimes can help to solve some problems with your system

for example its was your solution

WELLCOME AGAIN!