CatgirlIntelligenceAgency/run/test-data/url-1222442301

14 lines
62 KiB
Plaintext
Raw Normal View History

<html>
<head></head>
<body>
% CST8207 Assignment 13 - CentOS: Partitions, File Systems, single user % Ian! D. Allen <idallen@idallen.ca>
[www.idallen.com] % Winter 2014 - January to April 2014 - Updated Thu Apr 17 00:32:06 EDT 2014 Due Date and Deliverables ========================= &gt; **Do not print this assignment on paper!** &gt; &gt; - On paper, you will miss updates, corrections, and hints added to the &gt; online version. &gt; - On paper, you cannot follow any of the [hyperlink URLs] that lead you &gt; to hints and course notes relevant to answering a question. &gt; - On paper, scrolling text boxes will be cut off and not print properly. - **Due Date**: `23h59 (11:59pm) Thursday April 17, 2014 (end of Week 14)` - Late assignments or wrong file names may not be marked. Please be accurate and punctual. - College policy does not allow assignments to be due after classes end. - **Available online** - Version 1 04:10 April 7, 2014 - **Prerequisites** - All [Class Notes][hyperlink URLs] since the beginning of term. - All your previous [Assignments]. - Completed [CentOS Virtual Machine] virtual machine installation (done in a previous assignment). - Completed [Assignment #08] (CentOS install and configure) - Completed [Assignment #12] (Sysadmin account) - An ability to **READ ALL THE WORDS** to work effectively. - **Deliverables** 1. Modifications to your [CentOS Virtual Machine] as given in this assignment. - **Do not delete any assignment work from your [CentOS Virtual Machine] until after the term is over!** 2. One text file uploaded to Blackboard according to the steps in the [Checking Program] section below. 3. Directory structure and files created and left for marking on the [Course Linux Server] (**CLS**).\ **Do not delete any assignment work from the CLS until after the term is over!** Purpose of this Assignment ========================== &gt; **Do not print this assignment on paper!** On paper, you cannot follow any &gt; of the hyperlink URLs that lead you to hints and course notes relevant to &gt; answering a question. This assignment is based on your weekly [Class Notes]. 1. Review the [Partitions and File Systems] commands in the [Class Notes]. 2. Practice creating and deleting partitions. Create file systems. Mount and unmount file systems. 3. Review [Booting and GRUB] in the [Class Notes]. 4. Boot into **single user** mode. (This is how you change a forgotten `root` password.) Introduction and Overview ========================= This is an overview of how you are expected to complete this assignment. Read all the words before you start working. &gt; Do not print this assignment on paper. On paper, you cannot follow any of &gt; the hyperlink URLs that lead you to hints and course notes relevant to &gt; answering a question. You also dont get any of the later updates to the &gt; assignment. Do not print this assignment on paper. 1. Complete the readings in your weekly [Class Notes]. 2. Complete the **Tasks** listed below, in order. 3. Verify your own work before running the **Checking Program**. 4. Run the **Checking Program** to help you find errors. 5. Submit the output of the **Checking Program** to Blackboard before the due date. 6. **READ ALL THE WORDS** to work effectively and not waste time. You will create filesystem structure in your CLS home directory containing various directories and files. You will also make changes in your own Linux Virtual Machine running CentOS 6.5. You can use the **Checking Program** to check your work as you do the tasks. You can check your work with the checking program as often as you like before you submit your final mark. **Some task sections below require you to finish the whole section before running the checking program; you may not always be able to run the checking program successfully after every single task step.** When you are finished the tasks, leave the files and directories in place on both the CLS and your own Linux Virtual Machine as part of your deliverables. **Do not delete any assignment work until after the term is over!** Assignments may be re-marked at any time on the CLS; you must have your term work available on the CLS right until term end. &gt; Since I also do manu
<http: tldp.org howto partition fdisk_partitioning.html>
5. Start `fdisk` interactively as `root` using the command `fdisk`*devicename*, where *devicename* is the absolute path of the device corresponding to the new disk under `/dev`. - As `fdisk` starts, read the upper-case `WARNING` about **DOS-compatible mode**. This is a serious (**strongly recommended**) warning! - Type the correct one-letter command to quit the `fdisk` program. Do not continue. 6. Re-run same `fdisk` command, this time inserting the two option letters you found in the `man` page, above. (Keep the same device name.) - The DOS `WARNING` should be gone when you start `fdisk` with those two options. (One other harmless warning about an invalid flag will remain. This is normal, since the new virtual disk is empty and has not been initialized yet. Ignore the one warning.) - Always use these two `fdisk` options on CentOS. (Other versions of `fdisk` use these options as defaults.) &gt; You should avoid this DOS warning message in future by always using the &gt; `-cu` command line options to `fdisk` (RTFM) when you run it, even &gt; non-interactively. You might even consider making a shell alias that always &gt; supplies these two options to `fdisk` every time you use it: &gt; `alias fdisk='fdisk -cu'` 7. The `fdisk` utility should now be running in **interactive** mode, prompting you for input with a different **prompt** from your BASH shell **prompt**: `Command (m for help):` - This prompt is the `fdisk` utility **prompt**. - Do not type Linux commands into the `fdisk` program prompt! - As it says, type the command letter `m` for a list of helpful `fdisk` interactive command letters. 8. Inside interactive `fdisk` use the command to display the partition table and verify that the disk you are working on is the `1GB` disk (1073MB) with no partition table and no partitions. 9. Read the list of `Command action` commands. Copy the lines below into a file `fdisk_info.txt` and replace each underscore character with the (one-character) `fdisk` command letter that does the listed function: 1. _ save/write partition table to disk (and exit) 2. _ change a partition's type (system id) 3. _ exit/quit fdisk without saving changes 4. _ display/list/print the table of all partitions 5. _ create/add a new partition 6. _ show/display/list partition types (system ids) 7. _ remove/delete a partition You will need to use every one of these command letters in this assignment. Make sure you get them right. 10. Use the `fdisk` command letter that lists all the two-hex-digit *partition types*. (Partition types are also called “system identifiers”.) Use that list to answer this: Add the lines below to the end of the same `fdisk_info.txt` file and replace the underscore on each line with the hex type number (system id) of the following partition types, making sure you read the numbers correctly from the screen: 8. _ Linux 9. _ Linux swap / So 10. _ HPFS/NTFS 11. _ W95 FAT32 (LBA) The swap line, above, is short for `Linux swap / Solaris`. You will need all these partition ID numbers later in the assignment. Your completed `fdisk_info.txt` file should be 11 lines 67 words. Run the **Fetch** and [Checking Program] to verify your work so far. ### Creating Partitions using `fdisk` &gt; To learn more on how to use `fdisk`, see your in-class notes or see &gt;
<http: tldp.org howto partition fdisk_partitioning.html>
Below, we will use the correct commands in the `fdisk` utility to create the following **seven** new partitions on your `sdb` disk. - Always accept the **default** proposed by `fdisk` for the **starting** sector of a new partition. Push **[Enter]**; do not type any numbers. You only need to set the **end** sector (size) of the new partition using the `+size{K,M,G}` syntax shown by `fdisk`. - `fdisk` will sometimes adjust the size of each partition slightly to fit the DOS partition table disk geometry and sector size. Dont be alarmed that the size that `fdisk` creates and displays to you isnt *exactly* the size you asked for. - Use the `fdisk` command letter to display the partition table **after each change** to confirm that you created the correct partition with the correct size. - No changes will be saved to disk unless you explicitly use the `fdisk` command letter to save them. You can always quit `fdisk` before saving any changes. - First, make sure the disk you are about to change has *no* partitions configured. If you see partitions, you are using `fdisk` on *the wrong disk*. Make sure you use `fdisk` on the new disk device name! 1. On the empty disk (the new disk), create a **primary** first partition of size **200M**. - **Use the suffix letter `M`, not `MB`, inside `fdisk`.** Using `MB` as a suffix creates partitions using power-of-ten MegaBytes (1,000,000) instead of power-of-two [MebiBytes]. - The type (system id) will default to type **Linux**. Dont change the type. - Use the `fdisk` command letter to display the partition table to confirm the values and make sure that the size (in blocks) looks correct for the size you requested. - The `Start` sector of this first partition should be `2048`. If it isnt, you probably forgot to use the option that turns off DOS compatibility. Quit and restart with the correct two options. - The `End` sector must be `411647`. If it is less, re-read all the words in this question, especially the words in the sentence starting with “Use the suffix…”. 2. Create a **primary** second partition of **100M**. - Leave the type (**Linux**) as default. - Confirm the change. The `Number of blocks` must be `102400`. (If it is less, re-read all the words in the previous question.) 3. Create an **extended** third partition large enough to host the following three **logical** partitions inside it. - You must make the extended partition large enough to hold **all three** logical partitions described in the next step: &gt; NOTE: As mentioned in class, you cannot create an extended partition &gt; *exactly* the sum of the sizes of the logical partitions inside it. You &gt; need to make the extended a bit *larger* to accommodate the overhead of the &gt; logical partition information. Experiment to see how much “a bit larger” &gt; means. The end of the extended partition must be *less than* sector 2097151 &gt; that is the last sector in the disk. (i.e.&nbsp;Dont use up the whole disk for &gt; the extended partition!) 4. Create these three **logical** partitions inside the **extended** partition that you created in the previous step: 1. The size of the **first logical** partition is **200M**. Leave the partition type set as “**Linux**”. 2. The size of the **second logical** partition is **100M**. Change the partition type to “**Linux swap**”. 3. The size of the **third logical** partition is **300M**. Change the partition type to “**HPFS/NTFS**”. If you run out of space creating the logical partitions inside the extended partition, you can delete the extended partition and start over as many times as needed. (You can also start over by exiting `fdisk` without saving/writing any of your partition changes.) Make the extended partition *just big enough* to contain the logical partitions, no bigger. Try not to have much wasted space between the end of the third logical partition (its **end** sector) and the end of the extended partition (its **end** sector). **Hint:** `610M` is too big; make it smaller. 5. Create a **primary** fourth partition that uses up the r
</http:>
</http:>
</idallen@idallen.ca>
</body>
</html>