0% found this document useful (0 votes)
71 views31 pages

How To Install CentOS 7 With Custom Partitions

The document provides instructions for manually installing CentOS 7 and creating LVM partitions on a 32GB hard disk. Key steps include: 1. Creating a 250MB /boot partition as standard to hold boot files. 2. Creating a new LVM physical volume and using it to make logical volumes for /, swap, /home, and optional /tmp, /var, and /srv partitions. 3. Installing CentOS 7 and configuring the root password before rebooting and verifying the new partition setup.

Uploaded by

ruben perez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views31 pages

How To Install CentOS 7 With Custom Partitions

The document provides instructions for manually installing CentOS 7 and creating LVM partitions on a 32GB hard disk. Key steps include: 1. Creating a 250MB /boot partition as standard to hold boot files. 2. Creating a new LVM physical volume and using it to make logical volumes for /, swap, /home, and optional /tmp, /var, and /srv partitions. 3. Installing CentOS 7 and configuring the root password before rebooting and verifying the new partition setup.

Uploaded by

ruben perez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

How To Install CentOS 7 by manually Creating LVM

Linux Partitions
techencyclopedia.wordpress.com/2017/06/07/how-to-install-centos-7-by-manually-creating-lvm-linux-partitions

Techencyclopedia June 7, 2017

TECH ENCYCLOPEDIA LINUX SERIES

INTRODUCTION

What Is CentOS?

The CentOS Project is a community-driven free software effort focused on delivering a


robust open source ecosystem. CentOS is a Linux distribution (derived from Red Hat
Enterprise Linux) that is popular with system admins, dev ops engineers, and home users
alike.

Find more at: https://www.centos.org/

Lab Configuration

In this lab scenario 32 Gb hard disk is used to manually create LVM (Logical Volume
Manager) Linux partitions namely swap, root, home, var, srv and tmp. standard /boot
partition is created separately to keep the boot files and linux kernal as the system cannot
boot from LVM partition. Feel free to adjust the sizes of the partitions accordingly to the
requirement of your organization.

TUTORIAL

Firstly download CentOS 7 at https://www.centos.org/download/ and create bootable


CD/DVD

Select Install CentOS 7

1/31
2/31
Choose the language and press continue

3/31
Date & Time

Language Support

4/31
Keyboard Layout

5/31
Installation Source

6/31
Software Selection

In this scenario minimal install is selected

7/31
Installation destination

In this tutorial, LVM Linux partitions are created manually

If you are going to create the root (/) partition as a LVM, be sure to create a standard /boot
partition separately to keep the boot files and the Linux kernel because the system cannot
boot form LVM partitions.

8/31
Create The Standard Partition

Create a Standard Boot Partition

Mount Point: /boot


Desired Capacity: 250mb
Device Type: Standard Partition
File System: ext4
Label: boot

9/31
10/31
Press Update Settings

11/31
Create The New LVM PV And Rest of The Partitions

Root partition

Mount Point: /
Desired Capacity: 5 GB
Device Type: LVM [new LVM PV should be created – NewLVM-PV]
File System: ext4
Label: root

12/31
Create a new LVM PV – NewLVM-PV

13/31
14/31
Swap partition

Desired capacity is calculated according to the system RAM. If the system RAM is less than
2 GB it should be multiplied by 2, if the system RAM is more than 2 GB, should add 500
mb to the system RAM.

EX -:
system RAM is 250 mb —> Desired Capacity is 500 mb [250 mb * 2]
system RAM is 3 GB —> Desired Capacity is 3.5 GB [3 GB + 500 mb]

Mount Point: not mounted or labled


Desired Capacity: 2 GB [since the system RAM is 1 GB, 1 GB mulitiplied by 2]
Device Type: LVM [NewLVM-PV]
File System: swap
Label: swap

15/31
16/31
Home partition

Mount Point: /home


Desired Capacity: 4 GB
Device Type: LVM [NewLVM-PV]
File System: ext4
Label: home

17/31
Tmp partition (optional)

Mount Point: /tmp


Desired Capacity: 2 GB
Device Type: LVM [NewLVM-PV]
File System: ext4
Label: tmp

18/31
19/31
Var partition (optional) on web and mail servers (LVM)

Mount Point: /var


Desired Capacity: 3 GB
Device Type: LVM [NewLVM-PV]
File System: ext4
Label: var

20/31
Srv partition (optional) on FTP servers (LVM)

Mount Point: /srv


Desired Capacity: 3 GB
Device Type: LVM [NewLVM-PV]
File System: ext4
Label: srv

21/31
After creating required partitions press Done

22/31
Select Accept Changes

23/31
Press Begin Installation

24/31
Configure Root account password to complete installation

25/31
26/31
Press Finish Configuration

Press Reboot

27/31
POST INSTALLATION TASKS

After rebooting, login to the root account using the password given

To view the file system table use the command [find more at:
https://www.howtogeek.com/howto/38125/htg-explains-what-is-the-linux-fstab-and-
how-does-it-work/]

cat /etc/fstab
28/31
A file named /etc/fstab lists the devices (typically hard disk partitions) that are to be
mounted at boot time.

To view users

cat /etc/passwd

29/31
To view created groups

cat /etc/group

30/31
31/31

You might also like