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

Error mounting IMG (wrong fs type, bad option, bad superblock) #182

Closed
ondrejhajek opened this issue Feb 20, 2024 · 22 comments
Closed

Error mounting IMG (wrong fs type, bad option, bad superblock) #182

ondrejhajek opened this issue Feb 20, 2024 · 22 comments

Comments

@ondrejhajek
Copy link

Hi,

i have problem like in this #176

2 different machines (both Linux Mint 20.2 based on Ubuntu 20.04, x86_64) and i get error:

mount: /mnt/sdm: wrong fs type, bad option, bad superblock on /dev/loop26, missing codepage or helper program, or other error
mount: /mnt/sdm/boot: mount point does not exist
? Error mounting IMG '2023-12-11-raspios-bookworm-armhf-lite.img'

i run command from documentation: sudo sdm --customize --plugin user:"adduser=bls|password=mypassword" --plugin L10n:host --plugin disables:piwiz --regen-ssh-host-keys --restart 2023-12-11-raspios-bookworm-armhf-lite.img

sdm v11.4

mini-nspawn output is ok without errors

i work with freshly downloaded latest 2023-12-11-raspios-bookworm-armhf-lite.img image

thank you

@ondrejhajek
Copy link
Author

i have found error in linux dmesg:

EXT4-fs (loop40): VFS: Can't find ext4 filesystem

@gitbls
Copy link
Owner

gitbls commented Feb 20, 2024

As I mentioned previously, I installed Mint 20.2 and am unable to repro this.

I do have one idea for what the issue might be, but I'd really like a repro to test it. Any thoughts on how you could create a reliable repro for me?

@gitbls
Copy link
Owner

gitbls commented Feb 20, 2024

One thought: Can you burn an ssd or sd card and then try to mount it with sudo sdm --mount ...?

If this works on the mint system that mounting the IMG is failing, then I have a good idea as to how to fix.

@ondrejhajek
Copy link
Author

@gitbls done, i successfully burnt with sdm img to medium and i was able sdm --mount this medium

image

@gitbls
Copy link
Owner

gitbls commented Feb 20, 2024

Thx. That confirms for me that it's a bug in old Ubuntu and Mint releases, and will work around it.

@gitbls
Copy link
Owner

gitbls commented Feb 20, 2024

Please try the sdm-cparse in the attached zip file:

  • Unzip it
  • cd /usr/local/sdm
  • sudo mv sdm-cparse sdm-save-cparse
  • sudo cp /path/to/new/sdm-cparse sdm-cparse

Try the --mount command that previously failed. Please capture and provide all console output if it fails.

sdm-cparse.zip

Yes, I know this can be done with a github branch

@ondrejhajek
Copy link
Author

sudo sdm --customize --plugin apps:"apps=@myapps" 2023-12-11-raspios-bookworm-armhf-lite.img

i get this error:

* Mount IMG '2023-12-11-raspios-bookworm-armhf-lite.img'
mount: /mnt/sdm: wrong fs type, bad option, bad superblock on /dev/loop40, missing codepage or helper program, or other error
? IMG '' already attached to a loop device

@gitbls
Copy link
Owner

gitbls commented Feb 20, 2024

OK, thx. Will instrument up more logging to see what's going on.

@gitbls
Copy link
Owner

gitbls commented Feb 20, 2024

This one should put out some logging (so i can see where it's erroring out). Same "install" as before, but you don't need to save the one I previously sent you.

sdm-cparse.zip

@ondrejhajek
Copy link
Author

here is output:

* Mount IMG '2023-12-11-raspios-bookworm-armhf-lite.img'
Before 'new' mount
mount: /mnt/sdm: wrong fs type, bad option, bad superblock on /dev/loop40, missing codepage or helper program, or other error
Before 'old' mount
? IMG '' already attached to a loop device

@gitbls
Copy link
Owner

gitbls commented Feb 21, 2024

Strange. Investigating...

@gitbls
Copy link
Owner

gitbls commented Feb 21, 2024

Please try this version.
sdm-cparse.zip

@ondrejhajek
Copy link
Author

ondrejhajek commented Feb 21, 2024

there are some errors, but i think it works:)

in output, there are czech words, translation:

odpojení selhalo: Takové zařízení nebo adresa neexistuje - unmount failed: this device or address does not exists
připojeno do - mounted to
odpojeno, odpojen - unmounted

* Mount IMG '2023-12-11-raspios-bookworm-armhf-lite.img'
Before 'new' mount
Before 'old' mount
% Delete dangling loop device '/dev/loop40'
  /dev/loop40 1996488704      0         1  0 /home/ondicz/sdm/2023-12-11-raspios-bookworm-armhf-lite.img   0     512
losetup: /dev/loop40: odpojení selhalo: Takové zařízení nebo adresa neexistuje
mount: /dev/loop40p2 připojeno do /mnt/sdm.
mount: /dev/loop40p1 připojeno do /mnt/sdm/boot/firmware.
After 'old' mount
* Start Configuration
> Command Line: /usr/local/bin/sdm --customize --plugin apps:apps=@myapps 
  2023-12-11-raspios-bookworm-armhf-lite.img
* Host Information
   Hostname: rimmer
   uname: Linux rimmer 5.4.0-172-generic #190-Ubuntu SMP Fri Feb 2 23:24:22 UTC 2024 x86_64 
  x86_64 x86_64 GNU/Linux
   os-release Name: Linux Mint 20.3
   Version: 20.3 (Una) (una)
   Like OS: ubuntu
   sdm Version: V11.4
* IMG Information
   Name: 2023-12-11-raspios-bookworm-armhf-lite.img
   Date: 2023-12-11
   RasPiOS Version: 12
   RasPiOS Architecture: 32-bit armhf
   os-release Version: 12 (bookworm)
% sdm will use systemd-nspawn on this 'x86-64' host
  Retry the command with --chroot if this fails
* Plugins selected:
   * apps
       Args: apps=@myapps
> IMG '2023-12-11-raspios-bookworm-armhf-lite.img' has 299532 1K-blocks (0,3GB, 0,3GiB) free 
> Copy sdm to /usr/local/sdm in the IMG
* Start Phase 0 image customization
> Run Plugins Phase '0'
> Run Plugin 'apps' (/mnt/sdm/usr/local/sdm/plugins/apps) Phase 0 with arguments: 'apps=@myapps'
* Plugin apps: Start Phase 0
> Plugin apps: Keys/values found:
   apps: @myapps
?  file '/home/ondicz/sdm/myapps' not found
? Plugin 'apps' exited with failure
umount: /mnt/sdm/boot/firmware odpojen
umount: /mnt/sdm odpojen

@gitbls
Copy link
Owner

gitbls commented Feb 21, 2024

Great! I will make the "odpojenf" and the "Delete dangling loop devices" messages go away, so it will be pretty seamless.

This will be in the next release, coming soon. I'll update this thread when it's available.

@gitbls
Copy link
Owner

gitbls commented Feb 21, 2024

one more thing. Could you check and see if there are any unexpected, sdm-ish looking loop devices hanging around after you run sdm?

sudo losetup -a

Thx

@ondrejhajek
Copy link
Author

one more thing. Could you check and see if there are any unexpected, sdm-ish looking loop devices hanging around after you run sdm?

sudo losetup -a

Thx

i see only my snap applications

@gitbls
Copy link
Owner

gitbls commented Feb 21, 2024

Could I convince you to try this updated version just to make sure I didn't duff it?

sdm-cparse.zip

Thx!

@ondrejhajek
Copy link
Author

sure, here it is:

* Mount IMG '2023-12-11-raspios-bookworm-armhf-lite.img'
mount: /dev/loop40p2 připojeno do /mnt/sdm.
mount: /dev/loop40p1 připojeno do /mnt/sdm/boot/firmware.
* Start Configuration
> Command Line: /usr/local/bin/sdm --customize --plugin apps:apps=@myapps 
  2023-12-11-raspios-bookworm-armhf-lite.img
* Host Information
   Hostname: rimmer
   uname: Linux rimmer 5.4.0-172-generic #190-Ubuntu SMP Fri Feb 2 23:24:22 UTC 2024 x86_64 
  x86_64 x86_64 GNU/Linux
   os-release Name: Linux Mint 20.3
   Version: 20.3 (Una) (una)
   Like OS: ubuntu
   sdm Version: V11.4
* IMG Information
   Name: 2023-12-11-raspios-bookworm-armhf-lite.img
   Date: 2023-12-11
   RasPiOS Version: 12
   RasPiOS Architecture: 32-bit armhf
   os-release Version: 12 (bookworm)
% sdm will use systemd-nspawn on this 32-bit x86-64 host
  Retry the command with --chroot if this fails
* Plugins selected:
   * apps
       Args: apps=@myapps
> IMG '2023-12-11-raspios-bookworm-armhf-lite.img' has 299512 1K-blocks (0,3GB, 0,3GiB) free 
> Copy sdm to /usr/local/sdm in the IMG
* Start Phase 0 image customization
> Run Plugins Phase '0'
> Run Plugin 'apps' (/mnt/sdm/usr/local/sdm/plugins/apps) Phase 0 with arguments: 'apps=@myapps'
* Plugin apps: Start Phase 0
> Plugin apps: Keys/values found:
   apps: @myapps
?  file '/home/ondicz/sdm/myapps' not found
? Plugin 'apps' exited with failure
umount: /mnt/sdm/boot/firmware odpojen
umount: /mnt/sdm odpojen

@gitbls
Copy link
Owner

gitbls commented Feb 21, 2024

Thanks!

@gitbls
Copy link
Owner

gitbls commented Feb 23, 2024

This is all fixed 🤞in V11.5. Please test/verify. Thx!

@ondrejhajek
Copy link
Author

v11.5 is ok

@gitbls
Copy link
Owner

gitbls commented Feb 25, 2024

Excellent. Thanks for helping me sort this out. Still strange that I coudn't repro it here on Mint 20.2 😵

@gitbls gitbls closed this as completed Feb 25, 2024
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