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!
How about an article on Antergos?
Like this? :)
Only to thank you for advice, though not relevant to me, as the only couple of times I tried Mint, I did not persevere with it, as I just didn’t get along so well.
But great to offer your help for those that do. :)
It is Mike’s article ;)
“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.”
Curious . . . personally, if I were planning on wiping the drive anyway, I would boot into the Live USB and use Gparted to wipe the drive, and start the installation while the Live USB environment is running. It would be like the non-destructive re-install process one uses with Windows to fix various ailments.
What I had meant, is that I was using the built in partition manager from within the installer, that upon starting to make the needed partition adjustments, was asked to write the changes now before I could proceed. This is normal, but the USB crapping out in the middle of that process is not.
Yes, I could use Gparted to partition first, and then just set the installer to install and skip the partition setup part. However, this method would have failed anyway, due to the borked USB. Even if I had partitioned first using third-party software, good chance the install would have crapped out and I’d be in the same predicament anyway ;)
Why did you need to use Rufus, when you already had Antergos installed?
I was booted into my windows partition at the time.
Thanks again, For this not only well written but also highly informative article again (just like Martin always does!) Mike. Also again thanks for the great links you always mention like this time http://lxle.net/.
Hopefully, you will continue with this kind of great Linux article’s.
Do you maybe know or there Is there any change that you or maybe Martin is also going to tackle Raspberry Pi, or do you know that there is in the pipeline somebody new who is going to write articles for Raspberry Pi?