[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: "FATAL: kernel too old" when running mmdebootstrap'd riscv64 chroot



---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68

On Tue, Oct 23, 2018 at 9:58 PM Adam Borowski <kilobyte@angband.pl> wrote:
>
> On Tue, Oct 23, 2018 at 08:56:54PM +0100, Luke Kenneth Casson Leighton wrote:
> > possible hypothetical explanations are that binfmt uses an old
> > (cached?) version of the /usr/bin/qemu-riscv64-static.
>
> Yes, it does.  Otherwise, you would need to copy the binfmt handler to every
> chroot, just like you had to until recently.

 ah :)

> But with new kernels and new
> qemu, the executable is opened the moment the binfmt is registered, making
> it available even if the file is not accessible for a particular process.

 okaay, so that... ok, thanks kb.

> This is usually very beneficial, but it indeed makes updating qemu a bit
> tricky.

 it may be useful to note on the page, as i can't be the only person
who's been caught out by this.

>  Easiest to just reboot.

 640k is enough for everybody, too... :)  i got there in the end.

 ok so suggested changes to the wiki page:

https://wiki.debian.org/RISC-V#Creating_a_riscv64_chroot

"As the next step, copy /usr/bin/qemu-riscv64-static (cf. the qemu
section) to ${CHROOT_PATH}/usr/bin.  Also remember that if, on the
host system, the latest versions of linux kernel are not being used
(4.15 or greater) it may be necessary to re-run update-binfmts.

and in here:

https://wiki.debian.org/RISC-V#Qemu

If you don't want to use the Debian qemu packages, a static qemu for
user-mode emulation can be built.  Note also that running
update-binfmts is essential if a host linux kernel version less than
4.15 is in use.

Building a static riscv64 qemu from upstream qemu git is as follows:


or something along those lines.

l.


Reply to: