Unix Operating System & Boot Process
40 Questions
1 Views

Unix Operating System & Boot Process

Created by
@EasygoingLimit

Podcast Beta

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is a key expected outcome of this module related to user accounts?

  • Manipulate user accounts (correct)
  • Explain disk and file system structure
  • Establish network services
  • Investigate the structure of the LDAP directory
  • Which component is NOT part of the process structure manipulation in Unix?

  • Background/foreground
  • Initialization process
  • Fork/execute
  • User account management (correct)
  • What does the acronym 'LDAP' stand for in the context of Unix?

  • Linux Data Access Protocol
  • Legacy Directory Access Protocol
  • Local Database Access Platform
  • Lightweight Directory Access Protocol (correct)
  • Which statement best describes the Unix operating system's historical significance?

    <p>It is a cornerstone of internet infrastructure.</p> Signup and view all the answers

    In which of the following devices is a Unix-based system NOT commonly found?

    <p>Basic calculators</p> Signup and view all the answers

    Which security aspect is important when using Unix?

    <p>Encryption of user passwords</p> Signup and view all the answers

    What substitution has been made in character encoding systems over time?

    <p>Unicode has replaced ASCII</p> Signup and view all the answers

    Which operating systems are derived from Unix?

    <p>Linux and OS X</p> Signup and view all the answers

    What is the primary purpose of the /dev/initrd in the boot process?

    <p>To mount an initial root filesystem for the kernel</p> Signup and view all the answers

    Which of the following describes a block device?

    <p>A device that supports random access to data</p> Signup and view all the answers

    What does the kernel do after all drivers have been loaded?

    <p>Determines memory size and configures hardware</p> Signup and view all the answers

    How does the system typically handle input and output for character devices?

    <p>By reading and writing each character immediately</p> Signup and view all the answers

    What occurs during the second phase of the boot process using /dev/initrd?

    <p>Additional drivers or module information are loaded</p> Signup and view all the answers

    What information do devices without drivers receive from the kernel?

    <p>They are considered disabled</p> Signup and view all the answers

    Which command is used to check the permissions of /dev/initrd?

    <p>ls -l /dev/initrd</p> Signup and view all the answers

    What will the kernel conduct during its execution routine?

    <p>Probing the system bus and querying drivers</p> Signup and view all the answers

    What is the purpose of the Master Boot Record (MBR)?

    <p>Initiate the boot process of the operating system</p> Signup and view all the answers

    How large is the Master Boot Record (MBR)?

    <p>512 bytes</p> Signup and view all the answers

    Where does the BIOS read to initiate the boot process?

    <p>Track 0, Sector 1</p> Signup and view all the answers

    What is included in the first sector of the hard disk?

    <p>Disk partition tables and executable code</p> Signup and view all the answers

    What is referred to as the 'bootstrap code' in the MBR?

    <p>The initial 440 bytes of the MBR</p> Signup and view all the answers

    What role does the 'bootstrap code' serve?

    <p>To look up and load another file for booting</p> Signup and view all the answers

    What command shuts down a UNIX system immediately?

    <p>shutdown -h now</p> Signup and view all the answers

    Which command will reboot a UNIX system immediately?

    <p>shutdown -r -t 60</p> Signup and view all the answers

    What does the MBR check to determine which partition to boot?

    <p>If the partition is active and bootable</p> Signup and view all the answers

    What component follows the MBR in the boot process?

    <p>The stage two bootloader</p> Signup and view all the answers

    What does the 'x' character indicate in the /etc/passwd file?

    <p>Encrypted password is stored in /etc/shadow</p> Signup and view all the answers

    Which UID range is reserved for the root account in UNIX?

    <p>0</p> Signup and view all the answers

    What is one consequence of using the kill command indiscriminately?

    <p>Loss of user input and program results</p> Signup and view all the answers

    How is the field in the /etc/passwd file separated?

    <p>Colon (:)</p> Signup and view all the answers

    What does the '-a' option do in the shutdown command?

    <p>Use /etc/shutdown.allow</p> Signup and view all the answers

    Which field provides additional user information in the /etc/passwd file?

    <p>User ID Info</p> Signup and view all the answers

    What happens if a user's home directory does not exist upon login?

    <p>The user will be logged into the root directory (/).</p> Signup and view all the answers

    Which field in the /etc/shadow file represents the minimum number of days between password changes?

    <p>Minimum</p> Signup and view all the answers

    What does the 'Expire' field in the /etc/shadow file indicate?

    <p>The absolute date when the account is disabled.</p> Signup and view all the answers

    What does the 'GID' field in the /etc/group file represent?

    <p>The numerical group identifier.</p> Signup and view all the answers

    What is the status of the password field if it is empty in the /etc/group file?

    <p>No password is needed for group access.</p> Signup and view all the answers

    In the /etc/shadow file, what does the 'Warn' field indicate?

    <p>The days remaining before a user's password expires.</p> Signup and view all the answers

    What are the three methods for adding users on a UNIX system?

    <p>Manually through system interface, command line, and automated scripts.</p> Signup and view all the answers

    What is the default permission for the /etc/shadow file as shown in the example?

    <p>-r--------</p> Signup and view all the answers

    Study Notes

    Unix Operating System

    • The term "System Administrator" often implies Unix system administration, even though the same concepts apply across different operating systems.
    • Unix history is fascinating, and its development is closely tied to the rise of the internet and related technologies.
    • The Unix operating system originated as a platform for Ken Thompson's "Space Travel" game, running on a PDP-7.
    • Unix has evolved and is now the foundation for various operating systems, including Linux, Apple's OS X, Android, iOS, and many more.

    "Initializing" or "Booting" the Machine

    • The boot process begins with the BIOS reading the Master Boot Record (MBR) from Track 0, Sector 1 of the hard disk.
    • The MBR is the first software component in the boot procedure on BIOS-based machines.
    • The MBR is 512 bytes in size and contains the disk partition tables, executable bootloader code.

    MBR

    • The MBR contains information about how the hard disk is partitioned.
    • It also includes a small program that reads the partition table, identifies the active partition (bootable), and loads the boot sector of that partition.
    • The boot sector contains a program that reads the first portion of the operating system and starts it.

    /dev/initrd

    • The /dev/initrd is a RAM disk device loaded by the boot loader before the kernel starts.
    • It represents the initial root filesystem used by the kernel during the first phase of boot.
    • Additional drivers or modules are loaded from the initial root device as the kernel initializes.
    • A new root filesystem is mounted from a different device once the initial root filesystem is complete.

    Block Devices

    • Block devices are used to read and write data in blocks.
    • Examples include CDROM, hard disks, and floppy disks.
    • The dd command reads 512 byte blocks, 'dd if=/dev/sda1 of=/dev/null count=1' reads one 512 byte record.
    • Examples of block devices: /dev/initrd, /dev/ram10

    Character Devices

    • Character devices transmit data one character at a time.
    • They are used for stream communication and do not support random access to data.
    • Examples of character devices include mice, keyboards, virtual terminals, and serial modems.
    • Character devices typically use un-buffered input/output routines.
    • Examples of character devices: /dev/console, /dev/tty44

    Role of the Kernel

    • Once drivers are loaded, control is transferred to the kernel.
    • The kernel performs several crucial functions:
      • Determines the system's memory size.
      • Initializes data structures.
      • Mounts the root partition.
      • Configures hardware.
    • The kernel configures information by probing the system bus and querying drivers.
    • Devices without drivers are disabled.

    Shutdown Command

    • The shutdown command is used to shut down or reboot the system.
    • shutdown -h now immediately shuts down the system.
    • shutdown -r now immediately reboots the system.
    • shutdown -h 20:00 schedules a shutdown at 8:00 PM.
    • shutdown -r -t 60 reboots the system in 60 seconds.

    Kill Command

    • The kill command sends a signal to a specific process or process group.
    • Exercise caution when using kill command, especially on jobs involving text editors, databases, mail, or programs with user interaction.
    • kill terminates a job without saving user input or program results.

    /etc/passwd File

    • It is located at /etc/passwd.
    • It has a colon (:) as the field separator.
    • The format is: Username:Password:UID:GID:UserID:Home directory:Command/shell
    • Example: dandrear:x:1020:1021:dandrear user:/export/home/dandrear:/bin/bash
    • Permissions: -rw-r--r-- 1 root root 1636 Aug 16 10:37 /etc/passwd

    /etc/passwd File Fields

    • Username: Login name, up to 32 characters.
    • Password: x indicates the password is encrypted and stored in /etc/shadow.
    • UID: Unique user ID, 0 reserved for root, 1-99 for predefined accounts, 100-999 for system accounts/groups.
    • GID: Primary group ID, stored in /etc/group.
    • UserID Info: Extra information about the user.
    • Home directory: Absolute path to the user's home directory.
    • Command/shell: Absolute path to the user's shell or command.

    /etc/shadow File

    • Located at /etc/shadow.
    • Field separator: Colon (:)
    • Format: username:passwd:lastpasswdch:min:max:warn:inactive:expire:unused
    • Example: dandrear:$1$dhBysgdhfteM9gd00:13064:0:99999:7:::
    • Permissions: -r-------- 1 root root 1107 Sep 5 15:24 /etc/shadow

    /etc/shadow File Fields

    • Username: Login name.
    • Password: Encrypted password.
    • Last password change: Days since January 1, 1970.
    • Minimum: Minimum days between password changes.
    • Maximum: Maximum days the password is valid.
    • Warn: Days before password expiry when the user receives a warning.
    • Inactive: Days after password expiry when the account becomes disabled.
    • Expire: Days since January 1, 1970 when the account becomes disabled (absolute date).
    • Unused: Unused field.

    /etc/group File

    • Located at /etc/group.
    • Field separator: Colon (:)
    • Format: Group name:Password:GID:User_list
    • Example: faculty:x:410:, staff:x:430:
    • Permissions: -rw-r--r-- 1 root root 833 Aug 16 10:37 group

    /etc/group File Fields

    • Group name: Name of the group.
    • Password: Encrypted group password, empty for no password.
    • GID: Numerical group ID/unique identifier.
    • User_list: List of group members, separated by commas.

    Adding Users on a System

    • Three methods for adding users:
      • Manually through the system interface.
      • Using the useradd command.
      • Using the adduser command.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Related Documents

    Ch2.pdf

    Description

    Explore the intricacies of the Unix operating system and its historical significance. Additionally, delve into the boot process, focusing on the Master Boot Record (MBR) and its role in initializing machines. This quiz covers critical concepts that underpin modern operating systems.

    More Like This

    UNIX Operating System Overview
    18 questions

    UNIX Operating System Overview

    WellPositionedFlashback avatar
    WellPositionedFlashback
    Unix Operating System Essentials
    10 questions
    Use Quizgecko on...
    Browser
    Browser