Can't delete hard drive partitions

dalpets

New Member
Joined
Nov 15, 2022
Messages
3
Reaction score
0
Credits
40
I want to install Arch on to a 1TB hard drive & I need to delete existing non-Arch partitions that include 3 linux RAID & one W95 ext'd (LBA) partitions.
I have tried numerous approaches from online research but nothing has worked for me. Those attempts have been made at the Arch preinstallation command line.

Some help would be appreciated. Thank You.
 


If you do not wish to keep any other OS then back up all files and folders to an external source, and do a complete new installation of arch wiping the disc completely , then copy your saved work back to the new installation
 
I don't know what happened to my first post, but it started...
Welcome to the forums,
This may not be the "recognised way" of doing things , but it works for me.
 
If you do not wish to keep any other OS then back up all files and folders to an external source, and do a complete new installation of arch wiping the disc completely , then copy your saved work back to the new installation
If you are conversant with Arch you will know that the initial installation is only a very minimal preliminary-enough just to give you a working command prompt. That minimalist install doesn't offer to wipe the disk, which is presently virtually full.

The full install only comes after a very comprehensive & onerous configuration that can take up to some hours, so I am trying to otherwise convey that the wipe can only be done at the presently available command prompt ie., by some software compatible with Arch & that utilizes minimal space since, as mentioned, the disk is virtually full at present.

Maybe there is some bootable software that can treat the disk in raw mode & takes into account the types of partitions I have already mentioned.

Thanks again.
 
Last edited:
to wipe the disk you can boot any live ISO [Debian/mint/MX &etc] select partition magic and use that to delete your partitions or wipe the drive completely, then you can do a fresh minimalistic installation of Arch if that is what you wish, but back up to external source anything you wish to keep first, or you could use DD if you are competent in terminal
 
Most of us, simply boot from something like gparted if we want a GUI to manipulate our disks.


You can use fdisk form the arch CLI.

fdisk /dev/sda
g
w

You might have /dev/sdb or /dev/nvme0n1 instead of /dev/sda but you get the idea.
"g" will re-format the disk with a gpt table (warning, this wipes out everything on your disk)
"w" will write the new format to your disk.

You now have an empty disk.
 
Most of us, simply boot from something like gparted if we want a GUI to manipulate our disks.


You can use fdisk form the arch CLI.

fdisk /dev/sda
g
w

You might have /dev/sdb or /dev/nvme0n1 instead of /dev/sda but you get the idea.
"g" will re-format the disk with a gpt table (warning, this wipes out everything on your disk)
"w" will write the new format to your disk.

You now have an empty disk.
When I try your 'fdisk' approach it says "This disk is currently in use-repartitioning is probably a bad idea. It's recommended to umount all file systems & swap off all swap positions on the disk".

When I try 'umount' it says 'hanging display/entry units to cyclinders (DEPRECATED)'.
When for a second time I run the umount command it says 'changing to sectors' (no deprecation) then a third time it reverts back to 'cylinders'.

Moreover, when I use fdisk 'g' the system says there is a new disk label for the device that contains a 'dos' signature & it will be removed by a write command in fdisk(8). Is that 'fdisk w' ?

I have 3 linux raid partitions (sda1,2 &5) & one W95 Ext'd (LBA)-sda3.

How do I complete the umount process in these circumstances?.
How do I manage the "swap" recommendation? (I'm not convinced at this early stage of the installation that I even have a swap as it's not mentioned in the partition list).

With regard to your Gparted comment- can it function as a bootable command line?
 
Last edited:
dalpets wrote:
When I try your 'fdisk' approach it says "This disk is currently in use-repartitioning is probably a bad idea. It's recommended to umount all file systems & swap off all swap positions on the disk".
fdisk works on unmounted disks, or unmounted partitions. If you wish to clear the whole disk, which appears to be the case from your post #1, you need to have that whole disk unmounted, which basically means, to access it, you need to boot a live distribution as Brickwizard said in post #5.

When I try 'umount' it says 'hanging display/entry units to cyclinders (DEPRECATED)'.
When for a second time I run the umount command it says 'changing to sectors' (no deprecation) then a third time it reverts back to 'cylinders'.
If you try to unmount the running system, you will have no running applications to allow it to function. The 1TB disk needs to be unmounted from the point of view of a live distribution, so you need to boot the live distribution, then run a command such as:
Code:
lsblk
to determine the device name of the 1TB hard drive, and then run fdisk with with that device name.

Moreover, when I use fdisk 'g' the system says there is a new disk label for the device that contains a 'dos' signature & it will be removed by a write command in fdisk(8). Is that 'fdisk w' ?
That is simply a warning that you have a dos partition, which you know anyway, and which you evidently intend to wipe, so the warning is of no consequence.

How do I complete the umount process in these circumstances?
You don't have to unmount the 1TB drive if you boot up a live distribution in RAM. It won't be mounted, so it'll be ready for fdisk to change it's partitioning to your preferred arrangement.

How do I manage the "swap" recommendation?
You can research the matter of having or not having a swap partition in your new partitioning scheme. Opinions vary on the matter. If you are uncertain, you could create a swap partition the size of RAM which is safe. A swap partition that size allows for hibernation if you wish to use that function, but as I said, it can be a contentious matter and you need to make your decision on criteria that you are satisfied with.

With regard to your Gparted comment- can it function as a bootable command line?

Gparted can be fine, as dos2unix wrote in post #6. It's a GUI. The command line that achieves the same is: parted, but there's a bit to learn from the man page or other reliable sources if you are not familiar with it.

There are many live distributions that are usable for achieving what you appear to be after. These include a live rescue disk like systemrescue, a live debian, or live fedora etc. There are heaps of them and some based on arch too if you look for them.
 

Members online


Latest posts

Top