Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong fs type, bad option, bad superblock : ERROR while mounting the image #132

Open
harshcht opened this issue Jun 6, 2021 · 1 comment

Comments

@harshcht
Copy link

harshcht commented Jun 6, 2021

I followed the instructions as in the readme.md file. I download the raspbian OS image and then do :

sudo losetup -f --show -P ~/2021-05-07-raspios-buster-armhf-full.img

I get : /dev/loop14

now I try to mount the image, but am gettng error

sudo mount /dev/loop14 /mnt/rpi

mount: /mnt/rpi: wrong fs type, bad option, bad superblock on /dev/loop14, missing codepage or helper program, or other error.

Can someone please help me out with this ?

@paulwratt
Copy link

paulwratt commented Jun 9, 2021

/dev/loop14 is the device id allocation provided by losetup (loopback device setup), it is equivalent to /dev/sda or /dev/mccblk0, none of which are partitions, needed by mount
if ls /dev/loop14* lists only one item then run sudo partprobe /dev/loop14 and try again.
you are looking for (in your case) /dev/loop14p1 (the FAT16/32 boot partition) and /dev/loop14p2 (the EXT4 linux partition).
then redo your sudo mount command with either of those (optionally adding -t vfat or -t ext4 depending on partition)

pi@raspberrypi:~ $ ls /dev/mmcblk0*
/dev/mmcblk0  /dev/mmcblk0p1  /dev/mmcblk0p2  /dev/mmcblk0p3

(on my setup partition 3 is a linux swap partition)

EDIT:
for those wanting complete quick setup:

-=Loop Device=-
$ sudo losetup -f
/dev/loop0
$ sudo losetup /dev/loop0 sd-image.img
$ sudo partprobe /dev/loop0
$ sudo mount -t ext4 /dev/loop0p2 /mnt/sd-img
$ sudo mount -t vfat /dev/loop0p1 /mnt/sd-img/boot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants