Skip to content

u/LookingForMySelf

In this archive from Sep 2014 to Apr 2016

7
posts
32
comments
0
media
106
score

Top posts

Share your hooks!

Here is one that makes a snapshot with snapper before and after any package related change: ==> /etc/pacman.d/hooks/snapper-post.hook <== [Trigger] Operation = Install Operation = Upgrade Operation = Remove Type = Package Target = * [Action] Depends = snapper When = PostTransaction Exec = /etc/pacma...

9 points9 comments
Open on Reddit

"systemd-firstboot --copy" should copy locale, time zone and root password from the host, yet it ignores password

I was thinking about how to configure new system quickly and though about writing script to do that, when I found this command: systemd-firstboot But it does not copy either password or host. Example: sudo -i mkdir /tmp/test pacstrap -cd /tmp/test base systemd-firstboot --prompt-root-password --root...

5 points4 comments
Open on Reddit

I wish sometimes for more clear separation for system and user applications. What do you think?

I discovered GoboLinux not so long ago. Basically /Programs. The interesting idea is that file system supposed to be package manager so you can remove an application with rm -rf /Programs/Bash. Looks like windows, yes, but I do not think it is inherently bad(MS just makes bad OSs). http://lists.gobo...

0 points11 comments
Open on Reddit

Top comments

First I do not condone people behaving like dickheads. Next...

Many people want arch because it's "cool". I think arch should have some entry level gate keeper to check if user knows linux better then Milhouse. Many problems would have been resolved just because of that. Plus at some point it really get's tiresome to explain what iso is 10th time on the row. There are distributions that specialize on newbies, like ubuntu and are much more humane and appropriate for them.

I also think it's good part of forum etiquette to post the answer and mark problem as solved, or may be even put it into wiki.

I also do not think that pointing man right a way is anything bad, if people have not said that he read him. Some new users just do not have habit to read them. I was like that.

15 points

I must as well post my configuration then.

First I use rEFInd to boot my PC in /boot/efi/EFI/refind/refind.conf:

timeout 20

use_graphics_for windows,linux

menuentry "Arch Linux" {
        #icon     /EFI/refind/rEFInd-minimal/icons/os_arch.png
        volume   fb884168-0d7f-4fa2-8b42-16e249a702e8 
        loader   /archlinux/current/boot/vmlinuz-linux
        initrd   /archlinux/current/boot/initramfs-linux.img
        options  "root=PARTUUID=fb884168-0d7f-4fa2-8b42-16e249a702e8 rootfstype=btrfs rootflags=subvol=archlinux/current rw add_efi_memmap initrd=/archlinux/current/boot/intel-ucode.img"
        submenuentry "Boot using fallback initramfs" {
                initrd /archlinux/current/boot/initramfs-linux-fallback.img
        }
}

And my btrfs layout is:

ID 287 gen 60312 top level 5 path storage
ID 290 gen 59157 top level 5 path gentoo
ID 796 gen 59157 top level 5 path archlinux/snapshots
ID 797 gen 59157 top level 796 path archlinux/snapshots/1/snapshot
ID 838 gen 59157 top level 796 path archlinux/snapshots/2/snapshot
ID 839 gen 59157 top level 796 path archlinux/snapshots/3/snapshot
ID 840 gen 60312 top level 5 path archlinux/current
ID 841 gen 59470 top level 5 path archlinux/pkg
ID 842 gen 59157 top level 796 path archlinux/snapshots/4/snapshot
ID 843 gen 59157 top level 796 path archlinux/snapshots/5/snapshot

Storage contains all user files. This is done in order to separate changes of system from changes in user space. In order to rollback them separately.

home is located inside storage, media, documents, .ssh, .mozilla, are there too, also separated from home. This way if some config goes wrong I can just nuke home and be sure that my personal data is allright.

pkg is pacman's cache, separated because there usually is no need to roll it back and it only unnecessarily fill the btrfs' changelog.

Current is where the root always is.

/etc/fstab

# 
# /etc/fstab: static file system information
#
# <file system>                                 <dir>                   <type>  <options>                                                                                               <dump>  <pass>
PARTUUID="fb884168-0d7f-4fa2-8b42-16e249a702e8" /                       btrfs   defaults,subvol=archlinux/current                                                                       0 0
PARTUUID="fb884168-0d7f-4fa2-8b42-16e249a702e8" /.snapshots             btrfs   defaults,subvol=archlinux/snapshots                                                                     0 0
PARTUUID="fb884168-0d7f-4fa2-8b42-16e249a702e8" /mnt/btrfs              btrfs   defaults,subvolid=0                                                                                     0 0
PARTUUID="fb884168-0d7f-4fa2-8b42-16e249a702e8" /mnt/storage            btrfs   defaults,subvol=storage                                                                                 0 0
PARTUUID="fb884168-0d7f-4fa2-8b42-16e249a702e8" /var/cache/pacman/pkg/  btrfs   defaults,subvol=archlinux/pkg                                                                           0 0
PARTUUID="0fc3c956-d399-494c-970a-29081818a391" /boot/efi               vfat    rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro    0 1

Advantages of this btrfs layout are:

  • easy rollbacks, I just switch current for a snapshot with btrfs sub snap archlinux/snapshots/X/snapshot current

  • I can rollback and log changes for my data and system files separately

  • It is easy to make a back up from a snapshot. This command will allow me to get my back up compressed with XZ using multi threading env XZ_OPT="-T 0" tar --xattrs -cJpf -T 0 arch-backup.tar.xz /mnt/btrfs/archlinux/snapshots/5/snapshot/

  • I can have as many linux operation systems in the same btrfs volume as I want. I have gentoo right now there with absolutely the same layout

The problems are:

  • I have to make rollbacks manually, because snapper assumes that only one OS exists
  • I have to configure boot manually. Ideally it would be good if rEFInd would pick snapshots and current and display them automatically, so I would not have to use and use stanzas all the time. This way after system failed I can use last snapshot right of the bat, to fix my system.
  • There is no centralized way to create and manage many subvolume-snapshot ecosystems at once. Snapper GUI does not run on my PC, sadly.
7 points

Subreddits

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.