The Flat Earth Society

Other Discussion Boards => Technology & Information => Topic started by: xasop on November 08, 2014, 04:42:16 PM

Title: OpenBSD
Post by: xasop on November 08, 2014, 04:42:16 PM
I pre-ordered a copy of OpenBSD 5.6 (https://www.openbsdstore.com/cgi-bin/live/ecommerce.pl?site=shop_openbsdeurope_com&state=item&dept_id=01&sub_dept_id=01&product_id=CD56) a while back. It arrived a few days ago, and I lost no time in installing it at work. I've also just installed it on my Lemote Yeeloong to play around with at home. It really is a fantastic system to work with.

OpenBSD is a project I've had an idle interest in for some time, and with all the drama around systemd going on in Linux-land at the moment, it's finally got me fed up enough to move. It's going to take a while before I can move my home desktop, because OpenBSD can't read Linux encrypted filesystems and I have about 2 TB of data to migrate, but I'll get there in the end.

Moving from Linux to OpenBSD reminds me of when I first migrated from Windows to Linux; aside from a few teething problems as I get used to the differences, everything seems much cleaner and simpler, and it's a lot easier to understand how the OS works. This is made even easier in the case of OpenBSD, due to a combination of them including the full source code for the operating system when you buy a CD, having very high standards for their own code, and having documentation that is second to none. I've had it installed less than a week, and I've already spent a while exploring the internals of the codebase, and it's all very neat and tidy.

You can obtain a copy from http://www.openbsd.org/, although I would encourage you to buy a copy from https://www.openbsdstore.com/ if you're going to install it, as CD sales are one of the primary sources of funding for the project. I'm enjoying it enough that I already plan to buy OpenBSD 5.7 when it comes out in May.
Title: Re: OpenBSD
Post by: xasop on November 09, 2014, 03:30:11 PM
Debian has dropped their GNU/kFreeBSD port (https://lists.debian.org/debian-devel-announce/2014/11/msg00005.html) as a release architecture. If I needed any further motive to migrate to OpenBSD, this is it.

Goodbye, Debian. It's been a pleasant few years.
Title: Re: OpenBSD
Post by: Lord Dave on November 09, 2014, 04:04:51 PM
What drama could be in Linux land?
Title: Re: OpenBSD
Post by: xasop on November 09, 2014, 04:07:15 PM
What drama could be in Linux land?

https://en.wikipedia.org/wiki/Systemd#Reception
Title: Re: OpenBSD
Post by: Lord Dave on November 09, 2014, 04:21:38 PM
What drama could be in Linux land?

https://en.wikipedia.org/wiki/Systemd#Reception
So the drama is a bunch of people are going the Windows route of "it'll do everything for you" and others hate it?
Title: Re: OpenBSD
Post by: xasop on November 09, 2014, 04:43:10 PM
So the drama is a bunch of people are going the Windows route of "it'll do everything for you" and others hate it?

That's as reasonable a one-line summary as I've seen, although the issue as a whole is too complex to summarise easily. There are a number of people with various different objections to systemd all arguing over the top of one another, but the primary concern is that as people adopt it, it will become impossible to use Linux without it. Freedom of choice has historically been a very important part of the Linux ecosystem, and now that is perceived to be in danger.

Myself, I don't love systemd, but I don't hate it either. It's a decent attempt at solving a very real problem, but I think it tries to extend beyond its boundaries. This issue is really just a catalyst for me; I've been growing increasingly dissatisfied with Linux and GNU for various reasons over the past two to three years.

I should write a rant about my position or something; that's what everyone else seems to be doing these days. After all, why make something better than systemd when you can just pay $40 for a domain name and put up a page about how terrible it is? Really makes me appreciate OpenBSD, where people just write good code and don't have time for the petty squabbling that goes on in Linux communities.
Title: Re: OpenBSD
Post by: xasop on November 21, 2014, 12:25:46 PM
I have now shrunk my Linux partition to make room for a new OpenBSD partition. This weekend, I plan to attempt a delicate manoeuvre, involving running a Linux VM on OpenBSD and syncing files from the VM to the host. This will enable me to migrate files from a Linux encrypted volume to an OpenBSD encrypted volume without them ever touching an unencrypted filesystem.
Title: Re: OpenBSD
Post by: xasop on November 21, 2014, 01:04:44 PM
Well, OpenBSD boots, except my monitors are blank as soon as KMS kicks in due to missing firmware for my Radeon HD 6850. I managed to diagnose the issue by booting the kernel with the radeondrm(4) and drm(4) drivers disabled, so I should be set once I get that firmware blob installed.

Edit: Scratch that, the system installed the firmware for me on first boot, so this was only a problem the first time I booted (as the firmware got loaded after KMS was initialised).

I'll begin migrating data tomorrow, as I'm well on the way to being pleasantly inebriated on fine single malt whisky and I don't want to be doing risky operations on my precious data while in this state.
Title: Re: OpenBSD
Post by: Lord Dave on November 21, 2014, 01:36:10 PM
I have now shrunk my Linux partition to make room for a new OpenBSD partition. This weekend, I plan to attempt a delicate manoeuvre, involving running a Linux VM on OpenBSD and syncing files from the VM to the host. This will enable me to migrate files from a Linux encrypted volume to an OpenBSD encrypted volume without them ever touching an unencrypted filesystem.
Why?
Just unhook your network cable and transfer the data then.  Any data that gets onto an unencrypted spot on your HDD will be unrecoverable after a month.  So unless you have a pressing need to worry about being discovered in a month, why would you go to all the effort?
Title: Re: OpenBSD
Post by: jroa on November 21, 2014, 01:43:33 PM
What?
Title: Re: OpenBSD
Post by: xasop on November 21, 2014, 01:54:55 PM
What?
Title: Re: OpenBSD
Post by: beardo on November 21, 2014, 02:24:56 PM
Lord Dave saves the day yet again!
Title: Re: OpenBSD
Post by: Lord Dave on November 21, 2014, 02:36:21 PM
What?

*sigh*
Why are you concerned about your encrypted data never touching an unencrypted filesystem?
Title: Re: OpenBSD
Post by: xasop on November 21, 2014, 02:49:37 PM
Why are you concerned about your encrypted data never touching an unencrypted filesystem?

For the same reason I encrypted my data in the first place: It's my data and I don't want anyone else being able to access it. But also, because it's an interesting challenge.
Title: Re: OpenBSD
Post by: Lord Dave on November 21, 2014, 02:59:47 PM
Why are you concerned about your encrypted data never touching an unencrypted filesystem?

For the same reason I encrypted my data in the first place: It's my data and I don't want anyone else being able to access it. But also, because it's an interesting challenge.
So I get the second one but wouldn't any data that got written temporarily to an unencrypted file system be overwritten soon enough to not have to worry about anyone being able to read it?(by using recovery tools)
Title: Re: OpenBSD
Post by: xasop on November 21, 2014, 03:09:57 PM
So I get the second one but wouldn't any data that got written temporarily to an unencrypted file system be overwritten soon enough to not have to worry about anyone being able to read it?(by using recovery tools)

That depends on whether I use the unencrypted disk I put it on temporarily afterwards. Since I have no near-future plans to reuse that current disk, I'd have to wipe it myself, which is a hassle.
Title: Re: OpenBSD
Post by: Lord Dave on November 21, 2014, 03:11:28 PM
So I get the second one but wouldn't any data that got written temporarily to an unencrypted file system be overwritten soon enough to not have to worry about anyone being able to read it?(by using recovery tools)

That depends on whether I use the unencrypted disk I put it on temporarily afterwards. Since I have no near-future plans to reuse that current disk, I'd have to wipe it myself, which is a hassle.

Oh its a whole disk and not just temp storage?  Then I understand.
Title: Re: OpenBSD
Post by: xasop on November 21, 2014, 07:54:46 PM
I somewhat have Linux booting as a VM in OpenBSD. I ended up just booting my existing Linux installation instead of creating a new one, which has some interesting side effects. First, there's a whole bunch of stuff it doesn't do correctly on boot due to being in slightly different hardware. Second, I go through the same bootloader in the VM as I do on my physical machine, which means I need to be very careful not to tell GRUB to boot OpenBSD, otherwise I'll be running the same OS installation inside itself.

I'm tired enough that I don't trust myself to proceed any further today, so I'll begin working on actually migrating shit tomorrow.
Title: Re: OpenBSD
Post by: xasop on November 21, 2014, 08:06:38 PM
I'm tired enough that I don't trust myself to proceed any further today, so I'll begin working on actually migrating shit tomorrow.

I lied. I'm currently performing a pvmove of my data off my primary hard drive, and onto a combination of my backup hard drive and my external USB drive. I'll leave that for a while, and then I can boot into OpenBSD and reformat my primary drive, ready to move stuff onto it.
Title: Re: OpenBSD
Post by: juner on November 21, 2014, 10:38:47 PM
I installed OpenBSD in a VM. It works.
Title: Re: OpenBSD
Post by: xasop on November 22, 2014, 05:22:53 PM
My primary hard drive has been 99.4% emptied. It's almost time to shut down Debian for the last time.
Title: Re: OpenBSD
Post by: Lord Dave on November 22, 2014, 05:24:51 PM
My primary hard drive has been 99.4% emptied. It's almost time to shut down Debian for the last time.

Until you find you need it one day.
Title: Re: OpenBSD
Post by: xasop on November 22, 2014, 06:22:47 PM
I ran into a problem, viz. 4 TB hard drives showing up as 2 TB in a Linux VM on OpenBSD. OpenBSD itself sees them as 4 TB, so I suspect a QEMU bug.

In any case, I'm back in Debian for now so I can do a bit more data shuffling to get all the data I need access to within the first 2 TB of each drive. Then I can reboot to OpenBSD and do the copy.
Title: Re: OpenBSD
Post by: Thork on November 22, 2014, 08:57:39 PM
Yuck. You know what works right out of the box? Windows.

Title: Re: OpenBSD
Post by: Lord Dave on November 22, 2014, 08:59:46 PM
Yuck. You know what works right out of the box? Windows.
Not always.
Title: Re: OpenBSD
Post by: xasop on November 22, 2014, 09:03:31 PM
Yuck. You know what works right out of the box? Windows.

Why don't you tell me how well migrating just over 2 TB of encrypted data between Windows and any other OS works, Thork? You know, given that that's what I'm currently doing, and not dealing with either OS "not working".
Title: Re: OpenBSD
Post by: xasop on November 22, 2014, 10:13:53 PM
Well, that's done. Let's try this again.
Title: Re: OpenBSD
Post by: xasop on November 22, 2014, 10:47:48 PM
I now have my Linux system successfully booted as a VM on OpenBSD, running rsync inside to copy files over a virtual network to my OpenBSD system.

It's always nice starting clean:

Code: [Select]
-bash-4.3$ df -h /newhome/
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/sd4d      3.6T    470M    3.4T     0%    /newhome
Title: Re: OpenBSD
Post by: xasop on November 23, 2014, 03:25:10 PM
Due to reasons, my USB audio device doesn't work correctly in OpenBSD. The technical reason for it is slightly complicated, and is a result of three concurrent conditions:


Hopefully I can work my way around the OpenBSD kernel and the USB 2.0 spec well enough to fix this. For now, I've managed to work around the problem by connecting my audio device to my Lemote Yeeloong and starting up sndiod(1) (http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-5.6/man1/sndiod.1) on the Yeeloong, configured to listen on a TCP port. Thanks to sndiod's network audio support, I can now seamlessly play audio by using the remote sndiod on my Yeeloong as my default audio device on my desktop.
Title: Re: OpenBSD
Post by: xasop on June 19, 2015, 06:36:45 PM
So, given that the bug that caused me to abandon this effort is now fixed, I've restarted this migration, with some important differences:

 - I'm reusing my old 2 TB hard drives as temporary storage instead of a USB drive, which seems to be performing better.
 - I'm running OpenBSD as a VM inside Linux rather than vice versa, which both allows me to continue to use Linux until OpenBSD is ready, and performs better due to Linux's support for VT-x.
 - I'm copying files over an NFS mount instead of hacking an SSH-based solution on top of what is already a fairly clumsy hack.

Hopefully, my data should be fully copied over to OpenBSD by the end of the weekend. I still need to figure out what to do with my backups before I commit to migrating, though.
Title: Re: OpenBSD
Post by: xasop on June 20, 2015, 06:27:09 PM
I now have automated boot working with NFS mounts from an OpenBSD VM on Linux. The way it works is thus:

1. I boot and enter my passphrase to decrypt my Linux storage.
2. Before my login prompt comes up, a console VNC client starts attached to my OpenBSD VM so I can enter my passphrase to decrypt OpenBSD's storage.
3. A script waits for OpenBSD to come onto the network and start listening for NFS connections before allowing the NFS mounts to proceed.
4. Everything continues as normal, except all my files are now on OpenBSD.

Of course, OpenBSD boots work as normal without any of this, and I still have access to the same files. I rule.
Title: Re: OpenBSD
Post by: xasop on June 21, 2015, 08:06:29 AM
I am now running Linux with /home mounted over NFS. I had to put somewhat more things than expected onto local storage in order to get decent performance, and I can't watch Stargate over NFS, but we'll see how things go otherwise. Hopefully I won't be booted into Linux very often from now on.

Time to try a reboot and see if things all shut down and come back up as expected.
Title: Re: OpenBSD
Post by: xasop on June 21, 2015, 03:07:01 PM
First post from my new OpenBSD installation!

Code: [Select]
steven@vader:~$ uname -a
OpenBSD vader.steven-mcdonald.id.au 5.8 GENERIC.MP#1078 amd64
Title: Re: OpenBSD
Post by: xasop on July 06, 2015, 01:03:07 AM
I have finally finished migrating the last part of my data (my backups) from Linux to OpenBSD. I can now pare back my Linux installation to the things I really need it for; Steam and Ardour, mainly. The latter will stop being required after I write a port of the latest Ardour for OpenBSD.

It's been fun.
Title: Re: OpenBSD
Post by: xasop on August 09, 2015, 07:54:37 AM
I'm copying some old backup increments over to the OpenBSD backup drive, something I've been meaning to do for a while. This will mean I can remove my old 2 TB hard drives from my computer again and reconnect my optical drive (my power cables aren't long enough to reach 5 SATA drives and the optical drive at the same time).

Also, due to the less efficient way incremental backups are done on OpenBSD's filesystem, I now have less than 1 TB free space on my backup drive. I'll probably upgrade to one of Seagate's new 8 TB drives (http://www.pccasegear.com/index.php?main_page=product_info&cPath=210_344&products_id=30965) for backups at some point in the next year or so.
Title: Re: OpenBSD
Post by: Fortuna on August 10, 2015, 08:32:19 AM
Virtualization is the thing I love most about technology. Just thinking about it makes me feel all giddy.