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 wanna create and mount a minix fs image under ubuntu for study early file systems. And tried this:

dd if=/dev/zero of=minix1.img bs=1024 count=1440
sudo losetup /dev/loop0 minix1.img
sudo mkfs.minix /dev/loop0
mkdir minix1
sudo mount -t minix /dev/loop0 minix1
sudo touch hello.txt
sudo mkdir test

mounted ok, all work fine til now, but I could not read directories under the mount directory. While cd test, it displays a bash: cd: test: Not a directory

and ls -l gets:

-rw-r--r-- 1 root root  0 2010-11-25 15:37 hello.txt
?rwxr-xr-x 2 root root 64 2010-11-25 15:14 test

it's a ? where should be d :(

Thanks!

update: it's ubuntu 10.10 with 2.6.35-22 kernel, I've tried all above runs OK under a 10.04 system with a 2.6.32-21-generic kernel.

update: I've updated the kernel to 2.6.35-23 and the problem seems have been solved, though still feel weird about this. :(

share|improve this question
    
Your losetup line looks broken. –  Ignacio Vazquez-Abrams Nov 25 '10 at 7:57
    
oh sorry, it seems a typo :( –  fleurer Nov 25 '10 at 10:50

1 Answer 1

up vote 0 down vote accepted

ls is telling you that the root entry on the filesystem is not a directory but an unknown file type. You could see the precise file type with stat. This has to be either a bug in mkfs or in the kernel, and since it was solved by a kernel upgrade, the culprit must have been the kernel. I haven't investigated, but the bug might have been related to the minix: fix regression in minix_mkdir() change in 2.6.35-23.

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.