LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   NTFS Haunting (https://www.linuxquestions.org/questions/linux-general-1/ntfs-haunting-39122/)

lackluster 12-22-2002 11:45 AM

NTFS Haunting
 
I have a then-NTFS partition left over from when I was dual-booting Win2k & Slackware. I have long since destroyed my windows partition (on purpose) but have not been able to recover the space. I have fdisk'ed, but the files remain (the type is ext2 though). I tried to
#mount -w /dev/hda1 /stoarge
but I still couldn't
#touch myself
complaining that it's a read-only file-system.

How do I get rid of these friggin' files!? I can't delete them, I can't write over them and they're eating about 7GB of good space. Please help me exorcise these demonic files.

fragged one 12-22-2002 01:21 PM

if you still have your win2k disk, you can boot up with that, then use it's partitioning utility in the setup. just go through and delete the partition. then you can format it in linux.

lackluster 12-22-2002 04:43 PM

If I pull out my win2k disk I'll need to re-install. I removed alot of system files to see what happens. It was fun to watch the system freak out. There isn't any way to do this in linux?

MasterC 12-22-2002 08:22 PM

You said it's ext2... Let me summarize this really quick to make sure I get ya:

You have, say /dev/hda1. This used to be your winbloze partition. It was NTFS, since then you've ran:
mke2fs -j /dev/hda1 OR
mke2fs /dev/hda1 &&
tune2fs -j /dev/hda1

And the files still exist. Then you tried mounting this:
mount -t ext3 /dev/hda1 /mnt/storage

And once mounted you could cd /mnt/storage and it wouldn't let you manipulate/delete the files (that should have already disappeared)?

Is this correct? If not, what did you do, and what did I miss?

Cool

lackluster 12-22-2002 09:57 PM

MasterC,

After reading your post it has become quite apparant that you overlooked a very important point : I'm a moron. I didn't know about mke2fs before this post, and that took care of everything. I thought deleting the partition with fdisk, then re-adding it as ext2 would fix it. Now I know better though. The demons are gone, and now I have room for counter-strike ;). Once again, I thank you :) :) :) :)

MasterC 12-22-2002 10:01 PM

You're welcome, I am glad I could help :)

And btw, you are not a moron, I am sure there are TONS of things you know that I haven't the slightest bit of grasp on ;)

Cool

lackluster 12-22-2002 10:20 PM

I mean moron in a neutral way. Like "damn I'm a moron, but it's okay". One more follow-up question : is there a command (or ls option that I've overlooked) to get the total size of all files in a dir? Like DOS's dir does? (side note : I hate that dir has to be used instead of ls on dos/win. worse, you can't create a symlink so you can pretend it's there. I worked around it at work (before I got cygwin) by creating a batch file ls.bat ;)).

MasterC 12-22-2002 10:51 PM

du -h

I think that's what you are looking for?

I've never used DOS so I am not completely sure, but I think that's what you have described. Oh and don't forget to journal your new filesystem:
mke2fs -j /dev/hdx

Cool

lackluster 12-23-2002 06:51 AM

yep. that's what I needed. I -j'd up /dev/hda1 already, thanks ;)

SlickWilly 12-23-2002 10:14 AM

*blink*

You can journal an ext2 filesystem?

Does this make it an ext3, or is there something I didn't know about ext2 that enables journaling? The man on this is confusing...

Slick.

nxny 12-23-2002 12:00 PM

Quote:

Originally posted by SlickWilly
*blink*

You can journal an ext2 filesystem?

Does this make it an ext3, or is there something I didn't know about ext2 that enables journaling? The man on this is confusing...

Slick.

An ext3 filesystem is nothing but an ext2 filesystem with a journal. The journal can be internal ( usually inode 8 ) or can reside on a different device altogether. A journal was added to ext2 to eliminate long 'fsck' delays that maybe caused by an unclean shutdown.


All times are GMT -5. The time now is 12:31 PM.