Recently I bought a mini PC looking forward to setting up a home router. It started quite well except the specs were higher than I anticipated. 8 GB RAM plus 128 GB eMMC - too much waste for “just a router”, so I figured I’d get some virtual machines to improve its utilization. Choosing the virtualization platform isn’t hard - I’m most familiar with Proxmox VE.
The offcial ISO installer is pretty straightforward, until the last step:
Unable to get device for partition 1 on device /dev/mmcblk0
Solution
The Proxmox VE forum is completely unhelpful this time (1, 2) with staff keeping on saying “it’s not supported”, so I had to look around for alternatives. Fortunately this article is right there (for Proxmox VE 7):
Turns out it’s hard-coded into Proxmox VE’s Perl installer script, so all you have to do is to patch it:
- Boot the installer ISO to the first menu, select the second option
Install Proxmox VE (Debug mode)
- The first time you’re present with a command-line prompt, type
exit
and Enter to skip it. This is a very early stage and you can’t do much here. - The second time you have a shell, locate
/usr/share/perl5/Proxmox/Sys/Block.pm
1 (for Proxmox VE 8) and open it. Text editors such asvi
andnano
are available. -
Search for
unable to get device
and you should find some code like this:} elsif ($dev =~ m|^/dev/[^/]+/hd[a-z]$|) { return "${dev}$partnum"; } elsif ($dev =~ m|^/dev/nvme\d+n\d+$|) { return "${dev}p$partnum"; } else { die "unable to get device for partition $partnum on device $dev\n"; }
The full code can be found on GitHub if you’d like.
-
See how different kinds of storage devices are enumerated? Now add
/dev/mmcblk
to the list like this:} elsif ($dev =~ m|^/dev/[^/]+/hd[a-z]$|) { return "${dev}$partnum"; } elsif ($dev =~ m|^/dev/nvme\d+n\d+$|) { return "${dev}p$partnum"; } elsif ($dev =~ m|^/dev/mmcblk\d+$|) { return "${dev}p$partnum"; } else { die "unable to get device for partition $partnum on device $dev\n"; }
- Save your edits and type
exit
. Proceed with the installation as normal. Select/dev/mmcblk0
(without thebootX
suffix) as the install target. You may want to disable swap to avoid rapid wearing of the eMMC. - The next time you have a shell, use
exit
to skip it. Nothing to do here.
Rambling
While it’s possible to install Proxmox VE on top of a matching version of Debian, it’s tedious to install Debian just for PVE. The last time I had to do it this way was on very old hardware that the PVE installer just crashed (X server died), and that the PVE installer didn’t have a CLI version. Plus a standard Debian installation typically comes with extra stuff that you don’t want on a PVE system (or want to get rid of ASAP).
It’s also possible to modify the installer script beforehand, but you need to unpack pve-installer.squashfs
and re-pack it into the ISO. You should think more seriously if you want to install PVE on a lot of eMMC devices.
-
For Proxmox VE 7, you should go for
/usr/bin/proxinstall
instead. ↩
Leave a comment