How do I reset a bootable drive so that it no longer is bootable?

I made a bootable USB stick (Fedora) to install on a system. I'd like to reuse the stick, so I want to remove all traces of the functioning system; in particular I'm not sure how to reset the MBR so that, when treated as a disk, the stick does not look bootable.

My ultimate goal is to have a blank, non-bootable, NTFS (re-)formatted USB stick.


Solution 1:

As root, run dd if=/dev/zero of=/dev/sdX bs=512 count=1

Then you can add a partition table (fdisk /dev/sdX and press o, or you could use one of the graphical tools like gparted) and a new NTFS partition.

Solution 2:

From Fedora install GParted from the Fedora package manager. Unmount the bootable USB drive. Open GParted and find the USB drive from the menu list of drives (see mouse cursor on screenshot below).

enter image description here

From the GParted menu choose: Partition -> Manage Flags. From the Manage flags on... window uncheck boot (see screenshot below).

enter image description here

From the GParted menu select Partition -> Format to -> NTFS.

Solution 3:

You can achieve this by a simple system tool like diskpart from windows.

1)Open up the Start Menu and type “diskpart” in the run box.

2)Type “list disk”.enter image description here 3)“select disk #” where # is the disk number of your USB stick.

4)now enter the command “clean all”

The "clean" command zeroes out the sectors of the disk that contain the partition data. “clean all”command zero out all data on the USB stick .

Now you can format it from context menu as usual.

(since you mentioned NTFS , i hope you have access to a windows system)

To zero fill the drive from linux you can make use of dd. To wipe a disk by writing zeros:

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

where /dev/sda with your device.

Solution 4:

You can use diskpart from the command line or the disk management tool (inside computer management).

Disk Management: http://windows.microsoft.com/en-us/windows7/delete-a-hard-disk-partition

Obviously repartitioning / reformatting will erase all your files on the drive.

Diskpart command line: http://ss64.com/nt/diskpart.html

Usually the procedure is : delete the partition, create a new one, then format it