Fedora: Difference between revisions
Jump to navigation
Jump to search
(89 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{| | |||
| valign="middle" colspan="2" | | |||
================================================================================ | |||
================================================================================ | |||
1) [x] Language Settings 2) [x] Time Settings | |||
(English (United States)) (US/Eastern timezone) | |||
3) [ ] Network configuration 4) [x] Root password | |||
(Not Connected) (Disabled. Set password to | |||
enable root account.) | |||
5) [ ] User creation | |||
(No user will be created) | |||
Please make a selection from the above ['c' to continue, 'q' to quite, 'r' to | |||
refresh]: | |||
''we needs to set '''root password''' & '''user creation''' before move forward. We can skip other'' | |||
''settings for future or can be done on the fly.'' | |||
| valign="middle" | | |||
|- | |||
| valign="middle" colspan="3" | | |||
---- | |||
|- | |||
| valign="middle" | | |||
sudo timedatectl set-timezone 'Asia/Kuala_Lumpur' | |||
sudo timedatectl set-time '2010-10-10 10:10:10' | |||
sudo hostnamectl set-hostname fedora | |||
sudo timedatectl set-ntp true | |||
| valign="middle" | | |||
sudo dnf install icedtea-web java-openjdk | |||
sudo dnf install gnome-tweak-tool | |||
sudo dnf install tlp tlp-rdw | |||
sudo tlp-stat -b | |||
| valign="middle" | | |||
https://10.19.83.111:9090/ | |||
https://10.19.83.211:9090/ | |||
http://10.19.83.111/ | |||
http://10.19.83.211/ | |||
|} | |||
==Disable Overscan== | ==Disable Overscan== | ||
<source lang="bash" highlight="2-6,8"> | <source lang="bash" highlight="2-6,8"> | ||
Line 11: | Line 55: | ||
</source> | </source> | ||
==Expand | ==System Update== | ||
<source lang="bash" highlight="2-7"> | |||
sudo su | |||
cat << EOF >> /etc/dnf/dnf.conf | |||
fastestmirror=True | |||
max_parallel_downloads=10 | |||
defaultyes=True | |||
EOF | |||
dnf update | |||
</source> | |||
===Enable Repositories=== | |||
{| | |||
| valign="top" | | |||
'''Free/Community:''' | |||
<source lang="bash"> | |||
sudo dnf install\ | |||
https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release\ | |||
-$(rpm -E %fedora).noarch.rpm | |||
</source> | |||
| valign="top" | | |||
'''Non-Free/Commercial:''' | |||
<source lang="bash"> | |||
sudo dnf install\ | |||
https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree\ | |||
-release-$(rpm -E %fedora).noarch.rpm | |||
</source> | |||
|} | |||
===Installing plugins=== | |||
<source lang="bash"> | |||
sudo dnf install\ | |||
gstreamer1-plugins-{bad-\*,good-\*,base}\ | |||
gstreamer1-plugin-openh264 gstreamer1-libav\ | |||
--exclude=gstreamer1-plugins-bad-free-devel | |||
sudo dnf install lame\* --exclude=lame-devel | |||
sudo dnf group upgrade --with-optional Multimedia | |||
</source> | |||
==Network Config== | |||
{| | |||
| valign="top" | | |||
rpm -qa|grep NetworkManager-wifi | |||
rpm -qa|grep wpa_supplicant | |||
rpm -qa|grep iwd | |||
| valign="top" | | |||
sudo dnf install NetworkManager-wifi | |||
sudo dnf install wpa_supplicant | |||
sudo dnf install iwd | |||
| valign="top" | | |||
systemctl status wpa_supplicant.service | |||
systemctl status iwd.service | |||
nmcli connection show | |||
|- | |||
| valign="top" colspan="3" | | |||
---- | |||
|- | |||
| valign="top" | | |||
sudo nmcli dev help | |||
sudo nmcli con help | |||
sudo nmcli help | |||
| valign="top" | | |||
sudo nmcli device wifi list | |||
sudo nmcli device | |||
sudo nmcli con | |||
| valign="top" | | |||
sudo nmcli dev wifi con 'ChorkeOrg_2.4GHz' password 'sadaqah!' | |||
sudo nmcli dev wifi con 'ChorkeInc' password 'sadaqah!' | |||
sudo nmcli dev wifi con 'ChorkeOrg' password 'sadaqah!' | |||
|- | |||
| valign="top" colspan="3" | | |||
---- | |||
|- | |||
| valign="top" | | |||
sudo iw dev wlan0 scan|grep SSID | |||
sudo nmcli dev wifi rescan | |||
sudo nmcli dev wifi | |||
| valign="top" | | |||
| valign="top" | | |||
|} | |||
==Server Config== | |||
{| | |||
| valign="top" | | |||
sudo dnf install postgresql-server | |||
sudo dnf install mariadb-server | |||
sudo dnf install httpd | |||
| valign="top" | | |||
sudo systemctl enable httpd.service | |||
sudo systemctl start httpd.service | |||
ls -lah /usr/lib/systemd/system/ | |||
| valign="top" | | |||
sudo firewall-cmd --permanent --add-service=http | |||
sudo setsebool -P httpd_can_network_connect on | |||
sudo firewall-cmd --add-service=http | |||
|} | |||
==Expand Volume== | |||
<source lang="bash"> | <source lang="bash"> | ||
lsblk | lsblk | ||
Line 69: | Line 226: | ||
</source> | </source> | ||
=== Create Physical Volume=== | |||
<source lang="bash" highlight="12,16,18-20,24,37,54"> | <source lang="bash" highlight="12,16,18-20,24,37,54"> | ||
sudo fdisk /dev/mmcblk0 | sudo fdisk /dev/mmcblk0 | ||
Line 169: | Line 297: | ||
</source> | </source> | ||
===Resize Physical Volume=== | |||
<source lang="bash" highlight="6,7,15-18,20,23,24,32-34,36,37,45-48,50"> | |||
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 | |||
</source> | |||
<source lang="bash" highlight="12-14,18"> | |||
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 | |||
</source> | |||
<source lang="bash" highlight="10-13"> | |||
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 250085375 246757376 117.7G 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 | |||
EOF | |||
</source> | |||
===Resize Logical Volume=== | |||
---- | |||
'''1. Unmount:''' | |||
<source lang="bash"> | |||
sudo umount /dev/mmcblk0p3 | |||
:<<EOF | |||
umount: /dev/mmcblk0p3: not mounted. | |||
EOF | |||
</source> | |||
---- | |||
'''2. Resize:''' Physical Volume | |||
<source lang="bash"> | <source lang="bash"> | ||
sudo | sudo pvresize /dev/mmcblk0p3 | ||
:<<EOF | :<<EOF | ||
VG | Physical volume "/dev/mmcblk0p3" changed | ||
fedora_fedora | 1 physical volume(s) resized or updated / 0 physical volume(s) not resized | ||
EOF | |||
</source> | |||
---- | |||
'''3. Validate:''' Physical Volume Size | |||
<source lang="bash"> | |||
sudo pvs | |||
:<<EOF | |||
PV VG Fmt Attr PSize PFree | |||
/dev/mmcblk0p3 fedora_fedora lvm2 a-- 117.66g 112.25g | |||
EOF | |||
</source> | |||
---- | |||
'''4. Resize:''' Logical Volume | |||
<source lang="bash"> | |||
sudo lvresize -l +100%FREE /dev/fedora_fedora/root | |||
:<<EOF | |||
Size of logical volume fedora_fedora/root changed from 5.41 GiB (1385 extents) to 117.66 GiB (30121 extents). | |||
Logical volume fedora_fedora/root successfully resized. | |||
EOF | EOF | ||
</source> | </source> | ||
<source lang="bash"> | <source lang="bash"> | ||
sudo | sudo xfs_growfs /dev/fedora_fedora/root | ||
:<<EOF | |||
meta-data=/dev/mapper/fedora_fedora-root isize=512 agcount=4, agsize=354560 blks | |||
= sectsz=512 attr=2, projid32bit=1 | |||
= crc=1 finobt=1, sparse=1, rmapbt=0 | |||
= reflink=1 bigtime=0 inobtcount=0 | |||
data = bsize=4096 blocks=1418240, imaxpct=25 | |||
= sunit=0 swidth=0 blks | |||
naming =version 2 bsize=4096 ascii-ci=0, ftype=1 | |||
log =internal log bsize=4096 blocks=2560, version=2 | |||
= sectsz=512 sunit=0 blks, lazy-count=1 | |||
realtime =none extsz=4096 blocks=0, rtextents=0 | |||
data blocks changed from 1418240 to 30843904 | |||
EOF | |||
</source> | |||
---- | |||
'''5. Validate:''' Logical Volume Size | |||
<source lang="bash"> | |||
sudo lvs | |||
:<<EOF | :<<EOF | ||
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert | |||
root fedora_fedora -wi-ao---- 117.66g | |||
VG | |||
EOF | EOF | ||
</source> | </source> | ||
<source lang="bash"> | <source lang="bash"> | ||
df -h / | |||
:<<EOF | :<<EOF | ||
Filesystem Size Used Avail Use% Mounted on | |||
/dev/mapper/fedora_fedora-root 118G 3.9G 114G 4% / | |||
EOF | EOF | ||
</source> | |||
---- | |||
'''6. Remount:''' | |||
<source lang="bash"> | |||
sudo mount -a | |||
</source> | </source> | ||
==Knowledge== | ==Knowledge== | ||
{| | {| | ||
| | | valign="top" | | ||
sudo dnf system-upgrade download --releasever=35 | sudo dnf system-upgrade download --releasever=35 | ||
sudo dnf install dnf-plugin-system-upgrade | sudo dnf install dnf-plugin-system-upgrade | ||
Line 219: | Line 489: | ||
| | | valign="top" | | ||
sudo dnf repoquery --unsatisfied | sudo dnf repoquery --unsatisfied | ||
sudo dnf repoquery --duplicates | sudo dnf repoquery --duplicates | ||
Line 225: | Line 495: | ||
sudo rpmconf -a | sudo rpmconf -a | ||
| | | valign="top" | | ||
sudo dnf list extras | sudo dnf list extras | ||
sudo dnf autoremove | sudo dnf autoremove | ||
Line 232: | Line 502: | ||
|- | |- | ||
| | | valign="top" colspan="3" | | ||
---- | ---- | ||
|- | |- | ||
| | | valign="top" | | ||
'''physical volume''' | '''physical volume''' | ||
sudo pvdisplay -m | sudo pvdisplay -m | ||
Line 241: | Line 511: | ||
sudo pvs | sudo pvs | ||
| | | valign="top" | | ||
'''logical volume''' | '''logical volume''' | ||
sudo lvdisplay -m | sudo lvdisplay -m | ||
Line 247: | Line 517: | ||
sudo lvs | sudo lvs | ||
| | | valign="top" | | ||
'''volume group''' | '''volume group''' | ||
sudo vgdisplay -s | sudo vgdisplay -s | ||
Line 254: | Line 524: | ||
|- | |- | ||
| | | valign="top" colspan="3" | | ||
---- | ---- | ||
|- | |- | ||
Line 263: | Line 533: | ||
| | | valign="top" | | ||
sudo pvscan | sudo pvscan | ||
sudo fdisk -l | sudo fdisk -l | ||
Line 269: | Line 539: | ||
sudo parted /dev/mmcblk0 | sudo parted /dev/mmcblk0 | ||
| | | valign="top" | | ||
sudo resize2fs /dev/mmcblk0p3 | sudo resize2fs /dev/mmcblk0p3 | ||
sudo e2fsck -f /dev/mmcblk0p3 | sudo e2fsck -f /dev/mmcblk0p3 | ||
sudo xfs_growfs /dev/fedora_fedora/root | sudo xfs_growfs /dev/fedora_fedora/root | ||
sudo vgdisplay -v fedora_fedora|grep -i 'Free PE' | |||
|- | |||
| valign="top" colspan="3" | | |||
---- | |||
|- | |||
| valign="top" | | |||
$GRAALVM_HOME/bin/gu install native-image | |||
sudo dnf install icedtea-web java-openjdk | |||
sudo alternatives --config java | |||
| valign="top" | | |||
sudo dnf install java-latest-openjdk | |||
sudo dnf install java-1.8.0-openjdk | |||
sudo dnf install java-11-openjdk | |||
| valign="top" | | |||
sudo dnf install java-latest-openjdk-devel | |||
sudo dnf install java-1.8.0-openjdk-devel | |||
sudo dnf install java-11-openjdk-devel | |||
|- | |||
| valign="top" colspan="3" | | |||
---- | |||
|- | |||
| valign="top" colspan="2" | | |||
sudo dnf install gcc glibc-devel zlib-devel libstdc++-static | |||
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.13.0.8-1.fc35.aarch64 | |||
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin | |||
| valign="top" | | |||
export ACADEMIA_HOME="$HOME/.chorke/academia" | |||
mkdir -p $ACADEMIA_HOME/var/download | |||
cd $ACADEMIA_HOME/var/download | |||
|- | |||
| valign="top" colspan="3" | | |||
---- | |||
|- | |||
| valign="top" colspan="3" | | |||
wget https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.3.0/graalvm-ce-java11-linux-aarch64-21.3.0.tar.gz | |||
wget https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.3.0/graalvm-ce-java17-linux-aarch64-21.3.0.tar.gz | |||
|- | |||
| valign="top" colspan="3" | | |||
---- | |||
|- | |||
| valign="top" colspan="2" | | |||
tar -xvzf /home/pi/.chorke/academia/var/download/graalvm-ce-java17-linux-aarch64-21.3.0.tar.gz | |||
tar -xvzf /home/pi/.chorke/academia/var/download/graalvm-ce-java11-linux-aarch64-21.3.0.tar.gz | |||
ln -s /opt/cli/graalvm-ce-java11-21.3.0 /usr/lib/jvm/graalvm-ce-java11-21.3.0 | |||
ln -s /opt/cli/graalvm-ce-java17-21.3.0 /usr/lib/jvm/graalvm-ce-java17-21.3.0 | |||
alternatives --install /usr/bin/java java /usr/lib/jvm/graalvm-ce-java11-21.3.0/bin/java 4 | |||
alternatives --install /usr/bin/java java /usr/lib/jvm/graalvm-ce-java17-21.3.0/bin/java 5 | |||
| valign="top" | | |||
mkdir -p /opt/cli | |||
cd /opt/cli | |||
ls -lah /usr/lib/jvm | |||
ls -lah /usr/lib/jvm | |||
sudo alternatives --config java | |||
sudo alternatives --config java | |||
|- | |||
| valign="top" colspan="3" | | |||
---- | |||
|- | |||
| valign="top" | | |||
rpm -qa | grep NetworkManager-wifi | |||
rpm -qa | grep wpa_supplicant | |||
rpm -qa | grep iwd | |||
| valign="top" | | |||
sudo dnf install NetworkManager-wifi | |||
sudo dnf install wpa_supplicant | |||
sudo dnf install iwd | |||
| valign="top" | | |||
systemctl status wpa_supplicant.service | |||
systemctl status iwd.service | |||
sudo nmcli connection show | |||
|} | |} | ||
==Fedora 37 Fixes== | |||
sudo ostree remote add --if-not-exists\ | |||
--gpg-import=/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-37-x86_64\ | |||
fedora-iot-mirrorlist https://d2ju0wfl996cmc.cloudfront.net | |||
backupDir="$HOME/backups/etc_ostree_remotes_d/" && mkdir -p $backupDir\ | |||
&& cp /etc/ostree/remotes.d/fedora-iot.conf $backupDir | |||
sudo ostree remote delete fedora-iot | |||
deployment="$(ls -Art /sysroot/ostree/deploy/fedora-iot/deploy | tail -n 1)";\ | |||
/sysroot/ostree/deploy/fedora-iot/deploy/$(echo "${deployment%%*(.origin)}")/usr/lib/greenboot/check/wanted.d/01_update_platforms_check.sh | |||
sudo rpm-ostree rebase fedora-iot-mirrorlist:fedora/devel/x86_64/iot | |||
sudo rpm-ostree upgrade -r | |||
==Fedora 37 OSTree== | |||
rpm-ostree install wget | |||
rpm-ostree install httpd | |||
rpm-ostree install python3 | |||
rpm-ostree install java-17-openjdk | |||
rpm-ostree install java-17-openjdk-devel | |||
==References== | ==References== | ||
Line 319: | Line 695: | ||
* [https://stackoverflow.com/questions/26305376/ <code>resize2fs:</code>Bad magic number in super-block] | * [https://stackoverflow.com/questions/26305376/ <code>resize2fs:</code>Bad magic number in super-block] | ||
* [https://access.redhat.com/articles/3129891 Choose Red Hat Enterprise Linux File System] | * [https://access.redhat.com/articles/3129891 Choose Red Hat Enterprise Linux File System] | ||
* [https://docs.fedoraproject.org/en-US/quick-docs/assembly_installing-plugins-for-playing-movies-and-music/ Installing plugins for playing Movies & Music] | |||
* [https://www.linuxquestions.org/questions/fedora-35/how-to-resize-extend-a-volume-group-895429/ Fedora Resize/Extend a Volume Group] | * [https://www.linuxquestions.org/questions/fedora-35/how-to-resize-extend-a-volume-group-895429/ Fedora Resize/Extend a Volume Group] | ||
* [https://access.redhat.com/articles/1190213 Fedora resize a partition using <code>fdisk</code>] | * [https://access.redhat.com/articles/1190213 Fedora resize a partition using <code>fdisk</code>] | ||
* [https://docs.fedoraproject.org/en-US/quick-docs/setup_rpmfusion/ Enabling the RPM Fusion repositories] | |||
* [https://linuxhint.com/install_fedora_33_raspberry_pi4/ Install Fedora 33 on Raspberry Pi4] | * [https://linuxhint.com/install_fedora_33_raspberry_pi4/ Install Fedora 33 on Raspberry Pi4] | ||
* [https://linuxroutes.com/extend-linux-mount-point/ Extend Linux Mount Point] | * [https://linuxroutes.com/extend-linux-mount-point/ Extend Linux Mount Point] | ||
Line 326: | Line 704: | ||
| valign="top" | | | valign="top" | | ||
* [https://bugzilla.redhat.com/show_bug.cgi?id=1756488 Missing <code>wpa_supplicant</code> in Fedora Server] | |||
* [https://www.graalvm.org/docs/getting-started/linux-aarch64/ GraalVM Installation on Linux ARM64 systems] | |||
* [https://quarkus.io/blog/quarkus-native-on-a-raspberry-pi/ Quarkus native running on a Raspberry Pi] | |||
* [https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-apache-http-server/ Getting started with Apache HTTP Server] | |||
* [https://docs.oracle.com/en/graalvm/enterprise/21/docs/getting-started Oracle GraalVM EE 21 Getting Started] | |||
* [https://unix.stackexchange.com/questions/200239/ SSH Sessions Prevent From Freezing] | |||
* [https://github.com/graalvm/graalvm-ce-builds/releases/tag/vm-21.3.0 GraalVM Community Edition 21.3.0] | |||
* [https://github.com/graalvm/graalvm-ce-builds/tags GraalVM Community Edition Tags] | |||
* [https://gist.github.com/ricardozanini/fa65e485251913e1467837b1c5a8ed28 Gist Install GraalVM CE on Linux] | |||
* [https://serverfault.com/questions/283129/ SSH Connection Hang Forever] | |||
| valign="top" | | | valign="top" | | ||
* [https://fedoramagazine.org/updating-edge-devices-with-ostree-and-pulp/ Update Fedora IoT with OSTree & Pulp] | |||
* [https://www.tecmint.com/install-kde-plasma-5-in-linux/ Install KDE Plasma in Linux Desktop] | |||
* [https://medium.com/@john_freeman/native-javac-with-graalvm-ddcc18a53edb Native javac built with GraalVM] | |||
* [https://fedoramagazine.org/upgrading-fedora-31-to-fedora-32/ Upgrade to Fedora 32 from 31] | |||
* [https://fedoraproject.org/wiki/Fedora_Release_Life_Cycle Fedora Release Life Cycle] | |||
* [https://snapcraft.io/docs/installing-snap-on-fedora Installing snap on Fedora] | |||
* [https://stackoverflow.com/questions/31851611/ ARM64 vs. AArch64] | |||
* [[Fedora/Raspberry Pi]] | |||
* [[Fedora/Morefine]] | |||
* [[Fedora/GraalVM]] | |||
|} | |} |
Latest revision as of 00:11, 12 December 2022
================================================================================ ================================================================================ 1) [x] Language Settings 2) [x] Time Settings (English (United States)) (US/Eastern timezone) 3) [ ] Network configuration 4) [x] Root password (Not Connected) (Disabled. Set password to enable root account.) 5) [ ] User creation (No user will be created) Please make a selection from the above ['c' to continue, 'q' to quite, 'r' to refresh]: we needs to set root password & user creation before move forward. We can skip other settings for future or can be done on the fly. |
||
| ||
sudo timedatectl set-timezone 'Asia/Kuala_Lumpur' sudo timedatectl set-time '2010-10-10 10:10:10' sudo hostnamectl set-hostname fedora sudo timedatectl set-ntp true |
sudo dnf install icedtea-web java-openjdk sudo dnf install gnome-tweak-tool sudo dnf install tlp tlp-rdw sudo tlp-stat -b |
https://10.19.83.111:9090/ https://10.19.83.211:9090/ http://10.19.83.111/ http://10.19.83.211/ |
Disable Overscan
sudo su
cat << EOF >> /boot/efi/config.txt
disable_overscan=1
EOF
cat /boot/efi/config.txt
init 6
System Update
sudo su
cat << EOF >> /etc/dnf/dnf.conf
fastestmirror=True
max_parallel_downloads=10
defaultyes=True
EOF
dnf update
Enable Repositories
Free/Community: sudo dnf install\
https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release\
-$(rpm -E %fedora).noarch.rpm
|
Non-Free/Commercial: sudo dnf install\
https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree\
-release-$(rpm -E %fedora).noarch.rpm
|
Installing plugins
sudo dnf install\
gstreamer1-plugins-{bad-\*,good-\*,base}\
gstreamer1-plugin-openh264 gstreamer1-libav\
--exclude=gstreamer1-plugins-bad-free-devel
sudo dnf install lame\* --exclude=lame-devel
sudo dnf group upgrade --with-optional Multimedia
Network Config
rpm -qa|grep NetworkManager-wifi rpm -qa|grep wpa_supplicant rpm -qa|grep iwd |
sudo dnf install NetworkManager-wifi sudo dnf install wpa_supplicant sudo dnf install iwd |
systemctl status wpa_supplicant.service systemctl status iwd.service nmcli connection show |
| ||
sudo nmcli dev help sudo nmcli con help sudo nmcli help |
sudo nmcli device wifi list sudo nmcli device sudo nmcli con |
sudo nmcli dev wifi con 'ChorkeOrg_2.4GHz' password 'sadaqah!' sudo nmcli dev wifi con 'ChorkeInc' password 'sadaqah!' sudo nmcli dev wifi con 'ChorkeOrg' password 'sadaqah!' |
| ||
sudo iw dev wlan0 scan|grep SSID sudo nmcli dev wifi rescan sudo nmcli dev wifi |
Server Config
sudo dnf install postgresql-server sudo dnf install mariadb-server sudo dnf install httpd |
sudo systemctl enable httpd.service sudo systemctl start httpd.service ls -lah /usr/lib/systemd/system/ |
sudo firewall-cmd --permanent --add-service=http sudo setsebool -P httpd_can_network_connect on sudo firewall-cmd --add-service=http |
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
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 250085375 246757376 117.7G 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
EOF
Resize Logical Volume
1. Unmount:
sudo umount /dev/mmcblk0p3
:<<EOF
umount: /dev/mmcblk0p3: not mounted.
EOF
2. Resize: Physical Volume
sudo pvresize /dev/mmcblk0p3
:<<EOF
Physical volume "/dev/mmcblk0p3" changed
1 physical volume(s) resized or updated / 0 physical volume(s) not resized
EOF
3. Validate: Physical Volume Size
sudo pvs
:<<EOF
PV VG Fmt Attr PSize PFree
/dev/mmcblk0p3 fedora_fedora lvm2 a-- 117.66g 112.25g
EOF
4. Resize: Logical Volume
sudo lvresize -l +100%FREE /dev/fedora_fedora/root
:<<EOF
Size of logical volume fedora_fedora/root changed from 5.41 GiB (1385 extents) to 117.66 GiB (30121 extents).
Logical volume fedora_fedora/root successfully resized.
EOF
sudo xfs_growfs /dev/fedora_fedora/root
:<<EOF
meta-data=/dev/mapper/fedora_fedora-root isize=512 agcount=4, agsize=354560 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1 bigtime=0 inobtcount=0
data = bsize=4096 blocks=1418240, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 1418240 to 30843904
EOF
5. Validate: Logical Volume Size
sudo lvs
:<<EOF
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root fedora_fedora -wi-ao---- 117.66g
EOF
df -h /
:<<EOF
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/fedora_fedora-root 118G 3.9G 114G 4% /
EOF
6. Remount:
sudo mount -a
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 sudo vgdisplay -v fedora_fedora|grep -i 'Free PE' |
| ||
$GRAALVM_HOME/bin/gu install native-image sudo dnf install icedtea-web java-openjdk sudo alternatives --config java |
sudo dnf install java-latest-openjdk sudo dnf install java-1.8.0-openjdk sudo dnf install java-11-openjdk |
sudo dnf install java-latest-openjdk-devel sudo dnf install java-1.8.0-openjdk-devel sudo dnf install java-11-openjdk-devel |
| ||
sudo dnf install gcc glibc-devel zlib-devel libstdc++-static JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.13.0.8-1.fc35.aarch64 PATH=$PATH:$HOME/bin:$JAVA_HOME/bin |
export ACADEMIA_HOME="$HOME/.chorke/academia" mkdir -p $ACADEMIA_HOME/var/download cd $ACADEMIA_HOME/var/download | |
| ||
wget https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.3.0/graalvm-ce-java11-linux-aarch64-21.3.0.tar.gz wget https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.3.0/graalvm-ce-java17-linux-aarch64-21.3.0.tar.gz | ||
| ||
tar -xvzf /home/pi/.chorke/academia/var/download/graalvm-ce-java17-linux-aarch64-21.3.0.tar.gz tar -xvzf /home/pi/.chorke/academia/var/download/graalvm-ce-java11-linux-aarch64-21.3.0.tar.gz ln -s /opt/cli/graalvm-ce-java11-21.3.0 /usr/lib/jvm/graalvm-ce-java11-21.3.0 ln -s /opt/cli/graalvm-ce-java17-21.3.0 /usr/lib/jvm/graalvm-ce-java17-21.3.0 alternatives --install /usr/bin/java java /usr/lib/jvm/graalvm-ce-java11-21.3.0/bin/java 4 alternatives --install /usr/bin/java java /usr/lib/jvm/graalvm-ce-java17-21.3.0/bin/java 5 |
mkdir -p /opt/cli cd /opt/cli ls -lah /usr/lib/jvm ls -lah /usr/lib/jvm sudo alternatives --config java sudo alternatives --config java | |
| ||
rpm -qa | grep NetworkManager-wifi rpm -qa | grep wpa_supplicant rpm -qa | grep iwd |
sudo dnf install NetworkManager-wifi sudo dnf install wpa_supplicant sudo dnf install iwd |
systemctl status wpa_supplicant.service systemctl status iwd.service sudo nmcli connection show |
Fedora 37 Fixes
sudo ostree remote add --if-not-exists\ --gpg-import=/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-37-x86_64\ fedora-iot-mirrorlist https://d2ju0wfl996cmc.cloudfront.net backupDir="$HOME/backups/etc_ostree_remotes_d/" && mkdir -p $backupDir\ && cp /etc/ostree/remotes.d/fedora-iot.conf $backupDir sudo ostree remote delete fedora-iot deployment="$(ls -Art /sysroot/ostree/deploy/fedora-iot/deploy | tail -n 1)";\ /sysroot/ostree/deploy/fedora-iot/deploy/$(echo "${deployment%%*(.origin)}")/usr/lib/greenboot/check/wanted.d/01_update_platforms_check.sh sudo rpm-ostree rebase fedora-iot-mirrorlist:fedora/devel/x86_64/iot sudo rpm-ostree upgrade -r
Fedora 37 OSTree
rpm-ostree install wget rpm-ostree install httpd rpm-ostree install python3 rpm-ostree install java-17-openjdk rpm-ostree install java-17-openjdk-devel