junio 05, 2022

Borrar la partición usando el comando Parted

El artículo original está en: https://www.thegeekdiary.com/how-to-delete-disk-partition-using-parted-command/

How To Delete Disk Partition using Parted Command

Before removing the partition, make sure to unmount any partitions on the device and turn off any swap space on the device. Do not remove a partition on a device that is in use. Also take backup of the mount point using that partition, if the data is important to you.

1. Execute parted command to start

# parted

2. Suppose, /dev/sda is the device on which to remove the partition. Use the parted commnad with the /dev/sda device as shown below:

# parted /dev/sda

3. View partition table to determine the minor number of the partition to remove:

# print

4. Remove the partition with the command rm. For example, to remove the partition with minor number 2:

# rm 2
Note: The changes start taking place as soon as Enter has been pressed, please review the command before executing and committing to it.

5. After the partition has been removed, use print command to confirm that it is removed from the partition table. You cam view the output of /proc/partitions to make sure the kernel knows the partition has been removed.

# cat /proc/partitions

6. Remove entry from the /etc/fstab file. Find the line that declares the removed partition, and remove it from the file.

# vi /etc/fstab

 

El artículo original está en: https://www.thegeekdiary.com/how-to-delete-disk-partition-using-parted-command/ 

No hay comentarios:

¿Cómo poner el conteo de las filas en una consulta en MySql?

 ¿Cómo poner el conteo de las filas en una consulta en MySql? SELECT  @rownum := @rownum + 1 AS contador,  /*Contador*/ t.*  /* nombre d...