You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened:
We are attempting to update and reinstall GRUB2 on a PReP boot partition for our system but need assistance in identifying the correct PReP device. The process involves:
Identifying the correct PReP partition using lsblk or fdisk.
-Updating GRUB2 (dnf update grub2).
-Installing GRUB2 on the identified PReP partition (grub2-install /dev/[prep-partition]).
-Setting the boot list with bootlist -m normal -o /dev/[prep-partition].
We require guidance on reliably identifying the PReP partition to complete the installation.
if [ -z "$prep_partition" ]; then
echo "No PReP partition found with /dev/mapper."
exit 1
else
echo "PReP partition found: $prep_partition"
fi
Update grub2
echo "Updating grub2..."
dnf update -y grub2
Install grub2 on the identified PReP partition
echo "Installing grub2 on $prep_partition..."
grub2-install "$prep_partition"
Execute bootlist command
echo "Setting boot list..."
bootlist -m normal -o
What you expected to happen:
The pvsadm is not able to pick the correct disk .
How to reproduce it (as minimally and precisely as possible):
This is how the layout looks when we create a power vs server on top of bare-metal server:
Last login: Mon Aug 19 01:39:11 on hvc0
[root@localhost ~]#
[root@localhost ~]# fdisk -l
Disk /dev/sda: 10 GiB, 10737418240 bytes, 20971520 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: 0x14fc63d2
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 10239 8192 4M 41 PPC PReP Boot
/dev/sda2 10240 20971519 20961280 10G 83 Linux
and we need to use /dev/sda1 to re-install the grub.
So what should the disk name we need to use in template script when we are trying to build the image using pvsadm tool?
This is the disk layout when we try to print the partitions using these below commands in our template script.
-----------Printing Disk Layout----------
---------
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop1p2 104842220 2970752 101871468 3% /
------
---------
Filesystem Size Used Avail Use% Mounted on
/dev/loop1p2 100G 2.9G 98G 3% /
devtmpfs 718G 0 718G 0% /dev
tmpfs 718G 103M 718G 1% /run
/dev/mapper/3600507681381026e88000000000017fc2 100G 7.8G 93G 8% /etc/machine-id
------
---------
Disk /dev/sda: 350 GiB, 375809638400 bytes, 734003200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disk /dev/sdd: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disklabel type: dos
Disk identifier: 0x14fc63d2
Device Boot Start End Sectors Size Id Type
/dev/sdd1 * 2048 10239 8192 4M 41 PPC PReP Boot
/dev/sdd2 10240 209715166 209704927 100G 83 Linux
Disk /dev/sdb: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disklabel type: dos
Disk identifier: 0x14fc63d2
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 10239 8192 4M 41 PPC PReP Boot
/dev/sdb2 10240 209715166 209704927 100G 83 Linux
Disk /dev/sdc: 350 GiB, 375809638400 bytes, 734003200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disk /dev/sde: 350 GiB, 375809638400 bytes, 734003200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disk /dev/sdm: 350 GiB, 375809638400 bytes, 734003200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disk /dev/sdk: 350 GiB, 375809638400 bytes, 734003200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disk /dev/sdf: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disklabel type: dos
Disk identifier: 0x14fc63d2
Device Boot Start End Sectors Size Id Type
/dev/sdf1 * 2048 10239 8192 4M 41 PPC PReP Boot
/dev/sdf2 10240 209715166 209704927 100G 83 Linux
Disk /dev/sdo: 350 GiB, 375809638400 bytes, 734003200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disk /dev/sdi: 350 GiB, 375809638400 bytes, 734003200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disk /dev/sdj: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disklabel type: dos
Disk identifier: 0x14fc63d2
Device Boot Start End Sectors Size Id Type
/dev/sdj1 * 2048 10239 8192 4M 41 PPC PReP Boot
/dev/sdj2 10240 209715166 209704927 100G 83 Linux
Disk /dev/sdn: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disklabel type: dos
Disk identifier: 0x14fc63d2
Device Boot Start End Sectors Size Id Type
/dev/sdn1 * 2048 10239 8192 4M 41 PPC PReP Boot
/dev/sdn2 10240 209715166 209704927 100G 83 Linux
Disk /dev/sdl: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disklabel type: dos
Disk identifier: 0x14fc63d2
Device Boot Start End Sectors Size Id Type
/dev/sdl1 * 2048 10239 8192 4M 41 PPC PReP Boot
/dev/sdl2 10240 209715166 209704927 100G 83 Linux
Disk /dev/sdp: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disklabel type: dos
Disk identifier: 0x14fc63d2
Device Boot Start End Sectors Size Id Type
/dev/sdp1 * 2048 10239 8192 4M 41 PPC PReP Boot
/dev/sdp2 10240 209715166 209704927 100G 83 Linux
Disk /dev/sdg: 350 GiB, 375809638400 bytes, 734003200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disk /dev/sdh: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disklabel type: dos
Disk identifier: 0x14fc63d2
Device Boot Start End Sectors Size Id Type
/dev/sdh1 * 2048 10239 8192 4M 41 PPC PReP Boot
/dev/sdh2 10240 209715166 209704927 100G 83 Linux
Disk /dev/mapper/3600507681381026e88000000000017fb: 350 GiB, 375809638400 bytes, 734003200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disk /dev/mapper/3600507681381026e88000000000017fc: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disklabel type: dos
Disk identifier: 0x14fc63d2
Device Boot Start End Sectors Size Id Type
/dev/mapper/3600507681381026e88000000000017fc1 * 2048 10239 8192 4M 41 PPC PReP Boot
/dev/mapper/3600507681381026e88000000000017fc2 10240 209715166 209704927 100G 83 Linux
Disk /dev/mapper/data_vg-data_lv: 350 GiB, 375805444096 bytes, 733995008 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disk /dev/loop0: 100 GiB, 107374182400 bytes, 209715200 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: 0x14fc63d2
Device Boot Start End Sectors Size Id Type
/dev/loop0p1 * 2048 10239 8192 4M 41 PPC PReP Boot
/dev/loop0p2 10240 209715166 209704927 100G 83 Linux
Disk /dev/loop1: 100 GiB, 107374182400 bytes, 209715200 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: 0x14fc63d2
Device Boot Start End Sectors Size Id Type
/dev/loop1p1 * 2048 10239 8192 4M 41 PPC PReP Boot
/dev/loop1p2 10240 209715166 209704927 100G 83 Linux
------
Anything else we need to know?:
Environment:
pvsadm version (use pvsadm version): pvsadm version
Version: v0.1.15
Environment - On-Prem or IBM PowerVS: IBM PowerVS
OS (e.g: cat /etc/os-release):
[root@build-server-8-8-sap ~]# cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="8.8 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.8 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.8
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.8"
[root@build-server-8-8-sap ~]#
Kernel (e.g. uname -a):
[root@build-server-8-8-sap ~]# uname -a
Linux build-server-8-8-sap.power-iaas.cloud.ibm.com 4.18.0-477.51.1.el8_8.ppc64le Update go.yml #1 SMP Fri Mar 1 11:20:14 EST 2024 ppc64le ppc64le ppc64le GNU/Linux
Others:
The text was updated successfully, but these errors were encountered:
Locate the disk where the OS is installed and select the partition with type 41 using the fdisk -l <disk> command. For instance, if you need to identify the PReP Boot partition on a disk image
What happened:
We are attempting to update and reinstall GRUB2 on a PReP boot partition for our system but need assistance in identifying the correct PReP device. The process involves:
Identifying the correct PReP partition using lsblk or fdisk.
-Updating GRUB2 (dnf update grub2).
-Installing GRUB2 on the identified PReP partition (grub2-install /dev/[prep-partition]).
-Setting the boot list with bootlist -m normal -o /dev/[prep-partition].
We require guidance on reliably identifying the PReP partition to complete the installation.
Find the PReP partition with /dev/mapper
prep_partition=$(fdisk -l | grep -i ppc | grep -i mapper | awk '{print $1}')
Check if a PReP partition was found
if [ -z "$prep_partition" ]; then
echo "No PReP partition found with /dev/mapper."
exit 1
else
echo "PReP partition found: $prep_partition"
fi
Update grub2
echo "Updating grub2..."
dnf update -y grub2
Install grub2 on the identified PReP partition
echo "Installing grub2 on $prep_partition..."
grub2-install "$prep_partition"
Execute bootlist command
echo "Setting boot list..."
bootlist -m normal -o
What you expected to happen:
The pvsadm is not able to pick the correct disk .
How to reproduce it (as minimally and precisely as possible):
This is how the layout looks when we create a power vs server on top of bare-metal server:
Last login: Mon Aug 19 01:39:11 on hvc0
[root@localhost ~]#
[root@localhost ~]# fdisk -l
Disk /dev/sda: 10 GiB, 10737418240 bytes, 20971520 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: 0x14fc63d2
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 10239 8192 4M 41 PPC PReP Boot
/dev/sda2 10240 20971519 20961280 10G 83 Linux
and we need to use /dev/sda1 to re-install the grub.
So what should the disk name we need to use in template script when we are trying to build the image using pvsadm tool?
This is the disk layout when we try to print the partitions using these below commands in our template script.
Anything else we need to know?:
Environment:
pvsadm version
): pvsadm versionVersion: v0.1.15
cat /etc/os-release
):[root@build-server-8-8-sap ~]# cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="8.8 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.8 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.8
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.8"
[root@build-server-8-8-sap ~]#
uname -a
):[root@build-server-8-8-sap ~]# uname -a
Linux build-server-8-8-sap.power-iaas.cloud.ibm.com 4.18.0-477.51.1.el8_8.ppc64le Update go.yml #1 SMP Fri Mar 1 11:20:14 EST 2024 ppc64le ppc64le ppc64le GNU/Linux
The text was updated successfully, but these errors were encountered: