Find the answer to your Linux question:
Results 1 to 8 of 8
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    help!! mkdir: cannot create directory `test': Read-only file

    Hi, my name is Michele and I'm a complete newbie to Linux. In fact, I had never used it before yesterday when my Windows XP computer randomly shut off and wouldn't work again. (Technically, Windows wouldn't open.) My friend loaded Linux (KNOPPIX 3.6) by CD, and that's what I'm currently running now.

    Here's my problem (aside from the fact that my computer just randomly turned off):

    I can't tell if the problem was with Windows or with my C drive. All of my data seems to still be there, so I believe it is alright. I am trying to move everything of value to my D drive so that I can reformat C and reinstall a new OS. The problem lies in moving data.

    Here is proof that my D drive (hdb1) is not read-only

    knoppix@ttyp0[mnt]$ ls -l
    total 76
    drwxr-xr-x   2 root    root        0 May  3 13:44 auto
    lrwxrwxrwx   1 root    root       15 May  3 13:44 cdrom -> /mnt/auto/cdrom
    lrwxrwxrwx   1 root    root       16 May  3 13:44 floppy -> /mnt/auto/floppy
    drwxr-xr-x   2 root    root     1024 May  3 09:43 hd
    drwxrwxrwx   1 knoppix knoppix  4096 May  2 07:13 hda1
    drwxrwxrwx   1 knoppix knoppix  4096 Apr 15 21:26 hdb1
    drwxr-xr-x   2 root    root     1024 May  3 13:44 pts
    drwxrwxrwx  25 knoppix knoppix 65536 Dec 31  1969 sda1
    drwxr-xr-x   2 root    root     1024 May  3 13:44 sys
    drwxr-xr-x   2 root    root     1024 May  3 09:43 test
    However, when I go to write to D or to the directory Michele/ inside of it:

    knoppix@ttyp0[Michele]$ mkdir DESKTOPBACKUP/
    mkdir: cannot create directory `DESKTOPBACKUP/': Read-only file system
    This is also a problem when I try to copy to that directory both in the terminal window and by drag and drop.

    If you can help me, please respond... I need to move my stuff because finals are coming up really soon and I need a working computer. Please keep in mind that I'm completely new to this and that I didn't even know how to use "cd" or "mkdir" before two hours ago.

    Thank you so much...

    ~ Michele

  2. #2
    Linux Engineer
    Join Date
    Apr 2005
    Buenos Aires, Argentina
    What's the output of mount and is your hdb1 a FAT32 or NTFS partition?
    "All the drugs in this world won\'t save you from yourself"

  3. #3
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Seattle, WA, USA
    Well, here's the thing...

    If D:\ is a VFAT, we can help you. However, NTFS is unwritable in Linux (okay, it technically is writable, but it's difficult, you can't create new files, and sizes must remain the same).

    So if you can please tell us what partition your D: is, and if it is a VFAT or not, we can help.

    Hmmm...just realized, does Knoppix support VFAT? If someone can verify, I'd be grateful.

  4. $spacer_open
  5. #4
    here's the output of mount:

    knoppix@ttyp0[knoppix]$ mount
    /dev/root on / type ext2 (rw)
    /dev/scd0 on /cdrom type iso9660 (ro)
    /dev/cloop on /KNOPPIX type iso9660 (ro)
    /ramdisk on /ramdisk type tmpfs (rw,size=198636k)
    /proc/bus/usb on /proc/bus/usb type usbdevfs (rw,devmode=0666)
    automount(pid642) on /mnt/auto type autofs (rw,fd=4,pgrp=642,minproto=2,maxproto=4)
    /dev/hdb1 on /mnt/hdb1 type ntfs (ro,nosuid,nodev,umask=000,uid=1000,gid=1000)
    /dev/hda1 on /mnt/hda1 type ntfs (ro,nosuid,nodev,umask=000,uid=1000,gid=1000)
    I don't know what that means, but my friend did a bunch of mounting and unmounting earlier... I don't know if it's VFAT or NTFS, but I'm thinking it's NTFS since it's written in the code I just pasted... am I screwed?

  6. #5
    Linux Enthusiast puntmuts's Avatar
    Join Date
    Dec 2004
    Republic Banana
    /dev/hdb1 on /mnt/hdb1 type ntfs (ro,nosuid,nodev,umask=000,uid=1000,gid=1000)
    You see the ro at the beginning of the option line. That says your filesystem is readonly mounted, so you can't write to it. It is a NTFS partition so writing to it is not recommended and still in an experimental state.

    So the problem with hdb1 (d: ) is that is NTFS.

  7. #6
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Seattle, WA, USA
    Yeah, so your proposed solution will not work. Writing to NTFS is currently a bad idea, and is difficult anyway.

    My recommendation is to simply burn a CD with the files you want. I dunno if k3b is included with Knoppix, but if it is, boot that up and burn a CD with what you want to backup. You can pull it right off the NTFS drive.


  8. #7
    Linux Guru budman7's Avatar
    Join Date
    Oct 2004
    Knee deep in Grand Rapids, Michigan
    Is there any valuable information on the hdb drive?
    If not you can go to and put delpart on to a bootable disc. With delpart you can delete the partition that is on hdb, and reformat it as FAT.

    For a bootable disk, go to

    Hope ths helps.
    If you want to learn more about linux take a linux journey
    Use CODE tags when posting output of commands. Thank you.

  9. #8
    Linux Engineer rong's Avatar
    Join Date
    Feb 2005
    Describe your Windows problem and perhaps we can help you repair it.

    Do you have the XP installation CD? If so see if will it start up? If it does it will prompt you for a Repair.....
    registered Linux user #388382

    Have you checked here first?

Posting Permissions

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