apt get life

Life around technology

  • Technology
    • Guides
    • Linux
    • Development
      • Laravel
    • Misc
    • Raspberry Pi
  • Writing
  • Crafts
    • Crochet
    • Model Making
    • Painting
  • Privacy Policy
You are here: Home / Archives for Technology / Linux

Linux Mint Docker “Error loading docker apparmor profile”

2015/07/30 by sudo

I’ve recently been experimenting with Docker containers, but found there’s an error with installing it on Linux Mint:

2015/07/30 14:00:53 WARNING: Your kernel does not support cgroup swap limit.
Error loading docker apparmor profile: exec: "/sbin/apparmor_parser": stat /sbin/apparmor_parser: no such file or directory ()

It’s quite easy to solve, you just have to install app-armour:

sudo apt-get install apparmor

Then start the docker demon from the terminal to make sure it’s loading okay:

sudo docker -d

You should see something similar to the following:

2015/07/30 14:07:14 docker daemon: 1.0.1 990021a; execdriver: native; graphdriver: 
[67068605] +job serveapi(unix:///var/run/docker.sock)
[67068605] +job initserver()
[67068605.initserver()] Creating server
2015/07/30 14:07:14 Listening for HTTP on unix (/var/run/docker.sock)
[67068605] +job init_networkdriver()
[67068605] -job init_networkdriver() = OK (0)
2015/07/30 14:07:14 WARNING: Your kernel does not support cgroup swap limit.
2015/07/30 14:07:14 Local (127.0.0.1) DNS resolver found in resolv.conf and containers can't use it. Using default external servers : [8.8.8.8 8.8.4.4]
Loading containers: : done.
[67068605.initserver()] Creating pidfile
[67068605.initserver()] Setting up signal traps
[67068605] -job initserver() = OK (0)
[67068605] +job acceptconnections()
[67068605] -job acceptconnections() = OK (0)

 

Once it loads this far, you can use ctrl + c to exit and start the service. If you have any further errors you’ll need to investigate further. Then start the service using:

sudo service docker.io start

Filed Under: Linux, Technology

Setting up a Buildroot Environment on Ubuntu or Mint

2015/07/16 by sudo

I’ve got a project that requires really fast boot times, so I’ve been looking into buildroot, which is a tool for building embedded Linux systems. When I started playing with the tutotials I noticed that I was getting errors with the make menuconfig command:

make menuconfig

...

/development/rpi_buildroot/buildroot/output/build/buildroot-config/conf.o
 *** Unable to find the ncurses libraries or the
 *** required header files.
 *** 'make menuconfig' requires the ncurses libraries.
 *** 
 *** Install ncurses (ncurses-devel) and try again.
 *** 

In order to use buildroot on Ubuntu or Linux Mint the following packages need to be installed:

sudo apt-get install build-essential ncurses-base ncurses-bin libncurses5-dev dialog

After which you should be able to run make menuconfig without errors.

 

Filed Under: Linux, Technology

Solving Debian 8 Jessie resolv.conf update issues

2015/06/18 by sudo

With Debian Jessie, resolv.conf, which stores the name servers for the computer to use when looking up DNS requests, seems to automatically reset every so often. This results in the DNS lookup time for each request sent through the proxy to take longer if the name servers listed are not accurate or fast. For example, my resolv.conf file contained the following by default:

nameserver 192.168.0.1

The IP address listed is that of the router, which for some reason was taking an age to actually respond to requests. Originally I tried to edit this file by hand but it kept clearing itself back to default. This seems to be a particular issue in Debian Jessie.

To resolve the problem, I installed resolvconf, which is a program which has been designed to update the systems information about name servers.

apt-get install resolvconf

Once installed it’s easy enough to add the new name servers to the configuration file. I chose Google’s as a test, since they’re likely to be fast.

nano /etc/resolvconf/resolv.conf.d/head

In the file I added the two IP v4 name servers for google so that it looked like this:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
nameserver 8.8.4.4

Now that is in there, and of course you can change the name servers as you see fit, it’s just a case of running the update to resolvconf

resolvconf -u

Now your /etc/resolv.conf file should have your two lines prepended to it. Since the file works in top down priority your new requests will be sent to 8.8.8.8 by default. After implementing this Squid increased in speed significantly.

 

You may also be interested in reading alternative solutions on this particular thread at unix.stackexchagne.com.

 

 

Filed Under: Guides, Linux Tagged With: debian, debian jessie, nameservers, resolv.conf

Recommended starter hosting providers for 2014

2014/09/06 by sudo

These are my recommended hosting providers of 2014, all of whom offer Linux machines running Ubuntu or Debian:
Linode offer a wide range of VPS solutions in multiple locations. They have a good community behind them with some great tutorials. Their control panel makes things easy to manage too. There are pay-more additions like load balancers so if you think you’re going to grow your sites quickly or get lots of traffic it’s worth going with them as a more mature hosting provider.

Digital Ocean have been making a big name for themselves in the past year. Their machines are much faster than a traditional VPS as they’re an SSD only hosting provider, so no old spinning disks to slow things down. They have a wide range of tutorials and Q&A sections on their site which are growing rapidly. The web interface is easy to use, but I’m not too keen on the spin-up process yet as they insist on providing you a password via email.

Bytemark offer a cloud platform similar to both Linode and Digital Ocean. They’re a smaller team based in the UK and the platform is still maturing, but Bytemark are always my first port of call for hosting services. They sponsor many open source events and projects, and even offer hosting to the Debian project.

Filed Under: Linux, Technology, Uncategorized Tagged With: hosting, Linux

Recover Data from Netgear NAS

2014/08/08 by sudo

I hold no love for NAS drives, often with very specific software and hardware setups. One just device – a Netgear Nas – died in the office. Instead of pulling the data from the backup, I thought it was worth trying to get the drives working in an old PC to recover the latest data.

This particular model of NAS uses EXT3 LVM as a file system. Great news if you’ve got a Linux live DVD lying around (almost). So Netgear Nas boxes tend to run on non-standard hardware, making the block sizes 16 instead of 4. This means it won’t mount without some extra hacking.

  • Start by becoming root on your live distro
    sudo su
  • Next, install fuse EXT2 in order to allow fuse to mount ext2 file systems
    apt-get install fuseext2
  • Install LVM2 if it’s not already installed. This will be needed to manage the lvm used by the NAS
    apt-get install lvm2
  • Check to see if the fuse module is loaded after intstallation
    modprobe fuse
  • The next series of commands will check the lvm drives and set them as active
    vgscan
    vgchange -ay c
  • If you’ve not done so already, create a directory to mount the drive to
    mkdir /mnt/nas
  • Hopefully by this point you got messages indicating the drive was ready. this uses /dev/c/c/ as the Netgear NAS drive in it’s LVM volume, and /mnt/nas as the mountpoint
    fuseext2 -o ro -o sync_read /dev/c/c /mnt/nas

Tra da! you should be able to navigate to the directory and pull the data off. Alternatively you could install linux onto a spare PC and mount this drive, setting it up as a samba share to replace the nasty NAS.

Filed Under: Linux, Technology Tagged With: data recovery, Linux, netgear nas

  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next Page »

Recent Posts

  • System Hang on Ubuntu 24.04 “e1000_print_hw_hang”
  • Disable iLO on HP Microserver Gen8
  • Ubuntu Desktop 24.04 Change Wallpaper Settings
  • Customising Ubuntu Desktop 24.04
  • Remove domains from Let’s Encrypt using Certbot

Tags

API auditing crochet data recovery debian debudding development Dingo API docker email Getting started with Laravel 5 & Dingo API hard drive health HP Microserver KVM Laravel larvel 5 lenovo Linux Minion mint netgear nas networking network shares php PHP development Postfix raspberry pi review samba security SMART smartctl smartmontools smb testing traefik ubuntu ubuntu 18.04 ubuntu 20.04 ubuntu 22.04 ubuntu server vagrant Virtual machines xdebug xubuntu

© Copyright 2015 apt get life