mynodebtc / mynode

The easiest way to run Bitcoin and Lightning!
Other
650 stars 148 forks source link

mynode_amd64_0-2-55_uefi.img won't boot from thumb drive #679

Open calligrl opened 2 years ago

calligrl commented 2 years ago

I verified the download following the instructions on the website.

Then I flashed the .img file to a thumb drive using balena-etcher, also verified.

Tried to boot from the thumb drive using a laptop and a mini pc, both of which will boot other images (ISOs) from a thumb drive but this one won't boot. All I see on the screen is a flashing cursor.

Any idea why this is the case?

The 'uefi' bit in the file name - does that mean it needs something in particular to make it boot?

tioneb22 commented 2 years ago

"Unified Extensible Firmware Interface is a publicly available specification that defines a software interface between an operating system and platform firmware" It's basically a GUI in between your BIOS and your OS. Your hardware would need to support UEFI boot!

I've tried to boot a VM using the mynode_amd64_0-2-55_uefi.img (had to convert it to ISO first) but it wouldn't boot either. I run my VM's using ESXi 6.0.0 U3 and the BIOS supports UEFI.

It might be a bug?

calligrl commented 2 years ago

"Unified Extensible Firmware Interface is a publicly available specification that defines a software interface between an operating system and platform firmware" It's basically a GUI in between your BIOS and your OS. Your hardware would need to support UEFI boot!

I've tried to boot a VM using the mynode_amd64_0-2-55_uefi.img (had to convert it to ISO first) but it wouldn't boot either. I run my VM's using ESXi 6.0.0 U3 and the BIOS supports UEFI.

It might be a bug?

Right, thanks.

I couldn't see any mention of UEFI in the BIOS of either machine so maybe that's the problem. I had hoped that it just meant the image would be compatible with UEFI if it happened to be there, not that it required it. But as it won't boot for you and your device does have UEFI, then maybe it is a bug, as you suggest.

I particularly want this to work so I can move away from using the VM image. There is an older version of this x86 image that looks like it doesn't require UEFI, mentioned on the download page, but the link is dead.

tehelsper commented 2 years ago

How old is the PC? Any PC made in the last 10 or so years should work fine, but you may have to change the Boot Mode in your BIOS/UEFI settings. Typical modes are called BIOS or Legacy, UEFI, or Both.

You should not convert it to an ISO image. It is a disk image, so you should be able to boot from it directly after flashing with Rufus or Etcher. I've used dd write it to images and boot several devices from it.

calligrl commented 2 years ago

How old is the PC? Any PC made in the last 10 or so years should work fine, but you may have to change the Boot Mode in your BIOS/UEFI settings. Typical modes are called BIOS or Legacy, UEFI, or Both.

You should not convert it to an ISO image. It is a disk image, so you should be able to boot from it directly after flashing with Rufus or Etcher. I've used dd write it to images and boot several devices from it.

The laptop is a Dell Inspiron 1525 and doesn't have a UEFI system; neither does the mini pc - a Giada D310.

Does the myNode x86 image have to be UEFI? Surely a non-UEFI image would boot on any system, whereas if it's UEFI only, it will only boot on a UEFI system? Is that right?

What about the older x86 (non-UEFI) image file? The link to it has gone now. Couldn't I use that and then upgrade to the current version from there?

calligrl commented 2 years ago

Any possibilities here or do I need to buy some hardware that supports UEFI?

tehelsper commented 2 years ago

I used to have one and the OVA internally has a non UEFI OS. The same problem happens the other way - some new PCs are UEFI only or require bios changes.

There is a way to extract the image from the OVA, but I don't have the link handy. Bitcoin Beach BR came up with it.

calligrl commented 2 years ago

Thanks, Taylor.

If I figure out how to extract the image from the OVA, then install it directly on my hardware, will I be able to update it in the usual manner?

calligrl commented 2 years ago

I've extracted the files from the .OVA and have:

myNode-disk002.vmdk mynode_vm_0-2-53.mf myNode-disk001.vmdk mynode_vm_0-2-53.ovf

but I'm thinking that you meant I should end up with a single .img file.

I'm searching for how to do this but haven't found anything quite right yet, and can't locate Bitcoin Beach BR's instructions So if you do come across the link, please drop it here. I'll keep looking.

If anyone else knows how to do this, please give me a hint!

Thanks.

calligrl commented 2 years ago

So far:

I converted myNode-disk001.vmdk and myNode-disk002.vmdk to .raw files, concatenated the 2 x .raw files and converted the resulting .raw file to mynode-0-2-53.img

The problem is that mynode-0-2-53.img is 908 GB and is too big for any thumb drive I have.

There must be a way to end up with a more reasonably sized file; I'm still looking.

calligrl commented 2 years ago

I flashed the huge image file to a 3 TB USB drive and tried to boot it, but it wouldn't boot. So this method is not the way to end up with a bootable image; I need to somehow extract an image directly from the .OVA

tehelsper commented 2 years ago

Here's a link to how to do it via general instructions. I think you were very close, but you didn't need to combine the images. Just use the first one.

https://twitter.com/BitcoinBeachBR/status/1497244009248563209

Also, here's a script to do it automatically if you can run it via Linux.

#!/bin/bash

# RUN SCRIPT WITH SUDO

if [ "$#" -ne "2" ]; then
    echo "Usage: create_img_from_ova.sh <ova_image> <img_file>"
    exit 1
fi

OVA_IMAGE=$1
IMG_FILE=$2

if [ -f $IMG_FILE ]; then
    echo -n "Destination file already exists! Do you want to overwrite? (y/N): "
    read answer
    if [ "$answer" != "y" ]; then
        echo "Exiting."
        exit 0
    fi
    rm -f $IMG_FILE*
fi

date
echo "Extracting OVA..."
mkdir -p ./ovatmp
tar -xvf $OVA_IMAGE -C ./ovatmp

echo "Converting to IMG..."
qemu-img convert -O raw ./ovatmp/*-disk001.vmdk $IMG_FILE

echo "Compressing image..."
./compress_image.sh $IMG_FILE
chown tehelsper:tehelsper $IMG_FILE*

echo "Removing Temporary Files..."
rm -rf ./ovatmp

echo "Done!"
date
tehelsper commented 2 years ago

Also, here's a link to download an image. It's older and I'm pretty sure it's non-UEFI.

https://mynodebtc.com/device/mynode_images/mynode_amd64_0-2-53.img.gz

calligrl commented 2 years ago

That's all great; thanks, Taylor!

I run openSUSE so the script is very useful. I'll give it a try sometime over the next couple of days when I get the chance, and let you know how I get on.

tehelsper commented 2 years ago

The link is now also on https://mynodebtc.com/download for anyone else who needs it under deprecated images. The image version may not be updated in the future, but you can always update from within myNode.

calligrl commented 2 years ago

I couldn't get the script to work but the non-UEFI image from the link you provided booted just fine and is now syncing the blockchain.

Thanks, Taylor.