The officially official Devuan Forum!

You are not logged in.

#1 2023-07-21 04:56:27

hejik
Member
Registered: 2023-07-21
Posts: 10  

How can I run another OS from a Devuan running from a live USB stick?

How to run another OS from a USB stick running live devuan_chimaera_4.0.3_amd64_desktop-live.iso?  Without installing Devuan itself on the computer?

I tried installing QEMU, but it gives an error:
wget https://download.qemu.org/qemu-8.1.0-rc0.tar.xz
tar xvJf qemu-8.1.0-rc0.tar.xz
cd qemu-8.1.0-rc0
./configure

Using './build' as the directory for build output
WARNING: unrecognized host CPU, proceeding with 'uname -m' output 'x86_64'
python determined to be '/usr/bin/python3'
python version: Python 3.9.2

*** Ouch! ***

Python's ensurepip module is not found.
It's normally part of the Python standard library, maybe your distribution packages it separately?
(Debian puts ensurepip in its python3-venv package.)
Either install ensurepip, or alleviate the need for it in the first place by installing pip and setuptools for '/usr/bin/python3'.

ERROR: python venv creation failed

Offline

#2 2023-07-21 08:15:21

Camtaf
Member
Registered: 2019-11-19
Posts: 442  

Re: How can I run another OS from a Devuan running from a live USB stick?

Image write the .iso to your pendrive, make sure your computer will boot from USB first, insert pendrive, reboot - computer should load from pendrive.

Offline

#3 2023-07-21 11:29:44

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,501  

Re: How can I run another OS from a Devuan running from a live USB stick?

It's not clear what you want to accomplish.

1. If your usb stick is set up with a persistent volume to save changes in the live system, you can install qemu in it. If you don't have persistence set up, you would be better off making a new live-usb with a system that has qemu installed.

2. If you want to install qemu, it would be easier to install it from the devuan repo instead of compiling it from source.

3. Where is the other OS you want to boot? Are you planning to install it into a VM inside your live system? Is there a virtual hard disk with a system already on it?

Most of our packages are from debian, unchanged. That includes python3-venv.

Offline

#4 2023-07-21 19:34:36

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 233  
Website

Re: How can I run another OS from a Devuan running from a live USB stick?

fsmithred wrote:

If you want to install qemu, it would be easier to install it from the devuan repo instead of compiling it from source.

The lower version 8.0.3 should work:

wget https://download.qemu.org/qemu-8.0.3.tar.xz


If you work systematically, things will come by itself (Lev D. Landau)

Offline

#5 2023-07-21 20:06:10

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 233  
Website

Re: How can I run another OS from a Devuan running from a live USB stick?

hejik wrote:

How to run another OS from a USB stick running live devuan_chimaera_4.0.3_amd64_desktop-live.iso?  Without installing Devuan itself on the computer?

I tried installing QEMU, but it gives an error:
wget https://download.qemu.org/qemu-8.1.0-rc0.tar.xz
tar xvJf qemu-8.1.0-rc0.tar.xz
cd qemu-8.1.0-rc0
./configure

Using './build' as the directory for build output
WARNING: unrecognized host CPU, proceeding with 'uname -m' output 'x86_64'
python determined to be '/usr/bin/python3'
python version: Python 3.9.2

*** Ouch! ***

Python's ensurepip module is not found.
It's normally part of the Python standard library, maybe your distribution packages it separately?
(Debian puts ensurepip in its python3-venv package.)
Either install ensurepip, or alleviate the need for it in the first place by installing pip and setuptools for '/usr/bin/python3'.

ERROR: python venv creation failed

I tried in daedalus after installing python3.11-venv, and the configure script worked. But it's supposed to work with python3.7, python3.8,... as well. Look at the line 526 of configure.

Additional suggestion: configure your locales first.

Last edited by aitor (2023-07-21 20:07:37)


If you work systematically, things will come by itself (Lev D. Landau)

Offline

#6 2023-07-21 20:14:03

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 233  
Website

Re: How can I run another OS from a Devuan running from a live USB stick?

fsmithred wrote:

Most of our packages are from debian, unchanged. That includes python3-venv.

I guess that the required package is python3.X-venv (e.g, python3.11-venv in daedalus), instead of python3-venv.

I installed the following packages (in daedalus x86_64):

 # apt-get install ninja-build meson texinfo python3-sphinx:native python3-sphinx-rtd-theme libcapstone-dev libaio-dev libjack-dev libpulse-dev libbpf-dev \ 
libbrlapi-dev libcap-ng-dev libcurl4-gnutls-dev libfdt-dev libfuse3-dev libiscsi-dev libncurses-dev libvirglrenderer-dev libva-dev libdrm-dev libgbm-dev libnfs-dev \
libnuma-dev libcacard-dev librbd-dev libglusterfs-dev libsasl2-dev libsdl2-dev libseccomp-dev libslirp-dev libspice-server-dev \
librdmacm-dev libibverbs-dev libibumad-dev liburing-dev libusb-1.0-0-dev libusbredirparser-dev libssh-dev libvdeplug-dev libxen-dev libpmem-dev \
device-tree-compiler gcc-s390x-linux-gnu gcc-alpha-linux-gnu gcc-powerpc64-linux-gnu gcc-sparc64-linux-gnu fcode-utils gcc-hppa-linux-gnu \
gcc-riscv64-linux-gnu gcc-arm-none-eabi flex bison gcc-power-pc-linux-gnu bc python3.11-venv

And the ./configure script of qemu-8.1.0-rc0 worked.

Last edited by aitor (2023-07-21 20:27:18)


If you work systematically, things will come by itself (Lev D. Landau)

Offline

#7 2023-07-25 18:34:11

hejik
Member
Registered: 2023-07-21
Posts: 10  

Re: How can I run another OS from a Devuan running from a live USB stick?

fsmithred wrote:

It's not clear what you want to accomplish.

1. If your usb stick is set up with a persistent volume to save changes in the live system, you can install qemu in it. If you don't have persistence set up, you would be better off making a new live-usb with a system that has qemu installed.

2. If you want to install qemu, it would be easier to install it from the devuan repo instead of compiling it from source.

3. Where is the other OS you want to boot? Are you planning to install it into a VM inside your live system? Is there a virtual hard disk with a system already on it?

Most of our packages are from debian, unchanged. That includes python3-venv.

The main idea is not to use an installed OS or persistence. I have already run the live devuan iso from ventoy usb. Now I try to run the same live devuan iso via quemu-kvm, but I get an error:

sudo apt install -y qemu-utils qemu-system-x86 qemu-system-gui
sudo apt install -y qemu-system libvirt-daemon-system
sudo apt install -y qemu-kvm virt-manager libvirt

QEMU/KVM - Not Connected

Offline

#8 2023-07-26 09:25:47

Camtaf
Member
Registered: 2019-11-19
Posts: 442  

Re: How can I run another OS from a Devuan running from a live USB stick?

If I remember, qemu needs an image file to use - https://www.qemu.org/docs/master/system/images.html

(You can create an empty image file & install a distro to it, & then run it in qemu.)

Last edited by Camtaf (2023-07-26 09:27:11)

Offline

#9 2023-07-26 10:54:25

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,501  

Re: How can I run another OS from a Devuan running from a live USB stick?

I could never figure out how to use virt-manager, so I just use plain qemu. Something like this to boot the iso file from your hard drive...

qemu-system-x86_64 -enable-kvm -m 2048 -cdrom devuan_whatever.iso 

Change the 2048 to however much RAM you want to give it (in MB)

Edit: Fixed typo.

Offline

#10 2023-07-26 21:47:21

hejik
Member
Registered: 2023-07-21
Posts: 10  

Re: How can I run another OS from a Devuan running from a live USB stick?

fsmithred wrote:

I could never figure out how to use virt-manager, so I just use plain qemu. Something like this to boot the iso file from your hard drive...

qemu-system-x86 -enable-kvm -m 2048 -cdrom devuan_whatever.iso 

Change the 2048 to however much RAM you want to give it (in MB)

Everything seems to be installed, but qemu-system-x86 is still not found:

sudo apt update && sudo apt install -y qemu-utils qemu-system-x86 qemu-system-gui qemu-system libvirt-daemon-system qemu-kvm

qemu-system-x86 -enable-kvm -m 4096 -cdrom /media/devuan/Ventoy/devuan_chimaera_4.0.3_amd64_desktop-live.iso
bash: qemu-system-x86: command not found

sudo apt list qemu
qemu                qemu-efi            qemu-guest-agent    qemu-system-common  qemu-system-mips    qemu-system-sparc   qemu-user-binfmt    
qemu-block-extra    qemu-efi-aarch64    qemu-system         qemu-system-data    qemu-system-misc    qemu-system-x86     qemu-user-static    
qemubuilder         qemu-efi-arm        qemu-system-arm     qemu-system-gui     qemu-system-ppc     qemu-user           qemu-utils

sudo apt install -y qemu-system-x86
qemu-system-x86 is already the newest version (1:5.2+dfsg-11+deb11u2).

Offline

#11 2023-07-26 21:55:07

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,269  

Re: How can I run another OS from a Devuan running from a live USB stick?

Misspelling; should be qemu-system-x86_64

Online

#12 2023-07-27 03:02:48

hejik
Member
Registered: 2023-07-21
Posts: 10  

Re: How can I run another OS from a Devuan running from a live USB stick?

ralph.ronnquist wrote:

Misspelling; should be qemu-system-x86_64

Thank you!
I managed to run it. But for some reason, the internet speed in a virtual machine is half as fast as on a real one.

Offline

#13 2023-07-27 16:56:36

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,501  

Re: How can I run another OS from a Devuan running from a live USB stick?

Are you sure it's the network that's slow? I find the whole system to be slow inside a virtual machine.

Offline

#14 2023-07-27 22:53:36

hejik
Member
Registered: 2023-07-21
Posts: 10  

Re: How can I run another OS from a Devuan running from a live USB stick?

You are right, the whole system is slow on the virtual machine. I thought the VM should be about 3% slower. Is there any way to fix this?

Offline

#15 2023-07-28 10:55:10

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,501  

Re: How can I run another OS from a Devuan running from a live USB stick?

Adding something like this to the qemu command might help for some things:

-smp cores=2,threads=2

I don't know what else you could do. I do know that you could make it a lot slower by removing the '-enable-kvm' option.

The the system you're running is a debian-based live system, you could boot the whole iso to RAM and run from there. Booting will be slower but opening programs will be very fast. Add the word "toram" to the boot command or possibly add "toram=filsystem.squashfs" depending on how the usb stick is arranged.

Offline

#16 2023-07-28 17:24:45

hejik
Member
Registered: 2023-07-21
Posts: 10  

Re: How can I run another OS from a Devuan running from a live USB stick?

fsmithred wrote:

Adding something like this to the qemu command might help for some things:

-smp cores=2,threads=2

I don't know what else you could do. I do know that you could make it a lot slower by removing the '-enable-kvm' option.

The the system you're running is a debian-based live system, you could boot the whole iso to RAM and run from there. Booting will be slower but opening programs will be very fast. Add the word "toram" to the boot command or possibly add "toram=filsystem.squashfs" depending on how the usb stick is arranged.

Thank you!

Offline

Board footer