Running Debian/Hurd in KVM

De Eriberto Wiki
Ir para navegação Ir para pesquisar

The main goal of this tutorial is to run a pre-installed image of Debian/Hurd-i386 in KVM, providing SSH connection.

Some parts of this page is based in Debian GNU/Hurd Configuration.

Initial steps

  • Verify if virtualization is enabled in machine setup.
  • Install KVM in Debian (on real machine):
# apt install qemu-kvm


Initially, download and run an image of Debian/Hurd-i386:

$ mkdir ~/debian-hurd
$ cd ~/debian-hurd
$ wget
$ tar -xvzf debian-hurd.img.tar.gz
$ kvm -m 1G -drive file=$(echo debian-hurd*.img),cache=writeback -net nic -net user,hostfwd=tcp:

In login: type root and press ENTER.

Now is time to set a root password and to create a common user (inside debian-hurd running over KVM):

# passwd
# adduser test

Now you are able to enter via SSH. Go to a shell session in your real machine and type:

$ ssh -p 2222 test@
If you want to release the mouse cursor, press Ctrl + Alt + G

Updating the system

To update the whole system, firstly you need install the most recent debian-ports-archive-keyring package.

$ su -
# wget <link of debian-ports-archive-keyring package>
# apt install ./<name of downloaded package>

See a real example below:

$ su -
# wget
# apt install ./debian-ports-archive-keyring_2019.11.05_all.deb
Ignore messages like "N: Download is performed unsandboxed as root as file '/root/debian-ports-archive-keyring_2019.11.05_all.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (1073741837: Permission denied)".

Using nano, vi or vim, edit /etc/apt/sources.list, remove all lines and put the following content:

deb unstable main
deb-src unstable main
deb unreleased main

Update the local package list and upgrade the system:

# apt update
# apt dist-upgrade

After dist-upgrade, if you want save space, run:

# apt --purge autoremove
# apt clean

Final comments

Now you can use Debian/Hurd-i386.

To see other interesting options, please go to