How to mount minix3 filesystem on Linux?

3,716 views
Skip to first unread message

cwl

unread,
Oct 6, 2009, 2:57:13 AM10/6/09
to minix3
[chenwl@myhost minix]$ sudo mount -t minix minix.img /mnt -o loop
mount: unknown filesystem type 'minix'

It seems that Linux doesn't support minix filesystem.

But the man page says :
The file system types which are currently supported
include: adfs, affs, autofs, cifs, coda, coherent,
cramfs,
debugfs, devpts, efs, ext, ext2, ext3, ext4, hfs,
hfsplus, hpfs,
iso9660, jfs, minix, msdos, ncpfs, nfs, nfs4, ntfs,
proc, qnx4,
ramfs, reiserfs, romfs, smbfs, sysv, tmpfs, udf, ufs,
umsdos,
usbfs, vfat, xenix, xfs, xiafs. Note that coherent,
sysv and
xenix are equivalent and that xenix and coherent will be
removed
at some point in the future — use sysv instead.
Since kernel
version 2.1.21 the types ext and xiafs do not exist
anymore.
Earlier, usbfs was known as usbdevfs.
Yet it also says:
Note, the real list of all supported filesystems
depends on your kernel.

Tomas Hruby

unread,
Oct 6, 2009, 3:11:10 AM10/6/09
to min...@googlegroups.com
> [chenwl@myhost minix]$ sudo mount -t minix minix.img /mnt -o loop
> mount: unknown filesystem type 'minix'

what is minix.img file? Raw minix partition? Qemu image? Be more
specific please.

> It seems that Linux doesn't support minix filesystem.

It certainly does, although it lacks some compatibility with the lates
version. That is not the problem in your case for sure.

Cheers, T.

Martin Knappe

unread,
Oct 6, 2009, 3:31:03 AM10/6/09
to min...@googlegroups.com
try this:

losetup /dev/loop0 minix.img -o 512
mount -t minix /dev/loop0 /mnt

cwl

unread,
Oct 6, 2009, 6:55:47 AM10/6/09
to minix3
Sorry.
I use bochs virtual machine.
bximage created minix.img.

cwl

unread,
Oct 6, 2009, 7:42:15 AM10/6/09
to minix3


On 10月6日, 下午3时31分, Martin Knappe <martin.kna...@gmail.com> wrote:
> try this:
>
>losetup /dev/loop0 minix.img -o 512
~~~~~~~~~~~~ ok

> mount -t minix /dev/loop0 /mnt
~~~~~~~~~~~~ fail
mount: unknown filesystem type 'minix'

>
>
> On Tue, Oct 6, 2009 at 8:57 AM, cwl <qzche...@gmail.com> wrote:
>
> > [chenwl@myhost minix]$ sudo mount -t minix minix.img /mnt -o loop
> > mount: unknown filesystem type 'minix'
>
> > It seems that Linux doesn't support minix filesystem.
>
> > But the man page says :
> > The file system types which are currently supported
> > include: adfs, affs, autofs, cifs, coda, coherent,
> > cramfs,
> > debugfs, devpts, efs, ext, ext2, ext3, ext4, hfs,
> > hfsplus, hpfs,
> > iso9660, jfs, minix, msdos, ncpfs, nfs, nfs4, ntfs,
> > proc, qnx4,
> > ramfs, reiserfs, romfs, smbfs, sysv, tmpfs, udf, ufs,
> > umsdos,
> > usbfs, vfat, xenix, xfs, xiafs. Note that coherent,
> > sysv and
> > xenix are equivalent and that xenix and coherent will be
> > removed
> > at some point in the future -- use sysv instead.

Giovanni

unread,
Oct 6, 2009, 8:12:00 AM10/6/09
to min...@googlegroups.com
On 10/06/09 13:42, cwl wrote:

>> try this:

>> losetup /dev/loop0 minix.img -o 512
> ~~~~~~~~~~~~ ok

>> mount -t minix /dev/loop0 /mnt
> ~~~~~~~~~~~~ fail
> mount: unknown filesystem type 'minix'

Check if your Linux kernel includes the module for minix file system.

$ lsodgf0@monica:~ > zcat /proc/config.gz | grep MINIX
CONFIG_MINIX_FS=m
CONFIG_MINIX_SUBPARTITION=y

Ciao
Giovanni
--
A computer is like an air conditioner,
it stops working when you open Windows.
< http://giovanni.homelinux.net/ >

cwl

unread,
Oct 6, 2009, 10:29:42 AM10/6/09
to minix3
[chenwl@myhost minix]$ zcat /proc/config.gz | grep MINIX
# CONFIG_MINIX_FS is not set
# CONFIG_MINIX_SUBPARTITION is not set

cwl

unread,
Oct 6, 2009, 10:38:27 AM10/6/09
to minix3
My kernel does not support minix file system.
I build the minix module and insmod it now.

[chenwl@myhost minix]$ cat /proc/modules | grep minix
minix 29992 0 - Live 0xf9422000

"mount" knows the type minix now, but the image seems not to be
an disk image with minix file system.
( I created it with bximage command.)

What should I do to mount the disk image of MINIX3 OS?
I want to share files this way.


On 10月6日, 下午8时12分, Giovanni <gfalz...@inwind.it> wrote:

cwl

unread,
Oct 6, 2009, 11:08:43 AM10/6/09
to minix3
qemu can boot from physical device such as /dev/sda1 /dev/hda ...
I create a file disk.img using dd command.
And losetup it(/dev/loop0), then boot MINIX3 (cdrom:minix3.iso hda:/
dev/loop0).
After installing MINIX3, I mount /dev/loop0 /mnt.
Then cd to /mnt, file names are not readable. such as ???U?????
È?? ?????È??U??????#M??M??R??

What is the problem?

On 10月6日, 下午8时12分, Giovanni <gfalz...@inwind.it> wrote:

Giovanni

unread,
Oct 6, 2009, 11:59:10 AM10/6/09
to min...@googlegroups.com
On 10/06/09 16:38, cwl wrote:
> My kernel does not support minix file system.
> I build the minix module and insmod it now.
>
> [chenwl@myhost minix]$ cat /proc/modules | grep minix
> minix 29992 0 - Live 0xf9422000
>
> "mount" knows the type minix now, but the image seems not to be
> an disk image with minix file system.
> ( I created it with bximage command.)
>
> What should I do to mount the disk image of MINIX3 OS?
> I want to share files this way.

Did you format the disk image within Bochs? If so you need to mount
the minix partitions not the raw partition.


I usually run this simple script.

#!/bin/sh
ROOT=<offset of root partition in image>
USR=<offset of usr partition in image>
USRS=<offset of home partition in image>
MINIX=<mount point of minix root partition>
IMAGE=<path to image file>
sudo /sbin/losetup -o $ROOT /dev/loop0 $IMAGE
sudo /sbin/losetup -o $USR /dev/loop1 $IMAGE
sudo /sbin/losetup -o $USRS /dev/loop2 $IMAGE
sudo /sbin/mount -t minix /dev/loop0 $MINIX
sudo /sbin/mount -t minix /dev/loop1 $MINIX/usr
sudo /sbin/mount -t minix /dev/loop2 $MINIX/home
# end

You have to compute the offsets of the partitions. Get them by
running minix in bochs, reading in 'part' the starting sector of each
partition and multiplying them by 512 (No. of bytes per sector).

Sernin van de Krol

unread,
Oct 6, 2009, 3:42:07 AM10/6/09
to min...@googlegroups.com

You should also make sure the filesystem is supported by the kernel.
It should be listed in /proc/filesystems if so.
Otherwise try to load the module, if it is compiled as a module.
$ cat /proc/filesystems
# modprobe minix

Another option is that the img-file is also containing a partition table. you can check it using fdisk or cfdisk.

Regards,
Sernin van de Krol

On 6 Oct 2009 09:31, "Martin Knappe" <martin...@gmail.com> wrote:

try this:

losetup /dev/loop0 minix.img -o 512
mount -t minix /dev/loop0 /mnt

On Tue, Oct 6, 2009 at 8:57 AM, cwl <qzch...@gmail.com> wrote: > > > [chenwl@myhost minix]$ sudo ...

Tonym

unread,
Oct 6, 2009, 3:54:14 PM10/6/09
to minix3

> sudo /sbin/losetup -o $USRS /dev/loop2 $IMAGE
> sudo /sbin/mount -t minix   /dev/loop0 $MINIX
> sudo /sbin/mount -t minix   /dev/loop1 $MINIX/usr
> sudo /sbin/mount -t minix   /dev/loop2 $MINIX/home
> # end
>
> You have to compute the offsets of the partitions.  Get them by
> running minix in bochs, reading in 'part' the starting sector of each
> partition and multiplying them by 512 (No. of bytes per sector).

You can also search the image for likely sub-partitions with the code
at:

http://byerley.cs.waikato.ac.nz/~tonym/301/findpart.c

Tony

cwl

unread,
Oct 7, 2009, 5:38:50 AM10/7/09
to minix3
Here's the screenshot of "part" http://paste.ubuntu.org.cn/i45325
It is very strange that there is only one partition.
But MINIX3 have / /usr and /home.

I try to mount the image with -o option, but failed.
wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try

cwl

unread,
Oct 7, 2009, 5:46:04 AM10/7/09
to minix3
[root@myhost disks]# ./a.out minix.img
Sector 130 (offset 66560) probably has a partition table
partition 0 Minix active (0x80) start 63 (32256) ends 4193280
(2047.5 MB)
partition 1 empty
partition 2 empty
partition 3 empty
Sector 193 (offset 98816) probably has a partition table
partition 0 Minix active (0x80) start 64 (32768) ends 32832 (16.0
MB)
partition 1 Minix start 32832 (16809984) ends 837696 (393.0 MB)
partition 2 Minix start 837696 (428900352) ends 4193280 (1638.5 MB)
partition 3 empty
Sector 194 (offset 99328) probably has a partition table
partition 0 empty
partition 1 empty
partition 2 empty
partition 3 empty
155100 sectors scanned

I can only mount the image with offset 99328. But it is empty!
I create an file there.(hello.c)
Umount it.
Boot MINIX3.
There is no hello.c @_@ in (/, /usr, /home)

Giovanni

unread,
Oct 7, 2009, 6:39:12 AM10/7/09
to min...@googlegroups.com
On 10/07/09 11:38, cwl wrote:
> Here's the screenshot of "part" http://paste.ubuntu.org.cn/i45325
> It is very strange that there is only one partition. But MINIX3
> have / /usr and /home.
>
> I try to mount the image with -o option, but failed. wrong fs type,
> bad option, bad superblock on /dev/loop0, missing codepage or
> helper program, or other error In some cases useful info is found
> in syslog - try

Minix has its own partition scheme.
It uses subpartitions that are unkown to linux and you can display
them in 'part' by puttying the cursors on the minix entry ad pressing
'>'. You will get the informations on minix partitions.

Use '?' to get help on 'part' usage.

cwl

unread,
Oct 7, 2009, 9:42:57 AM10/7/09
to minix3
It works! It works!

Thanks very much!
Reply all
Reply to author
Forward
0 new messages