Computer Science student at the University of Manchester.
I'm also into other stuff, I guess.

Home

Doing Something, Then Doing It Again

A view from my window at St Andrews So, it's been almost a week into my lockdown, which has meant I've finally got it together, hunkered down and started doing some work. It's been, well, it's been interesting. As far as the pure CS part of my course, the induction series has mostly involved the installation of a VM on my own machine, something that, for a while, I couldn't exactly do due to a lack of hard drive space. I've since finally been able to get my shiny new laptop in, with 10 times as much space in its SSD than my old MacBook did (the bar was very low).

The tasks themselves were extremely straightforward. I'm super familiar with bash (though I did quickly switch to zsh) and git (though version control really is one of those things for which I prefer a GUI), so I breezed through the labs pretty quickly. I'd configured my VM to my liking, setting it all up nicely the way I like it, installing a couple of IDEs, text editors, setting up backup and the shared drive, importing some repos from my GitHub, and I shut it down. I restarted my laptop having updated a couple drivers and installing some software on the actual machine, but when I tried to restart my VM, it crashed.

(Quick note, this is where things get pretty nerdy. You can skip ahead to the bottom section if you're not me.)

Okay, this is fine, a quick Google search said to just delete the snapshot I'd saved on exit. No harm, no foul. Boot the VM and it takes me to the OS selection screen. Brilliant!

Or not. It was stuck on a black screen with a blinking cursor. This is when panic struck.

It wasn't a huge deal, I thought to myself, surely there's some software that'll let me extract the old files from my VM so I could just load them in on a reinstall. Well, yeah, there is, but it also costs $100. Maybe not. Fine, I'll just create a new VM which loads into the same virtual disk image. Also didn't work.

And after hours of internal screaming and frustration over my new baby suddenly closing her eyes every time I'd try to open them, I decided to cut my losses and go to bed.

The problem persisted the next day (today as of writing), and so I posted on the troubleshoot forum set up by the University. A couple questions about my OS later, the kind professor pointed me to an anchored link on a wiki page about Hyper-V.

Well, that can't be right - I disabled Hyper-V when I'd set up the VM in the first place, back in the good old days. A little footnote said something about WSL 2A Microsoft-made program which allows you to run a Linux subsystem inside your Windows machine. A dream for someone like me - if you want to be able to run a terminal inside a Windows computer, which is in effect a Linux machine, you should look into it. You get access to package managers, easier integration for certain languages, vim, everything that makes the Linux terminal a joy to work with., one of the aforementioned programs I had downloaded which required the restart. Huh.

At some point, WSL 2 by default activates Hyper-V. Which was the reason the VM wasn't working. I disabled Hyper-V with bcdedit, and the VM launched beautifully. At this point, though, I'd deleted the virtual drive file, thinking a corrupt drive could be the source of the problem, which meant I'd lost all the progress I'd made. So I had to start again.

The Bottom Section

The thing is, doing everything a second time isn't nearly as bad as you might think. You already know exactly what you want, what you need to do and roughly how long it takes. It's just a matter of sitting down and doing it all. Which, yes, is extremely frustrating, but is also strangely gratifying. Maybe I'm just riding off the high of having everything work again and being able to use the VM to do most of the things I would do on my computer, barring video games.

I genuinely think no one should have to go through and re-do something they'd spent hours doing all over again, but just as much, I'm sure everyone has. It's not exactly the craziest experience out there, and it hurts, dear God does it hurt, but it somehow feels twice as good once it's all done. And troubleshooting, just like bugfixing, feels more rewarding the more pain you go through to get to your endgoal, regardless of how dumb your mistakes are.

I guess what I'm trying to say with this entry is that doing something you're proud of and doing it another time isn't actually so bad. Yeah, it sucks, but it's something we've all done and it's something we've all got to do at some point.