Sunday, July 28, 2019

-currently in NetBSD 8.99...

===> Summary of results:
         build.sh command:    ./build.sh -j 4 -u -x -X /usr/xsrc release sets sourcesets iso-image-source
         build.sh started:    Sun Jul 28 10:03:40 UTC 2019
         NetBSD version:      8.99.51
         MACHINE:             amd64
         MACHINE_ARCH:        x86_64
         Build platform:      NetBSD 8.99.51 amd64
         HOST_SH:             /bin/sh
         MAKECONF file:       /etc/mk.conf
         TOOLDIR path:        /usr/src/obj/tooldir.NetBSD-8.99.51-amd64
         DESTDIR path:        /usr/src/obj/destdir.amd64
         RELEASEDIR path:     /usr/src/obj/releasedir
         Updated makewrapper: /usr/src/obj/tooldir.NetBSD-8.99.51-amd64/bin/nbmake-amd64
         Successful make release
         Building sets from pre-populated /usr/src/obj/destdir.amd64
         Built sets to /usr/src/obj/releasedir/amd64/binary/sets
         Successful make sourcesets
         Successful make iso-image-source
         build.sh ended:      Sun Jul 28 13:39:36 UTC 2019
===> .

...time's wonky because I didn't set the timezone properly; but it took 3.5 hours to (re)build NetBSD-current from NetBSD current in VirtualBox 6.


Sunday, July 7, 2019

Setting up FreeBSD 12 in Virtualbox 6, 2019

VirtualBox has come a long way since I started using it 11 years ago!

In that time, FreeBSD has put in a lot of spit and elbow grease and make the process of using it as a guest operating system pretty smooth for a BSD.

FreeBSD has also switched package systems in that time too -going from the aging pkg_* tools to using the newly written pkgng system.

I don't write often because I have settled into a pretty dull routine; WSL, or Mint, and the occasional NetBSD vm, with some retrocomputing mixed in from time to time. Nothing worth writing about, honestly.

Frustrated with trying to compile an update for NetBSD, I decided to take FreeBSD out for a spin. While I do play with FreeBSD from time to time (not as much as Net) I hadn't really taken a very close look at how well it works with VMs these days.

For the most part I've worked with connecting to my VMs with ssh, and hacking together decent resolutions either with Mate's tools or custom xorg.confs. Not wanting to take excessive amounts of time waiting for compiles and being curious, I just dove right in to pkgng, Virtualbox, and Mate.

I created a FreeBSD 12/amd64 virtual machine and ran through the installation from iso -nothing major there.

After that was set up, I got pkgng to work. That simply meant running pkg and then "pkg update"

From there I installed the xorg, virtualbox-ose-additions, mate and slim packages. Later I found I needed to add fuse, though I'm not sure what for at this point -mounting, maybe?

So ...pretty simple so far; after that some configuration needs to take place.

For slim, you need something in ~/.xinitrc. Since I'm running Mate I only have one line in mine:
exec mate-session

For virtualbox I've added the following to /boot/loader.conf:

fuse_load="YES"

And I made the following changes to /etc/rc.conf to get everything working:

dbus_enable="YES"
hald_enable="YES"
slim_enable="YES"
vboxguest_enable="YES"
vboxservice_enable="YES"


I've also set up codeblocks, firefox and vlc as well.

I used Mate's hardware tool (graphics) to set up a decent resolution and saved it as a local user. I wasn't able to save it globbally, which is annoying but I can cope with. I don't have sound working, but I'm confident I'll get it if I ever need it.

My middle mouse button works, though -so FreeBSD already has one over on Mint.

I wasn't able to get shared folders to mount, but I found a nice post on the FreeBSD forums that gave me the following line:

sudo mount -t vboxvfs -o rw,gid=1001,uid=1001 vmshare $HOME/windowsDir

Change the share ("vmshare") name and the destination and it works just fine, albeit a little "ghetto" for 2019.

I had a NetBSD VM set up for my retrocomputing (simh) environment -still have it, actually -but I think I'll set this up too, and maybe even try recompiling a system from scratch sometime in the future.

One thing I'll make a note of -I tried the same set-up with vmware player but couldn't set the resolution above 1280. Installed their tools, did some things I found on the google -none of it worked so I went back to my VB VM ...which did.

Saturday, January 20, 2018

The missing bits

Way way
Back back in the day, BSD was poised to take over the world.

But unexpectedly they smacked the bear on the nose and wound up in a year's long lawsuit which put the future of BSD in peril. 

In the end, everything was resolved with USL asking the CSRG (those responsible for BSD) to create a redacted release. This release was missing a few files and could not be compiled into a working release.

The open source projects (NetBSD, FreeBSD) scrambled to replace the missing parts and eventually released legally clean and unencumbered versions of their BSD-based operating systems.

Several years later, "historic unix" was released openly by Caldera (before they became the SCO group?), which put the formerly contested files out into the open.

A couple of years later, in 2004, a list of the contested files was released by Groklaw.

Here is the list, as far as I'm able to piece together:

Six Missing Header Files:

sys/sys/buf.h
sys/sys/proc.h
sys/sys/shm.h
sys/sys/tt y.h
sys/ufs/dinode.h
sys/ufs/inode.h

“Restricted Files” (26 files):

sys/kern/init_main.c
sys/kern/kern_clock.c
sys/kern/kern_exec.c
sys/kern/kern_exit.c
sys/kern/kern_physio.c
sys/kern/kern_sig.c
sys/kern/kern_synch.c
sys/kern/subr_rmap.c
sys/kern/sys_generic.c
sys/kern/sys_process.c
sys/kern/sysv_shm.c
sys/kern/tty.c
sys/kern/tty_subr.c
sys/kern/vfs_bio.c
sys/kern/vfs_syscalls.c
sys/sys/buf.h
sys/sys/proc.h
sys/sys/shm.h
sys/sys/tty.h
sys/ufs/dinode.h
sys/ufs/inode.h
sys/ufs/ufs_bmap.c
sys/ufs/ufs_disksubr.c
sys/ufs/ufs_inode.c
sys/ufs/ufs_vnops.c
usr.bin/cpio/cpio.c
 

Thursday, November 23, 2017

Long time, no nix!

Actually, that's not exactly true. I've been playing with the usual things and not really treading any new ground to speak of.

I've been playing off-and-on with NetBSD 8 in a virtualbox VM since May.

It's gotten a lot better (from my point of view). It's almost nearly useable as a replacement for Mint 18 ...almost. The performance isn't really there.

...and it wouldn't be, since there are no guest additions.

There are two tricks I've learned that makes life in VB a lot better for NetBSD 8:

1)SetExtras;
From the hosts' commandline:

VBoxManage setextradata $VMNAME CustomVideoMode1 1920x1080x16 

The "x16" is important. Your instinct will be to choose a color depth of 24, but it won't work. 16 will.

2)Use a custom xorg.conf in the guest:

I'm still working on this (is there a way to make Xorg see more ram? There's gotta be!), but this is what I have to date:
Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
    ModulePath   "/usr/X11R7/lib/modules"
    FontPath     "/usr/X11R7/lib/X11/fonts/misc/"
    FontPath     "/usr/X11R7/lib/X11/fonts/TTF/"
    FontPath     "/usr/X11R7/lib/X11/fonts/Type1/"
    FontPath     "/usr/X11R7/lib/X11/fonts/75dpi/"
    FontPath     "/usr/X11R7/lib/X11/fonts/100dpi/"
EndSection

Section "Module"
    Load  "dri"
    Load  "dri2"
    Load  "glx"
    Load  "shadow"
EndSection

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "kbd"
EndSection

Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "mouse"
    Option        "Protocol" "wsmouse"
    Option        "Device" "/dev/wsmouse"
    Option        "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
    Identifier   "Monitor0"
    VendorName   "Monitor Vendor"
    ModelName    "Monitor Model"
    HorizSync    31-80
    VertRefresh  30-100
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: : integer, : float, : "True"/"False",
        ### : "String", : " Hz/kHz/MHz",
        ### : "%"
        ### [arg]: arg optional
        #Option     "ShadowFB"               # []
        #Option     "DefaultRefresh"         # []
        #Option     "ModeSetClearScreen"     # []
    Identifier  "Card0"
    Driver      "vesa"
    BusID       "PCI:0:2:0"
EndSection

Section "Screen"
    DefaultDepth 16
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
    SubSection "Display"
        Viewport   0 0
        Depth     16
    EndSubSection
#    SubSection "Display"
#        Viewport   0 0
#        Depth     24
#        Modes     "1920x1080"
#    EndSubSection
EndSection
I've also found that setting RAM between 4G and 6G is needed for larger apps (CLang, GCC) to finish compiling.




I've managed to compile xfce4 and MATE; Mate works well enough to use as a desktop.

Most applications I've tried so far work, with some exceptions:
1)Firefox "nightly" randomly crashes.
2)Codeblocks stalls and never completely starts
3)htop doesn't seem to report free RAM correctly
4)closing apps sometimes crashes MATE
5)vlc player doesn't handle videos as well as gnome-mplayer (it's unwatchable).

Again, it's very much a case of "so near and yet so far". All said and done though, after three days of compiling everything (source, pkgsrc) I have a reasonably functional desktop with most of the comforts of home.

NetBSD 8 is still in beta, of course -and it shows. But I'm having better luck with it and pkgsrc (under virtualbox) than I have with NetBSD 7.x, so I'm optimistic this will be a keeper once it's done!

Wednesday, May 10, 2017

LFS once more

I've got nothing terribly exciting going on with virtual machines right now. No itches to scratch.

What I do have is my old computer and it's gathering dust; along with some external USB hard drives.

 I tried Linux From Scratch before. I compiled everything, booted but there were configuration weirdnesses.

I'm going to do something different this time.

This time I'm going to boot and work from the Mint 18 usb disk, use the external HD as a download and work area ($LFS) and have sda set as my target.

If this works, this should make things a LOT easier than trying to split up one hard drive between Mint and LFS.

I'll post my results if I get any!

Wednesday, March 8, 2017

Back to Virtual NetBSD


I was mistaken in my last post about Openindiana. It appears to compile, but never reaches the point where the final packages are made. It's probably a problem with my sunstudio setup -I don't feel like chasing it down when there's alternatives to play with.

I'm very fond of NetBSD -have been for fifteen or so years now.

Sadly, for nine and a half years I haven't been able to get it to work with real hardware. At first it didn't like my sata drives (in a computer now long-since gone), these days it doesn't like my wifi or my wireless mouse.

...thank God for virtualization, huh?

make release started at:  Wed Mar  8 00:49:50 AKST 2017
make release finished at: Wed Mar  8 02:16:35 AKST 2017
===> Successful make release
===> build.sh ended:      Wed Mar  8 02:16:35 AKST 2017
===> Summary of results:
         build.sh command:    ./build.sh -x -j 6 -r release
         build.sh started:    Wed Mar  8 00:49:44 AKST 2017
         NetBSD version:      7.1_RC2
         MACHINE:             amd64
         MACHINE_ARCH:        x86_64
         Build platform:      NetBSD 7.1_RC2 amd64
         HOST_SH:             /bin/sh
         No $TOOLDIR/bin/nbmake, needs building.
         Bootstrapping nbmake
         MAKECONF file:       /etc/mk.conf
         TOOLDIR path:        /usr/src/obj/tooldir.NetBSD-7.1_RC2-amd64
         DESTDIR path:        /usr/src/obj/destdir.amd64
         RELEASEDIR path:     /usr/src/obj/releasedir
         Removing /usr/src/obj/tooldir.NetBSD-7.1_RC2-amd64
         Removing /usr/src/obj/destdir.amd64
         Created /usr/src/obj/tooldir.NetBSD-7.1_RC2-amd64/bin/nbmake
         Updated makewrapper: /usr/src/obj/tooldir.NetBSD-7.1_RC2-amd64/bin/nbmake-amd64
         Successful make release
         build.sh ended:      Wed Mar  8 02:16:35 AKST 2017
===> .
 tldr; it only takes an hour and a half to rebuild NetBSD on my i5. Not too shabby.

The next task is to build firefox, fluxbox and some other packages that make life under NetBSD easier.

I love the fact I can set this up to build on another computer and do things on my desktop while it runs. It's a lot better than doing everything all on one -it's almost decadent!

Friday, March 3, 2017

Home VM projects

A few months ago (Oct 2016) I got a second desktop as insurance in case my older one dies (it's well past warranty).

The first thing I did was to hook them up ethernet-to-ethernet with a crossover cable. The new computer is weaker than the old one, so I am slowly setting up the old one as a combination router and build machine.

I've done a couple of things with Virtualbox. The first was to create a Windows VM to use for Poser 11; it seems to work OK but I haven't played with it a lot. The second thing was to install the extention pack and play with hooking up an old usb HD to it, and share it between computers -running FreeBSD/UEFI on it. That didn't work terribly well. Both computers could see the drive, but the FreeBSD install got confused and after a couple of sessions wouldn't boot.

I am using VB on both computers. On the weaker computer, I have a Linux VM that has a self-compiled SIMH on it. Following this tutorial ( http://gunkies.org/wiki/Installing_4.3_BSD_on_SIMH ) I was able to get 4.3 up quickly, and was delighted to find out that I could set up tap networking and ftp back and forth to the machine -though I can't get telnet to work at all. I managed to get a few old GNU things to work. I've been trying to figure out how to 'upgrade' the vax780, but no luck yet. I think I simply am missing too much training and background info that people knew back then.

 I am playing with setting up tap instances on both; on the router I have tap interfaces set up (manually) and am connecting to qemu instances running there.

Today I set up an OI kvm machine to use as a build VM. Here's my latest OI build and not much has changed, honestly...a build still takes a little over two hours.

qemu commandline;

cat bin/hipster
qemu-system-x86_64 -vga std -global VGA.vgamem_mb=256 -smp 4 -m 5G -cpu host -enable-kvm -drive file=$HOME/qemu/x86/hipster17/36G.qcow2,media=disk,if=virtio,index=0,format=qcow2 -boot c -net nic,model=e1000 -net tap,ifname=tap0,script=no,downscript=no -vnc 10.42.0.1:3399&


Output in virtual machine;

random@vipster2017:~$ cd /code/illumos-gate/
random@vipster2017:/code/illumos-gate$ time ./nightly.sh illumos.sh

real    47m39.132s
user    129m2.518s
sys     27m36.835s
random@vipster2017:/code/illumos-gate$



I ran that as a regular user in the Hipster vm, not root.

Setting up /etc/rc.local to set up tap turned out to not be the greatest idea, so I'm using that script in $HOME/bin and calling it with sudo when I need a tap interface.

So, I'm making progress in setting up a home network of computers but I have a lot of organizing left to do.

automating zfs mounts -a quick and very dirty script

 #!/bin/sh for x in obj xsrc src pkgsrc pkgsrc/distfiles pkgsrc/packages pkg         do zfs create ext/$x zfs set mountpoint=/usr/$x ext/$x ...