Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.


  Search this Thread
Old 06-28-2005, 01:13 AM   #1
LQ Newbie
Registered: Jun 2005
Location: Michigan, USA
Distribution: Fedora 4
Posts: 3

Rep: Reputation: 0
Deleted ntfs partition - added linux partition in its place - corrupt!

I am comverting a spare drive from ntfs to linux.
It is in the second position, i.e. hdb.
I deleted the partition (using fdisk,
as shipped with redhat), and thus, all partitions were gone.
Looks good. I added the linux partition in its place.
One partition, type 83 linux, looks good.
I created the file system, mkfs.ext2, looks good.
I tried to automount it, and the kernel still thought it was ntfs.
Naturally it wouldn't mount properly,
and, when I forced an fsck, it was corrupt.
I started over, this time rebooting after almost every step.
Delete, reboot, add, reboot, mkfs, fsck -f,
and the automounter STILL thought it was ntfs, thus corrupting everything again.
So I started over, same ritual,
and this time I mounted with the type specified as ext2.
Looks good. I copied some files over.
Then forced an fsck.
Superblock corrupt, hopelessly corrupt.
There is some piece of ntfs that won't go away, even if I delete all the partitions,
and it's destroying everything I try to do.
Interestingly, the first drive was also ntfs,
but fedora installed on that drive, and apparently they know the secret to get rid
of ntfs completely!
When I automount the first drive from a rescue floppy, the kernel knows darn well it's linux.
No problem.
But the second drive remains ntfs, somewhere deep inside, no matter what I do.
I suppose I can spend a few hours and install Fedora on the second drive,
then delete all the files; at least it will be a real linux partition.
But I'd rather understand what is going on.
Old 06-28-2005, 02:15 AM   #2
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
If you ran the 3rd fsck (the one after you copied some files over) while the partiton was mounted, it'll tell you it's corrupt even though it's not because the data on disk won't be consistent with what's in memory because of caching.

Other than that, I have no idea. I've never had any problems deleting/creating partitions.
Old 06-28-2005, 02:31 AM   #3
LQ Newbie
Registered: Jun 2005
Location: Michigan, USA
Distribution: Fedora 4
Posts: 3

Original Poster
Rep: Reputation: 0
Hi, it's me again, answering my own question.
Didn't get any sleep tonight, but hey, I figured it out.
I had to zero out the first meg of the partition, thus clearing the mysterious
ntfs bits, whatever and wherever they were.
dd if=/dev/zero of=/dev/hdb1 bs=1024k count=1
Then I ran mkfs.ext2, and the automounter knew it was linux.
Copied files over, unmounted, and fsck -f was happy.
No trouble at all.
So there it is; hope this helps someone else in a similar situation.
I will always remember to zero things out when changing the type
of a preexisting partition.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleted linux partition (using partition magic) Geminias General 7 10-09-2005 05:14 PM
Added second harddrive as a partition, but now the partition size is wrong.. mlsbraves Linux - General 5 08-17-2005 09:10 PM
corrupt NTFS partition kermitthefrog91 Linux - Software 3 08-14-2005 09:59 PM
After reformatting Windows partition, Linux is corrupt and won't boot. JakeMH Linux - Software 3 05-31-2005 06:35 PM
deleted linux partition adn the boot loader was deleted also,now i have only gnu grub boris199 Linux - Laptop and Netbook 2 01-29-2005 05:53 PM > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 10:59 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration