Skip to content

u/FinitelyGenerated

In this archive from Jun 2015 to Oct 2021

0
posts
393
comments
0
media
1.8k
score

So you can have a situation like this:

Mirror 1 says the latest version of thunderbird is 91 Mirror 2 says the latest version of thunderbird is 78 Local database is synced to mirror 1

If you switch from mirror 1 to mirror 2 and ask pacman to install thunderbird, it will try to download thunderbird 91 from mirror 2 and will return a 404 error because mirror 2 only has version 78.

However, this scenario is very rare because a) mirrors are generally no further than a couple hours out of sync with each other and b) where they are out of sync, it's only ever a handful of packages at a time.

So until this happens, or something is corrupted, I would not bother with -yy. And if this scenerio does happen the best options are to either: wait until mirror 2 catches up or use -Syyuu because you don't want to install the old version of thunderbird only to realize it is incomparable with the newer versions of the libraries you have installed.

2 points

The pacstrap script runs pacman with certain flags. The default looks something like:

pacman -r /mnt -Sy --cachedir=/mnt/var/cache/pacman/pkg --noconfirm base linux linux-firmware

(Run head /var/log/pacman.log and see for yourself.)

The -r / --root tells pacman to treat /mnt as / so a package that has a file in /usr/bin now has that file placed in /mnt/usr/bin.

--cachedir tells pacman to save the downloaded package tarballs on /mnt rather than on the ArchISO.

And pacstrap does a couple other things like copying your mirror list to the new root, but a lot of the heavy lifting is done via pacman and its flags.

12 points

chroot and by extension arch-chroot does not set environment variables the way that, for example, sudo does.

I would try either doing arch-chroot ... bash -c 'export HOME="/home/$username/" && ... (set the variable manually) or maybe use sudo -u $username in your script. Or if your script is only going to be used by that one user, you can put export HOME="/home/$username/" at the top of it.

2 points

I learned a lot by just looking around my own files.

For instance, take a .pkg.tar.zst file. That's a tarball so it can be extracted or you can use tar tf <filename> to list the file contents. Let's take a small package. You can do

cp /var/cache/pacman/pkg/zstd-1.4.9-1-x86_64.pkg.tar.zst /tmp
cd /tmp
tar tf zstd-1.4.9-1-x86_64.pkg.tar.zst

to copy zstd-1.4.9-1-x86_64.pkg.tar.zst to /tmp and list what files it contains. You'll see three files:

.BUILDINFO
.MTREE
.PKGINFO

followed by a bunch of stuff in /usr. Then you can use tar xf to extract the archive and check out what's inside those three dot-files.

Now let's find out something else. If you do pacman -Ql pacman you will see a list of files owned by the pacman package. Everything in /usr is static and if you do pacman -Ql pacman | grep -v /usr to get every other file, you will see this:

pacman /etc/
pacman /etc/makepkg.conf
pacman /etc/pacman.conf
pacman /var/
pacman /var/cache/
pacman /var/cache/pacman/
pacman /var/cache/pacman/pkg/
pacman /var/lib/
pacman /var/lib/pacman/

These are all the non-static files and directories owned by pacman. You might be wondering now: what about /etc/pacman.d/? Try using pacman -Qo to find out what's up about that.

So you may already have some familiarity with /etc/makepkg.conf and /etc/pacman.conf and /var/cache/pacman/. But what about /var/lib/pacman/? What's in there? Have a look for yourself.

Some helpful commands:

file <file> find out what kind of file something is.

zcat <gzipped file> unzips a file and outputs it to stdout (several files in /var/lib/pacman/ are gzipped). See also zless, zgrep, etc.

95 points

Either commit to using the package manager or install texlive manually. Do not create a Frankensteinian monster which is half official packages and half manual tinkering.

There are several texlive packages:

texlive-bibtexextra
texlive-bin
texlive-core
texlive-fontsextra
texlive-formatsextra
texlive-games
texlive-humanities
texlive-langchinese
texlive-langcyrillic
texlive-langextra
texlive-langgreek
texlive-langjapanese
texlive-langkorean
texlive-latexextra
texlive-music
texlive-pictures
texlive-pstricks
texlive-publishers
texlive-science

If you want to figure out which one you need to install to get a certain LaTeX package, use for example pacman -F bbm.sty. You will need to run pacman -Fy once if you have never used pacman -F at all.

4 points

I rewrote mine by hand replacing all those options by defaults

# Static information about the filesystems.
# See fstab(5) for details.
# <file system>                             <dir> <type> <options> <dump> <fsck>
UUID=fac92b5d-c2ac-4f90-a6fe-18d9e229ad97   /     ext4   defaults		     0 1 # /dev/nvme0n1p2
UUID=E7F4-1F95                              /boot vfat   defaults,fmask=0133 0 2 # /dev/nvme0n1p1
/swapfile				                    none  swap   defaults		     0 0 # swap
2 points

Polybar is a simple task bar (well, status bar, it doesn't display a list of tasks but it can display the active program's name). It displays the time, the current workspace number, display brightness, volume, things like that.

It's not that simple to resize towards the front of the disk because you first have to shift everything 400 GB to the front. Think of it as a glass of water. If you were to extend the glass upwards there would be no issue, it's just a simple matter of saying "there's more space here now." But if you want to extend the bottom of the glass downwards, the water needs to move with it.

This operation can be done but the partition cannot be mounted at the time, meaning you have to be booted off a USB or something.

I'm not sure about moving the boot partition. You probably will need to reinstall/configure GRUB because I think when GRUB installs itself, it writes a bit of data in the partition table saying "here's where the bootloaders are stored." Now if you move the bootloader, you probably need to update what is written in the partition table. I don't know GRUB well enough to advise.

8 points

To "install it" probably 30 minutes (meaning partition disks, mkfs, pacstrap. To configure it properly, make sure it boots, set password, locale, reboot, realize you forgot to install networkmanager/iwd/whatever, have to reboot the USB, reboot the machine again, get logged in, connect to the internet, and finally finally install a desktop environment? Probably another hour or more.

1 points

There is an option called XferCommand in pacman.conf. By default it is /usr/bin/curl -L -C - -f -o %o %u. You can find out what all those options do by reading man curl and man pacman.conf.

Curl cannot handle rsync, so if you want to use rsync mirrors you would need to change the XferCommand to rsync + appropriate arguments and you would need to read the man page(s) to figure out what those appropriate arguments are.

17 points

If you press l or w during bootup, the bootloader will put you into Linux and Windows respectively. It might be worth setting a positive timeout if this is something you are doing frequently.

F11 sounds like you are using your motherboard's EFI menu rather than using systemd-boot. You should be able to see the systemd-boot menu by just holding the spacebar to cancel the timeout=0 (again, it might be worth setting the timeout to 1). If you use F11 to boot windows instead of systemd-boot then that becomes the new default bootloader to the motherboard. If you don't use F11 and instead use systemd-boot then the default entry will be persistent.

https://man.archlinux.org/man/systemd-boot.7#KEY_BINDINGS

2 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.