Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Name: Date: LPIC-2: Linux Professional Institute Certification Study Guide: Exam 201 and Exam 202, 2nd Edition, Ancillary Exercises Please see the ancillary introduction and ancillary

Name: Date: LPIC-2: Linux Professional Institute Certification Study Guide: Exam 201 and Exam 202, 2nd Edition, Ancillary Exercises Please see the ancillary introduction and ancillary syllabus for LPIC-2: Linux Professional Institute Certification Study Guide 2nd Edition for guidelines associated with the following exercises. Chapter 1: Starting a System Ancillary Exercise 1.a: Customizing System Startup (Objective 202.1) Use both a Red Hatbased distribution, such as CentOS, and an Ubuntu distribution. 1. Boot an Ubuntu distribution system. 2. Press Ctrl+Alt+F2 and log in as a user who has superuser privileges via sudo. 3. At the command line, type which systemctl and press Enter. Record here what you receive: ______________ (If you receive nothing back, just record nothing.) 4. At the command line, type which initctl and press Enter. Record here what you receive: ______________ (If you receive nothing back, just record nothing.) 5. Which system initialization does this Ubuntu distribution use? systemd Upstart (Circle one) 6. If you circled systemd in the preceding step, then skip to step 19. If you circled Upstart in the preceding step, then continue with these steps. 7. Type ls /etc/inittab and press Enter. You should receive a message stating that there is no such file or directory. (The Upstart initialization method does not use the SysV /etc/inittab file, so it no longer exists on this system.) 8. View the Upstart service configuration files by typing ls /etc/init and pressing Enter. Do you see several files ending with .conf? Yes No (Circle one) 9. View the various services (that Upstart controls) and their status by typing initctl list and pressing Enter. 10. See whether the Common Unix Printing System (CUPS) service is running on the system by typing initctl status cups and pressing Enter. Is cups running on the system? Yes No (Circle one) If you circled No, find another running service you can view (such tty2) for the next few steps, instead of cups. 11. You do not have to use the initctl portion of the initctl status command. Try this by typing status cups and pressing Enter. Did you receive the same results as the previous step? Yes No (Circle one) 12. View the cups Upstart configuration file by typing less /etc/init/cups.conf and pressing Enter. What runlevel(s) does this service start on? Record your answer here: _____ What runlevel(s) does this service stop on? Record your answer here: _____ 13. Press q to exit the less pager. 14. Stop the cups service by typing sudo initctl stop cups and pressing Enter. Enter the sudo password, if asked. 15. Check the cups services status by typing status cups and pressing Enter. Is the service stopped? Yes No (Circle one) 16. You can also stop/start services without using the initctl portion of the command. Try starting the cups service without the initctl portion by typing sudo start cups and pressing Enter. Enter the sudo password, if asked. 17. Check the cups services status by typing status cups and pressing Enter. Is the service running? Yes No (Circle one) 18. If desired, shut down the Ubuntu system by typing sudo poweroff and pressing Enter. Enter the sudo password, if asked. 19. Boot a Red Hatbased distribution system, such as CentOS. 20. Press Ctrl+Alt+F2 and log in as the superuser or a user who has superuser privileges. 21. At the command line, type which systemctl and press Enter. Record here what you receive: ______________ (If you receive nothing back, just record nothing.) 22. At the command line, type which initctl and press Enter. Record here what you receive: ______________ (If you receive nothing back, just record nothing.) 23. Which system initialization does this Red Hatbased distribution use? systemd Upstart (Circle one) You should discover that systemd is used by this distribution. 24. View the various units managed by systemd by typing systemctl list-units and pressing Enter. Press the spacebar key to scroll through the listing. (You can press the q key to quit after a page or two.) 25. View only the cups service by typing systemctl list-units | grep cups.service and pressing Enter. Is the cups service running? Yes No (Circle one) If you circled No, find another running service you can view (such tty2) for the next few steps, instead of cups. 26. Look at the various unit configuration files status by typing the command systemctl list-unit-files --type=service and pressing Enter. Press the spacebar key to scroll through the listing. (You can press the q key to quit after a page or two.) 27. View only the cups service configuration files status by typing systemctl list-unit-files --type=service | grep cups.service and pressing Enter. What is the cups service configuration files status? enabled disabled static (Circle one) 28. View the cups service configuration files location by typing ls /lib/systemd/system/cups.service and pressing Enter. (Many service configuration files live in the /lib/systemd/system/ directory.) 29. Display the cups service configuration files contents by typing cat /lib/systemd/system/cups.service and pressing Enter. What target does this service start after? Record your answer here: _______ What targets want this service? Record your answer here: ____________ ___________ 30. Take a look at the multi-user.target files location by typing ls /lib/systemd/system/multi-user.target and pressing Enter. (Many target configuration files also live in the /lib/systemd/system/ directory.) 31. Display the multi-user.target files contents by typing cat /lib/systemd/system/ multi-user.target and pressing Enter. Are there any conflicts listed? Yes No (Circle one) 32. Custom service and target configuration files are typically located in the /etc/systemd/system/ directory and its subdirectories. View this directorys contents by typing ls /etc/systemd/system and pressing Enter. 33. You may also find service configuration files located in the /run/systemd directory tree. View any of these files by typing find /run/systemd -name *.service and pressing Enter. 35. Type man systemd-delta and view the commands man pages to answer the following questions: What is this command's primary purpose? Record your answer here: What are the three directories can configuration files be located within and what is the priority order of each directory? Record your answers here: 36. Press q to leave the man pages. 37. Try the systemd-delta command by typing systemd-delta and pressing Enter. Are there any overridden configuration files? Yes No (Circle one) 38. View the cups services status on the system by typing systemctl status cups and pressing Enter. Is it active (running)? Yes No (Circle one) If you circled No, skip the next step. 39. Stop the cups service on the system by typing systemctl stop cups and pressing Enter. 40. View the cups services status on the system by typing systemctl status cups and pressing Enter. Is it inactive (dead)? Yes No (Circle one) 41. Start the cups service on the system by typing systemctl start cups and pressing Enter. 42. View the cups services status on the system by typing systemctl status cups and pressing Enter. Is it active (running)? Yes No (Circle one) Ancillary Exercise 1.b: System Recovery (Objective 202.2) Use a Red Hatbased distribution (such as CentOS) that has systemd initialization and uses the GRUB2 bootloader. 1. If you are not already logged in, press Ctrl+Alt+F2 and log in as the superuser or a user who has superuser privileges. 2. See the current system status as reported by systemd by typing systemctl is-system-running and pressing Enter. Record the system status here: (Most likely the status is running, but it may show degraded if the system is not hooked to a network.) 3. View the various targets on the system by typing systemctl list-units --type=target and pressing Enter. Count the number of active targets, and record the number here: ____. (You should see several active targets listed.) 4. If needed, press q to leave the active targets list. 5. Enter rescue mode by typing systemctl isolate rescue.target and pressing Enter. (Note: You can leave off the .target from the command or just simply type systemctl rescue.) You should see a paragraph displayed that starts with Welcome to emergency mode on the screen. Do you see this paragraph? Yes No (Circle one) 6. At the or type Ctrl+D to continue prompt, type in the root accounts password. (Note: Do not press the Ctrl+D key combination. If you do press this key combination, the system will just boot into its normal default target.) 7. Once you receive a prompt, view the current runlevel by typing runlevel and pressing the Enter key. Most likely the output will be 5 1. 8. See the current system status as reported by systemd, by typing systemctl is-system-running and pressing Enter. Record the system status here: (The status should be maintenance.) 9. Compare the system status with the status you recorded in step 2. Is it different? Yes No (Circle one) 10. View the various targets on the system by typing systemctl list-units --type=target and pressing Enter. Count the number of active targets and record the number here: ____. Do you see fewer targets than you did in step 3? Yes No (Circle one) 11. If needed, press q to leave the active targets list. 12. View the journal log by typing journalctl -xb and pressing Enter. Use the spacebar to view a few pages and then press the q key to exit the journal listing. 13. Type systemctl reboot and press Enter to reboot the system to the default target mode (ignore any error messages). 14. Once the system has rebooted, press Ctrl+Alt+F2 and log in as the superuser or a user who has superuser privileges. 15. See the current system status as reported by systemd by typing systemctl is-system-running and pressing Enter. Record the system status here: 16. Compare the system status with the status you recorded in step 2. Is it different? Yes No (Circle one) 17. View the various targets on the system by typing systemctl list-units --type=target and pressing Enter. Do you see the same number of targets you saw in step 3? Yes No (Circle one) 18. If needed, press q to leave the active targets list. 19. Enter into emergency mode by typing systemctl emergency and pressing Enter. You should see a paragraph displayed that starts with Welcome to emergency mode on the screen. Do you see this paragraph? Yes No (Circle one) 20. At the or type Ctrl+D to continue prompt, type in the root accounts password. (Note: Do not press the Ctrl+D key combination. If you do press this key combination, the system will just boot into its normal default target.) 21. Once you receive a prompt, view the current system status as reported by systemd by typing systemctl is-system-running and pressing Enter. Record the system status here: (The status should be maintenance.) 22. Compare the system status with the status you recorded in step 2. Is it different? Yes No (Circle one) 23. View the various targets on the system by typing systemctl list-units --type=target and pressing Enter. Do you see fewer targets than you did in step 3? Yes No (Circle one) Do you see fewer targets than you did in step 10? Yes No (Circle one) 24. If needed, press q to leave the active targets list. 25. Type systemctl reboot and press Enter to reboot the system to the default target mode (ignore any error messages). 26. Once the system has rebooted, press Ctrl+Alt+F2 and log in as the superuser or a user who has superuser privileges. 27. At the command prompt, type man -k grub | less and press Enter to view the various grub commands. (Note: Your distribution may use grub2 commands in place of grub commands.) 28. Press q to leave the less pager utility. 29. View the contents of any grub directories by typing ls /boot/grub* and pressing Enter. Does one of these directories contain the grub.cfg file? Yes No (Circle one) 30. If you did not see the grub.cfg file in the preceding step, skip the rest of this exercises steps and proceed to the next exercise. 31 Record the directory where your system stores its grub.cfg file here: ________________ 32. View the grub.cfg file by typing less directory/grub.cfg and pressing Enter. (Dont actually type directory but instead use the directory name you recorded in the preceding step.) 33. The grub.cfg file may have some helpful comments at its top. Record those comments here (its OK if your configuration file has no helpful comments): 34. Page through the grub.cfg file by pressing the spacebar; press the q key when you are done to exit the less pager utility. 35. See whether your distribution has the /etc/default/grub file by typing ls /etc/default/grub and pressing Enter. Does your distro have the /etc/default/grub file? Yes No (Circle one) 36. If you did not see the /etc/default/grub file in the preceding step, skip the rest of this exercises steps and proceed to the next exercise. 37. Determine whether there are any grub settings within this file by typing grep GRUB /etc/default/grub and pressing Enter. Are there any grub settings within this file? Yes No (Circle one) Do you see a grub timeout value? Yes No (Circle one) 38. If desired, power down your system by typing systemctl poweroff and pressing Enter. Ancillary Exercise 1.c: Alternate Bootloaders (202.3) Use a Red Hatbased distribution, such as CentOS, or the Ubuntu distribution. The system must be connected to the Internet. 1. Log into the GUI as an ordinary user. 2. Open a web browser (such as Firefox) and navigate to www.stlinux.com/u-boot/introduction. 3. Read through this U-Boot introduction web page. Record a few of its features here: 4. Go to your favorite search engine and type in systemd-boot. From the web pages you find, answer the following questions: Where does systemd-boot assume your EFI System Partition (ESP) is mounted? Record your answer here: What name did systemd-boot have previously? Record your answer here: Was systemd-boot created for BIOS or UEFI systems? BIOS UEFI (Circle one) 5. Navigate to www.syslinux.org, read the web page, and answer the following: This project offers lightweight bootloaders for: (Record each bootloader name and its purpose below): Name Purpose 1. 2. 3. 4. 5. 6. Go to the ISOLINUX page on this website, read the web page, and answer the following. ISOLINUX comes in two flavors. What are they? Record your answer here:

Attachments:

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Students also viewed these Programming questions

Question

=+ What are the undesirable consequences?

Answered: 1 week ago