Issues with making EasyOS run (in a virtual machine)

@Rosika we might be talking about two different apps. My version is 4.0.0

I was able to use it easily after this video.

At some point, I also remember doing KVM/Installation - Community Help Wiki but it is not mandatory. I was exploring Android development and and I think I see somewhere that it improves the performance of the emulator.

1 Like

@ahmetbombaci:

Hi Ahmet, :wave:

sorry I couldn´t reply earlier.

Thanks for your latest comments.

Right. I was under the impression you were talking about cli-commands.
I see now you were referring to the GUI. :wink:

Well, I have that installed as well. My version however seems to be lower than yours:

virt-manager

It´s version 2.2.1.

But it works very well and apart from trying EasyOS to get to run/install I never ran into any problems.

I guess I still have to download the latest EasyOS version 4.3.4 and see whether this is better suited for running in a vm.

Thanks also for the link and many greetings.
Rosika :slightly_smiling_face:

Hi all, :wave:

in the meantime I posted the install issue on Barry Kauler´s forum ( EasyOS 32-bit Dunfell-series version 4.3.2 - Puppy Linux Discussion Forum ) and after a bit of work I got EasyOS running in my vm:

  • note: good instructions here: How to write EasyOS to a flash drive
  • Debian10 is already installed in the vm (virt-manager/qemu/kvm)
  • I downloaded easydd from http://bkhome.org/files/easydd.gz , unpacked it and set the correct permissions. Easydd is a frontend for dd. It´s a clever script as it turned out :wink:
  • performing sudo ./easydd easy-4.3-4-amd64.img (the script asked about the drive I wanted to write to beforehand)
  • so this isn´t going to work with ventoy (at least not for the latest version of EasyOS).
    Therefore I needed a dedicated stick for EaysOS alone.
  • After the write was complete I chose in the settings of my Debian vm: “add device”
  • I chose “USB host-device” and from the popup menu the respective stick
  • in “boot options” this is the boot order: the usb-stick - VirtIO - NIC
  • ( topic also dealt with in Virt-manager: redirection of USB-stick )
  • the vm boots EasyOS from the stick

All that worked well in the end :slightly_smiling_face: .

Yet the running EasyOS presents another problem:

I cannot connect to the internet. :frowning_face:

Although EasyOS is supposed to automatically recognize available network devices it doesn´t seeem to…

When running Debian in the vm it automatically connects to the virtual LAN. BodhiLinux as well. So theoretically there shouldn´t be any problems. :thinking:

No idea why EasyOS cannot do the same…:question:

Many greetings from Rosika :slightly_smiling_face:

2 Likes

Hi again, :wave:

I was considering alternative ways for not having to plug in a dedicated EasyOS stick and came up with the following (I don´t know whether this would be applicable to my scenario but it might be).

I was thinking: what about creating a virtual disk or virtual block device and then performing
step 4 in the above mentioned method

performing sudo ./easydd easy-4.3-4-amd64.img

and here using the newly created device as the target drive :thinking:

Well, on How to create virtual block device (loop device/filesystem) in Linux – The Geek Diary I found the respective steps for creating a virtual block device.
I successfully tried them out in my Debian vm. :smiley:

This is the example used for creating a 1 GB device (all commands with sudo):

  • dd if=/dev/zero of=loopbackfile.img bs=100M count=10 # create a file of desired size

  • du -sh loopbackfile.img # Verify the size of the file

  • losetup -fP loopbackfile.img # create a loop device with the file

  • losetup -a # print the loop device, example: /dev/loop5: [64769]:4199216 (/root/loopbackfile.img)

  • mkfs.ext4 /root/loopbackfile.img # create a ext4 filesystem on the loopback device

  • mkdir /loopfs

  • mount -o loop /dev/loop5 /loopfs # mount the loopback filesystem

  • df -hP /loopfs/ # Verify the size of the new mount point

  • mount | grep loopfs # verify type of filesystem

Well, these are sthe steps that worked. :smiling_face:
On my Debian vm I got these block devices with lsblk:

lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0    7:0    0  61,9M  1 loop /snap/core20/1518
loop1    7:1    0 386,5M  1 loop /snap/anbox/213
loop2    7:2    0 113,9M  1 loop /snap/core/13308
loop3    7:3    0 101,3M  1 loop /snap/lxd/23155
loop4    7:4    0 310,8M  1 loop 
loop5    7:5    0  1000M  0 loop   # this is new
loop6    7:6    0  1000M  0 loop /loopfs  # and this one as well
vda    254:0    0    30G  0 disk 
├─vda1 254:1    0  10,3G  0 part /
├─vda2 254:2    0     1K  0 part 
├─vda5 254:5    0   976M  0 part [SWAP]
└─vda6 254:6    0  18,8G  0 part /home

As well as it worked this situation still leaves me with loop devices.

For the easydd-script to work I guess I´d have to have a virtual device like so: /dev/[...] as the script scans the system for disks.

Does anyone have any idea how to make that happen :question:
Basically I´d have to make loop6 appear as /dev/vda7 or something like that.

On my host it would be e.g. /dev/sdg

Thanks so much and many greetings
Rosika :slightly_smiling_face:

2 Likes

Hi Rosika,
I think you mean you want to setup a loop mount. What that does is make a file on your HD look, to the OS, as if it were a block device. It can be used for .iso files ( and I presume .img), and it enables you to boot from an .iso file on HD, so you dont have to write it to a usb drive.
You can write a 40_custom file for grub, to tell it to boot from a loop mount.

I will get you a recipe… I need to look it up… its not in my memory.
You might find it in that old post which was about missing /dev/loopx files … I think it was titled something like Gnome Device Mounter command.

If you cant find it I will look it up tomorrow on the PC.

Regards
Neville

1 Like

Thanks Neville, :wave:

Yes, the steps described above seem to do just that. What I actually wanted to achieve is creating a virtual “disk” … a device that´s listed in the form of /dev/sdg

That would be the goal. Right. :+1:

Ah, I see. I´ll have to investigate further. Thanks for helping me. :heart:

I think you have Gnome-disk-image-mounter in mind.
I´ll take a look at it.

Thanks so much and many greetings
Rosika :slightly_smiling_face:

1 Like

A loop mount will be listed as /dev/loopx. It is a virtual disk.
If it has to be /dev/sdg you might be able to make a link.

Custom_40 files for loop mounts are difficult. They vary depending on the structure of the .iso file.

Regards
Neville

1 Like

Hi, :wave:

I see.
Well, I guess making a link would be the way to go then.
I´ll look into it.

Thanks a lot, Neville.
Many greetings from Rosika :slightly_smiling_face:

1 Like

I will find you an example of a 40_custom file to boot from an .iso .
It will be tomorrow. What happens is grub actually does the loop mount itself, and you get a line in the grubmenu offering to boot the iso file.
That is not exactly what you want. You want to boot it into the VM.
Not sure how that translates. … In VirtualBox you can boot directly from an iso file on HD… so I guess it does some sort of loop mount internally. Dont know about qemu.

Regards
Neville

1 Like

Thanks Neville,

you´re too kind. :heart:

I think it should be bed-time by know in your part of the world :blush:

I wish you a good night.

Many greetings.
Rosika :slightly_smiling_face:

1 Like

Hi @Rosika ,
If you go to /etc/grub.d you will find the following

nevj@mary:/etc/grub.d$ ls
00_header        10_linux      30_os-prober      40_custom  orig.40_custom
05_debian_theme  20_linux_xen  30_uefi-firmware  41_custom  README

The only file you shoud touch in there is 40_custom. The other files grub commands which automatically find OS’s on your disk(s) and setup grub boot commands for them .

THe default 40_custom file looks like this

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

You can add things after these lines to define a custom grub menu entry

Here is one that I did to boot the boot directly from the void distribution .iso file on HD

type or paste code here#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Void ISO" {
        set isoname="void-live-x86_64-20210930.iso"
	set isofile="/home/nevj/Downloads/void-live-x86_64-20210930.iso"
	echo "Using ${isoname}..."
	loopback loop $isofile
        probe --label --set=cd_label (loop)
        bootoptions="iso-scan/filename=$isofile findiso=$isofile root=live:CDLABEL=$cd_label init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=us locale.LANG=en_US.UTF-8"
	linux (loop)/boot/vmlinuz $bootoptions
	initrd (loop)/boot/initrd
}

What it is doing is using griub commands that you would normally type at the grub> prompt to tell grub to loopmount the file void-live-x86_64-20210930.iso, then setting bootoptions appropriate for Void, then telling it where to find vmlinuz and initrd.
If you did all that at the grub> command prompt you would then say grub> boot but in a 40_custom file you are defining a grub menu entry so you leave out the boot, that happens when you click on the grub menu entry.
After you have defined a 40_custom file, you just do update-grub it makes a new grub.cfg file in `/boot/grub’. Then when you boot you get a grub menu containing the newly defined custom entry.

Now, the problem with all this is is that what I have in that example will only work for Void .iso files. Here are 4-)custom entries for some other linux varieties

menuentry "Ubuntu 10.10 Desktop ISO" {
 loopback loop /ubuntu.iso
 linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu.iso noeject noprompt splash --
 initrd (loop)/casper/initrd.lz
}

menuentry "Linux Mint 10 Gnome ISO" {
 loopback loop /linuxmint10.iso
 linux (loop)/casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz iso-scan/filename=/linuxmint10.iso noeject noprompt splash --
 initrd (loop)/casper/initrd.lz
}

menuentry "Tinycore ISO" {
 loopback loop /tinycore.iso
 linux (loop)/boot/bzImage --
 initrd (loop)/boot/tinycore.gz
}

menuentry "Memtest 86+" {
 linux16 /memtest86+.bin
}

menuentry "SystemRescueCd" {
 loopback loop /systemrescuecd.iso
 linux (loop)/isolinux/rescuecd isoloop=/systemrescuecd.iso setkmap=us docache dostartx
 initrd (loop)/isolinux/initram.igz
}

I got those from the internet, I have never tested them.

So, if you wanted to do this with EasyOS, you would need to get in touch with the maintainers and ask if anyone had defined a 40_custom entry to boot EasyOS from its .img file. It should be possible, but you need the knowledge. Make sure you get 40_custom entry for grub2… a legacy grub entry will not work with grub2

Regards
Neville

2 Likes

Nothing better than that. :+1:

Actually I am a bit wary. Lots of stuff on websites is out of date . They never seem to take down old material. It is not always clear how old material is.

1 Like

That’s why my expression was meant to be ironic. :smile:

2 Likes

OK I get it now. I am really slow on such things. Cant understand or use emoji.

1 Like

Hi all, :wave:

@nevj:

Thank you so much for your very detailed description of how to mofify the 40_custom file in order to make the system boot from an iso. :heart:

In actual fact I once considered such a scenario for putting clonezilla live as an iso on my system and integrating it into grub2.

But that was a very long time ago. I refrained from doing so and indeed I wouldn´t have any knowledge left on how to accomplish such a feat.
So your tutorial is highly welcome. :+1:

I took a look at 40_custom yesterday and indeed mine looks just like yours. So that´s the default entry there, I guess.

Thanks for your example using void.

I see.

I can confirm that EasyOS has a different structure in that respect. E.g. there´s no “casper” folder in Easy´s img-file.

Yes, that would certainly be wise. Thanks for the suggestion.

Looking around a bit myself I found a source (software recommendation - How to boot from an .iso file in GRUB2? - Ask Ubuntu ) mentioning grub-imageboot:

It may be much easier than the impression you get from all the detailed explanations on the web. I just did the following on Ubuntu 12.04 to boot FreeDOS .iso for a firmware update

• Install grub-imageboot
• copy your .iso file(s) to /boot/images/
• run update-grub2

Or copy/paste these:

sudo -s
apt-get install grub-imageboot
mkdir /boot/images/
cp $YOUR_ISO_FILE.iso /boot/images/

update-grub2

That’s it.

As the author was referring to Ubuntu 12.04 - which seems to indicate a pretty old post - I looked it up on the command line myself:

env LANG=en_US.UTF-8 apt-cache show grub-imageboot
Package: grub-imageboot
Architecture: all
Version: 0.6
Priority: extra
Section: universe/admin
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Alexander Wirt <formorer@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 42
Depends: grub-pc | grub-efi-amd64 | grub-efi-ia32, syslinux-common (>= 4)
Filename: pool/universe/g/grub-imageboot/grub-imageboot_0.6_all.deb
Size: 4424
MD5sum: bbdd510fad33fa6b017f0dee8f809668
SHA1: 2e02f313466460db4823fe31ad1e37a98a408a4c
SHA256: 1f79e8f749bf69d810055ab7bafcace0fb77b4ae99efa555b08c53cc6e0c93fd
Description-en: boot iso, harddisk and floppy images with grub2 and syslinux memdisk
 This package installs a grub hook which integrates iso, harddisk and floppy
 images into the grub menu.
 .
 memdisk can't boot every image see
 http://syslinux.zytor.com/wiki/index.php/MEMDISK for its limitations.
Description-md5: a4107cac8a31714bd0d52a3bfce48aa5

It´s still available it seems and it can be installed .
apt-get -s install grub-imageboot tells me so.
I haven´t tried it, so I can´t say whether this could be an alternative to manually modifying
40_custom:thinking:

But in the end I don´t know whether putting the EasyOS img file as a boot option in grub would work.
EasyOS behaves so much more differently that other OSes. :sleepy:

The only way I could get it to work until now was as I posted in post #33.
So I needed to install it on a USB-stick first. The img file couldn´t boot all by itself.

Well, thanks a lot, Neville for your work. I might need it for some other scenario. :wink:

Many greetings from Rosika :slightly_smiling_face:

2 Likes

Damn, so easy. :laughing:

1 Like

Yes I see the difficulties. I reread post #33 .
It depends how qemu does its booting. I dont know if it uses grub or some other method. Both VirtualBox and Gnome Boxes can boot from an iso on HD. I just dont know what qemu can do.

There are 2 sorts of .iso files…

  • normal… will only boot if written to a cd/dvd
  • hybrid … will boot if written to a cd/dvd or a usb drive
    Most Linux distro files are hybrid isos.
    EasyOS is not an iso at all, it is an img
    So I am not sure where it will boot from, but it is at least as good as a hybrid iso because it worked for you from a usb drive.

Did you try the link method with a loop mount? Qemu should not be able to distinguish that from a usb device. It should work the same.
Make the loop mount like this

Then just give qemu the device name… use a link if qemu is fussy about the device name

Lets keep the grub method up our sleeve. It might not work with VM anyway.

Regards
Neville

Install grub-imageboot
• copy your .iso file(s) to /boot/images/
• run update-grub2

I did not know about grub-imageboot.
Do you know if it is only in Ubuntu?

Off topic… Our new fixed wireless internet connection is working well.
We get up to 50mbps on downloads.
… Am nearly ready to show how to do a docker container
with waterfox… It was a long struggle finding dependencies

1 Like

Are you being ironic again?

Hi Neville, :wave:

Well, all I can say is: when I boot Debian in my vm either via virt-manager (method 1 providing a DE) or:

using the following commands (method 2: for running Debian headless):


LIBVIRT_DEFAULT_URI=qemu:///system virsh list --all
 Id   Name          State
------------------------------
 -    archlinux     shut off
 -    clonezilla    shut off
 -    debian10      shut off
 -    ubuntu18.04   shut off

just to take a look at what´s available, and then:

LIBVIRT_DEFAULT_URI=qemu:///system virsh start debian10

after that:

LIBVIRT_DEFAULT_URI=qemu:///system virsh domifaddr debian10

so see the correct ip-address and then:

firejail ssh rosika2@192.168.122.174

… I see that grub is made use of by installed Debian:

rosika2@debian ~> dpkg-query -l | grep grub
ii  grub-common                           2.06-3~deb10u1                          amd64        GRand Unified Bootloader (common files)
ii  grub-pc                               2.06-3~deb10u1                          amd64        GRand Unified Bootloader, version 2 (PC/BIOS version)
ii  grub-pc-bin                           2.06-3~deb10u1                          amd64        GRand Unified Bootloader, version 2 (PC/BIOS modules)
ii  grub2-common                          2.06-3~deb10u1                          amd64        GRand Unified Bootloader (common files for version 2)

:blush:

So I guess grub should be supported by qemu.

Well, qemu can do that too.

I can start e.g. a Lubuntu iso thus:

firejail kvm --cdrom /media/rosika/Windows8_OS/Users/rosalia/Desktop/neue_ISOs_und_anderes/für_lubuntu/lubuntu_20.04.1/lubuntu-20.04.1-desktop-amd64.iso -cpu host -m 2048 -boot d

… and I can start any other iso (not EasyOS img though) which I put on my ventoy stick and redirect that stick to Debian (via settings in virt-manager).

No, I didn´t. Thanks for the link. I´ll look into it.

Many greetings from Rosika :slightly_smiling_face:

P.S.:

I just fired up Debian and looked there.

rosika2@debian ~> env LANG=en_GB:en apt-get -s install grub-imageboot
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  syslinux-common
The following NEW packages will be installed:
  grub-imageboot syslinux-common
0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
Inst syslinux-common (3:6.04~git20190206.bf6db5b4+dfsg1-1 Debian:10.13/oldstable [all])
Inst grub-imageboot (0.6 Debian:10.13/oldstable [all])
Conf syslinux-common (3:6.04~git20190206.bf6db5b4+dfsg1-1 Debian:10.13/oldstable [all])
Conf grub-imageboot (0.6 Debian:10.13/oldstable [all])

So it´s available for Debian as well. I don´t know about other OSes though. Sorry. :slightly_frowning_face:

That´s great :+1: .
Thanks for letting me know.
I know what it´s like to have to wait for internet-connection to be up and running again. :wink:

1 Like