# Error converting RPi4 image to mender "/mender-convert/work/rootfs: wrong fs type, bad option, bad superblock"

**URL:** <https://hub.mender.io/t/error-converting-rpi4-image-to-mender-mender-convert-work-rootfs-wrong-fs-type-bad-option-bad-superblock/4434>\
**Category:** General Discussions\
**Tags:** mender-convert, raspberry-pi-4\
**Created:** [December 31, 2021, 10:32am UTC](https://hub.mender.io/t/error-converting-rpi4-image-to-mender-mender-convert-work-rootfs-wrong-fs-type-bad-option-bad-superblock/4434 "2021-12-31T10:32:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BSBoatia](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/bsboatia/32/1456_2.png) [@BSBoatia](https://hub.mender.io/u/BSBoatia)\
**Post date:** [December 31, 2021, 10:32am UTC](https://hub.mender.io/t/error-converting-rpi4-image-to-mender-mender-convert-work-rootfs-wrong-fs-type-bad-option-bad-superblock/4434/1 "2021-12-31T10:32:50Z")

</div>

Hello,

I was trying to convert a raspberry pi 4 (Raspberry Pi 02 lite 32bit) to mender. The conversion errors out with:

`mount: /mender-convert/work/rootfs: wrong fs type, bad option, bad superblock on /dev/loop5, missing codepage or helper program, or other error.`

I created the golden image as dd from

```auto
Disk: /dev/disk2	geometry: 7764/255/63 [124735488 sectors]
Signature: 0xAA55
         Starting Ending
 #: id cyl hd sec - cyl hd sec [start - size]
------------------------------------------------------------------------
 1: 0C 64 0 1 - 1023 3 32 [8192 - 524288] Win95 FAT32L
 2: 83 260 0 1 - 1023 63 32 [532480 - 5611521] Linux files*
 3: 00 0 0 0 - 0 0 0 [0 - 0] unused      
 4: 00 0 0 0 - 0 0 0 [0 - 0] unused      
BMacBook-Pro:input user$ sudo dd if=/dev/disk2 of=sb-no-mender-golden-0.5.1.img bs=512 count=6135810

```

running:

```auto
Running mender-convert --disk-image input/sb-no-mender-golden-0.5.1.img --config configs/raspberrypi4_config
Running mender-convert-extract: --config ./work/override_compression_config --disk-image input/sb-no-mender-golden-0.5.1.img --config configs/raspberrypi4_config
2021-12-31 10:19:47 [INFO] [mender-convert-extract] Using configuration file: configs/mender_convert_config
2021-12-31 10:19:47 [INFO] [mender-convert-extract] Using configuration file: ./work/override_compression_config
2021-12-31 10:19:47 [INFO] [mender-convert-extract] Using configuration file: configs/raspberrypi4_config
2021-12-31 10:19:47 [INFO] [mender-convert-extract] Validating disk image
2021-12-31 10:19:47 [INFO] [mender-convert-extract] Disk parsed successfully
2021-12-31 10:19:47 [INFO] [mender-convert-extract] NUMBER OF PARTS: 2 TYPE: dos
2021-12-31 10:19:47 [INFO] [mender-convert-extract] PART 1: SIZE: 256M TYPE: 0xc
2021-12-31 10:19:47 [INFO] [mender-convert-extract] PART 1: extracting to work/part-1.fs
2021-12-31 10:19:57 [INFO] [mender-convert-extract] PART 2: SIZE: 2.7G TYPE: 0x83
2021-12-31 10:19:57 [INFO] [mender-convert-extract] PART 2: extracting to work/part-2.fs
mender-convert-extract has finished. Cleaning up...
Running mender-convert-modify: --config ./work/override_compression_config --disk-image input/sb-no-mender-golden-0.5.1.img --config configs/raspberrypi4_config
2021-12-31 10:21:56 [INFO] [mender-convert-modify] Using configuration file: configs/mender_convert_config
2021-12-31 10:21:56 [INFO] [mender-convert-modify] Using configuration file: ./work/override_compression_config
2021-12-31 10:21:56 [INFO] [mender-convert-modify] Using configuration file: configs/raspberrypi4_config
mount: /mender-convert/work/rootfs: wrong fs type, bad option, bad superblock on /dev/loop5, missing codepage or helper program, or other error.
mender-convert-modify has finished. Cleaning up...
umount: work/rootfs: not mounted.
2021-12-31 10:21:56 [ERROR] [mender-convert] mender-convert failed
2021-12-31 10:21:56 [DEBUG] [mender-convert-extract] When running: (modules/disk.sh:64): run_and_log_cmd():  

	dd if=input/sb-no-mender-golden-0.5.1.img of=work/part-2.fs skip=532480 bs=512 count=5611521 conv=sparse status=none
2021-12-31 10:21:56 [INFO] [mender-convert-modify] Using configuration file: configs/mender_convert_config
2021-12-31 10:21:56 [INFO] [mender-convert-modify] Using configuration file: ./work/override_compression_config
2021-12-31 10:21:56 [INFO] [mender-convert-modify] Using configuration file: configs/raspberrypi4_config
2021-12-31 10:21:56 [ERROR] [mender-convert] mender-convert failed
2021-12-31 10:21:56 [ERROR] [mender-convert] mender-convert exit code: 32
Log file available at: logs/convert.log.uJdMap2DsR

```

Please advise.

Thanks & very best!

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [December 31, 2021, 12:03pm UTC](https://hub.mender.io/t/error-converting-rpi4-image-to-mender-mender-convert-work-rootfs-wrong-fs-type-bad-option-bad-superblock/4434/2 "2021-12-31T12:03:19Z")

</div>

I would start by looking at the image you’ve extracted. Can you get it to mount locally?

---

<div class="post-metadata">

**Author:** ![BSBoatia](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/bsboatia/32/1456_2.png) [@BSBoatia](https://hub.mender.io/u/BSBoatia)\
**Post date:** [December 31, 2021, 2:17pm UTC](https://hub.mender.io/t/error-converting-rpi4-image-to-mender-mender-convert-work-rootfs-wrong-fs-type-bad-option-bad-superblock/4434/3 "2021-12-31T14:17:35Z")

</div>

@oleorhagen not sure how to mount it locally, but if I flash it onto an SD card using RPI imager, the PI is running fine.

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [January 10, 2022, 2:07pm UTC](https://hub.mender.io/t/error-converting-rpi4-image-to-mender-mender-convert-work-rootfs-wrong-fs-type-bad-option-bad-superblock/4434/4 "2022-01-10T14:07:51Z")

</div>

Hmm, that is interesting.

You can mount the filesystem with the `mount` command, if you’re on `linux`. And then give it the right offset for the partition you want to mount.
