Got a burning question about open source or the kernel? Whatever your level, email it to email@example.com
A He-Man reference, a Philip K Dick reference, a Marcel Proust reference, but you’ll have to work out the last one yourself.
Q I’ve (not) got the power
Excited by the release of the Pi 3 B+, I finally got around to getting its predecessor. Managed to snag a bargain on eBay, complete with a case.
I was impressed at how quickly it boots and how much better it does normal desktop things (web browsing, in particular YouTube, and LibreOffice). However, I noticed a small lightning graphic appearing in the top right-hand corner periodically.
After some investigations I found some log messages saying undervoltage
detected . If I switch to the experimental vc4 driver, then the lightning bolt disappears, but the messages are still in the log. I’m confused by this, because the same power supply works fine for my phone and older Raspberry Pis. WilliamBurnside A A few people have run into this problem. Having Bluetooth and wireless onboard, as well as all that extra processing power, bumps up the Pi 3’s power requirements significantly. As such it’s fitted with a warning sensor that emits alerts when the 5V input drops below 4.63V. The SoC itself can cope with occasional voltage drops (it can throttle the CPU or drop radio power), but other peripherals may not be so forgiving.
The problem is often cheap USB power supplies or poor-quality USB cables. Our attempts to compile FFMPEG (which is a brutal process) kept resetting the Pi because of this. Power supplies may claim to be able to dish out 5V at 2A, but they often do so unreliably.
We recommend using a separate powered hub, especially if you’re working with power-hungry USB devices such as hard drives. If you’re serious you can even purchase a six-port hub where each port has an independent 3A supply, so if one device becomes busy it won’t affect the others. The vc4 driver is great, but it doesn’t magically solve power problems, it’s just that the firmware can no longer access the framebuffer directly to draw all over it, so you have to make do with the text warnings.
Q Dial LVM for Murder
Not content with a dual boot setup, I configured an LVM array on my 2TB hard drive with the idea that it would make adding new distros easier. I’m now five distros in (Ubuntu, Mint, openSUSE, Fedora and Arch Linux) and use the rest of the LVM array as a large storage partition. Only once did I forget to shrink the filesystem first and have to restore a lot of things from backup, but we don’t talk about that. Whenever I need to add a new distro, I shrink the storage filesystem and partition by 40GB and add a new logical volume. Besides the LVM partition, I have a 512MB EFI partition and a 512MB boot partition.
But I’m slightly confused as to whether or not I still need this /boot
partition. Based on what I’ve read from multiboot tutorials, it’s good practice to let one distro take care of GRUB, so this partition is only mounted from Ubuntu, and whenever I run grub-update there it picks up any new kernels from the others. This has always seemed a bit like magic to me.
However, I thought I understood that we also needed this boot partition because the GRUB EFI image wasn’t able to penetrate LVM partitions. In fact, I seem to recall that in the past even Stage 2 GRUB couldn’t access these volumes. Nowadays I see insmod lvm in my grub. cfg, which presumably is a GRUB module for doing just that. And since my nonUbuntu distros store their kernels on their own partitions, this lends even more weight to this presumption.
Furthermore, I can boot some distributions (Arch and Fedora) straight from the UEFI menu, which takes me to a different GRUB menu, one which appears to live inside those distros’ logical volumes. This seems to contradict my previous thinking about GRUB not being able to access LVMs. ArthurCayley,viaemail A Before GRUB 2 came along, a boot partition (with the GRUB stages 1.5 and 2 files and kernels) had to exist outside the LVM. Once loaded the kernel (or more likely the initrd) could unravel the LVM magic and pivot to the root filesystem there. With GRUB 2, as long as the LVM module is included in the GRUB_
PRELOAD_MODULES variable in the file /etc/default/grub, then it can happily read LVM volumes directly (with the exception of thin logical volumes), so the /boot partition is no longer required.
For UEFI booting, GRUB images are installed to the EFI partition with a path to a configuration file hardcoded inside them. On Fedora, for example, this is EFI/ fedora/grub.cfg and this file is updated by the Grubby tool whenever a new kernel is installed. This is a lot different to the file generated by grub-mkconfig , which uses os-prober (or magic if you like) to examine other partitions. Since stock Arch kernels are all named vmlinuz-linux there’s no need for any menu updates once you’ve generated it (more likely painfully constructed it by hand) the first time. Ubuntu and derivatives all use grub
mkconfig to regenerate the menu on kernel updates, so you see all OSes when you boot those images.
From one Arch user to another – if you find that os-prober takes a while to detect Arch, try installing the lsb-release package to help it figure out what’s what.
This baby can deliver up to 3A per USB port, with a maximum of 12A for the device.
Once you get locked into a serious LVM collection, the tendency is to push it as far as you can