Tag Archives: GNU/Linux

Grub2: Save Last Boot Option

Over the years there have been many GNU/Linux bootloaders (I remember using loadlin, and syslinux), and these days most distributions are settling on Grub2 (https://www.gnu.org/software/grub/).

If you’re like me and have multiple OS installed on a machine, you can find yourself getting intimate with your bootloader to make it behave in a way that will suit your workflow, or sometimes missing that menu to make your selection.

I multi-boot Ubuntu, Windows 10 (yes, there are some things I need to do here), Arch, and sometimes something else. 9 times out of 10, I just want the bootloader to boot the last selection I made, but this one isn’t always Grub’s default. Yes, I could change the default value, however I find the offset-model here a little annoying, especially when you get “Advanced options for X Linux…” in the menu list.

Today I discovered a Grub2 setting that makes Grub remember and boot your last selection. Very useful!

I made my edits under Ubuntu (as that’s the OS that I consider owns my grub settings):

sudo nano /etc/default/grub

Change your GRUB_DEFAULT setting to be saved:

GRUB_DEFAULT=saved

Add in the GRUB_SAVEDEFAULT value to make this work:

GRUB_SAVEDEFAULT=true

Save, and then run the stub for grub-mkconfig:

sudo update-grub

Et voila! I can now reboot, and it rememvers what I selected last time. Great for when testing a change to your main-driver OS – as I’m doing with Arch currently.

Arch GNU/Linux – 1 Week In

I’ve been using Arch GNU/Linux for about a week now, as my main driver.

Those first few days are always about getting those packages installed that you use often, and configuring the system for your particular workload.

As a point of reflection, I thought I’d look at the list of packages that I have installed.

In pacman, to list all explicitly installed packages:

pacman -Qe

Which gives:

adobe-source-sans-pro-fonts 3.028-1
adobe-source-serif-pro-fonts 4.004-1
arduino 1:1.8.13-2
arduino-avr-core 1.8.3-1
autoconf 2.71-1
automake 1.16.3-1
base 2-2
bash-completion 2.11-1
baudline-bin 1.08-4
binutils 2.36.1-2
bison 3.7.3-1
chromium 88.0.4324.182-1
cinnamon 4.8.6-1
cmake 3.19.6-1
composer 2.0.11-1
docker 1:20.10.4-1
docker-compose 1.28.5-1
fakeroot 1.25.3-2
flex 2.6.4-3
gcc 10.2.0-6
gdm 3.38.2.1-1
gedit 3.38.1-1
git 2.30.1-1
gnome-calculator 3.38.2-1
gnome-control-center 3.38.4-1
gnome-keyring 1:3.36.0-3
gnome-screenshot 3.38.0-1
gnome-shell-extension-arch-update 39-1
gnome-system-monitor 3.38.0-1
gnome-terminal 3.38.3-1
gnome-tweaks 3.34.1-1
google-chrome 88.0.4324.182-1
gparted 1.2.0-2
gqrx 2.14.4-1
groff 1.22.4-4
inspectrum 0.2.3-1
intel-ucode 20210216-1
linux 5.11.2.arch1-1
linux-firmware 20210208.b79d239-1
liquid-dsp 1.3.2-2
m4 1.4.18-3
make 4.3-3
man-db 2.9.4-1
man-pages 5.10-1
mlocate 0.26.git.20170220-5
mongodb-compass-git 1:r3403.ga0d25bb2-1
mtools 4.0.26-1
nano 5.6-1
nemo-fileroller 4.8.0-2
nemo-preview 4.8.0-2
nemo-share 4.8.0-2
networkmanager-openconnect 1.2.7dev+49+gc512d5a-1
networkmanager-openvpn 1.8.12-1
noto-fonts 20201226-1
noto-fonts-cjk 20201206-1
noto-fonts-emoji 20200916-1
noto-fonts-extra 20201226-1
ntfs-3g 2017.3.23-5
openconnect 1:8.10-1
openvpn 2.5.1-1
patch 2.7.6-8
php-mongodb 1.9.0-3
pkgconf 1.7.3-1
python-pyqt5 5.15.3-2
qwt 6.1.6-1
sudo 1.9.5.p2-1
syncthing 1.13.1-1
texinfo 6.7-3
ttf-bitstream-vera 1.10-14
ttf-carlito 20130920-5
ttf-croscore 20201226-1
ttf-dejavu 2.37+18+g9b5d1b2f-2
usbutils 013-1
vi 1:070224-4
visual-studio-code-bin 1.53.2-1
whois 5.5.8-1
xf86-video-nouveau 1.0.17-1
xorg-fonts-misc 1.0.3-10
xterm 366-1

A few of those I’ll probably delete (denoted in red), as they were more for trial.

Naturally, this is just a list of packages that I have explicitly installed, there is a lot more behind that in terms of dependencies and in base.

Arch GNU/Linux – Need to know commands

Installed Arch Linux last weekend to give it a go.

As I’m sooo used to Debian-based distros, getting my head around pacman was a learning curve that I needed to get my head around.

Short summary which may be useful to others:

Seach for a package (e.g. ‘qt’) in remote repositories:

sudo pacman -Ss qt

Install a package (e.g. ‘qt’) from a remote repository:

sudo pacman -S qt

Seach for a package (e.g. ‘qt’) in local repositories:

sudo pacman -Qs qt

Upgrade all installed packages from remote repositories:

sudo pacman -Syu

To remove a package and its dependencies which are not required by any other installed package:

sudo pacman -Rs package_name

Full details here: https://wiki.archlinux.org/index.php/pacman