There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

linux

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

Coelacanthus , in What is your favourite shell to use
@Coelacanthus@lemmy.kde.social avatar

zsh, because of highly customizable.

send_me_your_mommy_milkers , in What is your favourite shell to use
@send_me_your_mommy_milkers@lemmy.world avatar

xterm+zsh

Toribor , in What is your favourite shell to use
@Toribor@corndog.social avatar

Zsh on workstations. Bash on servers.

laurelraven , in What is your favourite shell to use

PowerShell, with zsh being a close second

moreeni ,

Feeling risky today, eh? Mind sharing the reasoning behind your extravagant choice?

laurelraven ,

Not sure what’s extravagant about it… Fully object oriented pipeline in a scripting language built on and with access to the .NET type class system is insanely powerful. Having to manipulate and parse string output to extract data from command results in other shells just feels very cumbersome and antiquated, and relies on the text output to remain consistent to not break

PowerShell, it doesn’t matter if more or less data is returned, as long as the properties you’re using stay the same your script will not break

Filtering is super easy

The Verb-Noun cmdlet naming convention gets a lot of (undeserved) hate, but it makes command discovery way easier. Especially when you learn that there’s a list of approved verbs with defined meanings, and cmdlets with matching nouns tend to work together.

It actually follows the Unix philosophy of each cmdlet doing one thing (though sometimes a cmdlet winds up getting overloaded, but more often than not that’s a community or privately written cmdlet)

It’s easily powerful enough to write programs with (and I have)

And it works well with C#, and if you know some C#, PowerShell’s eccentricities start to make way more sense

Also, I mainly manage Windows servers for work running in an AD domain, so it’s absolutely the language of choice for that, but I’ve been using it for probably close to 14 years now and I can basically write it as easily as English at this point

ikidd , in What is your favourite shell to use
@ikidd@lemmy.world avatar

While fish is easy to set up, I can’t even be arsed to do that most times, so bash ends up being the one I use most.

gianni , in What is your favourite shell to use

I have customized ZSH to be very similar to Fish

possiblylinux127 , in Vivalidi 6.8 released

Proprietary software, no thanks

surrealpartisan , in What is your favourite shell to use
@surrealpartisan@lemmy.world avatar

Xonsh. For basic use (running CLI programs with arguments) it works like any other shell, and for other uses it has nice Python syntax (and libraries!). For example, I like not needing a separate calculator program, as I can do maths directly in the shell with an intuitive syntax.

rotopenguin , in What is your favourite shell to use
@rotopenguin@infosec.pub avatar

Fish for an interactive shell, and I’ll often drop back to bash for writing a script. I can never remember how to do basic program flow in fish. Bash scripting is not great, but you can always find an example to remind you of how it goes.

TheyCallMeHacked , in How to install Libreboot in 2024?

I’m not sure what you mean by “checking the ROM”…

libreman OP ,
@libreman@lemy.lol avatar

I’m not sure what you mean by “checking the ROM”…

Hello . I mean, how do I know that there are blob objects embedded in the ROM, without which my laptop won’t turn on, I mean mrc.bin

Previously I could check this using the command:

./cbfstool grub_t440pmrc_12mb_libgfxinit_corebootfb_usqwerty.rom print

TheyCallMeHacked ,

Oh you can still do that. The path changed to elf/cbfstool/[TREE]/cbfstool (replace [TREE] with the tree concerened). Note that since the switch to the libre RAM init code, mrc.bin is not included anymore

libreman OP , (edited )
@libreman@lemy.lol avatar

$ ./build roms t440plibremrc_12mb

Thanks for your answer and help. I understand you correctly that after I executed the command

$ ./build roms t440plibremrc_12mb

Then I can update my ROM (for example, I now have 2023.06.25) by running the commands:

  1. Boot with kernel parameter iomem=relaxed
  2. Download and install ** flashprog** since flashrom will not work (for me it shows the chip size as 8Mb instead of 12Mb)

<span style="color:#323232;">$ git clone  https://github.com/SourceArcade/flashprog.git
</span><span style="color:#323232;">$ cd flashprog
</span><span style="color:#323232;">$ make 
</span><span style="color:#323232;">$ sudo make install
</span>
  1. Check for errors with the command: $ sudo flashprog -p internal

4 Flash $ sudo flashprog -p internal -w seabios_withgrub_t440plibremrc_12mb_libgfxinit_corebootfb_ukqwerty_grubfirst.rom

And can I be sure that after turning on my computer I will see Grub Libreboot?

TheyCallMeHacked ,

Yeah, that’s basically right. I believe flashprog is also included in libreboot, have a look in the elf/ directory. After that, it should work as expected

libreman OP ,
@libreman@lemy.lol avatar

Yeah, that’s basically right. I believe flashprog is also included in libreboot, have a look in the elf/ directory. After that, it should work as expected

Thank you, kind person)) I installed it, but after installation my screen is too bright and this happens every time, so for now I will use the latest test version, it works well.

I have another question, please tell me how, in your opinion, I can edit grub.cgf correctly so as not to get an error with searching for disk “ahci1”

I inserted these lines:


<span style="color:#323232;">...........
</span><span style="color:#323232;">
</span><span style="color:#323232;">	echo # Insert newline
</span><span style="color:#323232;">
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="color:#323232;">menuentry 'Load  GNU/Linux-Libre (LTS)' {
</span><span style="color:#323232;">
</span><span style="color:#323232;">	cryptomount -a
</span><span style="color:#323232;">
</span><span style="color:#323232;">	set root='lvm/matrix-rootvol'
</span><span style="color:#323232;">
</span><span style="color:#323232;">	linux /boot/vmlinuz-linux-libre-lts root=/dev/mapper/matrix-rootvol cryptdevice=/dev/sda1:lvm
</span><span style="color:#323232;">
</span><span style="color:#323232;">	initrd /boot/initramfs-linux-libre-lts.img
</span><span style="color:#323232;">
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="color:#323232;">menuentry 'Load Operating System (incl. fully encrypted disks)  [o]' --hotkey='o' {
</span>

and deleted these ones since I don’t use raid:


<span style="color:#323232;">menuentry 'Load Operating System (incl. fully encrypted disks)  [o]' --hotkey='o' {
</span><span style="color:#323232;">
</span><span style="color:#323232;">        if [ "${grub_scan_disk}" != "ata" ]; then
</span><span style="color:#323232;">
</span><span style="color:#323232;">		search_grub ahci
</span><span style="color:#323232;">
</span><span style="color:#323232;">	fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">	if [ "${grub_scan_disk}" != "ahci" ]; then
</span><span style="color:#323232;">
</span><span style="color:#323232;">		search_grub ata
</span><span style="color:#323232;">
</span><span style="color:#323232;">	fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">        # grub device enumeration is very slow, so checks are hardcoded
</span><span style="color:#323232;">
</span><span style="color:#323232;">        # TODO: add more strings, based on what distros set up when
</span><span style="color:#323232;">
</span><span style="color:#323232;">	# the user select auto-partitioning on those installers
</span><span style="color:#323232;">
</span><span style="color:#323232;">	lvmvol="lvm/matrix-bootvol lvm/matrix-rootvol"
</span><span style="color:#323232;">
</span><span style="color:#323232;">        raidvol="md/0 md/1 md/2 md/3 md/4 md/5 md/6 md/7 md/8 md/9"
</span><span style="color:#323232;">
</span><span style="color:#323232;">        # in practise, doing multiple redundant checks is perfectly fast and
</span><span style="color:#323232;">
</span><span style="color:#323232;">	# TODO: optimize grub itself, and use */? here for everything
</span><span style="color:#323232;">
</span><span style="color:#323232;">        for vol in ${lvmvol} ${raidvol} ; do
</span><span style="color:#323232;">
</span><span style="color:#323232;">		try_user_config "${vol}"
</span><span style="color:#323232;">
</span><span style="color:#323232;">	done
</span><span style="color:#323232;">
</span><span style="color:#323232;">        unset ahcidev
</span><span style="color:#323232;">
</span><span style="color:#323232;">	unset atadev
</span><span style="color:#323232;">
</span><span style="color:#323232;">	for i in 11 10 9 8 7 6 5 4 3 2 1 0; do
</span><span style="color:#323232;">
</span><span style="color:#323232;">		for part in 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1; do
</span><span style="color:#323232;">
</span><span style="color:#323232;">			if [ "${grub_scan_disk}" != "ata" ]; then
</span><span style="color:#323232;">
</span><span style="color:#323232;">				ahcidev="(ahci${i},${part}) ${ahcidev}"
</span><span style="color:#323232;">
</span><span style="color:#323232;">			fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">			if [ "${grub_scan_disk}" != "ahci" ]; then
</span><span style="color:#323232;">
</span><span style="color:#323232;">				atadev="(ata${i},${part}) ${atadev}"
</span><span style="color:#323232;">
</span><span style="color:#323232;">			fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">		done
</span><span style="color:#323232;">
</span><span style="color:#323232;">	done
</span><span style="color:#323232;">
</span><span style="color:#323232;">        set pager=0
</span><span style="color:#323232;">
</span><span style="color:#323232;">	echo -n "Attempting to unlock encrypted volumes"
</span><span style="color:#323232;">
</span><span style="color:#323232;">	for dev in ${ahcidev} ${atadev} ${lvmvol} ${raidvol}; do
</span><span style="color:#323232;">
</span><span style="color:#323232;">		if cryptomount "${dev}" ; then break ; fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">	done
</span><span style="color:#323232;">
</span><span style="color:#323232;">	set pager=1
</span><span style="color:#323232;">
</span><span style="color:#323232;">	echo
</span><span style="color:#323232;">
</span><span style="color:#323232;">        # after cryptomount, lvm volumes might be available
</span><span style="color:#323232;">
</span><span style="color:#323232;">	for vol in ${lvmvol}; do
</span><span style="color:#323232;">
</span><span style="color:#323232;">		try_user_config "${vol}"
</span><span style="color:#323232;">
</span><span style="color:#323232;">	done
</span><span style="color:#323232;">
</span><span style="color:#323232;">        search_grub crypto
</span><span style="color:#323232;">
</span><span style="color:#323232;">        if [ "${grub_scan_disk}" != "ata" ]; then
</span><span style="color:#323232;">
</span><span style="color:#323232;">		# Last resort, if all else fails
</span><span style="color:#323232;">
</span><span style="color:#323232;">		set root=ahci0,1
</span><span style="color:#323232;">
</span><span style="color:#323232;">		for p in / /boot/; do
</span><span style="color:#323232;">
</span><span style="color:#323232;">			if [ -f "${p}vmlinuz" ]; then
</span><span style="color:#323232;">
</span><span style="color:#323232;">				linux ${p}vmlinuz root=/dev/sda1 rw
</span><span style="color:#323232;">
</span><span style="color:#323232;">				if [ -f "${p}initrd.img" ]; then
</span><span style="color:#323232;">
</span><span style="color:#323232;">					initrd ${p}initrd.img
</span><span style="color:#323232;">
</span><span style="color:#323232;">				fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">			fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">		done
</span><span style="color:#323232;">
</span><span style="color:#323232;">	fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">        if [ "${grub_scan_disk}" != "ahci" ]; then
</span><span style="color:#323232;">
</span><span style="color:#323232;">		# Last resort (for setups that use IDE instead of SATA)
</span><span style="color:#323232;">
</span><span style="color:#323232;">		set root=ata0,1
</span><span style="color:#323232;">
</span><span style="color:#323232;">		for p in / /boot/; do
</span><span style="color:#323232;">
</span><span style="color:#323232;">			if [ -f "${p}vmlinuz" ]; then
</span><span style="color:#323232;">
</span><span style="color:#323232;">				linux ${p}vmlinuz root=/dev/sda1 rw
</span><span style="color:#323232;">
</span><span style="color:#323232;">				if [ -f "${p}initrd.img" ]; then
</span><span style="color:#323232;">
</span><span style="color:#323232;">					initrd ${p}initrd.img
</span><span style="color:#323232;">
</span><span style="color:#323232;">				fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">			fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">		done
</span><span style="color:#323232;">
</span><span style="color:#323232;">	fi
</span><span style="color:#323232;">
</span><span style="color:#323232;">        true # Prevent pager requiring to accept each line instead of whole screen
</span><span style="color:#323232;">
</span>
TheyCallMeHacked ,

Hmm, I’m not sure… I must admit, I only use SeaBIOS, not GRUB, so I wouldn’t know how to configure it

libreman OP ,
@libreman@lemy.lol avatar

I installed the updated version 20240612 everything worked as you said. Checking nothing as in the previous instructions does not give anything, as you wrote: after switching to the libre RAM initialization code mrc.bin no longer turns on.

Now i need to edit grub.cfg because I get an error with searching for the achi1 disk

recarsion , in What is your favourite shell to use

Zsh with powerlevel10k + a few plugins

bjoern_tantau , in How to prevent files from being displaced? This protection should (somehow) persist through disk cloning.
@bjoern_tantau@swg-empire.de avatar

What do you mean with “displace”?

poki OP ,

‘Move’; this includes copying, cutting or what have you. It should remain in the assigned directory/location. I’ll include this remark. Thank you!

BestBouclettes , in How to prevent files from being displaced? This protection should (somehow) persist through disk cloning.

I guess you can use ACLs depending on your filesystem, or SELinux user contexts.

poki OP ,

Seems interesting. Got any sources to read up on? Thanks in advance!

BestBouclettes ,

You can read about SELinux here or ACLs here. SELinux can be pretty complex if you’ve never used it, so make sure you understand it well. I believe it should be able to do what you want to achieve.

frankfurt_schoolgirl , in How to prevent files from being displaced? This protection should (somehow) persist through disk cloning.

What do you mean by a file being displaced? Like do you want it to be unreadable, or unmodified, or just not deleted?

It’s not really possible to have a level of protection that would require more than sudo because with root access you bypass anything else.

You could put the files on an encrypted volume that uses a special password when it is mounted. Or you could use the chattr command to set special ext4 attributes that would make it unmodifiable (but could be removed with sudo). Or just record the file’s hash, and that way you know it hasn’t been modified later.

poki OP ,

Like do you want it to be unreadable, or unmodified, or just not deleted?

I don’t necessariy care for any of those. They are ‘bonuses’ if you will. Though…:

  • Unreadable will be required for preventing recreating the file elsewhere.
  • Unmodifiable is not necessarily required. Maybe I would like to ‘append’ something to an existing file. But I’m fine either way. It should not be possible to delete some of the original data though.
  • Not deleted is a must as well.
just_another_person , in How to prevent files from being displaced? This protection should (somehow) persist through disk cloning.

If you have these types of issues, just move to an immutable distro.

poki OP ,

Who says I’m not already :P . Got any ideas on how this might be able to specifically solve the problem at hand?

just_another_person , (edited )

What you describe in your post is a user who is not confident enough to manage their own machine with the CLI, and is afraid of misplacing files.

What you seem to not understand is that if you made the mv and cp commands require some sort of user interaction, nothing would ever work on the system, at least not in userspace if that’s the intent. No installer scripts, package managers, apps which use such commands…etc. Imagine implementing a rule like you describe, and then trying to copy/paste something in a GUI file manager, or organize music or photos.

So if you’re so afraid of moving something that needs not be moved, put some simple rules in place for yourself:

  • Don’t fuck around with anything outside of your homedir
  • Learn to reinstall system packages

Pretty simple. You also probably want to be on ZFS or BTRFS so you can undo your mistakes if you make them.

Isn’t literally ANY option here simpler than what you’re describing?

poki OP ,

Thank you for your input! It has made me recognize that I should specify that I don’t want this to be system-wide; which was not clear from the post.

What you’re describe in your post is a user who is not confident enough to manage their own machine with the CLI, and is afraid of misplacing files.

I understand why I might have given off that impression. But no worries; I’m a (relatively) seasoned Linux user. I also have no qualms with CLI or whatsoever. It’s a specific set of files that I wish to ‘protect’.

just_another_person ,

You’re aware of file permissions, right?

So if you’re concerned about a specific set of files that you don’t want moved, AND they’re in a normal userspace location…

poki OP ,

The thing with file permissions is that I or root are able to change that. I am looking for a method (if it exists) that somehow bypasses that.

just_another_person ,

Yeah, but you’d need to sudo in order to affect the files. So that’s a simpler way of doing what you’re suggesting.

poki OP ,

I’ll straight up pose the question I asked someone else:

It seems I wasn’t clear as most people misunderstood me.

But, to give a very precise example; say

  • I had a folder called ~/some/folder.
  • It was on an encrypted drive.
  • And I had done additional work to encrypt the folder again.
  • And say, I used chattr, chmod or chown or similar utilities that remove access as long as one doesn’t have elevated privileges.
  • And say, I had done whatever (additional thing) mentioned in your comment.

Then, what prevents whosoever, to copy that file through cloning the complete disk?

Even if they’re not able to get past the password, it will be found on the cloned disk. SO, basically, I ask for some method that prevents the file to even be copied through a disk clone. I don’t care that it has three passwords protecting it. What I want is for the disk clone (or whatever sophisticated copy/mv/cut or whatsoever utility exists) to somehow fail while trying to attempt the action on the protected files.

just_another_person ,

Nothing can stop anyone anywhere from cloning a storage device. You can encrypt it however many times you want, but it can still be read at the block level.

I’m not sure where the paranoia lands or is focused towards, but there is no storage device that exists that can’t be copied, so if that’s your hangup, you should just accept that and move on. If someone has physical access to your drives, then can copy it, but whether they can decrypt it is up for debate.

As the saying goes: given enough time and effort, anything can be brute-forced.

poki OP ,

Clear. Thank you!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines