{"id":162,"date":"2020-05-23T13:35:11","date_gmt":"2020-05-23T12:35:11","guid":{"rendered":"https:\/\/blog.thomarite.uk\/?p=162"},"modified":"2020-05-23T13:37:29","modified_gmt":"2020-05-23T12:37:29","slug":"first-step-into-openbsd","status":"publish","type":"post","link":"https:\/\/blog.thomarite.uk\/index.php\/2020\/05\/23\/first-step-into-openbsd\/","title":{"rendered":"First step into OpenBSD"},"content":{"rendered":"\n<p>This week Job Snijders  <a href=\"https:\/\/medium.com\/@jobsnijders\/openbsd-6-7-255517d396d6\">advertised<\/a> the latest version of openbsd. I have been always a dreamer of being a hacker (like the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Swordfish_(film)\">movies<\/a>) and the best guys when I was in Uni were Linux users. I had no idea what Linux\/Unix\/BSD was at that time. At the end (by the 4th year in Uni) I managed to install Linux in my windows PC without destroying anything. And fortunately,  I have been using it since then. Learning more and still fortunately, in the last 6 years, using it everyday at work too.<\/p>\n\n\n\n<p>Still very very far away from being a hacker though \ud83d\ude42<\/p>\n\n\n\n<p>In this time, I have read a bit about the BSD vs Linux threads about licenses, security, etc. And actually I was always keen to learn a bit. In <a href=\"https:\/\/en.wikipedia.org\/wiki\/Motorola\">Motorola<\/a>, I had to use Solaris (even managed to get a certification!).<\/p>\n\n\n\n<p>So this week, I tried to setup a VM in my debian laptop for using OpenBSD 6.7<\/p>\n\n\n\n<p>I found and followed this <a href=\"https:\/\/www.cyberciti.biz\/faq\/kvmvirtualization-virt-install-openbsd-unix-guest\/\">link<\/a>, so all credits for the author.<\/p>\n\n\n\n<p>First I downloaded openbsd 6.7 (install67.iso) from <a href=\"https:\/\/mirror.exonetric.net\/pub\/OpenBSD\/6.7\/amd64\/\">here<\/a>. There are many mirrors around the world. Prepare the file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/var\/lib\/libvirt\/images# ls -ltr\ntotal 1386064\n-rwxr--r-- 1 libvirt-qemu libvirt-qemu 996671488 Apr 6 2018 debian-VAGRANTSLASH-stretch64_vagrant_box_image_9.1.0.img\n-rwxr--r-- 1 libvirt-qemu libvirt-qemu 950796288 Nov 29 23:17 centos-VAGRANTSLASH-7_vagrant_box_image_1905.1.img\n-rw-r--r-- 1 ss ss 470118400 May 21 23:23 install67.iso\nroot@athens:\/var\/lib\/libvirt\/images# chown libvirt-qemu.libvirt-qemu install67.iso\n\/var\/lib\/libvirt\/images# mv install67.iso openbsd67.iso<\/pre>\n\n\n\n<p>Now start the installation:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/var\/lib\/libvirt\/images# virt-install \\\n--name=openbsd \\\n--virt-type=kvm \\\n--memory=2048,maxmemory=4096 \\\n--vcpus=2,maxvcpus=2 \\\n--cpu host \\\n--os-variant=openbsd5.8 \\\n--cdrom=\/var\/lib\/libvirt\/images\/openbsd67.iso \\\n--network=bridge=virbr0,model=virtio \\\n--graphics=vnc \\\n--disk path=\/var\/lib\/libvirt\/images\/openbsd67.qcow2,size=40,bus=virtio,format=qcow2\n\nStarting install\u2026\nAllocating 'openbsd67.qcow2' | 40 GB 00:00:01<\/pre>\n\n\n\n<p>Something that confused my was that I was installing openbsd6.7 but the os-variant in the command <strong>must<\/strong> be obenbsd5.8. Anything else, fails.<\/p>\n\n\n\n<p>In my setup, I have virt-viewer installed so it opened up and finished the installation using that.<\/p>\n\n\n\n<p>I was surprised how quick was everything and didnt find any problem:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"632\" src=\"https:\/\/blog.thomarite.uk\/wp-content\/uploads\/2020\/05\/Screenshot-from-2020-05-23-13-03-00-1024x632.png\" alt=\"\" class=\"wp-image-163\" srcset=\"https:\/\/blog.thomarite.uk\/wp-content\/uploads\/2020\/05\/Screenshot-from-2020-05-23-13-03-00-1024x632.png 1024w, https:\/\/blog.thomarite.uk\/wp-content\/uploads\/2020\/05\/Screenshot-from-2020-05-23-13-03-00-300x185.png 300w, https:\/\/blog.thomarite.uk\/wp-content\/uploads\/2020\/05\/Screenshot-from-2020-05-23-13-03-00-768x474.png 768w, https:\/\/blog.thomarite.uk\/wp-content\/uploads\/2020\/05\/Screenshot-from-2020-05-23-13-03-00-1536x948.png 1536w, https:\/\/blog.thomarite.uk\/wp-content\/uploads\/2020\/05\/Screenshot-from-2020-05-23-13-03-00-1200x741.png 1200w, https:\/\/blog.thomarite.uk\/wp-content\/uploads\/2020\/05\/Screenshot-from-2020-05-23-13-03-00.png 1657w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n\n\n\n<p>Once I logged in, I felt useless \ud83d\ude42 I used a bit the shell and tested I could ssh from my host pc to the openbsd vm.<\/p>\n\n\n\n<p>So now, I can find a book  of openbsd for dummies and get going!<\/p>\n\n\n\n<p>So close virt-viewer and stop the VM:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/var\/lib\/libvirt\/images# virsh\nvirsh # list\nId Name State\n2 openbsd running\nvirsh #\nvirsh #\nvirsh # destroy openbsd\nDomain openbsd destroyed\nvirsh # list\nId Name State\nvirsh #\nvirsh # list --all\nId Name State\nopenbsd shut off\nvirsh #<\/pre>\n\n\n\n<p>Test we can start up again:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># virsh\nWelcome to virsh, the virtualisation interactive terminal.\nType: 'help' for help with commands\n'quit' to quit\nvirsh # list --all\nId Name State\nopenbsd shut off\nvirsh # start openbsd\nDomain openbsd started\nvirsh # list --all\nId Name State\n3 openbsd running\nvirsh # exit\n#\n# virt-viewer<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week Job Snijders advertised the latest version of openbsd. I have been always a dreamer of being a hacker (like the movies) and the best guys when I was in Uni were Linux users. I had no idea what Linux\/Unix\/BSD was at that time. At the end (by the 4th year in Uni) I &hellip; <a href=\"https:\/\/blog.thomarite.uk\/index.php\/2020\/05\/23\/first-step-into-openbsd\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;First step into OpenBSD&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-162","post","type-post","status-publish","format-standard","hentry","category-unix"],"_links":{"self":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/comments?post=162"}],"version-history":[{"count":3,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/162\/revisions"}],"predecessor-version":[{"id":166,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/162\/revisions\/166"}],"wp:attachment":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/media?parent=162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/categories?post=162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/tags?post=162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}