Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
What exactly are you trying to accomplish? –  oKtosiTe Mar 21 '13 at 20:19
1  
And if you do an ls -s on the image file, is it actually zero length? That would certainly explain the error. –  oKtosiTe Mar 21 '13 at 20:28
    
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) –  Joseph Mar 21 '13 at 20:29
    
Again: could you please verify the image is actually the expected size? –  oKtosiTe Mar 21 '13 at 20:34
    
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 Mar 21 '13 at 20:40

2 Answers 2

Check two things: make sure you're selecting the correct filesystem in your fstab for the other image you're trying to mount, and also make sure you've configured offsets correctly in the new image you are trying to mount. If you're not that far along, make a boot sector on the new image, and then try again.

share|improve this answer
    
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. :-/ –  Joseph Mar 21 '13 at 20:41
    
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. –  Zac B Mar 21 '13 at 21:23
    
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. –  Joseph Mar 21 '13 at 21:28

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|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.