Mycroft on Windows

I’m back, with my screenshot of my weird ubunutu installation problem. just as a reminder, this is happening “directly” after I started the Ubunutu machine from the VirtualBox. after the first three [OK] I stopped at some point and safed the progress, now when I continued it when on for some seconds, but then fell back into the “a start job is running…”
I couldn’t relocate more CPUs to the machine, I think I would have had to do that while setting up the system. anyone any idea? I followed the introduction very fastidiously…
thanks in advance

Welcome to the systemd haters world! That’s just one of the many reasons (but not the main one) why many many linux users hate this init system-thing.

Do you use snaps at all? I also personally dislike them.
My bet is you’re using some and there is a problem with it, its filesystem or whatsoever…

If you don’t know what a snap is or aren’t you using, perhaps the best would be disable the service at boot time, to do this, you should boot with a live CD/USB, and disable snapd (or whichever name has on ubuntu), by mounting the hard disk and removing the snapd.service from /<mountpoint>/etc/systemd/system/ (you need to search inside the directories below, like multi-user.target.wants or the like.

If you use snaps, and you need them (ie: you have no way to install something in other some more mature and appropiate way), you should try to change the Type of the Unit. Here someone explain how.

In both cases, if you cannot finally boot (I think if in 2h 12min hasn’t booted, you won’t boot never), you will need to boot with a liveCD, and mount the disk.

hej, thanks for your help!
I am not sure if you understood what I am trying to do, but that might also be because I have, as you assumed, no idea what you are talking about :smiley:

I am running Ubuntu on VirtualBox, so I am using an Image to boot the OS. How would I use the USB instead in this situation?

I am really new to all this, so I have also no real idea what that would take me to do. If I use the USB, just plug it in and search for the directories and delete it? If it is possible to use the boot-stick in the virtual machine at all…
thanks a lot!

Sorry for the delay.

I think the easiestfor you would be to install another virtualbox VM and make sure you aren’t using snaps. Pay attention and if you see that word anywhere, try to avoid them. You can safely use ubuntu without them.

If you ask about liveCD/USB, yes, you can mount the ubuntu .iso file under the CD settings, then under settings should be a “boot order” where you must specify to boot first from CD. Then the liveCD/installation environment should start.

Once on the live environment, instead of install into hard disk, you can mount the hard disk and browse the files and delete them.

But again, if you’re new to linux, perhaps the easiest way should be install the operative system again, and make sure not to use snaps for the moment.

If you want, you can try Debian instead Ubuntu, it deliver a desktop as well and it doesn’t use snaps, so problem solved, and Mycroft works with any linux, a debian or ubuntu is more or less the same.

its been a while, but today I tried a few things. it ended up with me trying the debian minimal image. i got quite far, but after installation I had problems connecting to the mirror server, and I am pretty sure that this is because of my network settings. I am connected to the wifi with my fritz-wifi stick. I chose “network bridge” in the virtual-box settings as seen in a tutorial (these settings are missing in the mycroft tutorial, are they important?). But I have no connecting, I think. Anyone has an idea how to fix that? I had to put in my network settings manually, and I dont think that did any good…
still trying…
@edit: as always, the moment I press send and I try the next thing, it works… I used my phone to make a hotspot, and the network is connected. it seems that my dorm-router somhow blocks the connection?

@problem: so I got debian running, and mycroft cloned, so far so good. now when I run the “debug command”, it tells me that there is"Errno 28 No spave left on device", which is BS, because I allocated 8gb to the virtual drive of which 4gb are taken. I think the mycroft setup also stopped (at a very late stage though) with some kind of space error problem. anyone has an thought on that? thanks again, still hoping …! :):tired_face:!
I tried to add another vitrual hard drive to the machine, I think debian doesn’t recognize it. not sure what my df tells my as well… seems like I am need to redo the machine again tomorrow…
DF screenshot

well, you’re facing some strange problems :expressionless:

Virtualbox should work with Network Bridge, that type would use an IP from your LAN’s range if you’re using a DHCP server on it, or you could configure manually if you don’t have any or you don’t want to use it. If it is working when tethering from your phone, perhaps there is a firewall on your host OS forbidding the DHCP through the ethernet adapter.
You can set up the static IP easily by editing /etc/network/interfaces and, if your guest ethernet adapter is named for example enp0s0, then put something like

auto enp0s0
iface enp0s0 inet static
      address 192.168.0.231
      netmask 255.255.255.0
      gateway 192.168.0.1

And put a free IP address of your home range, whatever it is, I guessed the most typical here, a 192.168.0.0/24, but yours can be different. Correct also your gateway

Then, edit /etc/resolv.conf and put a nameserver, if your router has the IP 192.168.0.1, it would be something like

nameserver 192.168.0.1
nameserver 8.8.8.8

Then reboot the virtual machine or restart the network daemon with the command systemctl restart networking.

Now it should appear the configured IP on the adapter in the output of the command

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether c8:60:00:98:ed:99 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.231/24 brd 192.168.0.255 scope global noprefixroute enp3s0
       valid_lft forever preferred_lft forever
    inet6 fe80::c0e6:e966:d55a:eebc/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

Finally, if the IP is not showing or the status is not UP, then somethingis failing here. You can test to ping your router IP, then ping outside your network (google.com) and that should solve your DHCP problems.

I cannot see the screenshot you posted. So I can’t tell you if you ran out of space. Debian minimal should be… well, minimal, and 8GB should be enough for system installation and mycroft and dependencies. My Mark I uses 5,4GB, so yours should be like this. Perhaps did you install a desktop environment?

Again, the easiest way for you, should be reinstall once again, yet there are ways to solve space issues, but in this stage, I would just reinstall and give enough space disk (20 or 32GB should be enough for any scenario). Have in mind that virtualbox doesn’t preallocate the disk space, that means that even if you assign… 200GB, if you use just 6GB, the space on disc allocated is 6GB.

wow, thanks for the very fast reply!
first, lets try the screenshot again:


seems to work now.

maybe I found the problem. I put in the IP of my PC/Wifi-stick, maybe that was the problem? I thought I need to give it the same config. I will try it the next time with another static one. since I will have to set up the machine again anyway…
I now the part with the disk space, thats why I am confused about the error messages of mycroft. since also VB only shows abt 4gb used of the drive… I am certain that it is the small image.
@gez-mycroft is the network-bridge setting important? maybe its needed in the general manual as well?
or should I try it without it once?
thanks guys for all the help with these weird problems. I will try to put them all in one doc when I am finished, maybe it can help someone else as well!
@edit: as i mentioned, I stay in a dorm and the wifi should be quite crowded. is there a possibility to search for a free ip address beforehand? or is that “192.168.0.0/24” a real suggestion including the slash?

On virtualization world, there is the Host which is the computer that virtualize the Guest.

Most virtualization systems have three methods to give an interface to a guest machine:

  • Bridge Networking: this kind of interface acts like a normal Ethernet interface. You can configure with a static or DHCP configuration as you would do on a normal computer.
  • NAT: Virtualization systems has their own DHCP server, usually on a class C network (255.255.255.0) different from the typical used by ISP providers (192.168.X.X), if you set this type of connection and set the guest to DHCP, it will acquire that IP and the host will act like a firewall for the guest. This guest will be able to access the internet and your computers on your LAN, but those computers won’t be able to access the guest machine, just the host. (They are on another subnet, and they don’t know how to reach the guest). An advanced user could forward the guest ports to the host and then the other computers could access the services on the guest through the host. If you set up a second virtual machine within this network, the two VMs will be able to see each other just as if they were on the same LAN (because they are on the same virtual LAN)
  • Host Only network: This kind of network as too few case uses, just the host will see the guest and vice versa, I don’t remember if the guest can even access the internet, I would bet that it can’t.

So, explained that, your option is to bring up the bridge network and this virtual machine will be just as other computer in your LAN. Make sure you select the Ethernet adapter on the bridge settings “Attached To”.

Being said that, you can’t set the host IP on the guest machine because it will conflict each other. Set it up with a free IP, see the settings on your computer and write down your default gateway, subnet mask and DNS and set it up as I explained in the former post.

For the disk space… well you have assigned just 4 GB, so it’s not enough for a semi complex system like Mycroft. If you created one 8 GB disk on virtualbox, then at some point of the installation it created the main partition of just 4 GB.

You can run the command lsblk like this

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 978,1G  0 disk 
├─sda1   8:1    0 960,9G  0 part /
└─sda2   8:2    0  17,2G  0 part [SWAP]

The other “sizes” you see like udev or tmpfs are just in-memory filesystems: they are not taking space from your hard disk, but the half of the VM’s memory.

The easy way would be reinstall again and when the wizard goes into partitioning, select “Manual” and create two partitions:

  • 1 partition of 2GB size.
    • Partition type: swap (2GB swap is enough for most cases)
  • 1 partition of the rest of the disk, you can configure this partition like follows
    • Format it in ext4 or xfs
    • Mount this partition on /
    • Make the partition bootable

Apply the settings and continue the installation, when rebooting you should see the disk of the (size - 2GB), so if you want 8 GB, create a disk of 10 GB.

Alternative way: If by running lsblk you see you have another partition of 4 GB, you could use a live CD of Gparted (Download the iso, mount it on the virtual machine DVD, set the boot options on the virtual machine to boot first from CD-ROM and reboot). After selecting the keuboard language, a desktop will be shown and after a few seconds, the GParted partition manager pop up. This application is pretty straight forward: you can select the desired disk on the dropdown menu on top right, and a graphical view of the disk will be shown, then you can select the partition you wan to resize, edit it and drag a bar up to your desired size, and then apply the changes. After rebooting (without the CD) you will see the partition at the grown size.
I suggest you this way just for testing purposes, because perhaps when you installed something and ran out of space, something got borked and probably you will face new problems. But if you want to know how to use the cool Gparted, it could make your day even with Windows disks.

okay i got a lot of input, thanks! especially for the network guide, so I guess the easiest way to circumvent the problems ist just to put it back to NAT settings, since I dont really need the machine to be a guest on its own, do I?

you get that from the 3.9g of the sda1, i figure. I expected it to simply show whats in the drive, since VB hast the dynamic thing, always just giving it the space that it needs until the limit sets in.
since the VB setting still show me that I have allocated 8gb to the drive, and I did not made an partitions during the installtions, at least not on purpose. and wouldnt other partitions show in the df as well?

I am going to read your suggestions thorougly at home, but I think what I will do is set it up again, give the machine a bunch of space and see whats happens. its honestly too much work for me, to get into the topic, and since the network thing needs also redoing, it fits. lets hope for some AI action :slight_smile:

Well, you can put the network in NAT mode, I don’t know if it has any impact on Mycroft as I don’t use virtualbox myself. It shouldn’t affect anything unless you need to access something in Mycroft (ie: access with your phone and use mycroft socket, etc).

No, there is a thing called thin provision which is a mechanism of disk allocation as it fills up, but virtualization environments see the “entire” disk, I mean, if you tell virtualbox you have 20 GB disk, df -h in the guest will show you 20 GB, although your occupied disk is 5 GB in the host. This is cool because you can overprovision disks above your real storage, but is also dangerous for the very same reason, if your guest VMs grows too much, you can fill your physical hard disk.

df stands for “disk free” and reports file system disk space usage, if you didn’t formated a partition (and/or is not mounted), you won’t see there.
lsblk stands for “list block devices” and it would show you all your block devices (hard disks, usb, optical readers, etc) regarding if they are formatted/mounted or not
fdisk -l stands for “format disk” and the parameter -l makes it to show you all the partitions and formats, on my case:

sudo fdisk -l
Disk /dev/sda: 978,9 GiB, 1050214588416 bytes, 2051200368 sectors
Disk model: Crucial_CT1050MX
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3925ad1e

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sda1             2048 2015196980 2015194933 960,9G 83 Linux
/dev/sda2       2015196981 2051195264   35998284  17,2G 82 Linux swap / Solaris

With those command, you will have an idea of what’s happening.

1 Like

THanks for all the input!
I ended up redoing the machine and finding the problem on the way. Also the lsblk showd the same. apparently debian creates another partition during the setup

. So I set up a bigger VD on the next machine and now most of it is working. Just as remarke for debian: use at least 12-14 gb. I got a new problem, but I opened another topic for that :smile:
(Skill-Manager Error)
thanks for the help!

I’m glad you finally got it!

It seems it does the right way, one swap partition and one for the entire system. That should be the best approach for someone coming from Windows (C:\ and pagefile.sys or the newer swapfile.sys) . But in Linux, of course, there are another configurations, like creating a partition for user files (/home) if you want in a future reinstall without losing all the user configuration, or creating a dedicated partition in (/var) because this directory tends to grow a lot and you can avoid running out of space. But sincerely, those add complexity and you need to rummage with filesystems, so keeping simplification in mind, the best your most users is to have all the available data in / and a swap space to avoid kernel panics if the system reaches the max memory.

Regarding the size of a Debian installation, well, it will depend of the stuff installed on it, on my job I setup all the VMs with 32 GB disks, but Debian itself occupy from 1.6 GB to 3 GB. Those are obviously headless servers without a desktop. With a desktop should increase the size from 200 MB to 4 GB, depending on the desktop and features.

I created a new topic, since there is an offical guide using ubuntu in VB for mycroft, so if someone runs into the same problems that I have it is easier to see through everything. there is also still a problem with the minimal image, but more to that in the other topic.
Thanks again, especially @malevolent for the idea with debian!