LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-19-2010, 01:42 PM   #1
ZimMonkey
LQ Newbie
 
Registered: Jun 2009
Posts: 13

Rep: Reputation: 0
Deleting hidden partitions on usb drive


I recently bought a Buffalo 500GB ministation usb with "optional disk encryption". Turns out, I'm having one hell of a time trying to remove the "optional" from the drive. I figured I could just delete the program that is on the disk, and go on my way. That doesn't seem to be the case.

fdisk /dev/sdc1, then "p" showed that there were 4 partitions. So I deleted them one by one. "n" gave me a new partition. "t" I used 87 because I will be using it on windows. Then "w" to write everything.

mkfs -t ntfs /dev/sdc1 - all went well.
fsck -f -y /dev/sdc1 - all went well

Then I took the removed the drive and plugged into Windows only to find that the "optional" is still there. It actually creates a virtual drive with the "optional" software.

So I tried it over again. I tried fdisk only to see that the partitions were back (as if they were never removed). I removed them again, and used primary partition as linux, and wrote to disk. As a hunch, I checked permissions. Can't remember what it said, but I did change them.

chmod 777 /dev/sdc1

Then in a last hope of desperation, before coming to work today, i decided to dd the drive.

dd if=/dev/zero of=/dev/sdc1 bs=4k conv=notrunc

I'll know when I get home from work if any of this helped. Is it possible that the "optional" stuff is actually hard coded onto a chip, or something inside the drive and I may never get rid of it? Am i missing something in my process?

Thanks for your help

Zim
 
Old 02-19-2010, 01:57 PM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
dd if=/dev/zero of=/dev/sdc1 bs=4k conv=notrunc
This is only going to wipe one partition, /dev/sdc1

Better, perhaps, is to try to wipe the entire disk (partition table, MBR & all)
Code:
dd if=/dev/zero of=/dev/sdc bs=1M
Make very sure you sure you are zeroing the correct disk, or you will be sorry.

Then look at it with fdisk /dev/sdc
 
Old 02-19-2010, 02:33 PM   #3
ZimMonkey
LQ Newbie
 
Registered: Jun 2009
Posts: 13

Original Poster
Rep: Reputation: 0
tredegar,

Thanks for your quick reply.

I'm just trying to wrap my head around a few things, and could use some clarification.

Code:
dd if=/dev/zero of=/dev/sdc bs=1M
So when i use the dd command, I should be using it as sdc, not sdc1? Why when I mount and use the drive is it accessed through sdc1? Are you saying that sdc1 is a partition of sdc? Does the MBR, and partition table and such exist on sdc, and not sdc1?

Thank you for your help. And as a side note, thanks for the additional reminder to zero the correct disk (it is).

Zim
 
Old 02-19-2010, 03:36 PM   #4
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
Quote:
Originally Posted by ZimMonkey View Post
tredegar,
Code:
dd if=/dev/zero of=/dev/sdc bs=1M
Why when I mount and use the drive is it accessed through sdc1?
sdc is the disk, sdc1 is the first partition. A disk with only one partition will be accessed as sdc1.

You have to create at least one primary partition on any disk in any OS (that I know of, certainly windows) before you can format it and write to it. Under windows the partition must be marked as active as well.

If you were to write a bootable disk image to a USB disk then you would use similar syntax, because you want the whole of the disk (including the boot sector) to be written as per the image.
dd if=/path/to/image of=/dev/sdx

sd means it's a scsi or SATA drive and also USB are named this way.

sdc means it's the 3rd sata (scsi) disk in the system

sdc1 means the first partition on the 3rd sata (scsi) disk in the system.

Under bsd the conventions are different.


I forgot to say, in your case you want to overwrite the whole disk including all boot sectors and partitions. So the sdc is correct.
Also most new disks come pre-set up, so you don't have to write a partition yourself.

Last edited by smoker; 02-19-2010 at 03:47 PM.
 
Old 02-19-2010, 04:08 PM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
I'm just trying to wrap my head around a few things, and could use some clarification.
OK.

Quote:
So when i use the dd command, I should be using it as sdc, not sdc1?
Yes.

Quote:
Are you saying that sdc1 is a partition of sdc?
Yes.

Quote:
Does the MBR, and partition table and such exist on sdc, and not sdc1?
Yes.


The "disk" is /dev/sdc

This is the raw disk. It refers to your hardware.

Disks are usually split into "partitions", that sub-divide the disk into, well, partitions. The partition table ( a description of how the entire raw, physical, disk is to be divided ) is held in the raw disk's MBR which resides in the first sector of the raw disk. That's /dev/sdx (no number, just a letter).

Raw disks can be partitioned into separate slices. Think of it like a cake, sliced up. The cake is /dev/sdb and the "slices" are /dev/sdb1 /dev/sdb2 etc. Each partition can be allocated space, and formatted as a filesystem, and used as such.

If you want to remove all software from a disk, and return it to its raw state, you need to zero the whole disk ( Eg /dev/sdb but check this carefully) not just the partition ("slice of the cake") like sdb1

Once you have done that you will have to repartition the disk with (as root) fdisk /dev/sdb

menu for help
print the partitions
n to create new partitions
w to write the changes

And remember that /dev/sdb needs to be unmounted when you do this
then follow the prompts.
 
1 members found this post helpful.
Old 02-19-2010, 06:01 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
If it's anything like the Sandisk U3 crap, you cannot remove it using normal tools. For the Sandisk junk you have to trust their tool - and run in under Windoze.
 
Old 02-19-2010, 07:56 PM   #7
ZimMonkey
LQ Newbie
 
Registered: Jun 2009
Posts: 13

Original Poster
Rep: Reputation: 0
smoker & tredegar,

Thanks for the help. I'll be trying it out in a few hours. I'll post my progress.

syg00,

Is there a way to find out if it's the same as the Sandisk U3 before spending lots of quality time swearing at it? Or will it be something that I'll just have to find out the hard way? I've seen posts on nonlinux sites trying to figure out how to remove this thing, but so far nothing as to if it's hard wired in somehow, or if anyone's been successful. Progress will be posted, as well as possible cursing

Thanks,

Zim
 
Old 02-22-2010, 08:32 AM   #8
ZimMonkey
LQ Newbie
 
Registered: Jun 2009
Posts: 13

Original Poster
Rep: Reputation: 0
An update:

I tried tredeager's suggestion. Actually I tried it twice just to make sure. I am unable to remove the software for the "optional" disk encryption. After plugging the device in, I still get a virtual cd showing as one of my drives. Thanks for your help.
 
Old 02-22-2010, 09:20 AM   #9
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,820

Rep: Reputation: 229Reputation: 229Reputation: 229
Try Buffalo...

Have you tried the Buffalo support site to see if there is a utility available to manage and remove the unwanted formatting? You may have to run any utility on a Windows system, perhaps after formatting the HDD again with NTFS or VFAT.

Another possibility is, if it is not sealed, to try to open the HDD case, and see who has manufactured the disk itself, then see if the maker has a utility to change the specifications of the disk. A HDD tool such as Seatools or HUTIL has an option to do a low level format of the HDD that may remove what Buffalo has installed.

Some of the Buffalo encryption software has an integrated management tool, but yours has none? It might be necessary to install the software under Windows in order to make any changes.

I assume that the results of the command "lshw" is that the device announces itself as a Buffalo HDD. Buffalo has management programs for their small format USB HDDs, but are they the utility that you need?

http://www.buffalotech.com/support/downloads/

Last edited by thorkelljarl; 02-22-2010 at 11:18 AM.
 
Old 02-22-2010, 10:20 AM   #10
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
These problems are very similar to the ones posted in this LQ thread. It seems USB HDD vendors are using advanced USB functionality to provide smart "value added" services aimed at the Windows market -- providing features which are unhelpful on Linux.

Hopefully people will contribute to LQ's Linux Hardware Compatibility (HCL) so we can find out which models are not suitable.

I figure the (too damn) smart functionality is in the firmware; unless manufacturers provide firmware which removes the smart stuff and renders the device as a simple USB HDD there is not much we can do. usbsnoop could provide a bit more information about what is going on, as seen from the OS.
 
Old 02-22-2010, 01:40 PM   #11
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
OK, it didn't work (the dd .. of=/dev/sdc )
The "CD ROM" is probably in the firmware on the device. Ignore it. I doubt you could reclaim the space, such as it is, anyway.
If you want to boot linux from one of these drives, you'll probably have to make sure that
the bootloader is installed on the partition and not the MBR.

Mental note to self: Don't ever buy any disks with "optional encryption".
Who trusts their "encryption" anyway ?
 
Old 02-22-2010, 03:52 PM   #12
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567

Rep: Reputation: 57
I had a similar problem with a Kingston data traveler USB thumb drive. It didn't want to delete, but eventually I figured it out. I think fdisk actually got it for me.

If my memory serves me correctly you should be able to do the following (assuming you are still using /dev/sdc)
Code:
fdisk /dev/sdc
l
d
1
d
2
d
3
d
4
w
That should delete partitions 1-4 and then write the changes to /dev/sdc/. After that you can go back and create your new ntfs partition.
 
Old 02-22-2010, 03:55 PM   #13
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
Whats the point of removing it?
 
Old 02-23-2010, 09:32 AM   #14
ZimMonkey
LQ Newbie
 
Registered: Jun 2009
Posts: 13

Original Poster
Rep: Reputation: 0
thorkelljarl,

Thanks for the link. Buffalo doesn't have anything in referrance to removing the software. It does have a download for the original software. That gives me hope that it can be removed.

catkin,

The problem does seem to be the same. I've tried everything I can find to get rid of it and just can't. It's still a functional drive, just with bloat.

tredegar,

Thanks for your help. I 've bought thumb drives with compression software and other crap on it before and had no problem just deleting it. So I didn't think that this would end up being such a problem. I've learned my lesson on that.

worm5252,

That is one of the many things I tried. I've formatted, dd'd, searched, begged and pleaded

smeezekitty,

The point of removing it is more out of principle. The drive is totally functional, I just don't like being told that I can't remove software that I don't want. It reminds me too much of Bill Gates.

As a follow up of sorts, I did make an interresting discovery. When using fdisk on /dev/sdc it showed there were 4 partitions. I deleted each one, and wrote that to the drive. I checked the partition table and it showed the amount of space on the drive with no partition. As a fluke I used x as my option, then checked partition again. It showed that there were 4 partitions, 3 of them had zeroes after them, and the top one seemed to be the drive. After that I dd'd with zeroes /dev/sdc. Then I mkfs as ntfs. After that was done I plugged it into a Bill Gates computer and the virtual cd thing showed up again. It seems my persistance is only getting me more annoyed. Is there anything that I might have forgotten?

Thanks,

Zim

Last edited by ZimMonkey; 02-23-2010 at 10:38 AM.
 
Old 02-23-2010, 12:22 PM   #15
Fred Caro
Senior Member
 
Registered: May 2007
Posts: 1,007

Rep: Reputation: 167Reputation: 167
usb pain in rear

I don't wish to promote any purveyor but Kingston usb sticks come free from annoying software so maybe they do larger items? Maybe a case of buyer beware.

Fred.
 
  


Reply



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
Trouble Deleting Hidden Partition on External Drive jman82s Linux - Hardware 2 11-27-2007 06:48 PM
Deleting hidden lines in Wondows XP registry -- How? moxieman99 General 2 11-07-2007 07:07 AM
Deleting files on a USB drive. MheAd Linux - Hardware 1 06-11-2007 08:21 AM
Mounting USB external drive with multiple partitions, USB bluetooth mouse xmeson Slackware 7 12-17-2006 09:00 AM
USB drive using different partitions (usb key thumb drive) Arodef Linux - Hardware 0 08-04-2004 06:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:15 PM.

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