mazzilius_marsti

joined 8 months ago
 

I have an x220, yes it is old but I prefer the keyboard and the repairability. Anyway, it has 1 x msata SSD (2TB Orico) and 1 x 2.5 inch SSD (2TB Samsung).

What I want:

  • to take advantage of 2 drives.
  • no windows. I go full Linux now.
  • some forms of backup if system fails.

What I managed to do:

  • /, swap and all system directories on the msata

  • /home is dedicated to the entire 2.5 ssd.

  • fully encrypted. I.e the msata has a LUKS partition that mounts /, swap and others. The 2.5 inch also has a LUKS partiton for /home. My /home is on its own, so if system fails or I need to distro hop, I can keep all of my data.

System runs fine but is this a good idea in the long run?

Should I have it the other way? Root and swap and systems on faster 2.5inch SSD. Home in the smaller msata?

What about everything on the faster 2.5 drive, then use the slower msata for backups? Since I have 2TB, I'm thinking partition the msata into 2 so I can do: Timeshift backup on one, and Borg backup for my personal files on the other?

oh LibreOffice works great for me in general. Only for some documents with macros that were created in MS Office, I have problems running them. Eg: I once received a MS Word document that has some preprogrammed drop down list - so you click to extend the list and choose your items. The document opens fine, but I couldnt get the drop down feature to work. For Excel, documents with lots of VBA codes, I need to go in and do some manual changes.

In general, for 99% of the tasks, LibreOffice is fine. But it is that 1% which makes me still open up my Windows VM for MS Office.

After their shenanigan with subscription only models, we still see MS Office being used a lot. It shows how strong MS grips on the Office area is.

You are correct that 365 is used for most people. I used to use it too..For me, I prefer to be able to access stuff whenever I want. I live in an area with very shitty internet (both Wifi and 4G). Once, a client and I had to wait 5 minutes because Office Online takes too long to load up a spreadsheet. Offline for me is just a peace of mind.

[–] mazzilius_marsti@lemmy.world 12 points 2 days ago (3 children)

LibreOffice better step up their games and make their office suites better. Outside of very niche and specialized applications like CAD or video editor, the average Joe will just need a good office suite to do stuff.

 

I know Gnome is the default on popular distros: Fedora, Ubuntu, Rhel, Pop OS (it's Cosmic Desktop yes but it is still based on Gnome)...etc. But Gnome just doesnt work for me. I would pick XFCE - stable and no BS.

Before Manjaro and their cetificate shenanigan, I used to use their XFCE version. At the time, it was marketed as the "Flagship Manjaro version". I went 4 years without any problems and I did tinker a lot, just couldnt get their XFCE to break.

After a tough Arch or Gentoo installs, I just want to put XFCE on and call it a day.

What about you guys?

[–] mazzilius_marsti@lemmy.world 1 points 1 week ago (1 children)

i see, so the file names are: autostart_blocking.sh and autostart.sh

I dont need to create a weird file name like: autostart.sh &

But, whichever command I put in autostart.sh will run as if I run in terminal with the & sign. E.g: dunst & to run in the background.

[–] mazzilius_marsti@lemmy.world 0 points 1 week ago (1 children)

yes, that is what I thought: so "dunst &" means to start dunst in the background. But the way they attach to the end of a file name is weird.

 

I'm talking about this patch:

https://dwm.suckless.org/patches/autostart/

Now, the notes seem simple: after apply the patch, dwm will look for the autostart script in ~/.dwm/autostart.sh.

But if you read it carefully, the file is:

~/.dwm/autostart.sh &

Wth does a "&" have to do with file name? I tried to just use the normal file: autostart.sh with exec dunst. It doesnt work..

I tried to create in the Thunar this weird file name, "autostop.sh &". The system does not recognize it as sh script anymore. .

Any help is welcome.

[–] mazzilius_marsti@lemmy.world 2 points 1 week ago (1 children)

hows the search fuction in mutt? For eg, if i want to search an email thread from like 3 months ago, does it function well or do I need to open my broswer....

[–] mazzilius_marsti@lemmy.world 2 points 1 week ago* (last edited 1 week ago)

Well thanks everyone. I finally managed to get it to work on Arch. System has separate encrypted root and swap in LVM, and a separate encrypted home. It can suspend and hibernate. Below are my steps

DISK PREP

to create a LUKS container that is encrypted with: a keyfile and a password. Test both to make sure you can open the locked drive. Format and mount it at /mnt/home or where you want the /home to be.

  • Pacstrap and then genfstab.
    Important: Make sure to copy the keyfile from your archiso environment to your chroot environment aka your system. Otherwise, when reboot, the keyfile is gone. I put it in /root and set permission so only root can read.

AUTOMATIC UNLOCK

  • First, fstab. When you do genfstab, things should be fine. But just double check the UUID is correct for /home. Note in fstab, the UUID is the unlocked one: so the one with /dev/mapper/home. Change to noatime if you desire.

  • Second, crypttab. Assume you decrypt your LUKS home as "home". Add this:

home uuid of the unencrypted home drive location of the keyfile luks

The link above said to just use /dev/sda, but imo UUID is safer if you have a removable drive.

  • Third, grub. Edit your /etc/default/grub and append the following to GRUB_CMD_LINUX:

"rd.luks.uuid=UUID of the locked luks home drive"

FOR HIBERNATION

For some reasons, hibernation doesnt work out of the box. It works when I have everything in 1 drive, i.e 1 boot, 1 efi, 1 lvm on luks for /home, swap and /. The fix is simple:

  • add "resume" to /etc/mkinitcpio.conf. Add before "filesystems" . Rebuild your initramfs with mkinitcpio -P.

  • add to /etc/default/grub: "resume= uuid of the unlocked swap partition". Or if you do LVM, just use "resume=/dev/vg/swap".

Special thanks to bodaciousFern@lemmy.dbzer0.com and Lemmchen@feddit.org for giving me correct ideas about "rd.luks.uuid" and that LUKS can do both pass and keyfile.

[–] mazzilius_marsti@lemmy.world 1 points 1 week ago (1 children)

What do you backup with dejadup? Everything under /home?

[–] mazzilius_marsti@lemmy.world 0 points 1 week ago (4 children)

yeh if I encrypt /home using luks with passphrase, so cryptsetup. How do I tell the OS to decrypt it? I tried passphrase before and it cannot boot because /home cannot be mounted. That is why I searched and found out about the Arch wiki way: using keyfile stored in root.

 

Any distro would do, but for my case, it is Arch because I have more control over the partitions. I would like the OS, so root, swap and others on 1 drive. The /home should be on a separate drive. The tricky thing is to have everything encrypted, except /boot and /efi of course.

Now, here is what I can do

  1. FDE on 1 drive. This is easy: you create /efi, /boot and then create a large LUKS partition. From there, you create LVM on that LUKS partition and get your: /, /home and swap. Then mount everything correctly and install.

In the grub config, you only need to set it so it knows the LUKS partitom and where the root is. For eg, if your LUKs partition is /dev/sda3, you do:

  • cryptdevice=UUID=<uuid of the /dev/sda3>: cryptlvm rootfs=/dev/vg/root.
  1. Unencrypted /home on another drive. This is like 1) but /home is mounted on a separate drive. Still need to do the grub config, but nothing is needed for /home. It is automatically mounted when you login.

Now for my case: Encrypt /home

The encryption and mount part is easy. But how to get the OS to recognize it? The Arch wiki has this weird thing where you create an encryption key, they called it home.key, using cryptsetup. You then store the key in /etc and then in your /etc/crypttab, you specifiy the drive with /home and location of the key. No need for any passphrase.

The problem I have with this is that keys are stored in root. So if my root system is corrupted, I cant even decrypt home....

Any advice is welcome..

[–] mazzilius_marsti@lemmy.world 4 points 2 weeks ago

I have Fedora on my work laptop and vanilla Arch on my tinkering laptop.

I think instead of thinking about "set it and forget it", you might want to think about "if shit happens, how fast can I fix it?". That is because stuff break or there are bugs . If you use a very old and LTS distro, you might be comfortable but there might be bugs that do not get fixed until much later. Eg: Debian's kernel used to be able to suspend-then-hibernate, then they jump to one that cannot. So if you want that feature back, you need to wait.... until Debian catches up with mainline's fixes.

So if you only use your computer for web, email, movie. Then any distro will work.

Now, imo there are 2 types of problems in Linux:

  1. Boot/GRUB/partition problems: this can happen if you're dual boot, or a config goes wrong. To fix, usually you need to boot a live cd.

Pop OS would be #1 choice just because it has a "Recovery Partition" with live environment. You can reinstall the entire OS while you're on the plane, without wifi or any USB.

Arch would be #2 here, just because the arch iso is so good. It is minimal and has all the tools you need to fix stuff: partitions, wifi..etc. Plus, it boots in tty so it is faster for fixing.

  1. Problems with library mismatch: for this you want one with good snapshots built in. So OpenSUSE or if you know how to configure btrfs, maybe Fedora. I would still go Pop OS here, so you can configure btrfs AND get the recovery from point 1) above. Linux Mint would be #2 choice because they have timeshift built in.

So the TLDR for you is: pick Pop OS for the recovery partition. Also, use btrfs. Lastly, configure your disk nicely, i.e. dont do any crazy LVM encryption, just use standard layout so when comes the time to fix, it is easier.

26
submitted 2 weeks ago* (last edited 2 weeks ago) by mazzilius_marsti@lemmy.world to c/linux@lemmy.ml
 

Hey folks. I recently got an old X220 with an mSATA SSD. I plan to to install Linux on there. It doesnt matter which OS: Debian, Ubuntu or Arch. The machine is so old that all distros play nice with it.

Anyway, the speed on the mSATA is slower than the 2.5 SSD. So I want to know if is it possible to have your /boot, /efi, swap on the mSATA. Then, the /home on the 2.5 SSD? Any problems with this setup and if anyone tried it before?

Now, for the reasons why I use mSATA instead of just putting Linux on 2.5 SSD:

  1. the mSATA is Samsung, pretty rare nowadays. The health is still very excellent. I checked with CrystalDiskInfo. So might as well use it.

  2. My X220 has a problem finding out grub if installed on the 2.5 SSD. It's literally a 50/50 chance it can find grub properly. So:

a) you installed Linux on 2.5 SSD, reboot.

b) grub error screen

c) restart

d) boot into Linux well

Note at d) if I do anything to restart/shutdown the computer, you are back at step b) and require another reboot to reach Linux.

Any advice is welcome.

[–] mazzilius_marsti@lemmy.world 1 points 2 weeks ago (1 children)

hmm thanks i'm gonna try that script you linked in artix wiki. Havent seen that one before so its worth a shot. What I usually see is some systemd Unit scripts. Gtlock looks neat as well, does swaylock give you problems too?

[–] mazzilius_marsti@lemmy.world 4 points 2 weeks ago* (last edited 2 weeks ago)

The only robust and no BS lock combo so far, imo, is Regolith i3wm.

For some reasons and whatever black magic eas used, this Frankenstein combo of i3 and GNOME work every single time. The downside is their configs are soooo messy. It is very hard to use whatever you have in vanilla i3 for Regolith.

 

I have an older laptop so no need to worry about the stupid Modern Standby introduced in late 2019. What I want is a reliable way to lock screen when suspend, doesnt matter how bloat or minimal.

First, to make sure the laptop suspends when I close the lid:

  • on some Distro, this works OOTB.
  • If it doesnt, I check /etc/systemd/sleep.conf and set allow Suspend from there.

After this, laptop does suspend. Now here comes the trickiest part, how to make sure your screen stays locked? There are so many rabbit holes so I want some help.

Depending on your software selections, you can fall into 3 categories:

  1. create some systemd script like this: https://wiki.archlinux.org/title/Slock

Problem: sometimes the screen doesnt get locked, i.e. your slock doesnt get triggered. Even worse, in some cases, the desktop is briefly shown on resume, before the locker shows up.

  1. use program like xss-lock, xautolock. Then links it with your locker and then autostart in your wm. Eg: i3wm with i3lock and xss-lock:

exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock

This works. But the laptop sometimes takes a while to suspend.

  1. manually invoke "Lock" with a keystroke. Then close the lid. Apparently this works but I have to remember to manually "lock" every single time.

Thanks for any suggestions.

[–] mazzilius_marsti@lemmy.world 7 points 2 weeks ago* (last edited 2 weeks ago) (4 children)

I like and I do use Linux as my main OS. No dual boot BS, just pure Linux

butttttttttttttt

getting hibernate working perfectly in Linux on new hardware is PITA. I'm just happy with suspend working well, let alone hibernation.

Modern standby is the absolute shit of an invention.

This is the ONLY reason I wish I have a Mac. Forget all the memes and jokes about Apple, their laptops suspend very well. IIRC, they also have a hibernation timer built in, so if your laptop automatically hibernates after X hrs. But I dont want to be stuck in their ecosystem, so yeh...

Linux devs are not that keen to make hibernate work well either. Remember systemd dev forcefully removed the "suspend then hibernate" feature? You can still find the thread on Github lol.

 

So I put all of my important dot files on Github. Whenever I need to reinstall stuff, I pull the files. To get this working, I need to do the "gh auth login" where it grants the ssh key. Or I can create a token for that specific machine on Github. This is a long list of letters/numbers that I then copy when doing "git clone".

During installations of Arch or even a minimal Debian, how do you do this? There are no browsers, so the command "gh auth login" would get stuck.

Is there a better way to do this, other than making the dotfiles repo public?

view more: next ›