qemu boot from USB external disk in an x86_64 Linux system

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
mccurly
Posts: 5
Joined: Tue Aug 03, 2021 10:55 am

qemu boot from USB external disk in an x86_64 Linux system

Post by mccurly »

Hello everyone!

First post, thank you devs for all your work.

I hear, from this post here in the forum:

viewtopic.php?f=11&t=6128&p=18809&hilit ... tpi#p18809

it can be done.

Can anyone share their experiences in this?

Perhaps the posters from that thread? @ingenium and / or @hd888 ?

Note, I am writing this post with not much information because, currently I am at my phone's interface. I intend to post more details in a while.

Thanks beforehand!
mccurly
Posts: 5
Joined: Tue Aug 03, 2021 10:55 am

Re: qemu boot from USB external disk in an x86_64 Linux system

Post by mccurly »

Hi again (finally :( )

Here's the additional information that may be useful,

I am on an up-to-date archlinux distro.

Code: Select all

uname -a
Linux (machine name) 5.13.7-arch1-1 #1 SMP PREEMPT Sat, 31 Jul 2021 13:18:52 +0000 x86_64 GNU/Linux
The purpose of this is to be able to migrate the data from a Nextcloud Server laying inside the dietpi to a docker container inside my only raspberry pi 4b that would be running a libreelec kodi distro. Since I have only one raspberry pi 4b (4GiBi of RAM) and because I would like to perform the migration between running machines, I suppose this would be the only way...

I intend to do it like this because I barely used qemu-kvm and I am looking forward to learn something from it.

I hope that there is someone that can shed some light into my obscured mind, and that's about it for now...

See you soon, cheers!
User avatar
Joulinar
Posts: 5996
Joined: Sat Nov 16, 2019 12:49 am

Re: qemu boot from USB external disk in an x86_64 Linux system

Post by Joulinar »

I'm not 100% sure what you are trying to do. What kind of data you have on this HDD?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
mccurly
Posts: 5
Joined: Tue Aug 03, 2021 10:55 am

Re: qemu boot from USB external disk in an x86_64 Linux system

Post by mccurly »

Hello @Joulinar , thank you for your answer.

I am trying to migrate the nextcloud server from a dietpi raspberry pi 4b hardware onto a libreelec kodi peppered up with docker nextcloud + mysql (mariadb) containers.

Since I own only one Rasbperry Pi 4b I was trying to do this with the target system (libreelec) running on the Raspberry pi hardware. While the source system would be up inside a virtual machine. I thought this machine could be a qemu (kvm?) one managed for instance with virt-manager front-end.

That was the initial plan to do it. And do note that I was intending to do it without having to 'image' any of the disks. But I think that this is not possible or advisable (I mean, to make qemu boot from the physical disk itself), :? ...

I've seen that some dietpi fellow users (see above) managed to 'qemu' dietpi for raspberry pi. So I was interested in doing the same for one of the distros, either dietpi or libreelec, while the other one libreelec or dietpi (conversely), would be standing online in the rpi to be able to flight data from one setup to the other.

Untlil now I mirrored libreelec onto a disk image and tried to boot it with qemu-kvm libvirt virt-manager front-end. I got stuck at the virtual machine uefi interface, where it sits waiting for some other file. And there my "expertise" :) goes to shambles. I don't know how to surpass this step to be able to boot libreelec from then on.

@Joulinar do you understand my doubts now?

I appreciate any help.

Thank you, and hopefully I'll 'hear' from you sooner or later.

Until then Cheers!
User avatar
Joulinar
Posts: 5996
Joined: Sat Nov 16, 2019 12:49 am

Re: qemu boot from USB external disk in an x86_64 Linux system

Post by Joulinar »

I understood, but wich data you have located on your HDD at the moment?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
mccurly
Posts: 5
Joined: Tue Aug 03, 2021 10:55 am

Re: qemu boot from USB external disk in an x86_64 Linux system

Post by mccurly »

Hello again @Joulinar ,

Thank you for your answers.

I have:

1. External SSD with dietpi system

2. (Another) External SSD with libreelec mirrored to a raw disk image.

3. This raw disk image is the one I'm trying to boot with qemu in an Arch Linux distro.

All disk systems are bootable with the exception of the raw disk image that I'm failing yet to understand how to properly boot inside qemu. Up until now I only managed to get into an UEFI interface and corresponding shell at the qemu system image...

What's intriguing me for the moment is the boot procedure and how should I go about it:

Which "file" do I feed the UEFI interface for it to boot libreelec distro? Do I need boot parameters for it? Which, how?

Thank you beforehand!

See you sooner or later hopefully!

Cheers!
User avatar
Joulinar
Posts: 5996
Joined: Sat Nov 16, 2019 12:49 am

Re: qemu boot from USB external disk in an x86_64 Linux system

Post by Joulinar »

maybe this forum post could help you to get an RPI image running on QEMU viewtopic.php?p=27655#p27655
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
mccurly
Posts: 5
Joined: Tue Aug 03, 2021 10:55 am

Re: qemu boot from USB external disk in an x86_64 Linux system

Post by mccurly »

Hi @Joulinar !

Thank you.

I'll follow the link you've posted.

Cheers!

See you in a while!
Post Reply