1

I like to test out a lot of linux distros, so I have a USB that I load live images onto frequently. Sometimes, though, I need it for something else, and I need to erase all the partitions on it and restore it to normal. To do this, I generally use these commands on a Windows PC:

diskpart
list disk
select disk <mydisk>
clean
create partition primary
format fs=fat32 quick

That works like a charm most days, but I don't really use Windows anymore, so I was hoping to find an Ubuntu alternative set of commands that I could use. Does anyone know what the Linux terminal equivalent of these commands are?

Caleb H.
  • 141
  • 4
  • 1
    Why erase all the partitions:? mkusb creates a bootable USB with Boot partitions an ISO9660 OS partition a casper-rw persistence partition and a NTFS data partition. If you delete the ISO9660 and casper-rw partitions and expand the NTFS partition, you can drop multiple OS ISOs on to the NTFS partition and boot them by adding the appropriate menuentries in grub. The boot partitions are only ~250MB. The following may help, just forget the FAT persistence .partition: https://askubuntu.com/questions/1025656/how-do-i-boot-an-iso-file-from-my-drive-using-grub2-on-uefi-machines/1025863#1025863 – C.S.Cameron Mar 01 '19 at 04:49

0 Answers0