Showing posts with label slackware. Show all posts
Showing posts with label slackware. Show all posts

Thursday, December 5, 2019

Linux Kernel 5.4 and VirtualBox Puzzle

I've been puzzling over WHY my VirtualBox doesn't work under Linux kernel 5.4 ever since 5.4-RC1 came out.  Last week, Slackware -current made 5.4 the default kernel so I hoped all was well - NOPE!  So I compiled it myself adding in the modules that have always allowed everything to work up until 5.3.x.  That didn't work either.  Bummer.

So I did a bit of research (5 seconds of googling) and it seems there was a lot going on with VirtualBox and Linux kernel 5.4.  First there was this:

Linux 5.4 kernel will no longer make interfaces available so that arbitrary kernel modules may modify page attributes to turn the executable bit on/off. Virtualbox currently is one of such kernel modules doing that.

 Then, it seems, in 5.4-RC7 they added a special "shared folder" area for Virtualbox which was later removed

So, at this time, it seems VirtualBox and Linux kernel 5.4 are not going to play well together until a special new VirtualBox 6.1 candidate is released (designed specifically to work with VirtualBox).  So far, I cannot find this release candidate (5 seconds of googling).

That's ok, I have my box set to always my special vanilla 5.3.x (5.3.15 at the time of this writing).  I just hope this continues to get updates so I don't have to drop back to the 4.19.x LTS kernel.

If you see a release candidate for VirtualBox 6.1 post a response.  I'll do the same (so we're racing).

Monday, October 14, 2019

Slackware 14.2 Under XenServer 7.1

I've always had a networking problem with Slackware as a guest VM under Citrix XenServer (or Citrix Hypervisor, I guess is what they call it these days).  I still prefer Slackware as a desktop and so I set about solving this again recently - this time I would not be thwarted!

I ran across this article: How do I disable 8139too network driver... because lsmod lead me to search for 8139too networking module.  This was an Ubuntu article, so, I'll transmorgify it a bit for Slackware users.   The first thing it suggested was to blacklist 8139 in the modules.  Like the author of this I did not have any luck with that.  It was suggested you use the 8139cp instead (cool!  I didn't even know of its existence before this article).

# lsmod | grep 8139


This revealed 8139too in use and bound with mii, so...

# rmmod 8139too
# rmmod mii
# modprobe 8139cp
# modprobe mii
# /etc/rc.d/rc.inet1 restart

At this point, I had, for the first time ever as a Slackware XenServer guest, a working eth0!

In order to keep it (and use less resources) I created a smaller kernel /boot/initrd.gz by running mkinitrd.

# /usr/share/mkinitrd/mkinird_command_generator.sh

I appended :8130cp to the suggested mkinitrd script:

# mkinitrd -c -k 4.4.14 -f ext4 -r /dev/sda2 -m jbd2:mbcache:ext4:8139cp -u -o /boot/initrd.gz

This seemed to work nicely so I doctored up the boot area a bit:

# cd /boot
# rm System.map
# ln -s System.map-generic-4.4.14 System.map
# rm config
# ln -s config-generic-4.4.14 config

Then I added a section to the /etc/lilo.conf:

 image = /boot/vmlinuz-generic
   label = Slackware
   initrd = /boot/initrd.gz
   root = /dev/sda2
   read-only

And I always add default = Slackware before running lilo -v.

After that, I rebooted and had a Slackware install with a nice lean kernel with a eth0 running as a guest VM under Citrix XenServer (or Hypervisor - I can't get used to that!).
   

  

 

Wednesday, November 28, 2018

Codename: Ubuntu Rusty

Just call me Rusty -  with regards to Ubuntu anyway.  Man!  I can't remember how to set the IP in the old Ubuntu.  Now, 18.04 has changed yet again.  I'm a RHELish* user when I'm not using Slackware for my own personal desktop.  Don't get me wrong - Ubuntu is a fine desktop.  I used it from '04 to '09 parting ways when the Unity desktop came into play.  I did enjoy Xubuntu and then later Lubuntu but found my 5+ years of 'buntu had weakened my RHELish skills much in the way the last (nearly 10) years has mu 'buntu skills SO I switched back.  Actually, I always load Ubuntu for other people (non-Unix folks) who want to salvage an old laptop or old desktop that ran Windows 7 or something.  I've had some success stories there.  But I digress.  

This is just a place to save these commands so I don't have to hunt them up YET AGAIN.  


Changing an Ubuntu 18.04 LTS server's name

This is pretty easy.  

$ sudo hostnamectl set-hostname linuxconfig

This note is not (currently) for me: Check for the existence of /etc/cloud/cloud.cfg and change preserve_hostname: false to preserve_hostname: true

Changing the static IP of an Ubuntu 18.04 LTS server

This is no longer in the /etc/network/interfaces.  Instead look in /etc/netplan (sudo -s first or it will not auto-complete leading me to believe it didn't exist).  The file is 50-cloud-init.yaml.

That is all I have to say since this note is mainly for me.  Hopefully I'll know what else to do when I need this information again. 



---
*RHELish (pronounced "relish") is the term I coined for Red Hat -like based systems such as (of course) Red Hat Enterprise Linux, CentOS, Scientific Linux and Oracle Linux. 

Tuesday, November 28, 2017

Slackware14.2-current, VirtualBox and new kernels

I keep blowing up my Slackbuild VirtualBox setup with every new kernel update.  Usually, I can just re-run the Slackbuilds for virtualbox-kernel and virtualbox (with a re-boot in between) and I'm fine. Not today. Tried all kinds of things. Then got weird. I was running the Slackbuild for VirtualBox 5.0.40. I decided to just skip package management and go straight to the source (hey, I'm a Slacker). So, I went to the Oracle Virtualbox site and found this link and then, from the command line ran the following:


curl -O http://download.virtualbox.org/virtualbox/5.2.2/VirtualBox-5.2.2-119230-Linux_amd64.run
sh VirtualBox-5.2.2-119230-Linux_amd64.run

Lots of things works, lots of things complained about symbolic links already existing (step 1 of this script attempted to remove my Slackbuild VirtualBox with, I'd say, partial success), and then it ended on "unable to start kernel drivers". Not a good sign I thought. Just for luck, another reboot. And then, I re-ran "rc.vboxdrv start" AND IT WORKED! So now I'm running 5.2.2!!

So, I fire up an ALL NEW Oracle VirtualBox with lotsa Oracle branding (hmmm... didn't remember all of that). I attempt to start my Windoze VM - no go. It complains about USB 2.0 support not being there and suggests I try installing extensions.

Implementation of the USB 2.0 controller not found!

Because the USB 2.0 controller state is part of the saved VM state, the VM cannot be started. To fix this problem, either install the 'Oracle VM VirtualBox Extension Pack' or disable USB 2.0 support in the VM settings

I re-run extensions. Still no go. So, I retro my VM's USB support from 2.0 to 1.1 (trying to think how often I use USB with a VM anyways?) AND IT WORKED! 


Ok, not the slickest solution in the world. The installer did something with Python bindings, from what I could tell, installed some things, fixed some things, possibly broke my USB 2.0 support but otherwise bailed me out.

So, if you're desperate - you're welcome.

Friday, August 5, 2016

Slackware and LXC

I have a fresh Slackware 14.2 I've been enjoying since it came out this month.  I needed a hyper-visor and was getting ready to add Xen (the hyper-visor of choice on Slackware).  I like Xen, but I knew the compile times for the Slackbuilds and it's dependencies would probably take more time than I had at the moment.  Then I remembered LXC.  It comes with.

I didn't know much about LXC so did some quick reading.  They say "it's similar to Docker but easier" - I like the sound of that.  So I check it out.  It's EXACTLY like Solaris containers!  Which I've been using for over 10 years - but, again, easier!  It's pretty slick!  And it installs by default on Slackware 14.2 but there's a few things you need to change.

ON THE HOST

Edit the /etc/rc.d/rc.inet1.conf

Slackware does not have a bridged network device by default BUT it does have it defined and commented out.  I found this works nicely except I was expecting my host interface to use eth0 and lxc guest to use br0.  It was not what I expected but it works fine!

# Example of how to configure a bridge:
# Note the added "BRNICS" variable which contains a space-separated list
# of the physical network interfaces you want to add to the bridge.
IFNAME[0]="eth0"
BRNICS[0]="br0"
#IPADDR[0]=""
#NETMASK[0]=""
USE_DHCP[0]="yes"
#DHCP_HOSTNAME[0]=""

Routing = Yes

You will, of course, need your host to route packets so

# chmod 755 /etc/rc.d/rc.ip_forward

And then start it or restart.  I like to restart to make sure everything is the way it needs to be before relying on it.  You could also just

# echo 0 > /proc/sys/net/ipv4/ip_forward


LXC Config

Really the only other thing you need to do is add a bit to /etc/lxc/default.conf.  This worked for me:

root@slacks:~# cat /etc/lxc/default.conf
lxc.network.type=veth
lxc.network.link=br0
lxc.network.flags=up

ON THE LXC GUEST

Just run netconfig and set a static address or DHCP and then restart rc.inet1.  

WHAT LXC GUEST?!!

Oh, I skipped that bit, eh?  Super simple.  Try this:
  
# lxc-create -n lxcguest -t /usr/share/lxc/templates/lxc-slackware
# lxc-start -n lxcguest -d
# lxc-console -n lxcguest  (it'll tell you how to login)

Now, run netconfig.  

What?!  You're already running Slackware on the host and you'd like to try something different?  Just run list the contents of  /usr/share/lxc/templates and then try one or a dozen of the other 18 pre-installed templates.  Like:

root@slacks:~# ls /usr/share/lxc/templates
lxc-alpine*     lxc-cirros*    lxc-openmandriva*  lxc-sparclinux*
lxc-altlinux*   lxc-debian*    lxc-opensuse*      lxc-sshd*
lxc-archlinux*  lxc-download*  lxc-oracle*        lxc-ubuntu*
lxc-busybox*    lxc-fedora*    lxc-plamo*         lxc-ubuntu-cloud*
lxc-centos*     lxc-gentoo*    lxc-slackware*



If you down like any of those, try something else with this command:

# lxc-create -t /usr/share/lxc/templates/lxc-download -n newguest

You will be given an even bigger choice.  Knowing Slackware and how stable it is, I would stay with the local choices to ensure that legendary stability stays as is (but that's just me). 


THE END

Well, that's all of my notes.  Postive comments and any kind of experiences with LXC are always welcome below.  

Tuesday, December 22, 2015

It's a good time to be a Linux sysadmin!

Linux is everywhere now.  It's on my TV, on my Roku, it's the firmware running my SAN hardware, it's the OS behind all of our virtualization platforms. If you know me, you know my technology passions are for Linux, Perl and pretty much anything running open source.  I started using Linux about 1993/94 when I downloaded SLS from GEnie over my 2400 baud modem.  It was kernel 0.99p11.  It booted Linux and ran off of floppy.  Later, I got a larger copy from GEnie using work's 9600 baud connection.  I had to dialup Indy to get a speed that fast!

Later, when Windows 95 came out, I started running Linux as my desktop and I've stuck with it.  I remember that the guys in my office would always reboot their Windows 95 systems at lunch as a preventative measure to prevent accidental lockups.  One time, just prior to lunch, I distinctly remember Ken yelling "Oh  no!  It locked up and I've been working on that spreadsheet for an hour!" I typed "w" to get my uptime:

[rat@localhost Desktop]$ w
 16:39:19 up 99 days,  8:14,  4 users,  load average: 0.25, 0.25, 0.27


Ha!  They can't keep their desktop up half a day - mine's been up for 99 days and still going.  I think to myself: "Linux - I think I'll keep it."

It's been over 20 years.  I can remember telling someone I worked on Unix and Linux systems.  "Ah, a niche OS, eh?"  "Niche?"  Not really.  Unix/Linux was running the Internet before these guys knew there was an Internet.  It's always been the one to run DNS, web servers, DCHP servers, NTP (time protocol), etc.  It ran all the SMTP (mail) and SNMP (network and hardware monitoring).  Linux WAS the back office of any decent sized IT shop. 

Later, Apple forked BSD Unix into its operating system OSX.  Now Apple was Unix!  I was very much at home on the Apple OSX command line.  Everything was there: Bash shell, Perl, and all the core Unix commands.  Pretty cool. 

Next came Windows PowerShell.  So many of the commands were aliased to bash commands that I was once again at home.  I really like Windows 2012 R2 Core and PowerShell.  Each new version of PowerShell adds more and more bash-like aliases.

And now, Microsoft Azure Cloud Services has dozens of versions of Linux you can deploy in their cloud service.  One estimate was that over 75% of the virtual machines in Microsoft Azure Cloud Service were Linux.  Even better - Microsoft runs AZURE on Linux!!  What's more, the Azure services SDK client also runs on Linux!  It was pretty freaky seeing bash scripts with a Microsoft license boiler plate on them.  And now the Office 360 is coming to Linux!

It's not a niche!  It's not going away.  I'd say that, without fan fare, Linus' OS has finally won.  I saw the future 20 years ago.  It is Linux!!

Merry Christmas everyone!

P.S. Don't forget - Linux is the OS running Android phones and the Raspberry Pi.

References:
http://www.wired.com/2015/09/microsoft-using-linux-run-cloud/

Friday, April 26, 2013

Slackware 14 under Xen

I have tried (halfway) to get Slackware to run under Xen (which I run on 32 bit CentOS 5.x).  It never seems to have a working network.  This time, I took a (very) little amount of time to fix this.  Googling resulting only in running Xen on Slackware.  I couldn't find anything on this problem.  I love to load each new distro that comes out but I really enjoy just using Slackware (SLS was my first distro).  So, when Slackware would repeatedly come up without a network interface, I was disappointed and a bit surprised.  If you're having this issue - here one possible fix:   Use a virtual Ethernet and do NOT use the default hypervisor network interface.  Instead, use "ne2k_pci".  I intend to try to get the shared physical interface to work with a real outside address and even test the other options under the virtual Ethernet.  But, this solved my problem.  If anyone else tries these, I'd love the hear the results.

Monday, December 14, 2009

I can't believe this actually worked!

I'm using Slackware 13 with XFCE. Love how fast and stable it is! But, I'm not much of a KDE fan. Especially KOffice - yuckko! So, I tried to install OpenOffice. It wouldn't compile due to some missing libraries and with the way Slackware is, getting the dependencies looked hopeless. Then I ran across this link: How do I install OpenOffice.org on Slackware? It was for OO 2 but I tried it anyway. I unpacked the OO 3 tar.gz, changed into the RPMS dir anbd ran the Slackware "rpm2tgz" tool. Then, unlike the instructions, I went crazy and just ran "pkgtool" on the whole directory. And it worked! So far, so good. No instabilities - but I'll post a reply to this if it blows up. Wish me luck!