mkfs.ext4 errors

12,000

What exact command have you used when creating the file? If it's destined to be and EXT file system, then you need sth like that (e.g. for 1 MB filesystem):

dd if=/dev/zero bs=512 count=2000
Share:
12,000

Related videos on Youtube

Joseph
Author by

Joseph

Updated on September 18, 2022

Comments

  • Joseph
    Joseph over 1 year

    I've just installed Kali Linux and am working with an img file I created from dd (/dev/zero). When I go to do mkfs.ext4 on it, I get

    mkfs.ext4: Device size reported to be zero. Invalid partition specified, or partition table wasn't reread after running fdisk, due to a modified partition being busy and in use. You may need to reboot to re-read your partition table.

    I solved the above (made it too small). Still having the issue below

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

    To re-iterate, I get this when I try to mount any of the Kali Linux arm images. The desktop FS is ext4 according to gparted. Not sure what else the FS could be.

    EDIT: I got it to mount on my mac via fuse. Though I'd still like to know how to do this via cmd. The single image mounts one msdos (vfat) and one ext4. How can I mount two at once out of the same image?

    • 吴环宇
      吴环宇 about 11 years
      What exactly are you trying to accomplish?
    • Joseph
      Joseph about 11 years
      I have the new kali arm img. I need to mount it, as well as another image (that's smaller) and transfer the data from one to the other. Going off the same I did for BT5 (see article I wrote: forum.xda-developers.com/showthread.php?p=39232185)
    • 吴环宇
      吴环宇 about 11 years
      Again: could you please verify the image is actually the expected size?
    • Joseph
      Joseph about 11 years
      Yep, it's the expected size. I made it tiny, made it 20 bytes. Did another one that was 200 (these were tests since I kept getting a mount error on the original). But yes, it's the size it should be.
    • Joseph
      Joseph about 11 years
      Okay, so after some playing, it's possible it isn't ext4. That wouldn't make sense though, the desktop OS is ext4 according to gparted, why wouldn't the ARM version be? If anyone knows the FS for Kali Linux let me know.
  • Joseph
    Joseph about 11 years
    None of this should apply. I'm working on the desktop VM version of Kali, working on tweaking the arm version of kali. Plus, I'm not doing anything overly complicated. Mount an image, Create a blank image, format it ext4, mount that image, copy. :-/
  • Zac B
    Zac B about 11 years
    Is the image with a known-good filesystem already on it being mounted with -t ext4 or similar? To my knowledge, mounting any flat image as a loopback disk requires it to behave like a disk at least insofar as having a) a valid bootsector/geometry section, or b) something that spoofs that information to make it behave like a disk for anything (e.g. mkfs) to use it.
  • Joseph
    Joseph about 11 years
    My main os is ext4, but then again, I'm running the desktop version of the image I'm working with, and in the past on BT5, it worked fine. This is the out of the box VM too, which is why this is so obnoxious. I'm literally redoing exactly what I did for the previous version of the OS. forum.xda-developers.com/showthread.php?p=39232185, previously, this worked flawlessly.