Dietpi in odroid n2 on microsd card via petitboot

DietPi v10.5.2 : 22:36 - Thu 06/25/26
─────────────────────────────────────────────────────

* Device model : Odroid N2 (aarch64)
* CPU temp : 47 °C / 116 °F : Optimal temperature
* LAN IP : 10.26.104.103 (wlan0)
* MOTD : DietPi v10.5 has been released. Check out all changes:
  https://dietpi.com/docs/releases/v10_5/
  ─────────────────────────────────────────────────────

DietPi Team     : https://github.com/MichaIng/DietPi#the-dietpi-project-team
Patreon Legends : ADSB.im, Oliver C. Radke
Website         : https://dietpi.com/ | https://x.com/DietPi_ | Bsky: @dietpi.com
Contribute      : https://dietpi.com/contribute.html
Web Hosting by  : https://login-online.com/

dietpi-launcher : All the DietPi programs in one place
dietpi-config   : Feature rich configuration tool for your device
dietpi-software : Select optimised software for installation
htop            : Resource monitor
cpu             : Shows CPU information and stats

root@DietPi:\~# sudo tune2fs -L DIETPI "$ROOT_DEV"
tune2fs 1.47.2 (1-Jan-2025)
tune2fs: No such file or directory while trying to open
Couldn't find valid filesystem superblock.
root@DietPi:\~#

Sorry my mistake, false variable name. This is the correct one:

sudo tune2fs -L DIETPI "$G_ROOTFS_DEV"

It doesn’t work too. No problem. The mouse cursor is flickering and onboard screen with its settings doesn’t show up on clicking in xfce and lxqt desktops.

What do you mean by that? Does the command fail, or is the label not shown in the petitboot menu?

There are two labels, which you can check via:

findmnt -o SOURCE,LABEL,PARTLABEL "$G_ROOTFS_DEV"

If the filesystem label is not shown in the petitboot menu, then it must be the partition label. That can be changed with:

parted "$(lsblk -npo PKNAME "$G_ROOTFS_DEV")" name 1 DietPi

BUT: That works only on GPT partition tables, not on MBR (our Odroid N2 images).

will try these commands . Thank you.:folded_hands: :folded_hands: :folded_hands:

Hi michalang, I’ve installed dietpi image for odroid n2 in the usb SSD along with other OSs (coreelec, unbuntu and armbian legacy image) using disk utility and all boot via petitboot except dietpi showing mount error which was booting from the micro SD card during previous installation. Do I need to make any changes in the image to multiboot via petitboot. from the usb SSD. Thank you.

You still need to use the testing images from Index of /downloads/images/testing. The DietPi release is still outstanding, vacation delay.

Took some time to test it. Yes it’s booting from the SSD via USB. I used disk utility to create partitions in the SSD and also used it to create and restore the dietpi images on to the SSD. It’s in sda5 as shown by petitboot. So it’s booting from both the sdcard and the USB.Thanks mic.

Okay, great that it works now. I am still confused about the “NO LABEL”.

sudo tune2fs -L DIETPI "$G_ROOTFS_DEV"

This does still not cause the DietPi partition to show up with “DIETPI” label in petitboot?

MBR has no way to assign a partition label. And the Armbian image should be MBR as well. Could you verify this?

lsblk -po NAME,PTTYPE,LABEL,PARTLABEL,UUID

If we are missing a commonly used way to label a distro partition, I’m happy to add it.

Ok mic, I’ll test and get back to you. Those other labels are injected by manual editing of the boot.ini file. The armbian image is a legacy one since the latest version is not recognised by petitboot as we already discussed. I’ll try your command line as well as manual editing of diet pi image and post the results.

How exactly, is there a related setenv or so? Or Is it the first line? In the boot.ini files for the Odroid C1 and XU4 (which need legacy vendor U-Boot) the first lines contain some label like ODROIDC-UBOOT-CONFIG, and I was wondering what this is about. But this isn’t it, is it?

And right, I didn’t think about the fact that even with the petitboot-compatibility workarounds we apply our end, the Armbian images are not even detected in the boot menu for some reason.

Hi mic , Got it. The tune2fs or e2label commands , labels the partition of DIETPI image but not recognised by petitboot, so I edited the boot.cmd file and inserted the setenv boot label as the first line shown in the image, recompiled it into boot.scr. Now petitboot recognise the label and I included your name and the device name - LOL. THANK YOU. Regards and greetings from INDIA.

Great find! I’ll add this to our default boot.scr.

It is btw a capital i in my username, not a lower-case l :wink:.

EDIT: I kept it simple: dietpi-installer: Odroid N2/HC4: add boot label for petitboot · MichaIng/DietPi@29e6658 · GitHub