Procedure 19.1. Remove Fedora partitions
mount
on a system where the root of the filesystem is on a standard partition such as /dev/sda2
might resemble:
/dev/sda2 on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0") /dev/sda1 on /boot type ext4 (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
mount
on a system where the root of the filesystem is on a logical volume might resemble:
/dev/mapper/VolGroup00-LogVol00 on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0") /dev/sda1 on /boot type ext4 (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
umount
command.
Remove Fedora entries from your bootloader
Example only
su -
and press Enter. When the system prompts you for the root password, type the password and press Enter.
gedit etc/grub.d/10_linux
and press Enter. This opens the 10_linux
file in the gedit text editor.
10_linux
file consists of four lines:
Example 19.1. Example Fedora entry in 10_linux
10_linux
, each corresponding to a different version of the Linux kernel. Delete each of the Fedora entries from these files
10_linux
file and close gedit.
gedit etc/default/grub
and press Enter.
etc/default/grub
contains a line that specifies the default operating system to boot, in the format default=N
where N is a number equal to or greater than 0. If N is set to 0, GRUB will boot the first operating system in the list. If N is set to 1, it will boot the second operating system, and so forth. Alternatively, the default value can be the full menu entry.
default=
line contains the number one below the number of your chosen default operating system in the list.
grub
file and close gedit. If you have Fedora entries in the other script files in the /etc/grub.d
directory, use this procedure to remove them in the same way.
Make space available to your operating system
Note
Note
If you do not use LVM
/dev/sda
.
(parted)
prompt, enter print
. The parted tool displays information about the partitions on your system, including their partition numbers, their sizes, and their positions on the disk.
(parted)
prompt, enter resize number start end
, where number is the partition number, start is the location on the disk at which the partition begins, and end is the location on the disk at which you want the partition to end. Use the start position that you previously obtained with the print
command, and refer to the parted documentation for different ways to specify the end parameter.
quit
at the (parted)
prompt.
e2fsck partition
, where partition is the partition that you just resized. For example, if you just resized /dev/sda3
, enter e2fsck /dev/sda3
.
resize2fs partition
at a command line and press Enter, where partition is the partition that you just resized. For example, if you just resized /dev/sda3
, type resize2fs /dev/sda3
.
If you use LVM
Create a new partition in the free space on the disk
/dev/sda
.
Command (m for help):
, enter n
to create a new partition. Refer to the fdisk documentation for options.
Change the partition type identifier
Command (m for help):
, enter t
to change a partition type.
Partition number (1-4):
, type the number of the partition that you just created. For example, if you just created partition /dev/sda3
, type the number 3
and press Enter. This identifies the partition whose type fdisk will change.
Hex code (type L to list codes):
, enter 8e
to create a Linux LVM partition.
Command (m for help):
, enter w
to write the changes to disk and exit fdisk.
Expand the volume group
lvm
and press Enter to start the lvm2 tool.
lvm>
prompt, type pvcreate partition
and press Enter, where partition is the partition that you recently created. For example, pvcreate /dev/sda3
. This creates /dev/sda3
as a physical volume in LVM.
lvm>
prompt, type vgextend VolumeGroup partition
and press Enter, where VolumeGroup is the LVM volume group on which Linux is installed and partition is the partition that you recently created. For example, if Linux is installed on /dev/VolumeGroup00
, you would type vgextend /dev/VolumeGroup00 /dev/sda3
to extend that volume group to include the physical volume at /dev/sda3
.
lvm>
prompt, type lvextend -l +100%FREE LogVol
and press Enter, where LogVol is the logical volume that contains your Linux filesystem. For example, to extend LogVol00
to fill the newly-available space in its volume group, VolGroup00
, type lvextend -l +100%FREE /dev/VolGroup00/LogVol00
.
lvm>
prompt, type exit
and press Enter to exit lvm2
e2fsck LogVol
at the command line and press Enter, where LogVol is the logical volume that you just resized. For example, if you just resized /dev/VolumeGroup00/LogVol00
, you would type e2fsck /dev/VolumeGroup00/LogVol00
.
resize2fs LogVol
at a command line and press Enter, where LogVol is the partition that you just resized. For example, if you just resized /dev/VolumeGroup00/LogVol00
, you would type resize2fs /dev/VolumeGroup00/LogVol00
.