Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Trying to use LVM with encryption on my Debian 10 system for the first time. I need to add a crypttab entry now and wasn't sure if it should be:
code:
/dev/raid0vg0/raid0lv0 UUID=b31086c9-f24c-41b9-9c2f-94d9c3011cc8 /etc/keyfiles/main luks
or is it:
code:
raid0lv0encrypted UUID=b31086c9-f24c-41b9-9c2f-94d9c3011cc8 /etc/keyfiles/main luks
Or is either valid? If so is there a specific term for differentiating the two types of names there?

Here's my block devices:
code:
root@charlie:~# lsblk
NAME                         MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                            8:0    0  12.8T  0 disk
└─raid0vg0-raid0lv0_rimage_0 253:3    0  12.8T  0 lvm
  └─raid0vg0-raid0lv0        253:5    0  25.5T  0 lvm
    └─raid0lv0encrypted      253:6    0  25.5T  0 crypt
sdb                            8:16   0  12.8T  0 disk
└─raid0vg0-raid0lv0_rimage_1 253:4    0  12.8T  0 lvm
  └─raid0vg0-raid0lv0        253:5    0  25.5T  0 lvm
    └─raid0lv0encrypted      253:6    0  25.5T  0 crypt
nvme0n1                      259:0    0 953.9G  0 disk
├─nvme0n1p1                  259:1    0   487M  0 part  /boot
├─nvme0n1p2                  259:2    0     1K  0 part
└─nvme0n1p5                  259:3    0 953.4G  0 part
  └─nvme0n1p5_crypt          253:0    0 953.4G  0 crypt
    ├─charlie--vg-root       253:1    0 952.4G  0 lvm   /
    └─charlie--vg-swap_1     253:2    0   976M  0 lvm   [SWAP]

root@charlie:~# blkid
/dev/nvme0n1p1: UUID="22b20ecc-2e5b-495b-b155-2bf8f30c7c66" TYPE="ext2" PARTUUID="f03008bc-01"
/dev/nvme0n1p5: UUID="89636a5c-3ea9-43e8-b516-d18f85d46069" TYPE="crypto_LUKS" PARTUUID="f03008bc-05"
/dev/sda: UUID="6dbxYg-EdKy-HHfq-fs7E-KFcc-ImwY-omzqUy" TYPE="LVM2_member"
/dev/mapper/nvme0n1p5_crypt: UUID="LDtwwL-kMfr-x5X1-ma8g-Fwik-dGtT-kCNbT4" TYPE="LVM2_member"
/dev/sdb: UUID="dFChF4-eJfz-x31Z-FE18-NTx5-Dud5-jCR2dY" TYPE="LVM2_member"
/dev/mapper/charlie--vg-root: UUID="ae066ca0-7bdd-42fa-8490-e7dc7ae7d192" TYPE="ext4"
/dev/mapper/charlie--vg-swap_1: UUID="d9e31b36-d164-4e1c-9f52-d2e7eebd8adf" TYPE="swap"
/dev/mapper/raid0vg0-raid0lv0: UUID="b31086c9-f24c-41b9-9c2f-94d9c3011cc8" TYPE="crypto_LUKS"
/dev/mapper/raid0lv0encrypted: UUID="91cf91af-ff78-44b8-9125-87b088714c20" TYPE="ext4"
/dev/nvme0n1: PTUUID="f03008bc" PTTYPE="dos"

fletcher fucked around with this message at 18:50 on May 8, 2021

Adbot
ADBOT LOVES YOU

gourdcaptain
Nov 16, 2012

Had a (fairly old at the point) family computer's hard drive break when I was in high school, we didn't have the restore medium and when a new one was bought, I shoved Xubuntu 8.04 on the old one as an excuse to try out Linux. Then, several Ubuntu version upgrades later that all failed spectacularly (apt failing halfway through or drivers being broken enough to render it unbootable) I moved to Arch Linux solely to avoid those with a rolling release distribution and haven't looked back since on my own machines, although I don't recommend it to less technical family members and friends. Stuck with XFCE as well, mostly because I have to use GNOME 3 for work and I find it utterly miserable at all times.

hifi
Jul 25, 2012

fletcher posted:

Trying to use LVM with encryption on my Debian 10 system for the first time. I need to add a crypttab entry now and wasn't sure if it should be:
code:
/dev/raid0vg0/raid0lv0 UUID=b31086c9-f24c-41b9-9c2f-94d9c3011cc8 /etc/keyfiles/main luks
or is it:
code:
raid0lv0encrypted UUID=b31086c9-f24c-41b9-9c2f-94d9c3011cc8 /etc/keyfiles/main luks
Or is either valid? If so is there a specific term for differentiating the two types of names there?

Here's my block devices:
code:
root@charlie:~# lsblk
NAME                         MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                            8:0    0  12.8T  0 disk
└─raid0vg0-raid0lv0_rimage_0 253:3    0  12.8T  0 lvm
  └─raid0vg0-raid0lv0        253:5    0  25.5T  0 lvm
    └─raid0lv0encrypted      253:6    0  25.5T  0 crypt
sdb                            8:16   0  12.8T  0 disk
└─raid0vg0-raid0lv0_rimage_1 253:4    0  12.8T  0 lvm
  └─raid0vg0-raid0lv0        253:5    0  25.5T  0 lvm
    └─raid0lv0encrypted      253:6    0  25.5T  0 crypt
nvme0n1                      259:0    0 953.9G  0 disk
├─nvme0n1p1                  259:1    0   487M  0 part  /boot
├─nvme0n1p2                  259:2    0     1K  0 part
└─nvme0n1p5                  259:3    0 953.4G  0 part
  └─nvme0n1p5_crypt          253:0    0 953.4G  0 crypt
    ├─charlie--vg-root       253:1    0 952.4G  0 lvm   /
    └─charlie--vg-swap_1     253:2    0   976M  0 lvm   [SWAP]

root@charlie:~# blkid
/dev/nvme0n1p1: UUID="22b20ecc-2e5b-495b-b155-2bf8f30c7c66" TYPE="ext2" PARTUUID="f03008bc-01"
/dev/nvme0n1p5: UUID="89636a5c-3ea9-43e8-b516-d18f85d46069" TYPE="crypto_LUKS" PARTUUID="f03008bc-05"
/dev/sda: UUID="6dbxYg-EdKy-HHfq-fs7E-KFcc-ImwY-omzqUy" TYPE="LVM2_member"
/dev/mapper/nvme0n1p5_crypt: UUID="LDtwwL-kMfr-x5X1-ma8g-Fwik-dGtT-kCNbT4" TYPE="LVM2_member"
/dev/sdb: UUID="dFChF4-eJfz-x31Z-FE18-NTx5-Dud5-jCR2dY" TYPE="LVM2_member"
/dev/mapper/charlie--vg-root: UUID="ae066ca0-7bdd-42fa-8490-e7dc7ae7d192" TYPE="ext4"
/dev/mapper/charlie--vg-swap_1: UUID="d9e31b36-d164-4e1c-9f52-d2e7eebd8adf" TYPE="swap"
/dev/mapper/raid0vg0-raid0lv0: UUID="b31086c9-f24c-41b9-9c2f-94d9c3011cc8" TYPE="crypto_LUKS"
/dev/mapper/raid0lv0encrypted: UUID="91cf91af-ff78-44b8-9125-87b088714c20" TYPE="ext4"
/dev/nvme0n1: PTUUID="f03008bc" PTTYPE="dos"

The first field in the crypttab entry is just what the device gets called when it get unencrypted (paraphrasing from the man page for crypttab).

Not sure what's up with the /dev/mapper/raid0lv0encrypted entry in blkid output though. Is it already set up?

Storm One
Jan 12, 2011

fletcher posted:

Trying to use LVM with encryption on my Debian 10 system for the first time. I need to add a crypttab entry now and wasn't sure if it should be:
code:
/dev/raid0vg0/raid0lv0 UUID=b31086c9-f24c-41b9-9c2f-94d9c3011cc8 /etc/keyfiles/main luks
or is it:
code:
raid0lv0encrypted UUID=b31086c9-f24c-41b9-9c2f-94d9c3011cc8 /etc/keyfiles/main luks

No experience with LVM but judging from that blkid output it's probably EDIT: no it's probably not, this is why I hate LVM
code:
raid0vg0-raid0lv0 UUID=b31086c9-f24c-41b9-9c2f-94d9c3011cc8 /etc/keyfiles/main luks
scratch that, it should be your second example:

code:
raid0lv0encrypted UUID=b31086c9-f24c-41b9-9c2f-94d9c3011cc8 /etc/keyfiles/main luks
/dev/mapper/raid0lv0encrypted is the unecrypted LUKS volume containing the ext4 filesystem

/dev/mapper/raid0vg0-raid0lv0 is the 25TB RAID0 LVM volume containing the encrypted LUKS volume

lsblk -fp should make parsing a bit easier

Storm One fucked around with this message at 23:22 on May 8, 2021

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Thanks for the replies!

hifi posted:

The first field in the crypttab entry is just what the device gets called when it get unencrypted (paraphrasing from the man page for crypttab).

Not sure what's up with the /dev/mapper/raid0lv0encrypted entry in blkid output though. Is it already set up?

I think this may have been because I had already run cryptsetup luksOpen /dev/raid0vg0/raid0lv0 raid0lv0encrypted at that point?

Storm One posted:

/dev/mapper/raid0lv0encrypted is the unecrypted LUKS volume containing the ext4 filesystem

/dev/mapper/raid0vg0-raid0lv0 is the 25TB RAID0 LVM volume containing the encrypted LUKS volume

lsblk -fp should make parsing a bit easier

Thanks for the clarification and the tip about lsblk -fp that's handy to know, I think it makes sense now.

Went with:
code:
raid0lv0encrypted UUID=b31086c9-f24c-41b9-9c2f-94d9c3011cc8 /etc/keyfiles/main luks
Did a reboot everything seems to be working! Neat-o

Zaepho
Oct 31, 2013

Late 80s learned DOS
Early 90s screamed that Micro$haft would never take my shell
Mid 90s Eggdrop and Efnet is life
Also mid 90s Win 95 has a 32 bit winsock? poo poo.. OK I'll go to 95
Later... MS pays the bills but I still like my Fedora core 3 box....
20 years of Microsoft paying the bills.... XP, SQL, System Center, Hyper-V, Azure Everything


Tomorrow.. New Hire Orientation for a Household Linux Brand
What the gently caress have I gotten myself into...

Mr. Crow
May 22, 2008

Snap City mayor for life
A blissful life without Microsoft. I rip my hair out every time I have to do something on windows that isn't gaming.

CaptainSarcastic
Jul 6, 2013



Mr. Crow posted:

A blissful life without Microsoft. I rip my hair out every time I have to do something on windows that isn't gaming.

Meh, Windows is fine. I spend most of my computing time in Linux by preference (KDE is such a good desktop), but Windows 10 is okay. I'd rather use Windows than Mac OS X, personally.

xzzy
Mar 5, 2009

Every OS is cool and worth knowing, use them all. With WSL2 and PowerShell Windows even has usable shells now!

BlankSystemDaemon
Mar 13, 2009



Counterpoint:
https://www.youtube.com/watch?v=CPRvc2UMeMI

RFC2324
Jun 7, 2012

http 418

xzzy posted:

Every OS is cool and worth knowing, use them all. With WSL2 and PowerShell Windows even has usable shells now!

If you don't have a computer with every os on it, you aren't making your company buy you enough toys

And/or a company smart enough to realize that a macbook isn't a superior workstation for linux/windows admins, and professional computer touchers dont need toys endorsed by the hackers of 15 years ago

Mr. Crow
May 22, 2008

Snap City mayor for life

xzzy posted:

Every OS is cool and worth knowing, use them all. With WSL2 and PowerShell Windows even has usable shells now!

he actually did it, the madman actually said something positive about powershell :eyepop:

xzzy
Mar 5, 2009

Well compared to cmd.exe everything is an improvement.

I think pipes passing objects between commands is a novel idea too. A solution looking for a problem perhaps but it tickles my nerd neurons.

BlankSystemDaemon
Mar 13, 2009



I'm gonna go ahead and say it, and there's nothing you can do to stop me!

PowerShell is really useful and a good addition to Windows.

There, I said it.
And if you take the time to understand the syntax, you get to all sorts of fun thing with stdio, pipelining, and other things that you find on any Unix-shell.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

As user-unfriendly bash seems to be, once you work with it, it’s simple.

RFC2324
Jun 7, 2012

http 418

I haven't worked much with it, but nothing I see about powershell makes me dislike it. The worst I can say is that its a bit overly verbose with its commands, and a blue shell is uncomfortable

Mr. Crow
May 22, 2008

Snap City mayor for life
systemd bad, powershell good




:confused:

RFC2324
Jun 7, 2012

http 418

Lets not be hasty here

Craptacular!
Jul 9, 2001

Fuck the DH
Not going to say PowerShell is unusuable, but it feels like it was made to sell certificates proving that you understand it. I don't pretend to be a Bash wizard, but I can plain English explain every part of a command when I suggest friends do what I say to make computer do the thing.

The Gadfly
Sep 23, 2012

I'm on step 7 I guess. I don't think I'll ever use Gentoo though, because I had enough fun :airquote: trying to get stuff like ungoogled-chromium to compile.

I don't think I'll use BSD either, unless it's for official ZFS integration, and running it on a server.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

RFC2324 posted:

a blue shell is uncomfortable

IRIX motherfucker

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Craptacular! posted:

Not going to say PowerShell is unusuable, but it feels like it was made to sell certificates proving that you understand it. I don't pretend to be a Bash wizard, but I can plain English explain every part of a command when I suggest friends do what I say to make computer do the thing.

I get that everything is an object and you can do all this powerful stuff but it’s so much simpler in bash to do easy stuff like basic text processsing

https://stackoverflow.com/questions/2503010/extracting-columns-from-text-file-using-powershell

Like what the flying gently caress

CatBlack
Sep 10, 2011

hello world
I'm gonna go out on a limb here and say that everything microsoft makes is bad and you shouldn't use any proprietary software

tjones
May 13, 2005
I'm sure powershell is great but the first thing I recall from my limited experience with it is that its slow as balls.

Craptacular!
Jul 9, 2001

Fuck the DH

Bob Morales posted:

I get that everything is an object and you can do all this powerful stuff but it’s so much simpler in bash to do easy stuff like basic text processsing

https://stackoverflow.com/questions/2503010/extracting-columns-from-text-file-using-powershell

Like what the flying gently caress

I keep WSL1 with the free RHEL UBI just to do occasional things in one line that PowerShell wants me to do with three.


EDIT:
Compare decoding base64:

Bash:
echo TheBase64StringHere | base64 -d

PowerShell:
code:
$EncodedText = “TheBase64StringHere”
$DecodedText = [System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($EncodedText))
$DecodedText

Craptacular! fucked around with this message at 03:31 on May 10, 2021

RFC2324
Jun 7, 2012

http 418

Craptacular! posted:

I keep WSL1 with the free RHEL UBI just to do occasional things in one line that PowerShell wants me to do with three.

iirc, if you do this you can just call things through bash from the normal command line

Craptacular!
Jul 9, 2001

Fuck the DH

RFC2324 posted:

iirc, if you do this you can just call things through bash from the normal command line

The multi-shell Windows Terminal app makes it simple enough to operate both simulataneously.

Methanar
Sep 26, 2013

by the sex ghost
code:
$EncodedText = “TheBase64StringHere”
$DecodedText = [System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($EncodedText))
$DecodedText
When I'm doing things in the terminal I often wish I was instead writing a proprietary rip off version of java instead

RFC2324
Jun 7, 2012

http 418

Methanar posted:

code:
$EncodedText = “TheBase64StringHere”
$DecodedText = [System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($EncodedText))
$DecodedText
When I'm doing things in the terminal I often wish I was instead writing a proprietary rip off version of java instead

at least it isn't perl lol

otoh, it could be something actually good in practice, instead of just in theory

xzzy
Mar 5, 2009

Craptacular! posted:

The multi-shell Windows Terminal app makes it simple enough to operate both simulataneously.

This app is a pretty good windows native implementation of the GUI tmux type tool, but fuckin hell they really gotta add an option to disable the pop up on multi line pastes.

Also a way to ignore exit codes when exiting a shell, there's no way to close them without X-ing the tab when they get in that state.

astral
Apr 26, 2004

xzzy posted:

This app is a pretty good windows native implementation of the GUI tmux type tool, but fuckin hell they really gotta add an option to disable the pop up on multi line pastes.

Not only is it an option (you may have to edit your json config to change it), but that setting is off by default at this point.

xzzy
Mar 5, 2009

astral posted:

Not only is it an option (you may have to edit your json config to change it), but that setting is off by default at this point.

Duh, a google search fixed it. There's no gui toggle for it it's a json edit only. I get that it's considered a beta, but still..

(and in my recent fresh install it defaulted to on)

BlankSystemDaemon
Mar 13, 2009



It feels very much in the spirit of all the bad things about Linux that it's using a json config file, instead of something like UCL or just a simple key-value store.

RFC2324
Jun 7, 2012

http 418

Aren't they talking about a windows utility?

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

BlankSystemDaemon posted:

It feels very much in the spirit of all the bad things about Linux that it's using a json config file, instead of something like UCL or just a simple key-value store.

YAML :smith:

xzzy
Mar 5, 2009

At least it's not an ini style config.

(which loops us back around to: gently caress you systemd, I want to like you but COME ON)

Volguus
Mar 3, 2009

xzzy posted:

At least it's not an ini style config.

(which loops us back around to: gently caress you systemd, I want to like you but COME ON)

Eh, it's fine. For what is used for it works just fine. TOML uses it, and it's a quite better for configuration files than json, at least in my experience with it.

Craptacular!
Jul 9, 2001

Fuck the DH
All I'm going to say further about Windows utilities in this thread is that if you run Windows and you have not...

1) Downloaded Windows Terminal from the Store
2) Downloaded the open-sourced PowerShell from the Store
3) Configured Terminal to default to OSS PS and hide the sysdefault PS
4) Installed scoop
(Optional) Installed Chocolatey for the occasional weird utility that works poorly from Scoop due to limitations on portable apps

then your Windows experience is not as Linux-like as it could be.

I can't remember if OSS PS got rid of the aliases that link curl and wget commands to PowerShell's own InvokeWebrequest, or if you need to make a PowerShell profile to remove them if you want to use the actual wget/curl Windows binaries. People complained a ton but after years of posting Microsoft decided not to remove them from the default included closed-source copy of PowerShell (usually called "Windows PowerShell" now to distinguish it from the just plain PowerShell in development) because no matter what poor manners it is to steal a program's command away, you still risk breaking legacy behavior and that might interrupt some ancient computer's workflow.

gregday
May 23, 2003

So I’ve been using a Slackware base that I fresh installed like 15 years ago and have been manually keeping updated to current since then. It’s been through 3 motherboards and was still 32-bit and booting with LILO on legacy BIOS compatibility.

I decided to make a clean break and throw Ubuntu on a Gigabyte Z590 D mobo with some 2TB M.2 NVMe’s and uhh… holy poo poo. I guess I’ve been out of the loop for awhile because I am floored at what just worked out of the box using open source drivers with no or nearly no configuration or loving around:

WiFi
Bluetooth (mouse)
Audio
It even auto detected my network printer and set it up

Guess I’ve been missing out by insisting on doing things the hard way.

Adbot
ADBOT LOVES YOU

KozmoNaut
Apr 23, 2008

Happiness is a warm
Turbo Plasma Rifle


Craptacular! posted:

All I'm going to say further about Windows utilities in this thread is that if you run Windows

...As anything but a stripped-down support layer for Steam, you're probably doing it wrong.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply