Beginner trying to remove all partitions and raids during install
Beginner trying to remove all partitions and raids during install
Hi,
new to debian and Linux as a whole. However just set up my truenas scale server which was easy compared to debian (I was quite proud to be honest).
Taking small steps to become more advanced within IT and love every step of the way thanks to forums and people like you
I installed debian just some days ago and also messed with RAID and LVM during that install (while waiting for some sata cables to plugin more hdd)... the issue now, with the hardware complete, is that I cant figure out how to delete all partitions and RAID config during the install process. I am a simple windows user and during their install its just "click and delete" and voila you have empty hdd. When going in manual mode during Debian 12 install and trying to delete RAID setting it tells me I use it for my LVM partition... trying to delete the LVM partition tells me its in use. Its like catch 22... obviusly I am doing something wrong and cant find anything in the guides/manuals.
Can someone help me figure out how to remove RAID and also remove all partitions so I can redo it with normal (not LVM) and also get RAID for my two new ssds?
Hope my question makes sense
Best regards,
Flamur
new to debian and Linux as a whole. However just set up my truenas scale server which was easy compared to debian (I was quite proud to be honest).
Taking small steps to become more advanced within IT and love every step of the way thanks to forums and people like you
I installed debian just some days ago and also messed with RAID and LVM during that install (while waiting for some sata cables to plugin more hdd)... the issue now, with the hardware complete, is that I cant figure out how to delete all partitions and RAID config during the install process. I am a simple windows user and during their install its just "click and delete" and voila you have empty hdd. When going in manual mode during Debian 12 install and trying to delete RAID setting it tells me I use it for my LVM partition... trying to delete the LVM partition tells me its in use. Its like catch 22... obviusly I am doing something wrong and cant find anything in the guides/manuals.
Can someone help me figure out how to remove RAID and also remove all partitions so I can redo it with normal (not LVM) and also get RAID for my two new ssds?
Hope my question makes sense
Best regards,
Flamur
-
- Posts: 46
- Joined: 2022-07-20 17:55
- Has thanked: 6 times
- Been thanked: 6 times
Re: Beginner trying to remove all partitions and raids during install
Hi,
i understand that you wnat to wipe out come disk, so, instead to load the installer boot into the live debian, i dont recall if the debian live enviroment has gparted, if not just look for gparted booteable image and boot to it, gparted is like the disk manager in windows, there you will be able to delete partitions, format, etc.
i understand that you wnat to wipe out come disk, so, instead to load the installer boot into the live debian, i dont recall if the debian live enviroment has gparted, if not just look for gparted booteable image and boot to it, gparted is like the disk manager in windows, there you will be able to delete partitions, format, etc.
-
- Posts: 1149
- Joined: 2016-01-07 12:25
- Has thanked: 12 times
- Been thanked: 27 times
Re: Beginner trying to remove all partitions and raids during install
Just to add to the above that if you want to install gparted in the (debian) live session it is as trivial as installing to an installed system, the only difference would be that will not be retained after a reboot.strapicarus wrote: β2024-07-25 02:52 Hi,
i understand that you wnat to wipe out come disk, so, instead to load the installer boot into the live debian, i dont recall if the debian live enviroment has gparted, if not just look for gparted booteable image and boot to it, gparted is like the disk manager in windows, there you will be able to delete partitions, format, etc.
Re: Beginner trying to remove all partitions and raids during install
Many thanks for the tips. I found the gparted website with usb guide - will try it
Re: Beginner trying to remove all partitions and raids during install
That handled the partitions - making progress and I am happy its GUI for these stuff... I had the preconception that everything Linux was codebased and I would be totally lost. This is quite fun insights and its all thanks to your help for which I am very grateful!
However two notes:
1) one "linux software raid array" is not possible to delete within gparted
2) Two disks have a partition with a lock icon on - cant remove them. I have removed the RAID flags for them. My own guess is that these are still linked to the raid array?
How would I solve these two notes?
However two notes:
1) one "linux software raid array" is not possible to delete within gparted
2) Two disks have a partition with a lock icon on - cant remove them. I have removed the RAID flags for them. My own guess is that these are still linked to the raid array?
How would I solve these two notes?
-
- Posts: 1149
- Joined: 2016-01-07 12:25
- Has thanked: 12 times
- Been thanked: 27 times
Re: Beginner trying to remove all partitions and raids during install
I would try (in gparted) going to Device -> Create Partition Table which should clear the drive completely, do this for all disks you want to have emptied.
Re: Beginner trying to remove all partitions and raids during install
Many thanks for your help indeed! It was possible to some extent then I got message it was in use etc. Tried booting gparted from ram with the same result.Dai_trying wrote: β2024-07-25 17:02 I would try (in gparted) going to Device -> Create Partition Table which should clear the drive completely, do this for all disks you want to have emptied.
However I went back to debian install guide and could now remove the raid from there instead - and it told me the disks where empty. So all seems to have worked out in the end.
Now I redid the RAID and installed debian on there using normal "diskmode" (not LVM) and also chose to split the the disk (home, temp and swap) with the automatic partition guide. Seems to work so far
-
- Posts: 1149
- Joined: 2016-01-07 12:25
- Has thanked: 12 times
- Been thanked: 27 times
Re: Beginner trying to remove all partitions and raids during install
I'm not sure where the error would come from really as the disk should be seen as just a block device from the live-session (I think) but I'm no expert so as long as you have solved the issue all is good,
Re: Beginner trying to remove all partitions and raids during install
Hehe its always like that when beginners do stuff
Also getting past this I instead get stuck during install that the installer cant install GRUB... I have no clue what I am doing - just following guides and google stuff all the time. Cant figure out what I am doing wrong.
I use RUFUS and choose GPT and DD mode when fixing the USB install media.
In bios I set the installing computer to UEFI mode.
During install I choose to force UEFI-mode for Debian.
I also install Debian to a RAID1 setup (software RAID during the Debian install process).
Also getting past this I instead get stuck during install that the installer cant install GRUB... I have no clue what I am doing - just following guides and google stuff all the time. Cant figure out what I am doing wrong.
I use RUFUS and choose GPT and DD mode when fixing the USB install media.
In bios I set the installing computer to UEFI mode.
During install I choose to force UEFI-mode for Debian.
I also install Debian to a RAID1 setup (software RAID during the Debian install process).
-
- df -h | grep > 20TiB
- Posts: 1518
- Joined: 2012-10-06 05:31
- Location: /dev/chair
- Has thanked: 102 times
- Been thanked: 250 times
Re: Beginner trying to remove all partitions and raids during install
Creating a new partition table does exactly what it sounds like - it doesn't wipe the disk, it just overwrites the partition table with an empty one. Any filesystems or raid array signatures will remain on disk (though filesystems will not be visible unless you actively go looking for them).Dai_trying wrote: β2024-07-25 17:02 I would try (in gparted) going to Device -> Create Partition Table which should clear the drive completely, do this for all disks you want to have emptied.
To completely clear a disk, either overwrite it with zeros (dd from /dev/zero) or use wipefs, which will look for and offer to remove any filesystem or array headers.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
-
- Posts: 1149
- Joined: 2016-01-07 12:25
- Has thanked: 12 times
- Been thanked: 27 times
Re: Beginner trying to remove all partitions and raids during install
I learn something new every day, thank you.steve_v wrote: β2024-07-26 00:55Creating a new partition table does exactly what it sounds like - it doesn't wipe the disk, it just overwrites the partition table with an empty one. Any filesystems or raid array signatures will remain on disk (though filesystems will not be visible unless you actively go looking for them).Dai_trying wrote: β2024-07-25 17:02 I would try (in gparted) going to Device -> Create Partition Table which should clear the drive completely, do this for all disks you want to have emptied.
To completely clear a disk, either overwrite it with zeros (dd from /dev/zero) or use wipefs, which will look for and offer to remove any filesystem or array headers.
Re: Beginner trying to remove all partitions and raids during install
Great info - thanks!
How would I use the dd from /dev/zero? I am not familiar with these kind of tips. I have seen similar tips on other posts etc - but I dont understand how/where to execute them if I dont have debian installed (yes I am totally new to linux thinking, sorry to say)
I will google wipefs - perhaps its something similar to gparted
-
- df -h | grep > 20TiB
- Posts: 1518
- Joined: 2012-10-06 05:31
- Location: /dev/chair
- Has thanked: 102 times
- Been thanked: 250 times
Re: Beginner trying to remove all partitions and raids during install
At the CLI, from just about any GNU/Linux live or install media. You should be able to get a CLI either by exiting the installer without rebooting, or by switching to another TTY with alt-[f1-f6].
Then (as root) something like "dd if=/dev/zero of=/dev/[disk or partition you want to wipe] count=[number of bytes to wipe] skip=[how far from the beginning of the disk to start]". Be sure you get the right disk, there's no confirmation.
To wipe out the partition table and MBR (the first 512 bytes) on the first disk for example, one could do 'dd if=/dev/zero of=/dev/sda count=512'
To wipe the entire disk, omit the 'count=xxx' part.
The reason software RAID arrays tend to hang around after changing partition layouts and/or formatting is that the headers/metadata aren't at the start of the disk, and the exact location depends on the array metadata version. That's where wipefs is handy, because it'll find it for you. Otherwise one would need to read the docs to figure out what area to hit, or wipe the entire disk, which can take a while.
I've never seen a live or install disk that doesn't come with dd, not totally sure if wipefs is on the Debian media but it's part of the standard util-linux package so it probably is.
If you mean a GUI program, no. GUIs are overrated.
Aside, the misconception here is where all the FUD regarding used HDDs and/or people "easily" recovering data comes from. Removing or overwriting the partition table just nukes information about where the data is on disk, not the data itself. The same is true WRT to "quick" formatting a filesystem - it's quick because it doesn't wipe the data, just the structures defining how it should be accessed.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
-
- Posts: 1149
- Joined: 2016-01-07 12:25
- Has thanked: 12 times
- Been thanked: 27 times
Re: Beginner trying to remove all partitions and raids during install
@flamur Here is where your journey can begin, GUI's are very useful for what they do, but are limited by the scope of their design. You can usually find a command line tool that will accomplish a given task more efficiently and so for a beginner I would recommend learning to use man as it more often than not will contain all the information you would need.
To demonstrate this you could open a terminal (I use terminator as it is great IMO) and type the command man dd this will tell you all (sometimes not all but most) of the parameters you can use and their general usage reference, this can be a little daunting to a newcomer but if you can persist in using these pages as a reference much more of what you can do will become evident and your journey will become smoother over time. Although for getting used to man pages and testing their information it might be better to look into some easier and usually less potentially harmful commands like cp, mv, ls, mkdir, rmdir to name a few.
And remember there are many users here who will give you much more assistance if you appear to want to learn, after all this is how many on this forum began their own journey (myself included), and once you have mastered a few basic commands you will begin to see the true capabilities of switching from M$ to a more powerful (again IMO) and robust ecosystem.
One final note, please, please, please backup your DATA, it is very easy to re-install the underlying system, but the data you have created/gathered is not always so easy to recover, and backup is absolutely essential to a future without (so many) headaches!
To demonstrate this you could open a terminal (I use terminator as it is great IMO) and type the command man dd this will tell you all (sometimes not all but most) of the parameters you can use and their general usage reference, this can be a little daunting to a newcomer but if you can persist in using these pages as a reference much more of what you can do will become evident and your journey will become smoother over time. Although for getting used to man pages and testing their information it might be better to look into some easier and usually less potentially harmful commands like cp, mv, ls, mkdir, rmdir to name a few.
And remember there are many users here who will give you much more assistance if you appear to want to learn, after all this is how many on this forum began their own journey (myself included), and once you have mastered a few basic commands you will begin to see the true capabilities of switching from M$ to a more powerful (again IMO) and robust ecosystem.
One final note, please, please, please backup your DATA, it is very easy to re-install the underlying system, but the data you have created/gathered is not always so easy to recover, and backup is absolutely essential to a future without (so many) headaches!
Re: Beginner trying to remove all partitions and raids during install
Thats just awesome! Many thanks for your time and effort to explain I will acctually give it a try with CLI commands and see if that works.steve_v wrote: β2024-07-26 08:09At the CLI, from just about any GNU/Linux live or install media. You should be able to get a CLI either by exiting the installer without rebooting, or by switching to another TTY with alt-[f1-f6].
Then (as root) something like "dd if=/dev/zero of=/dev/[disk or partition you want to wipe] count=[number of bytes to wipe] skip=[how far from the beginning of the disk to start]". Be sure you get the right disk, there's no confirmation.
To wipe out the partition table and MBR (the first 512 bytes) on the first disk for example, one could do 'dd if=/dev/zero of=/dev/sda count=512'
To wipe the entire disk, omit the 'count=xxx' part.
The reason software RAID arrays tend to hang around after changing partition layouts and/or formatting is that the headers/metadata aren't at the start of the disk, and the exact location depends on the array metadata version. That's where wipefs is handy, because it'll find it for you. Otherwise one would need to read the docs to figure out what area to hit, or wipe the entire disk, which can take a while.
I've never seen a live or install disk that doesn't come with dd, not totally sure if wipefs is on the Debian media but it's part of the standard util-linux package so it probably is.
If you mean a GUI program, no. GUIs are overrated.
Aside, the misconception here is where all the FUD regarding used HDDs and/or people "easily" recovering data comes from. Removing or overwriting the partition table just nukes information about where the data is on disk, not the data itself. The same is true WRT to "quick" formatting a filesystem - it's quick because it doesn't wipe the data, just the structures defining how it should be accessed.
The good thing is that the server I am having as a first linux project is open for failure until everything is set. So no harm in trying a bit
Thanks again!