You are not logged in.
Your script is three lines. The third line contains the actual command you want to run. And the command you want to run is only one line.
The only case in which I could see this being launched as a script is one where you want to add or modify to this command. However, it doesn't sound like you want to in this case.
Permission denied.
Linux has several ways of saying, "you need to access this as root." We talked about /sbin already. And there is more than one protected folder in your filesystem.
can I turn this script into an .sh file
File extensions don't matter in linux like they do in windows. However, your script includes a crunchbang (#!) with the interpreter as line 1. So, for most cases, you shouldn't need to launch it by first running /bin/bash. However, your file manager may be fickle about how it launches, and I don't know which file manager miyo uses.
I think it would be helpful to research shell scripting. Nothing beats independent research. If you want to analyze some simple ones for reference, you can check out some that I made for my Linux systems:
https://github.com/souperdoupe/crunkbon … ls/scripts
EDIT: to support what GNUser said below, "which" will usually determine if you have a program installed; it's useful because sometimes developers will change the installation path for an app (a common practice between *nix and *bsd distributions). In debian, an even easier way to check for an app is to simply "apt-get install" your program.
I wasn't offended lol.
I'm wondering where you found that statement from Debian. It is my understanding that jessie-security solved this issue with a patched kernel, according to the CVE tracker. Would you mind sharing?
Again, however, all i386/i686 kernels are still vulnerable, and the kpti patch developers have no intent to fix them in the near future.
@Ron: never apologize for making an effort to develop your understanding of a topic.
Two ways you can verify if a program is installed. Replace "program" with anacron:
A) which program
The which command will print the full path of your program. If it isn't in your executables path, the output will be blank. If you want to check which directories are in your path, run "echo $PATH". Note that root has different folders in their path than normal users, including /sbin.
B) find / -iname *program*
This will take awhile, but if it is anywhere in your system, it should find it. This works for any file or directory, by the way. -iname will ignore case (uppercase or lowercase) differences. The asterisks (*) is a bash wildcard; in this case, find will find any file or folder with the string "anacron".
There are many more ways, but I prefer these.
You may want to research cron.daily and the others.
To reiterate, I'm not sure why you're pointing cron to a script that runs a simple command. I would use a script if there were a series of lines.
Yesterday, Gnuser linked to an interesting case regarding anacron. I'm assuming you read it. No idea if it applies to your situation. In any case, reinstalling or installing anacron is trivial.
what do you mean by "installed a live build from chroot"
Sorry if that was unclear. I debootstrapped a system and develop it through chroot; that includes running refractasnapshot within the chroot environment, and accessing the iso from the host filesystem later on. I don't believe this approach uses swap in the way you inquired below. Also, nothing is encrypted.
With the normal jessie kernel, the iso produced works as expected, whether I'm entering the live environment through a virtual machine (qemu), or dd-ing the iso onto a removable drive (usb). Actually, you would know, since you tested it for me.
https://dev1galaxy.org/viewtopic.php?pid=8241#p8241
One thing I forgot to mention in the original post is that I'm trying to replace the kernel altogether, although I do intend to experiment with a version that includes two kernels in the future. For now, I'm inquiring about replacing the jessie kernel with a backported one.
Using the procedures in the original post, I've tried:
a. removing the jessie kernel and then installing the backported one, and
b. installing the backported one and then removing the jessie
Both produce the same kernel panic message. What I also find weird is that, no matter what, when I uninstall the bpo and re-install jessie's, it goes back to working as expected. I did not attempt a snapshot which included both jessie's kernel and the bpo.
Researching the panic led to ambiguous results, not to mention the screen cuts off because it's something like a 640x480 resolution. My gut tells me that this is an initrd error, but I've never encountered an issue like this before. I've even manually ran the initrd and grub update commands after the bpo kernel is installed, even though it runs those during installation anyway.
The way you add commands will depend on whether or not you use cron or anacron. Each application has rich usage, and may require restarting its own daemon. I cannot say with certainty because it's been a long time since I've needed to add or modify a cron or anacron job. (I've also never modified cron commands on a Mint system, so I have no idea if the "Mint way" follows a different approach.) However, the links below should provide ample documentation, or at least direction, for task scheduling on Debian/Devuan/Miyo.
https://debian-administration.org/artic … _with_cron
https://wiki.debian.org/CronAnacronAtBatchSchedulers
To be clear, I'm leaving the documentation because I'm not sure what kind of system you're using; on a server, I only use cron, but I've heard other users swear by anacron on laptops or other systems that are routinely powered-off/suspended/hibernated.
Then I added sudo in front of it, and after putting in my password there was a brief pause, then "ron@miyolinux:~$" came back. So does that mean it worked? I rebooted and all seems well (so far).
http://www.linfo.org/sbin.html
/sbin is a standard subdirectory of the root directory in Linux and other Unix-like operating systems that contains executable...programs. They are mostly administrative tools, that should be made available only to the root (i.e., administrative) user.
Notice the directory where fstrim resides.
Some utilities, like ifconfig, will not be seen at all without root privileges (sudo or su).
https://www.sudo.ws/man/1.8.3/sudo.man.html
The "pause" you mentioned was most likely the program running.
Based on the output, it looks like you mislaunched the command. Research how to launch a custom script in a linux shell.
Also, I have no idea why you didn't just run:
/sbin/fstrim --all || true
directly in a root shell.
siva wrote:
I am assuming you understand what this command does and why.Just that it runs a trim job, whatever that is. Anything beyond that is gooblygook to me.
Uh, you may want to read about that just in case something ever, well...goes horribly wrong. SSDs can be fickle.
In any case, if the fstrim command runs as-expected in your system, it should be trivial to make a new entry using whichever cron you prefer on devuan/miyo.
Then I'd recommend putting the # back on the backports repo.
You can also specify backported packages with the "-t [repo]" option (eg, "-t jessie-backports"). Then you can keep the bpo repo uncommented and use only when needed.
To my knowledge, there have been no patches for meltdown and spectre in kernel 3.16, because it's believed that 3.16 isn't affected...
https://wiki.debian.org/DebianSecurity/SpectreMeltdown
Are you joking?
Also, processor architecture matters just as much as kernel version. Not only will i386 probably never be patched, but anything before 4.14.14 (on amd64) is just a backport, criticized for nebulous integrity.
http://forums.debian.net/viewtopic.php?f=3&t=135775
#!/bin/sh # trim all mounted file systems which support it /sbin/fstrim --all || true
I am assuming you understand what this command does and why.
Have you ran this command in devuan yet (not as a cron job, just a command)? If not, understand that there is a slight opportunity for misbehavior; because the developer hasn't messed with SSDs, you will basically be playing the role of tester.
If all you want is to know how to set up the cron job, then figure out which cron application your version of Mint uses first. In devuan, you can either...
a) learn the cron version and syntax that miyo uses and create a new job for your needs; or,
b) if you really want, and if it's in the devuan repos, use the version of cron that Mint ships. Just try to understand that you may end up setting up more than anticipated if it's not a miyo default.
@Ron: to your original question, I'm curious what doesn't work. Are you saying the file /etc/cron.weekly/fstrim doesn't exist?
It may be helpful to copy and paste the file /etc/cron.weekly/fstrim (from your mint system) into this conversation so we all know what actions it does and can provide further direction. fstrim should be available outside of mint (part of the util-linux package), so I see little reason not to modify it for your needs. Just make sure you read the documentation
I installed a live build of jessie from chroot and everything works okay. However, when I installed the backported kernel, the system spit out a kernel panic at boot. I suspect I missed a step, and would be skeptical of refractasnapshot only if it also kernel-panicked with the stock jessie kernel as well.
Procedures (all as root):
apt-get -t jessie-backports install linux-image-amd64
(update-initramfs loads automatically)
(update-grub runs automatically)
refractasnapshot
SOLUTION: install/backport the ascii+ versions of live-boot live-config live-config-sysvinit live-boot-initramfs-tools. Backporting/installing the former two will also backport/install the latter. For convenience, I've uploaded them to the crunkbong github page here, but I don't intend to maintain it after ascii reaches stable.
Sorry to get in this discusion but when you upload a iso on sourceforge ( bitdefender ) the antivirus modifies the file that is what i saw .
What does it do to the iso?
crunkbong 0.7.9 is released!
https://sourceforge.net/projects/crunkb … o/download
Changelog, 4/20/2018:
-Edited the openbox right-click menu for common gui apps. crunkbong doesn't ship with many gui apps at all, so the featured ones are really the most important imo. I decided to stick with this method because traditional menus and approaches required more dependencies -- and storage space -- than desired. It isn't worth it since most of the apps are cli-based.
-Switched the default shell back to bash. I'll probably end up changing it back to ksh once I figure out sensible keybindings/completion.
-Added a readme file for common apps/scripts. Most of it is console-based, so this is more of a quick overview.
-Separated the proprietary network firmware to .debs in a folder. This was a direct inspiration from refracta (thanks, fsmithred).
-Added xfe as the primary file manager. Minus all the ridiculous dependencies.
-Added a line in .xinitrc to give dwm a small tray with battery, date, and time. Thanks to Head_on_a_Stick.
Works in progress:
-Still looking for the leanest menu solution known to man.
-Beginning migration to ascii
-Still open to testers' advice and suggestions.
@Panopticon: I'll certainly take that into consideration XD the irony is that my friend had the same idea when we first started this.
@wdq: would you mind sharing your strategies for keeping ram usage that low?
Quality work as always.
I checked out the way you solved the proprietary firmware conundrum. I was wondering if you have a script that automates the .deb downloads and updates the readme, or if you do so by hand.
So that, when using the installer, instead of a novice to GNU/Linux just (unreflectively) choosing "Yes" (to quickly move on with the installation) to a mere question about if s/he wants to add a proprietary component, s/he is instead forced to read such a warning in the instructions of how to do this, and be educated (i.e. warned) about the important issue in question.
Honestly, if this comment alone had been the entire first post, I think it would have saved a lot of people a lot of headache.
Debian is already a great distribution in itself. So, there's no need to modify anything about it, in my opinion (besides removing the systemd component).
Then fork the original: bleach it, rebrand it, and share it. Setting up a personal github is easy. I'm sure someone is bound to use it.
This thread is not about criticizing Devuan's installer...I've created another thread for that
They're honestly all blurring together at this point.
That is, to not include anything proprietary in the installation media, but allow it to be added during the installation, only if the user really wants to and knows what s/he's doing
I think a few of the users made it very clear that the devuan installer gives you the option; therefore, a user who "knows what s/he is doing" should have no issues, well, doing. I'll echo the "user error" caveat.
I foresee some possible solutions:
a) use a libre devuan spin and manually install your system: partitioning, deboostrapping, etc.
b) rewrite the debian installer and share.
c) step B, and release it on your own devuan spin
Honestly, it sounds like option C is your best bet, as it implies the best of A and B. If you're building it from scratch (a deboostrapped build), then you can be pretty much 99.99% certain that your software is as secure as it can possibly get (the final .01% is for our friends at the NSA -- I know you're watching, Carl, so stop sending people to eat my dried kale leaves when I leave for work). In addition, it sounds like you'll have some fans who will benefit from a revised, libre-oriented installer. It sounds like your mindset could be of huge value to this community, if it were supported with software contributions. You should reach out to miroR, as well.
crunkbong (my project) is intended to focus on security, mostly through minimalism. I'm one step away from updating the kernel to 4.15.x for full meltdown mitigation (still deciding whether or not to use liquorix). The biggest issue I foresee you having with it is proprietary wifi drivers, which are the only proprietary components, and can be easily disabled or uninstalled before any network connection is established. (I'm actually trying to determine the best way to address this, btw, and I'm open to suggestions.)
If you're daring enough to boot it, and can post tangible findings regarding any proprietary-firmware-based exploits, I'd definitely love to hear back.
Not that I recommend it for daily use, aside from (I guess) being a sensible base, but it uses refractainstaller -- can't remember if this is the "default" devuan installer that this conversation is criticizing. Alternatively, one could easily manually partition a disk and debootstrap a base system. This process isn't far removed from using apt, as far as I can tell.
I wanted to have a secure OS.
http://forums.debian.net/viewtopic.php? … 65#p671040
OpenBSD Puffy.lan 6.3 GENERIC.MP#173 amd64
I gotta ask, how did you think up the name?
Short answer: I just needed a name.
Less-short answer: it's a nonsense quasi-homonym for "crunchbang."
I used crunchbang for about three years. A few years ago -- when Newborough made the official announcement to call it quits, but before BunsenLabs chimed in -- I considered all options, and deterimined to just follow Newborough's footsteps and make my own iteration in its spirit, but with some other features I find really useful.
The name was always a placeholder, but I never found a need to change it. The immature teenager in me looks forward to a future where people seriously announce absurd release names like "Crunkbong 1.0 (Bingbong)".
Thanks for testing!
I'll test the language option you used when I get home tonight. I imagine a simple transition to ascii, when it matures (I know, its current state is probably fine), will solve much of the language grief.
I think I'll also switch to bash as the default shell, or give the user an option upon login.
I'm working on a pipemenu for openbox. miyo had an interesting way of approaching that, and I'm playing around with options sans-unnecessary-dependencies and the ilk.
Current version: 0.7.11
C r U n K b O n G
Self-educate. Operate. Evacuate.
About crunkbong:
https://github.com/souperdoupe/crunkbong/wiki
Many Linux projects feature beautiful desktop backgrounds, polished user interfaces, and extensive, easy-to-use software. Screenshots boast their feature-rich userspace, which rivals commercial operating systems' refined aesthetics. They are attractive, well-known, and highly praised.
Crunkbong is not one of them.
Crunkbong is a switchblade for Linux: it does one thing really well. You won't always need to use one. However, when the right time comes, you'll be glad you had it. Also, it's fairly small, and meant to be kept on hand for whenever a need arises.
I wanted to construct a user experience based on the same framework, one that is small (~300mb), can fit in your pocket (on a USB drive), and used for a specific purpose: to get information from point-A to point-B, whether locally or across a network. (...)
Crunkbong is a means to accomplishing several specific ends with no commitment: you perform your task, and go back to the real world.
Official page: https://souperdoupe.github.io/
Downloads: https://sourceforge.net/projects/crunkbong-os/files
crunkbong utils: https://github.com/souperdoupe/crunkbong
Screenshots/videos: https://github.com/souperdoupe/crunkbon … creenshots
crunkbong is based on amd64. If there is a request for 32-bit (i686), I'll build one from scratch.
If there is no display manager, live-config will still run startx. You can disable that by adding the following boot option:
nocomponents=xinit
This was perfect, thanks.