ntfs partition won't go away??

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

ntfs partition won't go away??

Mike Spencer

I have a 500G IDE HD that had a NTFS f/s on it; no O/S, not bootable, just
data.  Fired up cfdisk, deleted the single NTFS partition, created:

         sdb1        Primary FAT16          246.76
         sdb2        Primary Linux swap    1003.49
         sdb3  Boot  Primary Linux       239997.22
         sdb4        Primary Linux       258860.40

and wrote it to HD.  Exited cfdisk.

If I restart cfdisk, sdb1 is now shown as:

       sdb1          Primary  ntfs    [mg-35] 246.76

exhibiting the label (mg-35) that was on the original NTFS f/s.

The older  fdisk program sees sdb1 as FAT16 (no label).

What's happening here?  How come anything is seen as ntfs?  How come
data representing a label is still around to be found?

Planning to install Linux on this HD.  Low level weirdness is
worrisome.

--
Michael Spencer                  Nova Scotia, Canada       .~.
                                                           /V\
[hidden email]                                     /( )\
http://home.tallships.ca/mspencer/                        ^^-^^
_______________________________________________
nSLUG mailing list
[hidden email]
http://nslug.ns.ca/mailman/listinfo/nslug
Reply | Threaded
Open this post in threaded view
|

Re: ntfs partition won't go away??

George N. White III
On Sun, 29 Sep 2019 at 00:04, Mike Spencer <[hidden email]> wrote:

I have a 500G IDE HD that had a NTFS f/s on it; no O/S, not bootable, just
data.  Fired up cfdisk, deleted the single NTFS partition, created:

         sdb1        Primary FAT16          246.76
         sdb2        Primary Linux swap    1003.49
         sdb3  Boot  Primary Linux       239997.22
         sdb4        Primary Linux       258860.40

and wrote it to HD.  Exited cfdisk.

If I restart cfdisk, sdb1 is now shown as:

       sdb1          Primary  ntfs    [mg-35] 246.76


 
exhibiting the label (mg-35) that was on the original NTFS f/s.

The older  fdisk program sees sdb1 as FAT16 (no label).

What's happening here?  How come anything is seen as ntfs?  How come
data representing a label is still around to be found?

Planning to install Linux on this HD.  Low level weirdness is
worrisome.


I assume that is a fairly old drive.  My experience is that failure rates increase rapidly after the 
warranty expires, but that is for disk-intensive workloads.  I've seen some lightly used drives
go far longer.  I've also disassembled samples from a big collection of failed drives and 
seen serious mechanical failures restricting head motion.  The drives use sintered metal
permanent magnets -- in one drive the magnet for the motor that spins the platters was 
turning itself to dust.

I've seen weirdness with disks that were repurposed from Mac or Windows.  Try writing nulls to 
the first few MB of the drive using one of the methods in https://wiki.archlinux.org/index.php/Securely_wipe_disk

For peace of mind, you could use smartmontools to check the "health" of drive and run the drive's builtin tests.  Many
vendors provide test software, usually on a bootable CD-ROM image.   These tests generally don't work with external
USB enclosures, you need to use the native interface. 
 
--
George N. White III


_______________________________________________
nSLUG mailing list
[hidden email]
http://nslug.ns.ca/mailman/listinfo/nslug
Reply | Threaded
Open this post in threaded view
|

Re: ntfs partition won't go away??

Richard Bonner
In reply to this post by Mike Spencer

On Sun, 29 Sep 2019, Mike Spencer wrote:

> I have a 500G IDE HD that had a NTFS f/s on it; no O/S, not
> bootable, just data.  Fired up cfdisk, deleted the single NTFS
> partition, created:

>         sdb1        Primary FAT16          246.76
>         sdb2        Primary Linux swap    1003.49
>         sdb3  Boot  Primary Linux       239997.22
>         sdb4        Primary Linux       258860.40

> and wrote it to HD.  Exited cfdisk.

> If I restart cfdisk, sdb1 is now shown as:

>        sdb1          Primary  ntfs    [mg-35] 246.76
(Snip)

***   I suggest:

* Use Windows to delete the partition and have it create a FAT 16 or
even a FAT 32 without installing Windows. Then have cfdisk delete the
FAT and have it create the partitions you require.

* Use RANISH under DOS to delete all partitions and then use cfdisk.

* Use a disc editor to write zeroes directly to the partition
information location(s), then use cfdisk.

    The last suggestion may be dangerous to use in that it might make
the disc unrecognisable by cfdisc. I have not done this before and am
just speculating regarding this suggestion.

  Richard
_______________________________________________
nSLUG mailing list
[hidden email]
http://nslug.ns.ca/mailman/listinfo/nslug
Reply | Threaded
Open this post in threaded view
|

Re: ntfs partition won't go away??

Jack Warkentin-2
In reply to this post by Mike Spencer
Hi Mike

Here are a few thoughts that might be of help.

1. Excerpt from man 8 cfdisk

"Note that cfdisk  provides  basic  partitioning  functionality  with  a
  user-friendly interface. If you need advanced features, use fdisk(8)
instead."

2. The lsblk command (man 8 lsblk) can tell you what disk label is
actually present.

3. The fatlabel command (man 8 fatlabel) can set or get an MS-DOS
filesystem label.

4. I doubt that the label is a big deal. The fact that fdisk does not
display it suggests just that. It looks to me as if cfdisk neglected to
alter the label field in the sdb1 partition information. So what?

My 2¢ worth,

Jack


Mike Spencer wrote:

>
> I have a 500G IDE HD that had a NTFS f/s on it; no O/S, not bootable, just
> data.  Fired up cfdisk, deleted the single NTFS partition, created:
>
>           sdb1        Primary FAT16          246.76
>           sdb2        Primary Linux swap    1003.49
>           sdb3  Boot  Primary Linux       239997.22
>           sdb4        Primary Linux       258860.40
>
> and wrote it to HD.  Exited cfdisk.
>
> If I restart cfdisk, sdb1 is now shown as:
>
>         sdb1          Primary  ntfs    [mg-35] 246.76
>
> exhibiting the label (mg-35) that was on the original NTFS f/s.
>
> The older  fdisk program sees sdb1 as FAT16 (no label).
>
> What's happening here?  How come anything is seen as ntfs?  How come
> data representing a label is still around to be found?
>
> Planning to install Linux on this HD.  Low level weirdness is
> worrisome.
>

--
Jack Warkentin, phone 902-404-0457, email [hidden email]
39 Inverness Avenue, Halifax, Nova Scotia, Canada, B3P 1X6
_______________________________________________
nSLUG mailing list
[hidden email]
http://nslug.ns.ca/mailman/listinfo/nslug
Reply | Threaded
Open this post in threaded view
|

Re: ntfs partition won't go away??

Mike Spencer
In reply to this post by George N. White III


I wrote:

mds> I have a 500G IDE HD that had a NTFS f/s on it; no O/S, not
mds> bootable, just data.  Fired up cfdisk, deleted the single NTFS
mds> partition, created:
mds>
mds>          sdb1        Primary FAT16          246.76
mds>          sdb2        Primary Linux swap    1003.49
mds>          sdb3  Boot  Primary Linux       239997.22
mds>          sdb4        Primary Linux       258860.40
mds>
mds> and wrote it to HD.  Exited cfdisk.
mds>
mds> If I restart cfdisk, sdb1 is now shown as:
mds>
mds>        sdb1          Primary  ntfs    [mg-35] 246.76
mds>
mds> exhibiting the label (mg-35) that was on the original NTFS f/s.


George replied:

gnw> I assume that is a fairly old drive.  My experience is that
gnw> failure rates increase rapidly after the warranty expires, but
gnw> that is for disk-intensive workloads.

HD is old but hardly used.  Got it from my son who bought it for
long-term data storage.   I've had it for a couple of years, read out
all the data a couple of time.  So very low mileage drive.

gnw> Try writing nulls to the first few MB of the drive using one
gnw> of the methods in
gnw> https://wiki.archlinux.org/index.php/Securely_wipe_disk

After repeatedly deleting and reconstructing the partition table with
fdisk, cfdisk, sfdisk and a utility called testdisk and always ending
up with an ntfs partition where I'd specified a FAT16 (06),  I did as
you suggested.

Haven't carried on with installing fs, system, files etc. but nothing
reports an ntfs partition any more.

gnw> For peace of mind, you could use smartmontools to check the
gnw> "health" of drive and run the drive's builtin tests.  Many
gnw> vendors provide test software, usually on a bootable CD-ROM
gnw> image.  These tests generally don't work with external USB
gnw> enclosures, you need to use the native interface.

Well said because I'm working with this via a USB adapter. (No
"enclosure", the HD just sits there with power and adapter cables
plugged in.)  I did see the same warning elsewhere but good to repeat
it.

And Jack wrote:

jw> I doubt that the label is a big deal. The fact that fdisk does not
jw> display it suggests just that. It looks to me as if cfdisk
jw> neglected to alter the label field in the sdb1 partition
jw> information. So what?

The label per se wasn't what worried me.  It was that re-opening the
drive with cfdisk showed what should be an FAT16 partition was being
seen as an ntfs partition.  When testdisk reported the partition
table, it showed FAT16 but explicitly said that the way it was
reported indicated that it was in some way corrupted.  That's when I
decided to go with George's overwrite method.

Richard wrote:

rb> Use Windows to delete the partition and have it create a FAT 16 or
rb> even a FAT 32 without installing Windows.

You have no idea how onerous it would be for me to try to use Windows
to do anything.  That FAT16 partition will end up with MS-DOS 5 on it
if all goes well -- boot from the floppies you made for me to do the
DOS fdisk and sys, then install Slackware on a Linux partition.  But I
don't even know how to do quotidian stuff with Windows, never mind
tweaking the HD.

I have an old Windows laptop here that I kept around so I could boot
it up and play stupid with the guys "from Windows" who want to help me
stop doing bad stuff on the net.  But when the call came, the guy's
accent was so thick that it was just too much effort to play him.  So
it doesn't even get used for that.

All seems well. Still don't know why NTFS kept resurrecting itself.

Thanks for pointers.

--
Michael Spencer                  Nova Scotia, Canada       .~.
                                                           /V\
[hidden email]                                     /( )\
http://home.tallships.ca/mspencer/                        ^^-^^
_______________________________________________
nSLUG mailing list
[hidden email]
http://nslug.ns.ca/mailman/listinfo/nslug
Reply | Threaded
Open this post in threaded view
|

Re: ntfs partition won't go away??

Richard Bonner

On Wed, 2 Oct 2019, Mike Spencer wrote:

Richard wrote:

rb> Use Windows to delete the partition and have it create a FAT 16 or
rb> even a FAT 32 without installing Windows.

> You have no idea how onerous it would be for me to try to use
> Windows to do anything.

***   What about using a Windows live CD?


> That FAT16 partition will end up with MS-DOS 5 on it if all goes
> well -- boot from the floppies you made for me to do the DOS fdisk
> and sys, then install Slackware on a Linux partition.

***   Why such an old version of DOS?


> But I don't even know how to do quotidian stuff with Windows, never
> mind tweaking the HD.

***   The live CD may have some hints.


> All seems well. Still don't know why NTFS kept resurrecting itself.

***   Hmm. I wonder if Micro$oft has some sort of hidden file or
partition that does that if it detects anything other than Windows
being installed. They did similar crap years ago when users installed
WIN 3.n under DR-DOS.

  Richard
_______________________________________________
nSLUG mailing list
[hidden email]
http://nslug.ns.ca/mailman/listinfo/nslug
Reply | Threaded
Open this post in threaded view
|

Re: ntfs partition won't go away??

George N. White III
On Fri, 4 Oct 2019 at 16:00, Richard Bonner <[hidden email]> wrote:

On Wed, 2 Oct 2019, Mike Spencer wrote:

Richard wrote:

rb> Use Windows to delete the partition and have it create a FAT 16 or
rb> even a FAT 32 without installing Windows.

> You have no idea how onerous it would be for me to try to use
> Windows to do anything.

***   What about using a Windows live CD?


> That FAT16 partition will end up with MS-DOS 5 on it if all goes
> well -- boot from the floppies you made for me to do the DOS fdisk
> and sys, then install Slackware on a Linux partition.

***   Why such an old version of DOS?

There are old CNC machine tools, satellite recievers, and 
lab instruments that use DOS software and custom PC bus
(ISA) cards (which rules out a VM on modern hardware).  
The drivers may need to be recompiled for a different 
DOS version, so there are use cases that require old 
versions of DOS.   Machines that can run old DOS versions
are still sold, but the one I used could not handle drives 
larger than 160GB due to some BIOS limitation.

Mike: Have you checked out freeDOS?   
 

> But I don't even know how to do quotidian stuff with Windows, never
> mind tweaking the HD.

***   The live CD may have some hints.


> All seems well. Still don't know why NTFS kept resurrecting itself.

***   Hmm. I wonder if Micro$oft has some sort of hidden file or
partition that does that if it detects anything other than Windows
being installed. They did similar crap years ago when users installed
WIN 3.n under DR-DOS.

A drive of unknown origin may have rootkit malware that messes with
the MBR to stay hidden.   Attempting to use tools that peek at the 
existing partition information may result in "undefined behaviours" 
(up to and including  global thermonuclear war).  Zeroing out the drive 
is a more robust approach and might even save the planet

--
George N. White III


_______________________________________________
nSLUG mailing list
[hidden email]
http://nslug.ns.ca/mailman/listinfo/nslug
Reply | Threaded
Open this post in threaded view
|

Re: ntfs partition won't go away??

Mike Spencer

George wrote:

> On Fri, 4 Oct 2019 at 16:00, Richard Bonner <[hidden email]> wrote:
>
>> ***   Why such an old version of DOS?
>
> There are old CNC machine tools, satellite recievers, and lab
> instruments that use DOS software and custom PC bus (ISA) cards
> (which rules out a VM on modern hardware).  The drivers may need to
> be recompiled for a different DOS version, so there are use cases
> that require old versions of DOS.  Machines that can run old DOS
> versions are still sold, but the one I used could not handle drives
> larger than 160GB due to some BIOS limitation.

My targets are, sadly. not so sophisticated.  I've put the DOS
partition first in the hopes that this will allow DOS to work despite
being a 500G drive.  System I'mm presently using has only an 80G drive.

+ I like occasionally to play Civilization I. Works fine in dosemu if
  there's  a DOS system mounted.

+ I have a *really* *old* Kodak digital cam that captures really great
  landsape colors (its only real asset aside from being an intriguing
  curiosity.)  The only software to d/l photos runs under Win 3.1.

+ Very occasionally, I use improcess, a DOS-based image processing
  program.  It's actually quite remarkable. I added myself to this
  as a joke using improces and the other people involved decided that
  they were sufficiently amused to put it on the web.

     http://www.mit.edu/afs/athena/user/b/h/bhdavis/www/VCG.html

  (My association with the VCG was intermittent and quite informal
  although I did get an inconspicuous credit in the long list of
  "alumni"on the Athena end of project video tape.)

> Mike: Have you checked out freeDOS?

I have Norton DOS installed.  Haven't put any effort into any
improvements because my use is very limited & occasional and is
supported by that I have.

> A drive of unknown origin may have rootkit malware that messes with
> the MBR to stay hidden.

No evidence so far of malware unless NTFS is regarded as the narrow
wedge of MS intrusion/persistence.

> Attempting to use tools that peek at the existing partition
> information may result in "undefined behaviours" (up to and
> including global thermonuclear war).

Um, as far as I know, my system as no influence at the Pentagon (or
KREMVAX :-).

> Zeroing out the drive is a more robust approach and might even save
> the planet

Seems to have worked for my  humble, non-nuclear needs.

--
Michael Spencer                  Nova Scotia, Canada       .~.
                                                           /V\
                                                          /( )\
                                                          ^^-^^
_______________________________________________
nSLUG mailing list
[hidden email]
http://nslug.ns.ca/mailman/listinfo/nslug
Reply | Threaded
Open this post in threaded view
|

Re: ntfs partition won't go away??

Richard Bonner

On Sat, 5 Oct 2019, Mike Spencer wrote:

> I've put the DOS partition first in the hopes that this will allow
> DOS to work despite being a 500G drive.  System I'mm presently using
> has only an 80G drive.

***   You might consider creating a FAT 16, 2 GB bootable partition.
This will allow Ranish to run which might be able to remove the NTFS
partition, if it can be recognised as such.


> + I like occasionally to play Civilization I.
>
> + I have a *really* *old* Kodak digital cam. The only software to
> d/l photos runs under Win 3.1.

> + Very occasionally, I use improcess, a DOS-based image processing
>   program.

***   All will run in a 2 GB partition.

  Richard
_______________________________________________
nSLUG mailing list
[hidden email]
http://nslug.ns.ca/mailman/listinfo/nslug
Reply | Threaded
Open this post in threaded view
|

Re: ntfs partition won't go away??

Joel Maxuel
In reply to this post by Mike Spencer
My email filter got screwed up since I consolidated my mailing lists under one label, so just seeing this thread now.

Not seeing this suggestion through the tangent below, but `cfdisk` would have properly written the new partition information, but (unlike `gparted`) it does not inform the OS of the changes - the usual answer for this (applies to partitioners that run under DOS as well) is to just reboot.  There is (for Linux) a command to to this without rebooting: `partprobe`:

https://www.cyberciti.biz/tips/re-read-the-partition-table-without-rebooting-linux-system.html  

I would gather that at this point, these tips would be purely informational for future reference as opposed to helping out a current situation.

--
Cheers,
Joel Maxuel

"One should strive to achieve, not sit in bitter regret."
 - Ronan Harris / Mark Jackson


On Sun, Sep 29, 2019 at 12:04 AM Mike Spencer <[hidden email]> wrote:

I have a 500G IDE HD that had a NTFS f/s on it; no O/S, not bootable, just
data.  Fired up cfdisk, deleted the single NTFS partition, created:

         sdb1        Primary FAT16          246.76
         sdb2        Primary Linux swap    1003.49
         sdb3  Boot  Primary Linux       239997.22
         sdb4        Primary Linux       258860.40

and wrote it to HD.  Exited cfdisk.

If I restart cfdisk, sdb1 is now shown as:

       sdb1          Primary  ntfs    [mg-35] 246.76

exhibiting the label (mg-35) that was on the original NTFS f/s.

The older  fdisk program sees sdb1 as FAT16 (no label).

What's happening here?  How come anything is seen as ntfs?  How come
data representing a label is still around to be found?

Planning to install Linux on this HD.  Low level weirdness is
worrisome.

--
Michael Spencer                  Nova Scotia, Canada       .~.
                                                           /V\
[hidden email]                                     /( )\
http://home.tallships.ca/mspencer/                        ^^-^^
_______________________________________________
nSLUG mailing list
[hidden email]
http://nslug.ns.ca/mailman/listinfo/nslug

_______________________________________________
nSLUG mailing list
[hidden email]
http://nslug.ns.ca/mailman/listinfo/nslug
Reply | Threaded
Open this post in threaded view
|

Re: ntfs partition won't go away??

Mike Spencer

Joel Maxuel <[hidden email]> wrote:

> Not seeing this suggestion through the tangent below, but `cfdisk`
> would have properly written the new partition information, but
> (unlike `gparted`) it does not inform the OS of the changes - the
> usual answer for this (applies to partitioners that run under DOS as
> well) is to just reboot.  There is (for Linux) a command to to this
> without rebooting: `partprobe`:
>
> https://www.cyberciti.biz/tips/re-read-the-partition-table-without-rebooting-linux-system.html

This is an interesting technical detail I didn't know about.  But I
can't see that it applies to my experience.

I was partitioning a (until then) ntfs HD connected to a running
system with a USB adapter.  After creating 4 partitions (DOS, Linux
swap, Linux, Linux) with cfdisk and exiting cfdisk, a re-start of
cfdisk (or any other tool I had available) showed swap & Linux x 2
correctly but NTFS instead of DOS.  One tool reported corrupted
$SOMETHING without offering specific details.

> I would gather that at this point, these tips would be purely
> informational for future reference as opposed to helping out a
> current situation.

Yes.  George's suggestion of writing nulls to a GB or two  of the
raw device seems to have worked.

Tnx for the pointer, though.

Setting up a new Slackware system on that HD and (elsewhere)
experimenting with internet over a "wireless gateway" device using a
Telus SIM card and data-only account.  I will soon have more pleas for
help.  :-)

--
Michael Spencer                  Nova Scotia, Canada       .~.
                                                           /V\
                                                          /( )\
                                                          ^^-^^
_______________________________________________
nSLUG mailing list
[hidden email]
http://nslug.ns.ca/mailman/listinfo/nslug
Reply | Threaded
Open this post in threaded view
|

Re: ntfs partition won't go away??

Joel Maxuel
Hi Mike,

It would still apply, as (the way I read it), the disk was re-
partitioned, changes committed, tool closed, and then re-opened (with
multiple tools) to find a partial change to the partition table,
without mention of a reboot in between.

However, there is another possibility (something I even encountered
months ago).  As there are different types of partitions, so there are
partition tables.  These days `gpt` is common (which `cfdisk` cannot
understand) whereas `mbr` is the old faithful option for x86 hardware.

Key differences is that `mbr` can only have four primary partitions
(that's right, this is the one for DOS) and limited to a 2TB disk,
overall, whereas `gpt` is known for 128 partitions (without having to
go "logical" for any of them).

You can technically have both tables on the same disk, in a "hybrid"
setup - however the partition tool needs to know of both kinds of
tables and be able to use hybrid in general `cfdisk` does not.

If this is your case, you can either:
1. Re-initialize the disk with a `mbr` table scheme - since you are
planning a DOS partition, `gpt` would not play well here - and then re-
create the partitions with the application of your choice
2. Recover from the inconsistencies with `gdisk` - this can still
result in a hybrid setup and even though that should not be of an issue
in itself once `mbr` and `gpt` agree with each other, it would mean
future changes to the disk layout (if any) would have very reduced
options (parted or gparted).

I would go for option one - since even though option two usually does
not result in data loss, a backup of any contents is a must anyway
(making the first option just plain easier).

Related:

https://www.howtogeek.com/193669/whats-the-difference-between-gpt-and-m
br-when-partitioning-a-drive/

https://askubuntu.com/questions/1058263/convert-hybrid-gpt-mbr-to-pure-
gpt-partition-scheme

Hope this helps.

--
Regards,
Joel Maxuel

On Tue, 2019-10-08 at 16:40 -0300, Mike Spencer wrote:

> Joel Maxuel <[hidden email]> wrote:
>
> > Not seeing this suggestion through the tangent below, but `cfdisk`
> > would have properly written the new partition information, but
> > (unlike `gparted`) it does not inform the OS of the changes - the
> > usual answer for this (applies to partitioners that run under DOS
> > as
> > well) is to just reboot.  There is (for Linux) a command to to this
> > without rebooting: `partprobe`:
> >
> > https://www.cyberciti.biz/tips/re-read-the-partition-table-without-
> > rebooting-linux-system.html
>
> This is an interesting technical detail I didn't know about.  But I
> can't see that it applies to my experience.
>
> I was partitioning a (until then) ntfs HD connected to a running
> system with a USB adapter.  After creating 4 partitions (DOS, Linux
> swap, Linux, Linux) with cfdisk and exiting cfdisk, a re-start of
> cfdisk (or any other tool I had available) showed swap & Linux x 2
> correctly but NTFS instead of DOS.  One tool reported corrupted
> $SOMETHING without offering specific details.
>
> > I would gather that at this point, these tips would be purely
> > informational for future reference as opposed to helping out a
> > current situation.
>
> Yes.  George's suggestion of writing nulls to a GB or two  of the
> raw device seems to have worked.
>
> Tnx for the pointer, though.
>
> Setting up a new Slackware system on that HD and (elsewhere)
> experimenting with internet over a "wireless gateway" device using a
> Telus SIM card and data-only account.  I will soon have more pleas
> for
> help.  :-)
>
_______________________________________________
nSLUG mailing list
[hidden email]
http://nslug.ns.ca/mailman/listinfo/nslug