eventsger.blogg.se

How to install linux on a brand new hard drive
How to install linux on a brand new hard drive










how to install linux on a brand new hard drive

If we want that partition to be mounted permanently, it will be necessary to edit the file /etc/fstab using the preferred editor and to enter the following line. We keep the changes. The next step is to format the new hard drive with the desired file system using the command mkfs (make file system)įinally, we mount the new disk in the desired location, in this tutorial we have created a new directory called /data : mount /dev/sdb1 /data We can see that the process is executed correctly. If we rerun fdisk -l we can look at the changes in the new disk (/dev/sdb) : Establish the value of the last sector which is by default 41943039.Establish the value of the first sector which is 2048 by default.N umber 1 to establish a single partition of the new disk.Enter the letter p to define what is a primary partition.Enter the letter n to create the new partition.With this in mind we will perform the following process once the fdisk /dev/sdb command has been executed : W: Save the changes and exit the command. Once the new hard disk has been identified, the next step will be to partition it, for this we will use the following syntax: fdisk /dev/sdb Common fdisk parameters are: This name will be assigned taking into account the type of disk if we use a virtual hard drive, it will be /dev/xvdc. Once the hard disk is connected, run the same command, fdisk -l. As we can see the new hard drive, 20 GB, is assigned to the path /dev/sdb. First of all, we must know how is the structure of CentOS 7 before the installation of the new hardware, for this we must be as root users and execute the following command: fdisk -l












How to install linux on a brand new hard drive