Fedora: Difference between revisions
Jump to navigation
Jump to search
Line 141: | Line 141: | ||
=== Resize Physical Volume=== | === Resize Physical Volume=== | ||
<source lang="bash" highlight="6,7,15-18,20,23,24,32-34,36,37,45-48,50" | <source lang="bash" highlight="6,7,15-18,20,23,24,32-34,36,37,45-48,50"> | ||
sudo parted /dev/mmcblk0 | sudo parted /dev/mmcblk0 | ||
:<<EOF | :<<EOF | ||
Line 193: | Line 193: | ||
(parted) quit | (parted) quit | ||
Information: You may need to update /etc/fstab. | Information: You may need to update /etc/fstab. | ||
EOF | |||
</source> | |||
<source lang="bash" highlight="12-14,18" line> | |||
sudo fdisk /dev/mmcblk0 | |||
:<<EOF | |||
Welcome to fdisk (util-linux 2.37.2). | |||
Changes will remain in memory only, until you decide to write them. | |||
Be careful before using the write command. | |||
This disk is currently in use - repartitioning is probably a bad idea. | |||
It's recommended to umount all file systems, and swapoff all swap | |||
partitions on this disk. | |||
Command (m for help): t | |||
Partition number (1-3, default 3): 3 | |||
Hex code or alias (type L to list all): 8e | |||
Changed type of partition 'Linux' to 'Linux LVM'. | |||
Command (m for help): w | |||
The partition table has been altered. | |||
Syncing disks. | |||
EOF | EOF | ||
</source> | </source> |
Revision as of 10:01, 6 November 2021
Disable Overscan
sudo su
cat << EOF >> /boot/efi/config.txt
disable_overscan=1
EOF
cat /boot/efi/config.txt
init 6
Expand Volume
lsblk
:'
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
mmcblk0 179:0 0 119.3G 0 disk
├─mmcblk0p1 179:1 0 600M 0 part /boot/efi
├─mmcblk0p2 179:2 0 1G 0 part /boot
└─mmcblk0p3 179:3 0 5.4G 0 part
└─fedora_fedora-root 253:0 0 5.4G 0 lvm /
zram0 252:0 0 7.6G 0 disk [SWAP]
'
df -h
:'
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 1.6G 9.2M 1.6G 1% /run
/dev/mapper/fedora_fedora-root 5.5G 2.4G 3.1G 44% /
tmpfs 3.9G 4.0K 3.9G 1% /tmp
/dev/mmcblk0p2 1014M 154M 861M 16% /boot
/dev/mmcblk0p1 599M 31M 569M 6% /boot/efi
tmpfs 783M 0 783M 0% /run/user/1000
'
sudo fdisk -l
:<<EOF
Disk /dev/mmcblk0: 119.25 GiB, 128043712512 bytes, 250085376 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8f4e3975
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 2048 1230847 1228800 600M 6 FAT16
/dev/mmcblk0p2 1230848 3327999 2097152 1G 83 Linux
/dev/mmcblk0p3 3328000 14680063 11352064 5.4G 8e Linux LVM
Disk /dev/mapper/fedora_fedora-root: 5.41 GiB, 5809111040 bytes, 11345920 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/zram0: 7.64 GiB, 8205107200 bytes, 2003200 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
EOF
Create Physical Volume
sudo fdisk /dev/mmcblk0
:<<EOF
Welcome to fdisk (util-linux 2.37.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.
Command (m for help): n
Partition type
p primary (3 primary, 0 extended, 1 free)
e extended (container for logical partitions)
Select (default e): p
Selected partition 4
First sector (14680064-250085375, default 14680064):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (14680064-250085375, default 250085375):
Created a new partition 4 of type 'Linux' and of size 112.3 GiB.
Command (m for help): w
The partition table has been altered.
Syncing disks.
EOF
lsblk
:<<EOF
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
mmcblk0 179:0 0 119.3G 0 disk
├─mmcblk0p1 179:1 0 600M 0 part /boot/efi
├─mmcblk0p2 179:2 0 1G 0 part /boot
├─mmcblk0p3 179:3 0 5.4G 0 part
│ └─fedora_fedora-root 253:0 0 5.4G 0 lvm /
└─mmcblk0p4 179:4 0 112.3G 0 part
zram0 252:0 0 7.6G 0 disk [SWAP]
EOF
sudo fdisk -l
:<<EOF
Disk /dev/mmcblk0: 119.25 GiB, 128043712512 bytes, 250085376 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8f4e3975
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 2048 1230847 1228800 600M 6 FAT16
/dev/mmcblk0p2 1230848 3327999 2097152 1G 83 Linux
/dev/mmcblk0p3 3328000 14680063 11352064 5.4G 8e Linux LVM
/dev/mmcblk0p4 14680064 250085375 235405312 112.3G 83 Linux
Disk /dev/mapper/fedora_fedora-root: 5.41 GiB, 5809111040 bytes, 11345920 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/zram0: 7.64 GiB, 8205107200 bytes, 2003200 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
EOF
Resize Physical Volume
sudo parted /dev/mmcblk0
:<<EOF
GNU Parted 3.4
Using /dev/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit chs
(parted) print
Model: SD ED4QT (sd/mmc)
Disk /dev/mmcblk0: 490363,122,1
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 490363,255,2. Each cylinder is 261kB.
Partition Table: msdos
Disk Flags:
Number Start End Type File system Flags
1 4,4,0 2413,108,1 primary fat32 boot
2 2413,109,0 6525,124,1 primary xfs
3 6525,125,0 28784,111,1 primary lvm
(parted) rm 3
Error: Partition(s) 3 on /dev/mmcblk0 have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You
should reboot now before making further changes.
Ignore/Cancel? i
(parted) print
Model: SD ED4QT (sd/mmc)
Disk /dev/mmcblk0: 490363,122,1
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 490363,255,2. Each cylinder is 261kB.
Partition Table: msdos
Disk Flags:
Number Start End Type File system Flags
1 4,4,0 2413,108,1 primary fat32 boot
2 2413,109,0 6525,124,1 primary xfs
(parted) mkpart primary 6525,125,0 490363,122,1
(parted) print
Model: SD ED4QT (sd/mmc)
Disk /dev/mmcblk0: 490363,122,1
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 490363,255,2. Each cylinder is 261kB.
Partition Table: msdos
Disk Flags:
Number Start End Type File system Flags
1 4,4,0 2413,108,1 primary fat32 boot
2 2413,109,0 6525,124,1 primary xfs
3 6525,125,0 490363,122,1 primary lba
(parted) quit
Information: You may need to update /etc/fstab.
EOF
sudo fdisk /dev/mmcblk0
:<<EOF
Welcome to fdisk (util-linux 2.37.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.
Command (m for help): t
Partition number (1-3, default 3): 3
Hex code or alias (type L to list all): 8e
Changed type of partition 'Linux' to 'Linux LVM'.
Command (m for help): w
The partition table has been altered.
Syncing disks.
EOF
Knowledge
sudo dnf system-upgrade download --releasever=35 sudo dnf install dnf-plugin-system-upgrade sudo dnf upgrade --refresh |
sudo dnf repoquery --unsatisfied sudo dnf repoquery --duplicates sudo dnf install rpmconf sudo rpmconf -a |
sudo dnf list extras sudo dnf autoremove sudo dnf update |
| ||
physical volume sudo pvdisplay -m sudo pvdisplay sudo pvs |
logical volume sudo lvdisplay -m sudo lvdisplay sudo lvs |
volume group sudo vgdisplay -s sudo vgdisplay sudo vgs |
| ||
lsblk df -h ll /dev/mm* |
sudo pvscan sudo fdisk -l sudo fdisk /dev/mmcblk0 sudo parted /dev/mmcblk0 |
sudo resize2fs /dev/mmcblk0p3 sudo e2fsck -f /dev/mmcblk0p3 sudo xfs_growfs /dev/fedora_fedora/root |
References
| ||