Skip to content

u/grawity

In this archive from Nov 2018 to Jul 2023

0
posts
450
comments
0
media
1.8k
score

You have two separate installations of grub, each on its own disk and its own /boot partition, with each config generated by the respective distro. If you're booting from sdb in the firmware – you're seeing the config that Ubuntu has generated.

I think installing os-prober would help the grub config generator add entries for any other distros it finds? Not sure if it's better to do that from Ubuntu or Arch; probably better to use Ubuntu's because it has versioned kernel names.

Alternatively – start using the firmware boot menu (F8 or something) to select which GRUB you want to use, and make both of them boot straight into the respective distro, with 1s timeout or so.

6 points

The TZ environment variable overrides the global /etc/localtime setting. Make sure you don't have it set.

Actual "system time" (kernel time) is always maintained as UTC. (Not GMT, not BST, but UTC.) date -u would show it as the kernel sees it. It's why the hwclock is recommended to be in UTC as well, less timezone hassle that way.

What date shows is "system time adjusted to your timezone by /etc/localtime", or likely in your case "system time adjusted to some timezone per $TZ".

3 points

Fallback isn't a separate kernel – it's a separate initrd for the same kernel. Basically a larger set of drivers than regular.

The initramfs (initrd) is how the kernel pre-loads drivers needed for your system disk/filesystem itself, and e.g. the regular one won't include NVMe drivers if you didn't have an NVMe disk, but the fallback one will. (Why not just always have the full initramfs? It gets large, and must be all loaded into memory upfront, which could be rather slow in the days of HDDs.)

Arch doesn't keep old kernel packages around, as it's always the same package that just gets upgraded in place (unlike e.g. Debian where a new package gets installed every time), and you cannot have multiple versions of the same package.

The usual approach to having a "fallback" kernel on Arch is to install linux-lts alongside, as that's usually an older branch than the mainline kernel. (Even though Arch package maintainers don't agree with that manner of usage, or so reddit tells me.)

7 points

Instead of scrolling through forums, scroll through log files.

A lot of problems can be solved by knowing where to look into "what's happening" and "what the hell is this thing doing". Sometimes it's journalctl, sometimes it's strace, sometimes tcpdump, sometimes export GPGME_DEBUG=9, but it's all the same point – understanding that you can usually measure what it's doing and adjust the solution accordingly, instead of just randomly poking at stuff until it goes away.

I mean, even Electroboom knows how and when to use a voltmeter.

3 points

The message sounds like you formatted the partition that had the rest of GRUB. Usually the GRUB "core" lives in the EFI partition (or near the MBR) while everything else – the config, the modules for filesystem support, etc. – live in /boot/grub, which you just removed.

because Grub is broken, I can’t even boot into a USB flash drive with a Windows 11 ISO.

No, that's kinda backwards. Booting into USB drives is not handled by your installed GRUB or by anything else that was on the system disk. It boots straight from the firmware.

In other words, the firmware boot menu isn't provided by GRUB – it goes before GRUB – and is still there behind F8 or whatever other key. If you're able to access BIOS settings you're able to access the BIOS boot menu as well.

(I mean, you didn't even have GRUB when you only had Windows, and it booted USB sticks just fine, didn't it.)

4 points

GNOME Wayland will have that in the near future, hopefully, as part of its built-in RDP server. I'm not sure when (probably v46 if I had to guess) but I know it's in the plans – they've been putting in place some pieces to use a virtual screen when RDP'd.

Until then, no, you'll probably have to mess with a dummy HDMI or something.

Consider Waypipe and Xpra to run remote apps though – Waypipe for Wayland, Xpra for a faster version of X11 forwarding. (Though X11 forwarding itself might work better if you enable compression using ssh -C. For Firefox that's pretty much required.)

2 points

Sometimes geolocation databases are just out of date. "Second-hand" IPv4 blocks are pretty common these days (there's no other way to get IPv4 anymore). It took months for my Linode London server to stop showing up as being in "Russia" as Linode had received an IP block that had been previously used by a different company.

Sometimes an IP address block is officially assigned in one place but announced in another. For example, if the company has its own IP address block (i.e. not from its ISP), there's nothing really stopping them from tunneling its traffic to a different continent and announcing it there but not here... for whatever weird reason. The WHOIS database doesn't necessarily reflect actual routing (so in some cases geolocation DBs might be more accurate).

Sometimes a block gets moved between regions in such a way that even WHOIS can't decide where to look anymore, e.g. it previously belonged to ARIN region and now it's under APNIC, half the sites still think it's under ARIN.

1 points

That's probably something you could contact the alsa-devel mailing list about. With the computer's model included. (I'm guessing that the tty switch is when pulseaudio or pipewire releases the audio devices temporarily.)

The messages seem to be related to the Rockchip RK3399 sound chip, is that...Arch-ARM on Pine64, or something?

2 points

That encrypts the OS kernel. What decrypts it? GRUB. What decrypts GRUB itself? Nothing; it has to stay unencrypted. Same regardless of boot mode, whether it’s the boot sector or the EFI system partition.

Also, do not confuse /boot with the EFI system partition. EFI has nothing to do with Linux /boot. You might share the same partition for both and have the kernel alongside grub.efi, but you can just as well have them separate if needed.

So if you wanted to have an “encrypted /boot”, you would mount the unencrypted EFI partition at /efi instead, while /boot would be part of your encrypted rootfs and everything again would be the same as in BIOS setup. The only difference would be that GRUB is now shaped like a file.

7 points

Journal does not output those messages to tty in the first place. If they have a timestamp that looks [ like.this], they're kernel messages being output directly to what the kernel thinks its console is.

Use dmesg --console-level= or the kernel loglevel= option to adjust what priority messages are allowed to go to the console.

Normally on Arch the console log level is already adjusted to only send higher priority messages there, so it's probably a better idea to solve the cause of those messages than to hide them. (Like for example if you don't want to see ufw logs there, don't make ufw log boring stuff at such a high priority.)

2 points

Ultimately all distro packages are just "put this file there" – a .deb is more or less a tarball with some metadata. You can unpack the files inside, and as long as either Arch or the package itself can provide all of the libraries that the binaries need, it'll probably run on Arch.

There are plenty of .deb and .rpm conversions on AUR. One of my AUR packages (now removed as the service it used got shut down) also did this, but it had the problem that the binaries linked to weirdly named libraries – the binary wanted libssl.so.10 while the standard naming was libssl.so.1.0.0 – so I just...ran sed s/so.10/so.1\x00/ on the binaries.

One of the stupidest packages I had made was one that downloaded another PKGBUILD and sourced it, for whatever reason...

7 points

Your firmware always stays UEFI, what you're enabling is an additional boot mode (BIOS emulation), but this does not disable native UEFI boot. When you boot from a USB stick, your firmware boot menu has two options for the same disk: one to boot it via UEFI and one to boot it via BIOS emulation. You're probably still choosing the UEFI one, so you still get UEFI.

The question is, what difference does it make to you?

The same things that go unencrypted in the boot partition on EFI, also go unencrypted in the boot sector on BIOS. You're still required to have an unencrypted bootloader either way. All that you really achieve with switching to BIOS style boot is a messier partition layout, with the boot code going in various hidden places, but you're not achieving anything security-wise.

6 points

in that order, and after the reboot is done, cat /mnt/etc/fstab says the directory doesn't exist and lsblk says all the file systems are unmounted.

You just said /mnt/etc/fstab here. That implies you're not rebooting into the "installed" Arch system – you're rebooting back into the installer liveCD, otherwise it wouldn't be under /mnt anymore (all of it would be under / directly).

The fstab in /mnt is only for the OS that's installed on /mnt – a liveCD is not going to care about what's on disk and isn't going to auto-mount anything.

It's also probably worth noting that cat /etc/fstab always just describes what fstab is, both before and after generating it.

Similar but opposite problem. You tried to cat /etc/fstab, but…that's not what you generated moments ago – /mnt/etc/fstab is what you generated.

in that order,

The order of your commands isn't exactly right. Mounts "stack" – if you mount /mnt after you've mounted /mnt/boot/efi, the former will end up overlapping and hiding the latter. Always mount the parent filesystem before its children, i.e. /mnt before /mnt/boot before /mnt/boot/efi.

Finally, genfstab is not the "one true tool" for creating /etc/fstab. It's a convenience script – if it doesn't work, nothing really stops you from adding the same entries to /etc/fstab by hand (aside from it being a little annoying to look up UUIDs manually).

10 points

While technically, no one else other than root can really do anything without read and/or write permissions, it's messy.

With +x on the directory they can access any file or subfolder that's readable on its own, as long as they know its exact name. Which matters if you had manually restricted just your homedir to 0700 but if your default umask still results in the rest of your files being 0644/0755 (as is the case on Arch).

For example, if you have 0711 on ~/ and 0755 on ~/Pictures, that's enough for other users to be able to list the contents of the latter, despite not having read access to its parent.

2 points

I suspect the "relative" one was originally used with a /var path, as the "stub-resolv" file originally was static in older systemd versions and was kept in /var/lib (or actually maybe /usr/share?). In that case you do want the links relative so that cat /mnt/etc/resolv would show you /mnt/var, not the host's /var.

1 points

It wouldn't add the default route.

Did it fail to add the default route, or did it ignore the default gateway, or did it not receive a default gateway from DHCP? There's a difference.

is there something that will work like resolved for DNS

resolved is not networkd. You're not required to use resolved with only networkd. Most other DHCP clients can be configured to feed it configuration, at least through resolvconf emulation if nothing else.

11 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.