Sponsored Content
Top Forums UNIX for Dummies Questions & Answers UNIX/Linux/Distributions - driving me crazy... Post 302599192 by alexscript on Thursday 16th of February 2012 11:34:13 AM
Old 02-16-2012
If you speak about Linux distro i think make more sense use stable distro instead at solution as Gentoo more focused on performance and last packages. Indirectly using last packages means, potentially, more security problem, instead of using a little old package but with fix.
Just as idea, in case of linux, do you already give a look at kernel patch?
As for example grsecurity?
Do you have already take a look at the Access Control List (and other similar solutions) for a more fine permissions of the users on a system?
Etc.
The safety aspect is fascinating and the few that can get the necessary skills earn lots of money ...
Generally, i think, is better focus the time (the time isn't infinite) on these type of aspect instead of build or use an OS from scratch.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

unix driving me crazy

:( :confused: what is performed by the following unix command: grep -v Jane project1.txt and grep ' 5\..' janet.txt (1 Reply)
Discussion started by: Tendernisin
1 Replies

2. UNIX for Dummies Questions & Answers

Unix or Linux distributions for a PC

Hi all, I'd like to install either Unix or Linux on my PC and I don't know which way to go- I've tried with HP-UX 11.11 and it failed but I've heard that LInux is the fastest growing operating system in the world.I am asking you thus what sort of Linux distribution would be the best choice for a... (8 Replies)
Discussion started by: adrian262
8 Replies

3. Shell Programming and Scripting

Pleas help..this is driving me crazy

Hi, I've created a script in csh that takes a file and checks it for mispelled words. Im almost done but I need to do two more things but I need help. First, when displaying an incorrect word to the user, I need to show the line of the input file that contains the word. Second,if the user... (0 Replies)
Discussion started by: hckygoli31
0 Replies

4. UNIX for Dummies Questions & Answers

UNIX/Linux Distributions on VMware Workstation 6?

Which distributions are known to have great performance, but also excellent ease of use and compatibility on VMware Workstation 6? I have 2GB of real RAM in my system and Windows Vista Home Premium as a host operating system. I can almost always get away with alotting up to 1GB of RAM for my... (1 Reply)
Discussion started by: MrrrrrNiceGuy
1 Replies

5. Shell Programming and Scripting

PERL cgi script... extra character driving me crazy

I'm using a PERL cgi script that uses rrdtool to make graphs. I can't get the syntax correct to use a degree sign (alt+0176 like this °) and also using a variable. If I use single quotes, I can't call the variable. If I use double quotes, there is an extra symbol (Â) before the ° which goes... (2 Replies)
Discussion started by: audiophile
2 Replies

6. Shell Programming and Scripting

/etc/init.d available in all Linux distributions?

Hi All, I would just like to know if the /etc/init.d directory which is used to hold the start up scripts is available in all linux distributions? Are there any exceptions One more question Is the command chkconfig available in all Linux distributions and used in a similar fashions... (2 Replies)
Discussion started by: gurubarancse
2 Replies

7. Shell Programming and Scripting

Escape Characters are driving me crazy!

Hi everyone, Is there anywhere I can find a complete table of all characters that must be escaped by the various UNIX shells and scripting languages? It seems every command/shell/scripting language has different rules about what characters must be escaped. I do a lot of searching and... (3 Replies)
Discussion started by: troym72
3 Replies

8. UNIX for Dummies Questions & Answers

Variable with @ sign is driving me crazy

Ok so I am working on a command that is going to do a Dig @ a certain IP address which is enclosed in a variable. Now I thought I had this figure out because it works. The problem is that it does not ALWAYS work. the variable is IP=192.168.1.1 the commands I have tried are dig... (2 Replies)
Discussion started by: MrEddy
2 Replies

9. UNIX for Dummies Questions & Answers

unix distributions?

I'm new in the UNIX world. I'm just wondering what are the different examples of unix distributions? (2 Replies)
Discussion started by: j3ff_skull
2 Replies
DRACUT.MODULES(7)						      dracut							 DRACUT.MODULES(7)

NAME
dracut.modules - dracut modules DESCRIPTION
dracut uses a modular system to build and extend the initramfs image. All modules are located in /usr/lib/dracut/modules.d or in <git-src>/modules.d. The most basic dracut module is 99base. In 99base the initial shell script init is defined, which gets run by the kernel after initramfs loading. Although you can replace init with your own version of 99base, this is not encouraged. Instead you should use, if possible, the hooks of dracut. All hooks, and the point of time in which they are executed, are described in the section called "BOOT PROCESS STAGES". The main script, which creates the initramfs is dracut itsself. It parses all arguments and sets up the directory, in which everything is installed. It then executes all check, install, installkernel scripts found in the modules, which are to be processed. After everything is installed, the install directory is archived and compressed to the final initramfs image. All helper functions used by check, install and installkernel are found in in the file dracut-functions. These shell functions are available to all module installer (install, installkernel) scripts, without the need to source dracut-functions. A module can check the preconditions for install and installkernel with the check script. Also dependencies can be expressed with check. If a module passed check, install and installkernel will be called to install all of the necessary files for the module. To split between kernel and non-kernel parts of the installation, all kernel module related parts have to be in installkernel. All other files found in a module directory are module specific and mostly are hook scripts and udev rules. BOOT PROCESS STAGES
dracut modules can insert custom script at various points, to control the boot process. These hooks are plain directories containing shell scripts ending with ".sh", which are sourced by init. Common used functions are in dracut-lib.sh, which can be sourced by any script. Hook: cmdline The cmdline hook is a place to insert scripts to parse the kernel command line and prepare the later actions, like setting up udev rules and configuration files. In this hook the most important environment variable is defined: root. The second one is rootok, which indicates, that a module claimed to be able to parse the root defined. So for example, root=iscsi:.... will be claimed by the iscsi dracut module, which then sets rootok. Hook: pre-udev This hook is executed right after the cmdline hook and a check if root and rootok were set. Here modules can take action with the final root, and before udev has been run. Start Udev Now udev is started and the logging for udev is setup. Hook: pre-trigger In this hook, you can set udev environment variables with udevadm control --property=KEY=value or control the further execution of udev with udevadm. Trigger Udev udev is triggered by calling udevadm trigger, which sends add events for all devices and subsystems. Main Loop In the main loop of dracut loops until udev has settled and all scripts in initqueue/finished returned true. In this loop there are three hooks, where scripts can be inserted by calling /sbin/initqueue. Initqueue This hook gets executed every time a script is inserted here, regardless of the udev state. Initqueue settled This hooks (initqueue/settled) gets executed every time udev has settled. Initqueue timeout This hooks (initqueue/timeout) gets executed, when the main loop counter becomes half of the rd.retry counter. Initqueue finished This hook (initqueue/finished) is called after udev has settled and if all scripts herein return 0 the main loop will be ended. Abritary scripts can be added here, to loop in the initqueue until something happens, which a dracut module wants to wait for. Hook: pre-mount Before the root device is mounted all scripts in the hook pre-mount are executed. In some cases (e.g. NFS) the real root device is already mounted, though. Hook: mount This hook is mainly to mount the real root device. Hook: pre-pivot This hook is called before cleanup hook, This is a good place for actions other than cleanups which need to be called before pivot. Hook: cleanup This hook is the last hook and is called before init finally switches root to the real root device. This is a good place to clean up and kill processes not needed anymore. Cleanup and switch_root Init (or systemd) kills all udev processes, cleans up the environment, sets up the arguments for the real init process and finally calls switch_root. switch_root removes the whole filesystem hierarchy of the initramfs, chroot()s to the real root device and calls /sbin/init with the specified arguments. To ensure all files in the initramfs hierarchy can be removed, all processes still running from the initramfs should not have any open file descriptors left. NETWORK INFRASTRUCTURE
FIXME WRITING A MODULE
A simple example module is 96insmodpost, which modprobes a kernel module after udev has settled and the basic device drivers have been loaded. All module installation information is in the file module-setup.sh. First we create a check() function, which just exits with 0 indicating that this module should be included by default. check(): return 0 The we create the install() function, which installs a cmdline hook with priority number 20 called parse-insmodpost.sh. It also installs the insmodpost.sh script in /sbin. install(): inst_hook cmdline 20 "$moddir/parse-insmodpost.sh" inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh The pase-instmodpost.sh parses the kernel command line for a argument rd.driver.post, blacklists the module from being autoloaded and installs the hook insmodpost.sh in the initqueue/settled. parse-insmodpost.sh: for p in $(getargs rd.driver.post=); do echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf _do_insmodpost=1 done [ -n "$_do_insmodpost" ] && /sbin/initqueue --settled --unique --onetime /sbin/insmodpost.sh unset _do_insmodpost insmodpost.sh, which is called in the initqueue/settled hook will just modprobe the kernel modules specified in all rd.driver.post kernel command line parameters. It runs after udev has settled and is only called once (--onetime). insmodpost.sh: . /lib/dracut-lib.sh for p in $(getargs rd.driver.post=); do modprobe $p done module-setup.sh: check() check() is called by dracut to evaluate the inclusion of a dracut module in the initramfs. $hostonly If the $hostonly variable is set, then the module check() function should be in "hostonly" mode, which means, that the check() should only return 0, if the module is really needed to boot this specific host. check() should return with: 0 Include the dracut module in the initramfs. 1 Do not include the dracut module. The requirements are not fullfilled (missing tools, etc.) 255 Only include the dracut module, if another module requires it or if explicitly specified in the config file or on the argument list. module-setup.sh: depends() The function depends() should echo all other dracut module names the module depends on. module-setup.sh: cmdline() This function should print the kernel command line options needed to boot the current machine setup. It should start with a space and should not print a newline. module-setup.sh: install() The install() function is called to install everything non-kernel related. To install binaries, scripts, and other files, you can use the functions mentioned in [creation]. To address a file in the current module directory, use the variable "$moddir". module-setup.sh: installkernel() In installkernel() all kernel related files should be installed. You can use all of the functions mentioned in [creation] to install files. Creation Functions inst_multiple [-o] <file> [ <file> ...] installs multiple binaries and files. If executables are specified without a path, dracut will search the path PATH=/usr/sbin:/sbin:/usr/bin:/bin for the binary. If the option "-o" is given as the first parameter, a missing file does not lead to an error. inst <src> [<dst>] installs one file <src> either to the same place in the initramfs or to an optional <dst>. inst_hook <hookdir> <prio> <src> installs an executable/script <src> in the dracut hook <hookdir> with priority <prio>. inst_rules <udevrule> [ <udevrule> ...] installs one ore more udev rules. Non-existant udev rules are reported, but do not let dracut fail. instmods <kernelmodule> [ <kernelmodule> ... ] instmods should be used only in the installkernel() function. instmods installs one or more kernel modules in the initramfs. <kernelmodule> can also be a whole subsystem, if prefixed with a "=", like "=drivers/net/team". instmods will not install the kernel module, if $hostonly is set and the kernel module is not currently needed by any /sys/.../uevent MODALIAS. To install a kernel module regardless of the hostonly mode use the form: hostonly='' instmods <kernelmodule> Initramfs Functions FIXME Network Modules FIXME AUTHOR
Harald Hoyer SEE ALSO
dracut(8) dracut 06/12/2014 DRACUT.MODULES(7)
All times are GMT -4. The time now is 08:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy