[Freedombox-discuss] How to access a FreedomBox web interface under qemu?
A. F. Cano
afc54 at comcast.net
Tue Jul 19 22:39:07 BST 2022
On Wed, Jun 08, 2022 at 11:23:16PM -0400, I wrote:
> hello,
>
> I have recently downloaded an image of FreedomBox testing and put it on a
> 128GB SD card. With this command:
>
> sudo qemu-system-x86_64 -drive file=/dev/sdf,media=disk -m 4G -smp 2
>
> it boots and after a while I get a "freedombox login:" prompt in the
> qemu window. Of course since it's not set up there's no way to login.
>
> ...
After a lot of research and trial and error, I managed to set up qemu to
boot the FreedomBox and access its web interface. This is how:
sudo qemu-system-x86_64 -enable-kvm -drive file=/dev/sdf,media=disk -m 4G -smp 2 -nic user,hostfwd=tcp::10080-:443
Then pointed the host's browser to
https://127.0.0.1:10080/
This reached the unconfigured FreedomBox and I got the first boot page.
Set up the administrative user and all the default options until I got
to the "update software". This completed and now I have a configured
FreedomBox with one interface: the WAN interface. To make it look like
my real FreedomBox, with 2 local interfaces, I'll have to do a lot more
configuration, but this is a hopeful beginning.
I did get a couple of very long errors, before the sofware was updated,
so it might not be relevant to the current version:
Creating LDAP user failed: ('users', '', 'ldap_sasl_interactive_bind: Can\'t contact LDAP server (-1)\nTraceback (most recent call last):\n File "/usr/share/plinth/actions/users", line 602, in <module>\n main()\n File "/usr/share/plinth/actions/users", line 598, in main\n subcommand_method(arguments)\n File "/usr/share/plinth/actions/users", line 315, in subcommand_create_user\n validate_user(auth_user)\n File "/usr/share/plinth/actions/users", line 110, in validate_user\n admins = get_admin_users()\n File "/usr/share/plinth/actions/users", line 403, in get_admin_users\n output = subprocess.check_output([\n File "/usr/lib/python3.10/subprocess.py", line 420, in check_output\n return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,\n File "/usr/lib/python3.10/subprocess.py", line 524, in run\n raise CalledProcessError(retcode, process.args,\nsubprocess.CalledProcessError: Command \'[\'ldapsearch\', \'-LLL\', \'-Q\', \'-Y\', \'EXTERNAL\', \'-H\', \'ldapi:///\', \'-o\', \'ldif-wrap=no\', \'-s\', \'base\', \'-b\', \'cn=admin,ou=groups,dc=thisbox\', \'memberUid\']\' returned non-zero exit status 255.\n')
Failed to add new user to admin group: ('users', '', 'ldap_sasl_interactive_bind: Can\'t contact LDAP server (-1)\nTraceback (most recent call last):\n File "/usr/share/plinth/actions/users", line 602, in <module>\n main()\n File "/usr/share/plinth/actions/users", line 598, in main\n subcommand_method(arguments)\n File "/usr/share/plinth/actions/users", line 526, in subcommand_add_user_to_group\n validate_user(arguments.auth_user)\n File "/usr/share/plinth/actions/users", line 110, in validate_user\n admins = get_admin_users()\n File "/usr/share/plinth/actions/users", line 403, in get_admin_users\n output = subprocess.check_output([\n File "/usr/lib/python3.10/subprocess.py", line 420, in check_output\n return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,\n File "/usr/lib/python3.10/subprocess.py", line 524, in run\n raise CalledProcessError(retcode, process.args,\nsubprocess.CalledProcessError: Command \'[\'ldapsearch\', \'-LLL\', \'-Q\', \'-Y\', \'EXTERNAL\', \'-H\', \'ldapi:///\', \'-o\', \'ldif-wrap=no\', \'-s\', \'base\', \'-b\', \'cn=admin,ou=groups,dc=thisbox\', \'memberUid\']\' returned non-zero exit status 255.\n')
User account created, you are now logged in
I'll report back when I manage to configure the other 2 interfaces to look
like the real FreedomBox (static sub-nets). The idea is to have a
drop-in replacement ready to go in case the real one fails.
Augustine
More information about the Freedombox-discuss
mailing list