Results 1 to 8 of 8

Thread: mkfs.netf refuses to create filesystem on file

  1. #1
    Join Date
    Feb 2008
    Location
    readlink("/proc/self/exe"
    Beans
    1,120
    Distro
    Ubuntu Development Release

    Question mkfs.netf refuses to create filesystem on file

    Question: I can create a vfat filesystem as shown below.
    I can exchange mkfs.vfat with mkfs.jfs or mkfs.ext3, but when I exchange it with mkfs.ntfs, then I get this error message:
    virtual.dsk is not a block device.
    Refusing to make a filesystem here!

    Is there a way/cmd line option to create an nfts fs from a file ?

    Code:
    Create a virtual disk
    dd if=/dev/zero of=virtual.dsk bs=1048576 count=150
    
    
    Format it
    mkfs.vfat virtual.dsk
    
    
    Mount it
    sudo mkdir -p /mnt/vfat
    sudo mount virtual.dsk /mnt/vfat -t vfat -o loop
    In a world without walls and fences, who needs Windows and Gates?
    Linux is like a wigwam.... no Gates, no Windows but Apache inside!
    http://www.debianadmin.com
    apt-get install libstdc++6-4.3-doc

  2. #2
    Join Date
    Jun 2006
    Location
    Israel
    Beans
    292

    Re: mkfs.netf refuses to create filesystem on file

    Where is virtual.dsk located? You may need to specify the entire path, for example:

    Code:
    mkfs.ntfs /dev/virtual.dsk

  3. #3
    Join Date
    Feb 2008
    Location
    readlink("/proc/self/exe"
    Beans
    1,120
    Distro
    Ubuntu Development Release

    Arrow Re: mkfs.netf refuses to create filesystem on file

    Quote Originally Posted by Eisenwinter View Post
    Where is virtual.dsk located? You may need to specify the entire path, for example:

    Code:
    mkfs.ntfs /dev/virtual.dsk
    It's location: /tmp/virtual.dsk

    Upon your question, I moved it to /dev and tried again, but no success. It's still disallowed to create a ntfs there because it is not a block device..
    In a world without walls and fences, who needs Windows and Gates?
    Linux is like a wigwam.... no Gates, no Windows but Apache inside!
    http://www.debianadmin.com
    apt-get install libstdc++6-4.3-doc

  4. #4
    Join Date
    Feb 2008
    Location
    readlink("/proc/self/exe"
    Beans
    1,120
    Distro
    Ubuntu Development Release

    Wink Re: mkfs.netf refuses to create filesystem on file

    Uh, never mind, the magic option is:
    http://ubuntu-rescue-remix.org/node/215


    mkfs.ntfs -F filname.extension

    Solved.

    PS: Permanently mount:
    /path/to/virtual.dsk /mnt/vfat vfat loop,owner,group,umask=000 0 0

    use
    Code:
    mount -a
    to 'reload' the /etc/fstab file.
    Last edited by WitchCraft; May 24th, 2012 at 05:48 AM.
    In a world without walls and fences, who needs Windows and Gates?
    Linux is like a wigwam.... no Gates, no Windows but Apache inside!
    http://www.debianadmin.com
    apt-get install libstdc++6-4.3-doc

  5. #5
    Join Date
    Feb 2008
    Location
    readlink("/proc/self/exe"
    Beans
    1,120
    Distro
    Ubuntu Development Release

    Question Re: mkfs.netf refuses to create filesystem on file

    But why is the NTFS filesystem case-sensitive, while VFAT is not ?
    In a world without walls and fences, who needs Windows and Gates?
    Linux is like a wigwam.... no Gates, no Windows but Apache inside!
    http://www.debianadmin.com
    apt-get install libstdc++6-4.3-doc

  6. #6
    Join Date
    Feb 2008
    Location
    readlink("/proc/self/exe"
    Beans
    1,120
    Distro
    Ubuntu Development Release

    Re: mkfs.netf refuses to create filesystem on file

    Bump.
    In a world without walls and fences, who needs Windows and Gates?
    Linux is like a wigwam.... no Gates, no Windows but Apache inside!
    http://www.debianadmin.com
    apt-get install libstdc++6-4.3-doc

  7. #7
    Join Date
    Feb 2008
    Location
    readlink("/proc/self/exe"
    Beans
    1,120
    Distro
    Ubuntu Development Release

    Wink Re: mkfs.netf refuses to create filesystem on file

    As a secret tip if anybody needs a case-insenstive file system:

    FAT is covered by patents.
    Therefore, use JFS with the -O option.

    Code:
    apt-get install jfsutils
    dd if=/dev/zero of=jfs.dsk bs=1048576 count=150
    mkfs.jfs -O jfs.dsk
    mkdir -p /mnt/jfs
    mount /volumes/jfs.dsk /mnt/jfs -t jfs -o loop
    umount /mnt/jfs/
    In a world without walls and fences, who needs Windows and Gates?
    Linux is like a wigwam.... no Gates, no Windows but Apache inside!
    http://www.debianadmin.com
    apt-get install libstdc++6-4.3-doc

  8. #8
    Join Date
    Feb 2007
    Beans
    24,961
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: mkfs.netf refuses to create filesystem on file


    From the Ubuntu Forums Code of Conduct.
    If a post is older than a year or so and hasn't had a new reply in that time, instead of replying to it, create a new thread. In the software world, a lot can change in a very short time, and doing things this way makes it more likely that you will find the best information. You may link to the original discussion in the new thread if you think it may be helpful.
    Thread closed.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •