Reading: The manual pages for the various commands are a great resource (man command-name). They describe the options each command accepts and well as (in some cases) showing examples of how to use the commands. Microsoft Copilot can also be helpful at getting you started, but you should double-check any information it provides by reviewing the manual pages.
In this lab you will create a separate partition for the /home filesystem and copy all files from the original filesystem to the new one.
It can be convenient to subdivide large storage devices into separate partitions. Often, the operating system is in one partition while user files or data files are in other partitions. This has several benefits: easier OS upgrades, easier backups, and easier management of home directory growth (adding space as needed).
There are many tools that allow you to modify the partitions in your storage devices. The fdisk utility is the most primitive, but also universally available (on Linux systems). The parted (partition editor) tool is also a command line tool, but with more convenience features than fdisk. Gparted (GNOME Partition Editor) is an open source GUI tool that is the easiest to work with, but does require a graphical user interface.
For this lab we will use the classic command line tools. They require the least resources and have the widest availability.
You cannot modify partitions that are in use such as the boot partition. Therefore, you need to boot from a different partition (if one is available) or use a bootable ISO image (called a "live image"). Once that is done, the default boot partition can be changed. This can be achieved with shell commands (e.g., fdisk, etc.) from a live boot terminal
[OPTIONAL] Update your system by applying any pending package updates. Recall that on Ubuntu systems this can be done with the following commands:
$ sudo apt update # Update the local package database. $ sudo apt upgrade # Update all installed packages. $ sudo apt autoremove # Remove packages that are no longer needed. $ sudo reboot # Reboot the system to activate the new kernel.
It is an open question as to how often you should apply updates. Frequent updating fixes security problems as soon as fixes become available. However, updating the system can be disruptive, and it exposes your system to problems arising from broken updates.
Create at least one file in student's home directory. The contents of this file are not important. You just want at least one file to copy to the new partition so you can verify that it was copied appropriately.
Plan your work! For this lab we will create a small partition for the /home filesystem (for example, 4 GiB). You want to be sure you leave enough space on your root partition for all the files currently there and for new servers we'll be installing later in this course. Research the necessary commands before you begin so you know what you are trying to do! Don't just stumble into the problem and hope you can figure it out as you go along.
This summarizes the steps:
For this lab submit a document that details the steps you took and the commands you used to complete the task. You can start by copying the steps given above into your report and then elaborating on them as necessary. For example, what precise command lines did you use? What results did you see? The lab is worth 20 points.
Last Revised: 2025-01-28
© Copyright 2025 by Peter Chapin <peter.chapin@vermontstate.edu>