% CST8207 Week 14 Notes - GRUB, Run Levels, Services, Review % Ian! D. Allen - - [www.idallen.com] % Fall 2013 - September to December 2013 - Updated Mon Dec 2 04:24:41 EST 2013 Readings, Assignments, Labs, and ToDo ===================================== - Read (at least) these things (All The Words): - [Week 14 Notes HTML] - this file - **Read All The Words** - [Unix/Linux Boot Process, GRUB, Run Levels, services, telinit, chkconfig] - [List of Commands You Should Know] - Using your [lynda.com] account, watch [Unix for Mac OS X Users] Assignments this week --------------------- Check the due date for each assignment and put a reminder in your agenda, calendar, and digital assistant. - Read (All The Words), Do, and then Submit via Blackboard: - [Assignment #12 HTML] – work with [Users and Groups] (Simpsons, StarWars, and the Megadeth Project) - You must have a working CentOS installed for Assignments 12, 13, 14. - The last assignment has been split into two smaller halves for easier marking: - [Assignment #13 HTML] – Part 1 of 2 – Disks, Partitions, File Systems - [Assignment #14 HTML] – Part 2 of 2 – BONUS – GRUB, Run Levels, services - This Part 2 half is a bonus optional assignment for extra credit. Lab work this week ------------------ Final Exam – Wednesday December 11 15h30 (3:30pm to 6:30pm) =========================================================== - Your Final Exam schedule is posted in the ICT office. The Final Exam is closed-book, no aids, no devices. - Your Final Exam covers the entire course, with slight emphasis on material since the second midterm test, and on material that students did not answer well in the previous two tests. - Your Final Exam includes questions from **all** practice tests, not just the most recent ones. - For full marks, you must read and understand the [Test Instructions] before the test for important directions on how to enter your answers and the test version number on the mark-sense forms. - There may be more questions on the test than you can answer in the time allowed; answer the ones you know, first. - Practice tests are available for the Final Exam. - Read the [Practice Test README Information]. - See the [Practice Tests] and answer files. - The same questions are posted as **Quizzes** on Blackboard. The Quizzes are random samples from the above practice questions, and so they often repeat questions. - If you only want to do each practice question *once*, use the practice test PDF files, not the Quizzes that repeat questions at random (and may not show you all the possible questions). From the Class Notes link on the Course Home Page ================================================= - Review last week. Did you do everything assigned last week? From the Classroom Whiteboard/Chalkboard ======================================== - Your in-class notes go here. - Fill our your [Course Evaluation] > Subject: Important Message from CoursEval\ > The 2013 Fall surveys have been opened for almost a week now and the > response rate is very low. Could you please encourage your students to take > a few minutes and complete their assessments. The information you receive > could be very useful to you. The survey will be open until Friday, Dec. 6th > at midnight.\ > Course Assessment Administrator - Stop using `sudo` on my CLS: idallen-ubuntu : Nov 26 15:04:29 : olfe0004 : 2 incorrect password attempts TTY=pts/3 ; PWD=/home/olfe0004 ; USER=root ; COMMAND=/sbin/shutdown -h now - [No root-owned files in your sysadmin account] - Reminder that Assignments 12, 13, and 14 each contain at the start short descriptions of the command names you need to complete the assignment. This is in addition to having the names mentioned in the [List of Commands You Should Know]. - True/False – using the GRUB menu to modify kernel options at boot time makes the modifications permanent in the GRUB configuration file. - Cross-device links: You can’t hard link a file from one partition to another; hard links only work *inside* a partition. For cross-device links, you have to use a symbolic link. - What signal is sent to a process when you type `^C` at the keyboard? - Does this work? # su foo -c "touch /tmp/foo ; chmod 777 /tmp/foo" # su bar -c "chmod 666 /tmp/foo" - Does this work for user `foo` in group `foo` and user `bar` in group `bar`? # touch /tmp/foo ; chown foo:bar /tmp/foo ; chmod 777 /tmp/foo # su bar -c "chmod 666 /tmp/foo" - What services will stop when going from Run Level 3 to Run Level 2? $ ls /etc/rc2.d K10saslauthd K87restorecond S08ip6tables S15mdmonitor S80postfix K50netconsole K88iscsi S08iptables S25blk-availability S90crond K75netfs K89iscsid S10network S26udev-post S99local K75ntpdate K89rdisc S11auditd S55sshd K87multipathd S02lvm2-monitor S12rsyslog S58ntpd $ ls /etc/rc3.d K10saslauthd K89rdisc S10network S25blk-availability S80postfix K50netconsole S02lvm2-monitor S11auditd S25netfs S90crond K75ntpdate S07iscsid S12rsyslog S26udev-post S99local K87multipathd S08ip6tables S13iscsi S55sshd K87restorecond S08iptables S15mdmonitor S58ntpd Real Sysadmin Work ================== Reporting Bugs – A Case History in Four Hours --------------------------------------------- My course notes are written using the `vim` text editor in [Pandoc Markdown] format and then processed automatically into [Plain Text] and HTML. I needed to know how to have Pandoc produce a formatted plain-text output file that wouldn’t lose any of the formatting information and could be re-input to Pandoc to re-generate itself exactly. 1. `9:00am`: I go to the [Pandoc Markdown] web site and search the documentation for a “pandoc” output format. I don’t find anything. 2. `9:30am`: I go to the [Pandoc-Discuss] online discussion forum to see if anyone has asked about a “pandoc” output format. I don’t find anything. 3. `9:45am`: I join the [Pandoc-Discuss] discussion forum, using my Google account. 4. `9:48am`: I post [this question] to the [Pandoc-Discuss] discussion forum. 5. `11:17am`: I get a reply suggesting a partial solution from a user Dirk. 6. `11:31am`: I explain why Dirk’s solution doesn’t work. 7. `11:38am`: I get a reply from John MacFarline, **the author of Pandoc himself**, giving me the correct solution. He updates his answer again at `11:43` with a further explanation. 8. `11:45am`: I try his solution and discover something odd. I produce a small example that shows the odd formatting. 9. `12:12am`: I post the odd example to the forum. 10. `12:36am`: A user Tillmann Rendel say that I’ve discovered a bug. 11. `12:50am`: Tillmann goes to the source code of Pandoc and locates the Perl code that causes the bug. 12. `12:52am`: Pandoc author John MacFarlane confirms the bug and fixes it. He “pushes” the new version of the Pandoc source code out to the web server so that everyone can update their own copy of Pandoc. I download and build the fixed Pandoc. - Elapsed time from question posted to correct solution: 1 hour 50 minutes. - Elapsed time from my bug report to the bug fix by author: 40 minutes. (!) Let’s see you try doing that with a bug in Microsoft Word. `:-)` Take Notes In Class! -------------------- ![Take Notes in Class] -- | Ian! D. Allen - idallen@idallen.ca - Ottawa, Ontario, Canada | Home Page: http://idallen.com/ Contact Improv: http://contactimprov.ca/ | College professor (Free/Libre GNU+Linux) at: http://teaching.idallen.com/ | Defend digital freedom: http://eff.org/ and have fun: http://fools.ca/ [Plain Text] - plain text version of this page in [Pandoc Markdown] format [www.idallen.com]: http://www.idallen.com/ [Unix/Linux Boot Process, GRUB, Run Levels, services, telinit, chkconfig]: 750_booting_and_grub.html [List of Commands You Should Know]: 900_unix_command_list.html [lynda.com]: https://lyceum.algonquincollege.com/Lynda [Unix for Mac OS X Users]: http://wwwlyndacom.rap.ocls.ca/Mac-OS-X-10-6-tutorials/Unix-for-Mac-OS-X-Users/78546-2.html [Users and Groups]: 700_users_and_groups.html [Test Instructions]: 000_test_instructions.html [Practice Test README Information]: PRACTICE_TEST_README.html [Practice Tests]: indexcgi.cgi#XQuizzes__Tests__and_Exams [Course Evaluation]: https://coursefeedback.algonquincollege.com/etw/ets/et.asp?nxappid=WCQ&nxmid=start&s=8 [No root-owned files in your sysadmin account]: assignment12.html#no-root-files-in-non-root-accounts [Pandoc Markdown]: http://johnmacfarlane.net/pandoc/ [Plain Text]: week14notes.txt [Pandoc-Discuss]: https://groups.google.com/forum/#!forum/pandoc-discuss [this question]: https://groups.google.com/forum/#!topic/pandoc-discuss/oQqd5ck136E [Take Notes in Class]: data/remember.jpg "Take Notes in Class"