Wipe Hard Drive

I’m new to FreeBSD and also to IPFire. I bought a HUNSN RJ13, messed up the install, and now would like to wipe the drive. I can’t find the command that lists the drive(s) so I can use the dd if=/dev/zero of=/dev/ada0 bs=1M (at least I think it was ada0, I ran `geom disk list’). Can you advise me on a better way? Thanks.

As part of a new install the IPFire setup wipes the drive.

See the Partitioning and Formatting section.

Will that help?

EDIT: or maybe this will help for the device:

blkid -o list -c /dev/null

I assumed that, but when I reboot it doesn’t give me a chance to re-run the installer. Certainly I’m doing something wrong but I can’t figure out what it is

I’ve tried to run that ```
blkid -o list -c /dev/null
but I get ‘Command not found’

Is it booting directly into IPFire?

if yes, you’ll need to hit whatever magic BIOS key allow you to access the list of boot drives. Some BIOSes uses F2, some F9, some F12.

Then you should be able to make the system boot from the USB and not the internal hard drive…

1 Like

Yes, it’s booting into ipfire terminal, but not the GUI version. I got it to start up the web GUI once but I’m unsuccessful at starting it again. I’ll give the magic BIOS key a try, now that I think of it that sounds like the thing to do. Thanks very much Jon.

to wipe out the drive using the command line, you need to find out what its named. Fist we run lsblock to see what it is called

lsblk

it should return The drives connected and the partition.
This is an output from my raspberry pi:

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
nvme0n1     259:0    0 953.9G  0 disk 
├─nvme0n1p1 259:1    0   512M  0 part /boot/firmware
└─nvme0n1p2 259:2    0 953.4G  0 part /

Then if i wanted to erase the drive. i would run the command:
dd if=/dev/zero of=/dev/nvme0n1 status=progress

That is how I would wipe the drive.

Unless you have a specific reason to, you probably don’t need to erase the entire drive with ‘dd’ to ‘reset’ it which can take a lot of time. Doing the ‘dd’ without adding a ‘count=’ to zero the entire drive can take hours depending on the drive size/type and you’ll also have extra wear and tear on the drive.

You can use:

dd if=/dev/zero of=/dev/thedisk bs=512 count=1

to clean out the MBR partition table which is much quicker.

I actually use:

dd if=/dev/zero of=/dev/thedisk bs=1024 count=1024

a little overkill, but it is easier for me to remember the command since I don’t use it that often. :slightly_smiling_face: