Running Gentoo on the Milk-V Megrez

6 views
Skip to first unread message

crueter

unread,
Dec 25, 2025, 6:46:02 PM12/25/25
to RISC-V Developer Board Community
Does anyone have any experience getting Gentoo on the Megrez? I could get Fedora running but I personally can't really stand to use anything except Gentoo or Arch. The Gentoo RISC-V and ArchRISCV projects mention support for the Titan and Pioneer boards but not Megrez. Wondering how I should go about creating a bootable image or modifying the Fedora image in some way.

Michael Orlitzky

unread,
Dec 25, 2025, 7:50:44 PM12/25/25
to crueter, RISC-V Developer Board Community
Not specifically, but I don't think you'll have too many issues. I
would expect the big headaches to include the vendor kernel and the
boot process, but those have little to do with what OS runs on top.

If you can boot to Fedora, do that, and use Fedora to install Gentoo
on a separate drive. (You can just follow the Gentoo handbook from
within Fedora.) When you get to the kernel part, copy the Fedora
kernel instead of building your own, and make sure to get the modules
from e.g. /lib/modules too. Unless it's very old or very weird, the
Fedora kernel should boot Gentoo too.

Then there's the bootloader. The milk-V page says that you can put the
bootloader on an SD card. That's will be easier than messing with the
SPI flash, and if you don't mess with the flash, you can always use it
in an emergency to boot the default OS again.

Both Debian (RockOS) and Fedora images linked from this page...

https://milkv.io/docs/megrez/getting-started/resources

include SD card images that (hopefully, I'm guessing!) include a
bootloader. If you install one of those images on an SD card, and if
my guess is correct, you should then be able to mount the SD card and
edit the bootloader config files to point to your new Gentoo
installation rather than the RockOS/Fedora on the card.

Caveat 1: if the bootloader is janky and can't see the drive that you
installed Gentoo on, it's OK to put the kernel on the SD card too
and then pass it a root= param pointing to the Gentoo partition.

Caveat 2: the solution to Caveat 1 only works if the driver for your
SSD/SATA interface is compiled-in to the kernel.

Anyway, once Gentoo boots, everything should pretty much Just Work.

Immolo

unread,
Dec 25, 2025, 7:54:33 PM12/25/25
to crueter, RISC-V Developer Board Community
(Resending as originally forgot to tell reply to all)

On Thu, 25 Dec 2025, 23:46 'crueter' via RISC-V Developer Board Community, <devboard-...@riscv.org> wrote:
Does anyone have any experience getting Gentoo on the Megrez? I could get Fedora running but I personally can't really stand to use anything except Gentoo or Arch. The Gentoo RISC-V and ArchRISCV projects mention support for the Titan and Pioneer boards but not Megrez. Wondering how I should go about creating a bootable image or modifying the Fedora image in some way.

If you can wait a bit longer than I can start looking with you. Should be around 12th January. 

I promised to look into this on the understanding I'd need to start in the new year.

We can either work together or wait for doce to be produced, so just let me know which one interests you.

Kind regards

Immolo

Felix Yan

unread,
Dec 26, 2025, 11:42:12 AM12/26/25
to Michael Orlitzky, crueter, RISC-V Developer Board Community
On 12/26/25 08:50, Michael Orlitzky wrote:
> On 2025-12-25 15:46:02, 'crueter' via RISC-V Developer Board Community wrote:
>> Does anyone have any experience getting Gentoo on the Megrez? I could get
>> Fedora running but I personally can't really stand to use anything except
>> Gentoo or Arch. The Gentoo RISC-V and ArchRISCV projects mention support
>> for the Titan and Pioneer boards but not Megrez. Wondering how I should go
>> about creating a bootable image or modifying the Fedora image in some way.
>
> Not specifically, but I don't think you'll have too many issues. I
> would expect the big headaches to include the vendor kernel and the
> boot process, but those have little to do with what OS runs on top.

Indeed. I have not tried the Megrez myself, but I do have the SiFive
version (HiFive™ Premier P550) as well as StarPro64 installed with Arch
RISC-V as builders. Both of them are running just fine with vendor kernels.
--
Regards,
Felix Yan
OpenPGP_signature.asc
Reply all
Reply to author
Forward
0 new messages