Linux Debian support - Wipe and Reclaim NTFS Partition from Debian

This is Interesting: Free IT Magazines  
Home > Archive > Linux Debian support > November 2007 > Wipe and Reclaim NTFS Partition from Debian





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Wipe and Reclaim NTFS Partition from Debian
Luc The Perverse

2007-10-18, 7:12 pm

Hello! I have the latest unstable version of Debian (updates come every
day and I install all of them!)

I have a stray NTFS partition on my drive and I would like to securely
wipe it and then reclaim the space as a new Ext3 partition. I don't
know the size of it - but is comparatively small like 60 GB or something
- just the files I couldn't fit on my spare 120 GB drive that I was
using for backup purposes. I'm starting to feel the crunch though - I'm
down to 107 GB free on my main partition so I would definitely like to
reclaim that space.

I had forgotten about it - as I used it as a temporary storing ground so
I wouldn't lose any files as I wiped all my other system partitions. I
had since gotten the data off and no longer need it. I was keeping it
around in case I needed Windows for a programming or gaming project -
but the chance of that has dropped to 0 now that I have a shiny new
windows box for those purposes.

What tool would you suggest? I have never worked with partitions or
anything of the like in Linux except in the highly guided debian
installation.

--
LTP


§ Mark §

2007-10-20, 1:12 am

While hanging out in alt.os.linux.debian, I heard Luc The Perverse say:

> Hello! I have the latest unstable version of Debian (updates come every
> day and I install all of them!)
>
> I have a stray NTFS partition on my drive and I would like to securely
> wipe it and then reclaim the space as a new Ext3 partition. I don't
> know the size of it - but is comparatively small like 60 GB or something
> - just the files I couldn't fit on my spare 120 GB drive that I was
> using for backup purposes. I'm starting to feel the crunch though - I'm
> down to 107 GB free on my main partition so I would definitely like to
> reclaim that space.
>
> I had forgotten about it - as I used it as a temporary storing ground so
> I wouldn't lose any files as I wiped all my other system partitions. I
> had since gotten the data off and no longer need it. I was keeping it
> around in case I needed Windows for a programming or gaming project -
> but the chance of that has dropped to 0 now that I have a shiny new
> windows box for those purposes.
>
> What tool would you suggest? I have never worked with partitions or
> anything of the like in Linux except in the highly guided debian
> installation.
>
> --
> LTP
>
>


You could try the Gparted live CD. It has always worked well for me.
http://gparted.sourceforge.net/index.php
--
There are only 10 types of people in the world: Those who understand binary,
and those who don't.
AJackson

2007-10-20, 1:14 pm

On Oct 18, 10:11 pm, Luc The Perverse
<ataylor_no_spa_am@_letterC_solutions.n3t> wrote:
> Hello! I have the latest unstable version of Debian (updates come every
> day and I install all of them!)
>
> I have a stray NTFS partition on my drive and I would like to securely
> wipe it and then reclaim the space as a new Ext3 partition. I don't
> know the size of it - but is comparatively small like 60 GB or something
> - just the files I couldn't fit on my spare 120 GB drive that I was
> using for backup purposes. I'm starting to feel the crunch though - I'm
> down to 107 GB free on my main partition so I would definitely like to
> reclaim that space.
>
> I had forgotten about it - as I used it as a temporary storing ground so
> I wouldn't lose any files as I wiped all my other system partitions. I
> had since gotten the data off and no longer need it. I was keeping it
> around in case I needed Windows for a programming or gaming project -
> but the chance of that has dropped to 0 now that I have a shiny new
> windows box for those purposes.
>
> What tool would you suggest? I have never worked with partitions or
> anything of the like in Linux except in the highly guided debian
> installation.
>
> --
> LTP
>
>


Identify which partition you have it on /dev/hda1 or something like
that. If you do this wrong you could clean your / partiton (or any
other) clean.
Open a terminal window and try type 'sudo fdisk -list /dev/hda' to see
what partitions there are on first IDE harddrive. You will get
something like this.

/dev/hda1 * 1 3824 30716248+ 7 HPFS/NTFS
/dev/hda2 3825 3836 96390 83 Linux

Here /dev/hda1 is the NTFS partition. To make this a ext3 partition
just try this
'sudo mkfs /dev/hda1'
And you will have a good new partition.

Add this line into /etc/fstab and you can easily mount it as a user.
'/dev/hda1 /mnt/hda1 ext3 defaults,users
0 2'

Then create the mounting point where you will find the files on that
disk
'sudo mkdir /mnt/hda1'

Luc The Perverse

2007-10-21, 1:12 pm

AJackson wrote:
> On Oct 18, 10:11 pm, Luc The Perverse
> <ataylor_no_spa_am@_letterC_solutions.n3t> wrote:
>
> Identify which partition you have it on /dev/hda1 or something like
> that. If you do this wrong you could clean your / partiton (or any
> other) clean.
> Open a terminal window and try type 'sudo fdisk -list /dev/hda' to see
> what partitions there are on first IDE harddrive. You will get
> something like this.
>
> /dev/hda1 * 1 3824 30716248+ 7 HPFS/NTFS
> /dev/hda2 3825 3836 96390 83 Linux
>
> Here /dev/hda1 is the NTFS partition. To make this a ext3 partition
> just try this
> 'sudo mkfs /dev/hda1'
> And you will have a good new partition.
>
> Add this line into /etc/fstab and you can easily mount it as a user.
> '/dev/hda1 /mnt/hda1 ext3 defaults,users
> 0 2'
>
> Then create the mounting point where you will find the files on that
> disk
> 'sudo mkdir /mnt/hda1'
>



Cool - thank you

--
LTP


ray

2007-10-21, 7:11 pm

On Thu, 18 Oct 2007 13:11:07 -0700, Luc The Perverse wrote:

> Hello! I have the latest unstable version of Debian (updates come every
> day and I install all of them!)
>
> I have a stray NTFS partition on my drive and I would like to securely
> wipe it and then reclaim the space as a new Ext3 partition. I don't
> know the size of it - but is comparatively small like 60 GB or something
> - just the files I couldn't fit on my spare 120 GB drive that I was
> using for backup purposes. I'm starting to feel the crunch though - I'm
> down to 107 GB free on my main partition so I would definitely like to
> reclaim that space.
>
> I had forgotten about it - as I used it as a temporary storing ground so
> I wouldn't lose any files as I wiped all my other system partitions. I
> had since gotten the data off and no longer need it. I was keeping it
> around in case I needed Windows for a programming or gaming project -
> but the chance of that has dropped to 0 now that I have a shiny new
> windows box for those purposes.
>
> What tool would you suggest? I have never worked with partitions or
> anything of the like in Linux except in the highly guided debian
> installation.


gparted. There is a gparted Live CD.

AJackson

2007-10-24, 7:14 pm

On Oct 21, 6:46 pm, Luc The Perverse
<ataylor_no_spa_am@_letterC_solutions.n3t> wrote:[vbcol=seagreen]
> AJackson wrote:
>
>
>
>
>
>
>
>

But first you need to make partition type from "HPFS/NTFS" (code 7)
into "Linux" (code 83).
You can do that with cfdisk, fdisk, parted or gparted.

Sorry that I forgot that part.
[vbcol=seagreen]
>

And then as any user try 'mount /dev/hda1' and 'umount /dev/hda1'

And always read the manual pages and check what people writes.

So, did you success in your quest?

AJackson

2007-10-24, 7:14 pm

On Oct 21, 11:57 pm, ray <r...@zianet.com> wrote:
> On Thu, 18 Oct 2007 13:11:07 -0700, Luc The Perverse wrote:
>
>
>
>
> gparted. There is a gparted Live CD.


If the partition that you are going to change is not used, there is no
need to use a live CD.

IF you are going to change a partition that is in use and can't boot
in singel user and unmount that partition, like your root partition
(/), then you must boot another OS to do that. A live CD is a very
good method to do this.

With a lvm, you don't need to do that. You can change partitions under
the feet of the OS, and make a partiotion larger (or smaller) on a
running system, with the right choise of file systems (like ext3fs,
reiserfs, xfs etc).

Good luck

Luc The Perverse

2007-10-25, 1:15 am

AJackson wrote:
> On Oct 21, 6:46 pm, Luc The Perverse
> <ataylor_no_spa_am@_letterC_solutions.n3t> wrote:
>
> But first you need to make partition type from "HPFS/NTFS" (code 7)
> into "Linux" (code 83).
> You can do that with cfdisk, fdisk, parted or gparted.
>
> Sorry that I forgot that part.
>
>
> And then as any user try 'mount /dev/hda1' and 'umount /dev/hda1'
>
> And always read the manual pages and check what people writes.
>
> So, did you success in your quest?
>



yeah I did thanks

Now I just have an annoying Gnome issue where if I mount the drive it
appears on my desktop - but that is fairly minor - and I'm sure I can
fix it when I spend a few minutes on it.


Thanks everyone

--
LTP


AJackson

2007-10-25, 1:12 pm

On Oct 25, 3:51 am, Luc The Perverse
<ataylor_no_spa_am@_letterC_solutions.n3t> wrote:
> AJackson wrote:
>
>
>
>
>
>
>
> yeah I did thanks


(You should tell us then how you did ;-))

> Now I just have an annoying Gnome issue where if I mount the drive it
> appears on my desktop - but that is fairly minor - and I'm sure I can
> fix it when I spend a few minutes on it.


Remove user from the line in /etc/fstab. Then that partition will
mount automaticly when you boot. And Gnome shouldn't put the disk on
your desktop. Only disks that you are allowed to mount as an ordinary
user (marked with 'user' or 'users' in option collumn in /etc/fstab).
Have a look at 'man fstab'.

Good luck

Keith Blow

2007-10-25, 1:12 pm

AJackson wrote:
>
> Remove user from the line in /etc/fstab. Then that partition will
> mount automaticly when you boot. And Gnome shouldn't put the disk on
> your desktop. Only disks that you are allowed to mount as an ordinary
> user (marked with 'user' or 'users' in option collumn in /etc/fstab).
> Have a look at 'man fstab'.
>

I have three partitions mounted at boot time, all three show up on the
desktop. (gnome 2.18.3, debian testing)

--
Keith Blow
Luc The Perverse

2007-10-26, 1:15 am

Keith Blow wrote:
> AJackson wrote:
> I have three partitions mounted at boot time, all three show up on the
> desktop. (gnome 2.18.3, debian testing)


Well my other partitions do not appear on the desktop - the ones I
installed - and if they did I would find a way to remove them because I
like "NOTHING" on my desktop unless I am actively working on it.

--
LTP



Keith Blow

2007-10-26, 7:16 am

Luc The Perverse wrote:
> Keith Blow wrote:
>
> Well my other partitions do not appear on the desktop - the ones I
> installed - and if they did I would find a way to remove them because I
> like "NOTHING" on my desktop unless I am actively working on it.
>
> --
> LTP
>
>
>

Agreed, in fact I'm more extreme, I don't use the desktop at all.
Documents I'm working on can easily be found in the "recent documents"
section of all the apps I'm using.
The point I was making was that I have a setup which the previous poster
said would ensure the drives don't appear on the Desktop, but they do.
If you find out how to avoid this, please post the solution.

--
Keith Blow
Kees Theunissen

2007-10-26, 7:16 am

Keith Blow wrote:
> Luc The Perverse wrote:
[vbcol=seagreen]
> Agreed, in fact I'm more extreme, I don't use the desktop at all.
> Documents I'm working on can easily be found in the "recent documents"
> section of all the apps I'm using.
> The point I was making was that I have a setup which the previous poster
> said would ensure the drives don't appear on the Desktop, but they do.
> If you find out how to avoid this, please post the solution.
>


I would start in such a case to experiment with different mount points.
Where did you mount those drives? I'm just guessing but I can imagine
that /mnt/* and /media/* are handled special by gnome/kde/whatever.

The mount points in /media are intended for removable media and /mnt
is intended as a temporary mount point.
(AJackson advised Luc to mount the newly formatted old windows partition
on /mnt/hda1)

Regards,

Kees.

--
Kees Theunissen.
Luc The Perverse

2007-10-27, 1:13 am

Kees Theunissen wrote:
> Keith Blow wrote:
>
>
> I would start in such a case to experiment with different mount points.
> Where did you mount those drives? I'm just guessing but I can imagine
> that /mnt/* and /media/* are handled special by gnome/kde/whatever.
>
> The mount points in /media are intended for removable media and /mnt
> is intended as a temporary mount point.
> (AJackson advised Luc to mount the newly formatted old windows partition
> on /mnt/hda1)
>
> Regards,
>
> Kees.
>


Ah is that my problem?

I am still quite green to this whole mounnting and partitions idea -
myself a recovering "Windows guy."

--
LTP


Keith Blow

2007-10-30, 7:12 pm

Kees Theunissen wrote:
> Keith Blow wrote:
>
>
> I would start in such a case to experiment with different mount points.
> Where did you mount those drives? I'm just guessing but I can imagine
> that /mnt/* and /media/* are handled special by gnome/kde/whatever.
>
> The mount points in /media are intended for removable media and /mnt
> is intended as a temporary mount point.
> (AJackson advised Luc to mount the newly formatted old windows partition
> on /mnt/hda1)
>
> Regards,
>
> Kees.
>

Nice idea but that's not the problem. Two are mounted under /mnt
(windows vfat partitions) and one is an extra storage area mounted as
/store (ext3).

You are right about /media, if you don't have your cdrom in /etc/fstab
it will show up on the desktop when you put a disk in. I think udev
(hal?) handles that.

--
Keith Blow
Keith Blow

2007-11-07, 7:11 pm

Keith Blow wrote:
> Kees Theunissen wrote:
> Nice idea but that's not the problem. Two are mounted under /mnt
> (windows vfat partitions) and one is an extra storage area mounted as
> /store (ext3).
>
> You are right about /media, if you don't have your cdrom in /etc/fstab
> it will show up on the desktop when you put a disk in. I think udev
> (hal?) handles that.
>

You can stop ALL the mounted icons appearing on the desktop (I have
gnome 2.18.3):
system tools->configuration editor->apps->nautilus->desktop
uncheck "volumes visible"
Now none of the volume icons will appear, not even the auto mounted
ones. You will still get a browser window if you have that enabled in:
System->Preferences->Removable drives and Media

--
Keith Blow
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com