How to fix broken USB install damaging your Linux dual boot
Rather than a very straightforward tutorial type article, I thought I would tell you a true story of what happened to me immediately before writing this, and how I solved it.
Tonight before I started working on some articles for Ghacks, I decided to wipe my current setup and install the latest version of Linux Mint Cinnamon edition, and see how she runs. This laptop currently has Windows 7 and Antergos dual-booted.
I couldnâ€™t find the usual flash drive I keep handy for firing LiveUSBâ€™s up, so I grabbed another random one I had laying around, and I quickly popped open Rufus, made my USB, and booted into Mint. I noticed that the boot was a bit slower than it had been in the past, but I thought perhaps that might just be attributed to this version of Mint, no big deal, and moved on to continue with the installation.
Once I got to the screen where it was time to partition my drive (I always do so manually), the installer told me that before I could continue with setting up my various partitions, the changes I had made thus far (selecting that I wanted to format the old partition. I hadnâ€™t got to the part of selecting it yet for the new install) needed to be applied. No problem, I plan to wipe the partition anyway, so go ahead and get that part done ...until the process is interrupted by the USB drive choking on itself. This resulted in an error of the installer, and a hung process. Upon rebooting and booting from the main drive, I was greeted with the GRUB crash / recovery terminal.
This gave me an idea!
I remembered that my other USB drive was in my backpack, and quickly dug it out to boot from it and see what might be on it â€“ LXLE from a recent install I did on my cousins computer; however, not what I wanted.
From here what I did, was boot off the USB that contained Linux Mint, into the live environment, before accessing the Windows partition on the laptop it was plugged into, and transferring the Linux Mint ISO to my home folder for convenience sake of typing the location into a terminal later.
Once that was finished, I popped open a terminal, and checked what my USB drive I wanted to install Mint freshly onto (the one from my backpack) was mounted as: lsblk
This showed me that the 8gig flash drive, was mounted as /dev/sdb
From here, I simply used the live environment, to make another liveUSB of mint, on the other drive:
sudo dd if=/Path/to/Linux/Mint of=/dev/sdb bs=2M
This command copies the contents of the ISO into a proper and bootable format onto the USB stick I selected. The command will give no output when it is first issued, you need to sit and wait until the process is done (usually 1-5 minutes), and then finally an output will be given that the process is finished. Once so, you are free to reboot, unplug the buggy USB, and boot fresh from the other.
This allowed me to install Linux Mint as intended, without losing anything on my Windows partition, and a fresh GRUB install as well.
I hope my experience might help others stuck in a similar situation!Advertisement