32GB USB stick, trying to restore a Fienix image

USB Image Tool support forum
Primax
Posts: 13
Joined: Sun Aug 21, 2022 4:18 pm

Re: 32GB USB stick, trying to restore a Fienix image

Post by Primax »

Tested with a Windows 10 Pro (the same as at home) computer in the office. Exactly the same result. And yes, Microsoft .NET Framework is installed.

To me, this can only mean, that I do not correctly use your tool...

1.) Does it matter, from which folder the tool is started? Is the download folder the wrong place? Where should I move it?
2.) Why is a file written in the download folder instead of the USB stick? What could be the reason?

Thanks!
Primax
Posts: 13
Joined: Sun Aug 21, 2022 4:18 pm

Re: 32GB USB stick, trying to restore a Fienix image

Post by Primax »

For the moment, I give up.
I updated 7-zip hoping, this would solve it: no.
And: I tried to write back the uncompressed image, *.gz, but again, I only get a file in the download folder...
Alex
Site Admin
Posts: 267
Joined: Fri Jul 29, 2011 11:59 pm

Re: 32GB USB stick, trying to restore a Fienix image

Post by Alex »

I have created a 1GB and a 10GB patition on my 32GB USB stick. Means: about 21 GB unused.
On your USB Image Tool version 1.85 I did choose Volume mode, then my 10GB partition, then restore and take the fienix image.
This is the only procedure, that makes sense for that image imho. The 5.1 image is not a full disk image including boot sector + the boot partition + the Fienix partition. The 3.0 image (and probably 3.3) was different, containing a boot sector + also the FAT16 boot partiton with some files on it (initrd.img, vmlinux-5.7, ...). You probably need to write 5.1 image into an already prepared 2nd partition after a boot partitition with Volume mode, where the 3.x image could just be restored in Device mode and was boot ready.
The process runs fine up to 100%.
After that, the partition is empty. Nothing!
BUT: In my download folder of my Windows laptop, now there is a file, called this:
"乹敘Ƥ⺃敗灀ř灀ř习敘䯚敘"
I was able to create this situation myself. From a first look, it seems something goes wrong when extracting the gz image. I need to investigate this. It took some time to figure out, how it happens. I got the same situation, when:

1) I manually created the partitions FAT16 + FAT32 on the USB stick with a partition tool (I used Minitool partition wizard)
2) Afther that, USB Image Tool showed me 2 volumes in volume mode (FA16 + FAT32)
3) Then I wrote the manually extracted (used 7-zip for that als well) 5.1 image to the 2nd FAT32 partition
4) Re-plugged the USB device
5) USB Image Tool now only shows the 1st volume, because the file format for the 2nd partition ist not directly supported by Windows (I suspect this being ext4 or something, you can see the detection process also in the debug log, if activated)
6) The I restored the gz again, but accidently to the boot partion. This creates the strange named file.


For the other questions:

1.) Does it matter, from which folder the tool is started? Is the download folder the wrong place? Where should I move it?
The folder does not matter. You can start it from anywhere, if all included dlls are in the same folder. .NET Framework is present, otherwise the tool wouldn't start. It's also just for the GUI, the device routines are unmanaged C code.

2.) Why is a file written in the download folder instead of the USB stick? What could be the reason
This is something I want to find out. Probably something goes wrong during the extraction process.
For the moment, I give up.
I updated 7-zip hoping, this would solve it: no.
And: I tried to write back the uncompressed image, *.gz, but again, I only get a file in the download folder...
I will take a look into the restore process for volumes. I can test/debug now. Not guaranteed, the image will work after that, but the file created in the folder is a bug, I want to find.

I also wrote a question on the Fienix maintainers support page, asking for some tips. Don't know, why the image file format changed from an easy to use full disk image to a volume image. Most of the Windows imaging tools can't even write in Volume mode and the manual partitioning before writing the image also requires 3rd party tools. Windows does not really support multiple partitions on removable flash media, only for hard drives. Easiest way for (Windows) users would be a full disk image like Fienix 3.x was. This also had some install instructions for using USB Image Tool on a page not linked anymore, but worked with and described the device mode.
Alex
Site Admin
Posts: 267
Joined: Fri Jul 29, 2011 11:59 pm

Re: 32GB USB stick, trying to restore a Fienix image

Post by Alex »

I debugged it and it seems, that volume restore mode is broken for quite some time time now (since 1.75 from 2018). The volume name is filled with garbled information, which results in a random file name generated in the working directory. This file receives the extracted image instead of the 2nd volume.

Last working version was 1.74, but I still get error messages (no. 32) with these and also with my WIP fix, because the volume can not be opened exclusivly. Maybe you can try to restore with an older version (1.74), which is still available for download. I will try to figure out, what might be causing the locking issue.

I guess, volume mode is more or less out of usage for some time. Nearly all use cases are device mode, writing the full device.
Alex
Site Admin
Posts: 267
Joined: Fri Jul 29, 2011 11:59 pm

Re: 32GB USB stick, trying to restore a Fienix image

Post by Alex »

Quick update: Version 1.74 + removing the drive letter from both partitions works for me. Will fix volume mode with next version.

https://docs.microsoft.com/de-de/windows-server/storage/disk-management/change-a-drive-letter
Primax
Posts: 13
Joined: Sun Aug 21, 2022 4:18 pm

Re: 32GB USB stick, trying to restore a Fienix image

Post by Primax »

Hmmm...but now, I cannot access the partitions...neither I can see, if the procedure worked, nor can I copy files to the little boot partition...
I guess, I have to wait for your fixed version...or you tell me in a more detailed way, how it worked for you.

Thank you!
Primax
Posts: 13
Joined: Sun Aug 21, 2022 4:18 pm

Re: 32GB USB stick, trying to restore a Fienix image

Post by Primax »

PS: In the "Datenträgerverwaltung" I then added the drive letters.
Question: is the partition with the image named "RAW" there?
Alex
Site Admin
Posts: 267
Joined: Fri Jul 29, 2011 11:59 pm

Re: 32GB USB stick, trying to restore a Fienix image

Post by Alex »

Not guaranteed, it will work this way, even with the fixed version. You need a bootable USB device first, just restoring the 2nd 5.1 partition will not work. Your USB device needs a bootsector (first 512 bytes) with a fitting MBR + boot code. Otherwise, it will just not boot. Only thing, that might work here, is writing an 3.x Fienix image in device mode first, including the boot sector and then overwrite the 2nd partition with the new 5.1 volume image.

Bad thing is, you won't have a chance to overwrite the last partition that way with current USB Image Tool versions. They just show partitions, that are recognized and supported by Windows. Fienix images seem to be ext4. Windows won't show this as a valid partition, also will not show any files on that. USB Image Tool also does not show this in volume mode, so there is no chance to write the 5.1 volume image at the moment.

Honestly, I have not idea, how the 5.1 installation can work with this image right now. Easiest way would be a prepared device mode image with proper boot code + a 5.1 partition and everything included. Volume mode is a hassle and in 99% does not make any sense to use anymore. It will always conflict with GPT or MBR information, when not backing up/restoring exactly on the same device. I already thought of removing it in the next version at all. I will try to get this somehow working in the new 1.90 version I'm working on, but not 100% sure I will succeed.
Primax
Posts: 13
Joined: Sun Aug 21, 2022 4:18 pm

Re: 32GB USB stick, trying to restore a Fienix image

Post by Primax »

Dear Alex,

thanks again for your efforts and the time you took. Very kind and supportive! :)
I now have asked in the corresponding Hyperion forum - https://forum.hyperion-entertainment.com/viewtopic.php?f=58&t=4808 - to provide that full Fienix image...we will see.

I took the liberty of quoting your last reply. Because you can explain it much, much better than I could do it.
Daniel
Primax
Posts: 13
Joined: Sun Aug 21, 2022 4:18 pm

Re: 32GB USB stick, trying to restore a Fienix image

Post by Primax »

Hi Alex.

I do not know if in the meantime you got an answer by Casey (the maintainer of the FienixPPC distribution).
I asked for a full image in the hyperion-entertainment forum and there he replied:
"Hi there! Sorry to see all the trouble you've been having! As much sense as it makes, I hadn't considered how providing only the Fienix partition (without the boot partition) prevents users from being able to image a device using other OSes or tools such as USB Image Tool. I'll make a full disk image available, which should make this process easier."

So, let's hope...
Daniel
Post Reply