Score:-1

Bootable usb to format hard drive

us flag

Is there any way to boot from USB and completely format the hard drive. The reason I want to do this is because my Ubuntu 22.04 is not able to start anymore.

C.S.Cameron avatar
cn flag
Can you temporarily put the HDD into a second computer and format it there?
Score:0
in flag

Yes

I like any linux live USB distro and then gparted / parted program to format hard drive.

https://www.system-rescue.org/Installing-SystemRescue-on-a-USB-memory-stick/ You'll need a linux or windows system to make create boot system.

If you don't have another PC then maybe try booting to a lower runlevel, or booting to other kernel might give you the chance to create a boot USB.

Let us know what helped or what else could help.

Karim Mtl avatar
us flag
What is the right command. I tried this: ./sysrescueusbwriter-x86_64.AppImage -t /media/me/ it gave me this error "ERROR: iso image option missing or empty" and this ""
Czar avatar
in flag
You need to download and ISO for the operating system. Like Ubuntu, Linux Mint, Pop OS!. https://www.system-rescue.org/Download/ Your command looks correct except you're missing the <ISO-FILE>. Once you run the USB Writer command it should show your USB drives.
Karim Mtl avatar
us flag
I already have a bootable usb for ubuntu installation but it is not working either (I am having a message saying "Verification failed: (0x1A) Security Violation") when I try to boot from my regular ubuntu 22.04 usb. Was wondering if there is a tool to start from usb and format the whole system.
Czar avatar
in flag
All the tools I can think of require another PC to transfer system files to create a bootable environment so you can format your drive. This post should help fix USB drive error [Security_Violation](https://askubuntu.com/questions/1456460/verification-failed-0x1a-security-violation-while-installing-ubuntu) and you can download a ISO file from system-rescue.org with this command `wget https://sourceforge.net/projects/systemrescuecd/files/sysresccd-x86/10.00/systemrescue-10.00-amd64.iso/download`
Score:0
in flag

Of course you could boot from a live stick and choose "try out Ubuntu". Probably you don't have to re-format the system partition of the hard drive.

1.) You should check if the file system is ok. You might also check the file systems of other partitions. apropos check disk will give you hints, which commands might be useful. You can learn more about the found pieces by calling e.g. man fsck, man testdisk or google for examples how to use them.

2.) If the file systems on the partitions are ok, you might google for the keywords "Ubuntu Boot repair" and find some suggestions how to repair a broken Grub. Hopefully more expert guys than myself can give you more detailed hints on this.

3.) Once you have succeeded with one or the other method, answer your own question telling others how you did it or just mark an answer als the working one, if it left no open questions. Hint: create screenshots when trying your actions and use them to streamline your results to those, which actually lead to the result. I use this script, which I assign as to the key Print for that purpose as sh -c '/home/verwalter/Skripte/Druck_mw.sh' (of course the storage location must fit to where you store this script and make it executable):

#!/bin/bash
# **************************** Druck_mw.sh ************************
# 2023-04-07 Aus einem Terminal kann ich dieses Skript aufrufen.
#            In einem Shortcut muß man es aufrufen als
#                sh -c '/home/verwalter/Skripte/Druck_mw.sh'
#            Als shortcut funktionierte es nicht bei 
#                "disable_on_typing": true
#            in ~/.config/touchpad-indicator/touchpad-indicator.conf
#            Ich habe Debugausgaben eingefügt, um zu sehen, was los 
#            ist, die sind jetzt wieder auskommentiert.
#
#            Es gibt noch eine Variante ShiftDruck_mf7.sh, die das
#            gleiche um 7 Sekunden verzögert macht und die danach
#            Gimp mit der erzeugten Datei aufruft, damit man da
#            gleich das ausscheiden kann, worauf es ankommt.
#            Natürlich muß man bei der Variante das zurecht-
#            gestutzte Bild mit Gimp unter seinem alten Namen
#            wieder abspeichern.
# *****************************************************************
# Der momentane Inhalt der bash-Variablen ssTHEMA wird bei Aufruf
# mit einem Parameter vor dem Datum Bestandteil des Namens der
# zu erzeugenden Screenshotdatei.
#
# Dazu muß der Inhalt der Variablen allerdings mit zulässigen
# Dateinamen kompatibel sein und darf außerdem keine Leerzeichen
# enthalten! So kann man thematisch benannte Screenshots
# verschiedenen Tasten zuzuordnen, z.B.
#
#     Shift-Druck      ---> ohne Parameter
#     Strg-Druck       ---> 1
#     Fn-Druck         ---> 2
#     Shift-Strg-Druck ---> 3
#     Shift-Fn-Druck   ---> 4
# usw.
#
# Man die Variable ssTHEMA als Array auch aus einem Terminal
# definieren als "Überschrift" am Dateinamensanfang.
# Es kann aber nur ein Wort sein!
# *****************************************************************

#echo "Druck_mw.sh aufgerufen."

mkdir -p "/home/$(whoami)/Screenshots"      # Verzeichnis erzeugen, wenn es das noch nicht gibt

#echo "Screenshots gehen nach /home/$(whoami)/Screenshots"
#echo "ssTHEMA=»${ssTHEMA}«"
#echo "$(\date -Iseconds | sed -e s"/T/_/" | sed -e s"/:/-/g" | cut -c1-19).png" > "/home/$(whoami)/Screenshots/q"

if [[ ${ssTHEMA} == "" ]] ;
then
  ssTHEMA=(0 1 2 3 4 sonst) ; else echo "${ssTHEMA[*]}";
fi

if [[ $1 == "" ]] ;
then
  xfce4-screenshooter -wm --save "/home/$(whoami)/Screenshots/$(\date -Iseconds | sed -e s"/T/_/" | sed -e s"/:/-/g" | cut -c1-19).png"
else
  sssTHEMA=$1
  if [ $1 -gt 6 ]
  then
    sssTHEMA=6
  fi
  xfce4-screenshooter -wm --save "/home/$(whoami)/Screenshots/${ssTHEMA[$sssTHEMA]}"_"$(\date -Iseconds | sed -e s"/T/_/" | sed -e s"/:/-/g" | cut -c1-19).png"
fi

This script produces a screenshot file of the actual window named by date and time in ISO-format, so they easily reflect what you have done in which sequence.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.