virtualization, frustration, mental models [day 35]
In regards of the Linux from Scratch project idea, I paired to day with Dominic to set up a VirtualBox‘ed GNU/Linux system, as his Mac OS is not a perfect host for bootstrapping Linux.
This turned out to be an odyssey of failures (reminds me of a nice barcamp in Berlin by the way), which easily filled the whole second half of the day. We spent most of our time downloading Linux ISO images, following installation instructions, more or less systematic error search and seeing Operating Systems fail. I’m not sure why it was so flawed, but for every step forward we made two back. With each failure we had a new idea, which then revealed it’s own problems, only after we invested a certain amount of time. For example installing GNU/Debian left us without a driver for the virtualized Ethernet adapter. We did not find an easy way to install that, so two steps back chosing another distribution.
Now that I’m writing this I’m getting another new idea. Maybe we should’ve used Docker, which as far as I know runs pretty smooth on Mac OS X. Also it might be easier for my purposes to prepare a lightweight docker image instead of a Linux from scratch. Starting with busybox or toybox, more could be added as required.
I (rather: the perfectionist in me) wonders if we could’ve prevented this chain of failures by more planning and research. Probably not. We certainly learned something while going through all of this frustration. In our discussion we came across:
- Configuring an ssh server such that it is less secure. I found it commendable that root login via password per ssh is disabled by default in most of the distributions we tried.
- the difference between GParted and cfdisk. The former is my favourite, I can’t do partitioning via the commandline. Maybe I should learn it, to improve my mental model of what is going on. Having a GUI makes things easier, but often more opaque.1
- While we’re at partitioning: We talked about the differnce between a logical partition and an extended partition. It seems that the former can “hold” one or more of the latter.
- How to exit out of a broken ssh session with
<Return>~.
, which I had learned from this, and why ssh needs a special treatment. Answer: We need some kind of escape key, because we would want to send most of the keys, e.g.Ctrl-c
through ssh to the host. - That building a mental model of how an operating system is virtualized is not so easy. I don’t know much about it, it’s mostly “magic” to me. Several times we questioned, whether the Macintosh CPU causes the problems or not. Is it abstracted away or used in the virtualization?
-
While researching in the aftermath, I realized that both are graphical frontends for GNU parted and fdisk respectively, although cfdisk is curses-based. ↩