Doc /


(title Debugging a Freebox Virtual Machine (VM):)

"Freebox" is the name of the french FAI "Free" modem. The one I mean here is the "Delta" one, the most powerfull, including a full raid NAS.

What's a freebox VM

Virtual machines are allowed in the Freebox Delta modem directly from the "FreeOs" modem web interface. AFAIK, these VM are sort of qemu ones.

The simpler way to build one is to use the FAI templates. Being an openSUSE fan, I used a "JeOS" template. This one simply download a pre-configured disk image "opensuse.qcow2", probably named after the BTRFS file system used. The image is relatively small (around 3Gb), but later the disk and the file system can be extended.

What problem?

Learning the way this VM works, I made some error and got the infamous "type root passwd or controlD to continue" in the system cosole. But the password didn't ever match, what ever (AZERTY or QWERTY) keyboard I try.

So I needed a rescue console. But this modem do not allow one

From GRUB menu

Editing the boot commands

The Freebox VM admin interface is complete but very basic. For example, with some training one can see than there is a grub boot menu (waiting 10s) at boot. But the system xterm have to be launched at the due time. Too early you only get an error message, to late the kernel logs. Try it and exercise! As usual, pressing a key when the grub menu is displayed stops the boot process.

Then one can type "e" to enter grub edit screen, go to the "linux" line and add "init=/bin/bash" at the end. If the boot go far enough you should get a root session.

Using bootable snapshots

The simpler way may be to test a previous snapshot, in GRUB boot menu. There should be several. begin to the one just before the failing one and go down if no success.

Here is the official openSUSE documentation

Getting a rescue console

I had to use the modem "Download" feature to get on the Freebox disk an iso image. Namely a aarch64 iso (this modem is arm powered). The network small image didn't have the rescue system, so I had to download the full 4.5Gb image.

Then add this image as a cdrom from the VM admin interface and reboot.

At this stage, one have only the system console from web interface to work. This one is full black and do not cope well with booting the image. I had to kill and reload several times the console to finally get the grub menu, with the "more" and "rescue" option.

Working from the rescue

This is a pretty easy (for openSUSE experts) thing, as it's exactly like for any openSUSE rescue system.

Enter root, no passwd and get the rescue system at hand.

As you can see, the devices are "vdaX", not sdaX as usual.

then the usual set of commands are:

mount /dev/vda3 /mnt
cd /mnt
ll # to check if your are in /mnt, should show the vm root listing
mount --bind  /dev dev
mount --bind /sys sys
mount --bind /proc proc
chroot .

Notice using the up arrow can make typing better for the mount --bind lines.

At the end, you are root in the VM disk, you can change the passwd, use yast... try to fix the problem is you can...