Using Grub Customizer to … do what it says

Customizing your Grub2 config by hand is not a trivial task. On a re-purposed desktop over the past couple of months I’ve installed a bunch of different OSes, and my Grub menu on boot is a mess to say the least.

After installing more than one bootable Linux, you also (unless there’s a workaround for this?) end up with each Linux having it’s own grub config (/boot/grub/grub.cfg), although only one (the last installed) will have installed it’s config to your MBR. There’s a good question/answer on this here. In my case I do have two Linux installs, Mint and Kubuntu, so I did have to look at the config of each and work out which was currently installed to the MBR before I started doing any editing of the configs.

Luckily there’s an easier way to customize what OSes you have in your menu, using Grub Customizer – for install and usage see post here.

Part of my mess is having a prior install of Vista, upgraded to Windows 8, and then later upgraded to Windows 10. The boot menu options left behind are now for some reason a mix of all 3, even though only Windows 10 is actually installed and bootable. Plus I have a few Linux distros too:

Switching to View/Show Hidden, you can uncheck the menu entries you don’t want displayed, so that’s an easy fix. There’s plenty more options to configure and customize too, but for simple menu housecleaning, it’s an easier option than attempting to edit the grub config files by hand.

Ubuntu Ctrl-Alt-T Terminal window shortcut

I don’t know why I had never come across this before, but as an incredibly handy shortcut to open a new terminal window, use: Ctrl-Alt-T

This works on Ubuntu and derivatives, like Mint (is this a common Linux shortcut for all distros?)

Raspberry Pi Raspbian cross compiler toolchains on 64bit Linux

A while back I setup Eclipse C++ on Ubuntu to cross compile some ARM Assembly (see here). Last time I set up the Raspberry Pi tools on Ubuntu I was using a 32bit install. More recently I installed a 64bit version of Kubuntu, and so was retracing my steps to get set up again.

It might be obvious if you’re more familiar with gcc and cross compiler toolchains, but in the Raspberry Pi tools project there’s 32 bit and 64 bit versions of the tools. Trying to use the 32 bit versions on 64 bit Linux does not work. Rather than some useful error though, trying to execute any of the 32bit versions from a shell gives a rather un-useful ‘No such file or directory’ error.

Referring back to my original Eclipse C++ setup instructions, if you’re running Eclipse on 32bit Linux then you want to point to the tools here:

~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin

Otherwise point to the 64bit version here:

~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin

Installing Arch Linux as a VirtualBox Guest

Arch Linux is probably the first Linux distro I’ve come across that does not have a graphical installer. It boots from the iso and drops you straight into a shell.

Ok. Once you’ve realized this then the install instructions make more sense.

To install in VirtualBox I created an 8GB disk. Once booted from the iso, at the shell I used fdisk to partition 2 partitions, one 6GB for / and one 2 GB for /home, following the steps from this post.

In summary, the steps were:

  • p – create primary
  • 1 – 1st partition
  • enter for start position default
  • +6G for end point 6GB from start
  • p next primary
  • 2 – 2nd partition
  • enter for default start
  • enter for end at end of available space

p shows the created partitions, which ended up looking like this:

w to write the partitions and exit.

Next format the two partitions:

mkfs.ext4 /dev/sda1

mkfs.ext4 /dev/sda2

Mount and start the install!

At this point, pick up from the remainder of the instructions in the install guide and beginners guide.

When attempting to install grub, I got these errors:

Per this post (and here), looks like my repo databases needed to be created/updated? I ran

pacman -Syu

and this looks like it fixed my pacman database issue, but now at this point it looked like I’d ran out of space on /, but going back through the install docs, I didn’t do the

arch-chroot /mnt /bin/bash

step so looks like I was installing to the / on my iso live boot? Anyway, did arch-chroot,
and now re-running the command to install grub now worked.
Next steps:

grub-install --recheck /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

Remaining steps:

  • Set root’s password: passwd
  • Exit chroot
  • Unount drives:
    umount -R /mnt
  • reboot

Remove the iso in VirtualBox, and restart – whoah, Arch is installed! Now time to install X and a window manager! Next steps depending on what you intend to use Arch for are covered in the general recommendations guide.

Create a user:

useradd -m -G wheel -s /bin/bash username

Use password username to set password.

Network config

Network setup guide is awesome!

Add name servers to /etc/resolv.conf (e.g. for Google nameservers)

nameserver 8.8.8.8
nameserver 8.8.4.4

Start and enable dhcp services to start at boot:

systemctl start systemd-networkd.service
systemctl enable systemd-networkd.service
systemctl start systemd-resolved.service
systemctl enable systemd-resolved.service

Check adapters: ip link – get name of VirtualBox adapter, will be something like enp0s3

Edit /etc/systemd/network/wired.conf, add:

[Match]
Name=enp0s3
[Network]
DHCP=ipv4

Start and enable dhcpcd.service:

systemctl start dhcpcd@enp0s3.service
systemctl enable dhcpcd@enp0s3.service

… where enp0s3 is your VirtualBox network interface.

At this point you should have network connectivity – check by pinging www.google.com