summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2019-10-12 14:27:24 -0600
committermo khan <mo.khan@gmail.com>2019-10-12 14:27:24 -0600
commita7e0086ff90d462f47a27c24e74af3d98e2cae58 (patch)
tree0ee64f17eaede86c51eb6e035e186b373bf44d2c /README.md
parent46a31fa7d3a86ed1f7c5ac33e795c4bbf7b9ced3 (diff)
refine existing answers
Diffstat (limited to 'README.md')
-rw-r--r--README.md300
1 files changed, 170 insertions, 130 deletions
diff --git a/README.md b/README.md
index c44bff9..e1331d0 100644
--- a/README.md
+++ b/README.md
@@ -21,32 +21,39 @@
Fedora. People who are more familiar with `apt` or `Unity` will likely
prefer Ubuntu.
- I believe that Ubuntu is more popular than Fedora, so you may find more
- community forums and helpful posts related to Ubuntu if you need help.
- My current personal preference is Fedora.
+ Both Ubuntu and Fedora appear to have large communities. Support
+ for both distributions is available through community forums, mailing lists,
+ IRC and community websites.
b. A university computer science lab
In a university computer science lab, I think there is less of a need for a
- graphical user interface so OpenBSD might be a good choice. OpenBSD is known
- as a security focused BSD. This would be very useful in a university lab
- setting where you will multiple users working within the lab.
+ graphical user interface. OpenBSD is a good choice because it is known
+ as a security focused BSD. This is useful in a university lab
+ setting where multiple users work within the lab. OpenBSD supports
+ running the XOrg X window system if the need for a minimal GUI is needed.
c. A corporate web server
A corporation may prefer to use either RedHat Enterprise Linux (RHEL) or
- CentOS. RHEL is an open source operating system but does need to be
- purchased. The purchase includes support that may be very helpful in a
+ CentOS. RHEL is an open source operating system but a license must be
+ purchased for the specific flavour of this distribution. The pricing and
+ options are available [here](https://www.redhat.com/en/store/linux-platforms).
+
+ For a corporate web server I recommend the [Red Hat Enterprise Linux
+ Server](https://www.redhat.com/en/store/red-hat-enterprise-linux-server#?sku=RH00005).
+ A purchase includes different levels of support that is helpful in a
corporate environment. Depending on the corporation, they may not need the
- support that a RHEL purchase provides because they have in house engineers
+ support that a RHEL purchase provides because they have engineers
that can support the web server. In that case, they may choose to use
- CentOS. CentOS is the Community Enterprise OS, which is a binary compatible
+ CentOS. [CentOS](https://centos.org) is the Community Enterprise OS, which is a binary compatible
distribution of RHEL without the cost or support.
- Both distributation offer longer term support and typically ship with more
- stable versions of the linux kernel. This stability is important for key
- pieces of infrastructure, such as a corporate web server. These OS also ship
- with default yum repos that provide regular security updates.
+ Both distributations ship with stable versions of the Linux kernel.
+ This stability is important for key pieces of infrastructure, such as a corporate web server.
+ These operating systems also ship with default yum repos that provide regular security updates.
+ RHEL has the advantage of releasing security patches earlier but CentOS
+ usually [catches up within 24 - 72 hours](https://wiki.centos.org/FAQ/General#head-cea9337e6513cc1567c4d05afbd693f1f7038ccb).
RHEL based distros ship with the Security Enhanced (SELinux) Linux modules
that provides mechanisms for better management of access controls. To ensure
@@ -201,17 +208,17 @@ Your report should include advice to other people attempting to do the same.
1. HDD: 10GB unallocated
1. USB: Minimum of 1 USB 2.0 port is recommended
- For this installation a USB flash drive is required to perform the installation.
+ For this installation a USB flash drive is required.
This installation will describe how to setup a stand-alone Linux environment.
Dual boot is possible but will not be covered in this document.
1. Download the latest Fedora 30 DVD ISO from https://getfedora.org/en/workstation/download/
1. Verify the download by verifying the checksum of the downloaded image. https://getfedora.org/en/security/
- 1. Write the DVD iso to a flash drive.
+ 1. Write the DVD ISO to a flash drive.
```bash
$ dd if=/path/to/image.iso of=/dev/sdX bs=8M # use lsblk to identify the usb flash storage device
```
- 1. After the iso is written to the flash drive you will need to reboot the
+ 1. After the ISO is written to the flash drive you will need to reboot the
machine with the flash drive inserted. You might need to tweak the boot
settings to boot from the flash drive before the hard disk. Accessing the
BIOS configuration is dependent on the device. On my machine pressing F2
@@ -585,7 +592,11 @@ Your report should include advice to other people attempting to do the same.
1. Study the system configuration files and answer the following questions:
a. What startup style does your system most resemble, BSD or AT&T?
- I am running Fedora 30 Workstation which resembles System V.
+ [System V](https://en.wikipedia.org/wiki/UNIX_System_V) is the init system that evolved from [System III](https://en.wikipedia.org/wiki/UNIX_System_III).
+ For quite some time many Linux distrubitions including [Fedora](https://getfedora.org) used the System V init system.
+
+ I am running Fedora 30 Workstation which currently uses the [systemd](https://en.wikipedia.org/wiki/Systemd) [init](https://en.wikipedia.org/wiki/Init) system.
+ The [systemd](https://en.wikipedia.org/wiki/Systemd) init system is meant to replace the System V and BSD init systems.
b. Why? Give at least two reasons for your answer above. (Examples would be presence or absence of /etc/inittab, init.d scripts, etc.)
@@ -627,6 +638,9 @@ Your report should include advice to other people attempting to do the same.
8 directories, 18 files
```
+ Fedora attemps to map the System V init system to the systemd, but the bulk
+ of the processes that are started during init are managed by systemd.
+
c. Which directory contains the rc.d (or similar file)? Explain the contents of the rc.d (or the file/s) that does the same in your setup.
On Fedora, the /etc/rc.d is mostly empty.
@@ -782,114 +796,114 @@ Your report should include advice to other people attempting to do the same.
d. What is stored in rc0.d? Execute the ls command while in rc0.d, and say what is common among all the files stored there.
- ```bash
- モ ls -alh /etc/rc0.d/
- total 8.0K
- drwxr-xr-x. 2 root 4.0K Jun 28 07:45 ./
- drwxr-xr-x. 10 root 4.0K Sep 3 07:01 ../
- lrwxrwxrwx. 1 root 22 Apr 25 20:30 K01livesys-late -> ../init.d/livesys-late*
- lrwxrwxrwx. 1 root 17 Apr 25 20:30 K99livesys -> ../init.d/livesys*
- ```
+ ```bash
+ モ ls -alh /etc/rc0.d/
+ total 8.0K
+ drwxr-xr-x. 2 root 4.0K Jun 28 07:45 ./
+ drwxr-xr-x. 10 root 4.0K Sep 3 07:01 ../
+ lrwxrwxrwx. 1 root 22 Apr 25 20:30 K01livesys-late -> ../init.d/livesys-late*
+ lrwxrwxrwx. 1 root 17 Apr 25 20:30 K99livesys -> ../init.d/livesys*
+ ```
- On this system there is two shell scripts defined in the `/etc/rc0.d` directory.
- These two scripts are used for adding late init scripts for running the live image.
+ On this system there is two shell scripts defined in the `/etc/rc0.d` directory.
+ These two scripts are used for adding late init scripts for running the live image.
e. What is the function of files stored in init.d and the /etc/inittab?
- On older systems the `init.d` is the directory where you place startup shell scripts.
- They typically respond to `start`, `stop` and sometimes `restart`.
+ On older systems the `init.d` is the directory where you place startup shell scripts.
+ They typically respond to `start`, `stop` and sometimes `restart`.
- The `/etc/inittab` was used by the System V init system.
- It would define what processes to start and monitor.
+ The `/etc/inittab` was used by the System V init system.
+ It would define what processes to start and monitor.
- Fedora now uses `systemd` so the `/etc/inittab` is not used.
+ Fedora now uses `systemd`.
- ```bash
- モ cat /etc/inittab
- # inittab is no longer used.
- #
- # ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
- #
- # Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target
- #
- # systemd uses 'targets' instead of runlevels. By default, there are two main targets:
- #
- # multi-user.target: analogous to runlevel 3
- # graphical.target: analogous to runlevel 5
- #
- # To view current default target, run:
- # systemctl get-default
- #
- # To set a default target, run:
- # systemctl set-default TARGET.target
- ```
+ ```bash
+ モ cat /etc/inittab
+ # inittab is no longer used.
+ #
+ # ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
+ #
+ # Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target
+ #
+ # systemd uses 'targets' instead of runlevels. By default, there are two main targets:
+ #
+ # multi-user.target: analogous to runlevel 3
+ # graphical.target: analogous to runlevel 5
+ #
+ # To view current default target, run:
+ # systemctl get-default
+ #
+ # To set a default target, run:
+ # systemctl set-default TARGET.target
+ ```
- ```bash
- モ ls -alh /etc/init.d/
- total 44K
- drwxr-xr-x. 2 root 4.0K Sep 3 07:01 ./
- drwxr-xr-x. 10 root 4.0K Sep 3 07:01 ../
- -rw-r--r--. 1 root 18K Jun 28 06:46 functions
- -rwxr-xr-x. 1 root 7.3K Apr 25 20:31 livesys*
- -rwxr-xr-x. 1 root 1.1K Apr 25 20:30 livesys-late*
- -rw-r--r--. 1 root 1.2K Sep 3 06:59 README
- ```
+ ```bash
+ モ ls -alh /etc/init.d/
+ total 44K
+ drwxr-xr-x. 2 root 4.0K Sep 3 07:01 ./
+ drwxr-xr-x. 10 root 4.0K Sep 3 07:01 ../
+ -rw-r--r--. 1 root 18K Jun 28 06:46 functions
+ -rwxr-xr-x. 1 root 7.3K Apr 25 20:31 livesys*
+ -rwxr-xr-x. 1 root 1.1K Apr 25 20:30 livesys-late*
+ -rw-r--r--. 1 root 1.2K Sep 3 06:59 README
+ ```
- ```bash
- モ cat /etc/init.d/README
- You are looking for the traditional init scripts in /etc/rc.d/init.d,
- and they are gone?
-
- Here's an explanation on what's going on:
-
- You are running a systemd-based OS where traditional init scripts have
- been replaced by native systemd services files. Service files provide
- very similar functionality to init scripts. To make use of service
- files simply invoke "systemctl", which will output a list of all
- currently running services (and other units). Use "systemctl
- list-unit-files" to get a listing of all known unit files, including
- stopped, disabled and masked ones. Use "systemctl start
- foobar.service" and "systemctl stop foobar.service" to start or stop a
- service, respectively. For further details, please refer to
- systemctl(1).
-
- Note that traditional init scripts continue to function on a systemd
- system. An init script /etc/rc.d/init.d/foobar is implicitly mapped
- into a service unit foobar.service during system initialization.
-
- Thank you!
-
- Further reading:
- man:systemctl(1)
- man:systemd(1)
- http://0pointer.de/blog/projects/systemd-for-admins-3.html
- https://www.freedesktop.org/wiki/Software/systemd/Incompatibilities
- ```
+ ```bash
+ モ cat /etc/init.d/README
+ You are looking for the traditional init scripts in /etc/rc.d/init.d,
+ and they are gone?
+
+ Here's an explanation on what's going on:
+
+ You are running a systemd-based OS where traditional init scripts have
+ been replaced by native systemd services files. Service files provide
+ very similar functionality to init scripts. To make use of service
+ files simply invoke "systemctl", which will output a list of all
+ currently running services (and other units). Use "systemctl
+ list-unit-files" to get a listing of all known unit files, including
+ stopped, disabled and masked ones. Use "systemctl start
+ foobar.service" and "systemctl stop foobar.service" to start or stop a
+ service, respectively. For further details, please refer to
+ systemctl(1).
+
+ Note that traditional init scripts continue to function on a systemd
+ system. An init script /etc/rc.d/init.d/foobar is implicitly mapped
+ into a service unit foobar.service during system initialization.
+
+ Thank you!
+
+ Further reading:
+ man:systemctl(1)
+ man:systemd(1)
+ http://0pointer.de/blog/projects/systemd-for-admins-3.html
+ https://www.freedesktop.org/wiki/Software/systemd/Incompatibilities
+ ```
f. How do you enable/disable the CTRL-ALT-DELETE as an alternative to shutdown?
- To start and stop the service you can use `systemctl`.
+ To start and stop the service you can use `systemctl`.
- ```bash
- モ systemctl start ctrl-alt-del.target
- ```
+ ```bash
+ モ systemctl start ctrl-alt-del.target
+ ```
- ```bash
- モ systemctl stop ctrl-alt-del.target
- ```
+ ```bash
+ モ systemctl stop ctrl-alt-del.target
+ ```
- ```bash
- モ systemctl status ctrl-alt-del.target
- ● reboot.target - Reboot
- Loaded: loaded (/usr/lib/systemd/system/reboot.target; enabled; vendor preset: enabled)
- Active: inactive (dead)
- Docs: man:systemd.special(7)
- ```
+ ```bash
+ モ systemctl status ctrl-alt-del.target
+ ● reboot.target - Reboot
+ Loaded: loaded (/usr/lib/systemd/system/reboot.target; enabled; vendor preset: enabled)
+ Active: inactive (dead)
+ Docs: man:systemd.special(7)
+ ```
- ```bash
- モ systemctl list-unit-files | grep ctrl-alt
- ctrl-alt-del.target enabled
- ```
+ ```bash
+ モ systemctl list-unit-files | grep ctrl-alt
+ ctrl-alt-del.target enabled
+ ```
2. Read the man page for the shutdown command.
a. How do you shut down the system to a single-user mode? Try it and present results.
@@ -916,7 +930,7 @@ Your report should include advice to other people attempting to do the same.
```
After running the above command the GUI's dissappeared and it looked like my
- system was reboot. A single shell was shown with the following output:
+ system was rebooted. A single shell was shown with the following output:
```bash
Fedora 30 (Workstation Edition)
@@ -984,7 +998,7 @@ Your report should include advice to other people attempting to do the same.
モ init 1
```
- This produced the same affect as earlier. So I was not able to switch into
+ This produced the same affect as earlier. So I was unable to switch into
single user mode from Fedora.
@@ -992,29 +1006,52 @@ Your report should include advice to other people attempting to do the same.
> Single-user mode is a mode where only the administrator (root) has access to the computer, the mode is designed for maintenance and is often used for repairs. - https://www.tldp.org/LDP/GNU-Linux-Tools-Summary/html/x5152.htm
- c. Explain options in the command “shutdown -t 100 +3 -h”.
+ c. Explain options in the command "shutdown -t 100 +3 -h".
- On a BSD system, the man page says:
+ [shutdown](https://ss64.com/bash/shutdown.html) says:
- ```text
- -h The system is halted at the specified time when shutdown execs halt(8).
- ```
+ ```text
+ Shutdown or restart linux
- The `+3` is the time string.
+ Syntax
+ shutdown [options] when [message]
- ```text
- time time is the time at which shutdown will bring the system down and
- may be the word now (indicating an immediate shutdown) or specify
- a future time in one of two formats: +number, or yymmddhhmm,
- where the year, month, and day may be defaulted to the current
- system values. The first form brings the system down in number
- minutes and the second at the absolute time specified.
- ```
+ Options
+ -c Cancel a shutdown that is in progress.
- so this command will halt the computer in 3 minutes.
+ -f Reboot fast, by suppressing the normal call to fsck
+ when rebooting.
+ -h Halt the system when shutdown is complete.
- d. How do you boot into single-user mode?
+ -k Print the warning message, but suppress actual shutdown.
+
+ -n Perform shutdown without a call to init.
+
+ -r Reboot the system when shutdown is complete.
+ -t sec
+ Ensure a sec-second delay between killing processes
+ and changing the runlevel.
+
+ Examples
+ Shutdown immediately:
+ shutdown -h now
+
+ Reboot immediately:
+ shutdown -r now
+
+ Shutdown at 8 pm:
+ shutdown -h 20:00
+
+ Shutdown in 10 minutes:
+ shutdown -h +10
+ ```
+
+ The command `shutdown -t 100 +3 -h` will halt the system in 3 minutes and
+ ensure a 100 second delay between killing processes and changing the
+ runlevel.
+
+ d. How do you boot into single-user mode?
1. At the GRUB splash screen at boot time, press any key to enter the GRUB interactive menu.
1. Select Fedora with the version of the kernel that you wish to boot and type `a` to append the line.
@@ -1024,8 +1061,11 @@ Your report should include advice to other people attempting to do the same.
e. What, if anything, do you notice that is different about booting into single-user mode compared to shutting down to single-user mode?
f. Shut the system down; then boot it normally. Look in the file /var/log/messages (often /var/adm/messages on some systems). How does the information in the “messages” file compare with what appears on the screen during boot?
+
3. Linux Startup
+
a. Run the dmesg command, and list which devices are assigned to each of CD-ROM, HD, and floppy disk.
+
b. What do you think the following (or a similar line) in dmesg output means?
```text
Linux version 2.6.5-1.358 (bhcompile@bugs.build.redhat.com) (gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)) #1 Sat May 8 09:04:50 DT 2004
@@ -1100,12 +1140,12 @@ Rootly Powers and Processes
$ passwd otheruser
```
- The `passwd` command would appear in the history of the root user but I think
+ The `passwd` command would appear in the history of the root user but
it's difficult to see who was acting as the root user when the password was
changed.
-
3. Create two entries for the sudoers configuration file:
+
a. One entry that allows users Matt, Adam, and Drew to service the printer,
to unjam the printer, and to restart printer daemons on the machine printerserver.