I am having a CentOS7 VM.
During fdisk /dev/sda delete to resize partition, we deleted the primary partition and during recreation extended was chosen instead of primary. Changes were saved and reboot was given.
All actions are shown below, while the system boots the below are shown on the Console.
I am looking a way to make the system bootable again, and have better understanding what happed.
1. Console Output:
[ OK ] Started Show Plymouth Boot Screen. [ OK ] Reached target Paths. [ OK ] Started Forward Password Requests to Plymouth Directory Watch. [ OK ] Reached Target Basic System. .... dracut-initqueueu[262] Warning: dracut-initqueueu timeout - starting timeout scripts .... Starting Dracut Emergency Shell... Warning /dev/mapper/rootvg-rootlv does not exist Warning /dev/rootvg/rootlv does not exist 2. Actions Performed to VM and become unbootable:
[root@Server ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 25G 0 disk ├─sda1 8:1 0 1G 0 part /boot ├─sda2 8:2 0 1G 0 part │ └─swapvg-swaplv 253:1 0 1G 0 lvm [SWAP] └─sda3 8:3 0 23G 0 part └─rootvg-rootlv 253:0 0 23G 0 lvm / sr0 11:0 1 1024M 0 rom [root@Server ~]# fdisk /dev/sda Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/sda: 26.8 GB, 26843545600 bytes, 52428800 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 label type: dos Disk identifier: 0x000ea6ab Device Boot Start End Blocks Id System /dev/sda1 * 2048 2099199 1048576 83 Linux /dev/sda2 2099200 4202495 1051648 8e Linux LVM /dev/sda3 4202496 52428799 24113152 8e Linux LVM Command (m for help): d Partition number (1-3, default 3): Partition 3 is deleted Command (m for help): n Partition type: p primary (2 primary, 0 extended, 2 free) e extended Select (default p): e Partition number (3,4, default 3): First sector (4202496-52428799, default 4202496): Using default value 4202496 Last sector, +sectors or +size{K,M,G} (4202496-52428799, default 52428799): Using default value 52428799 Partition 3 of type Extended and of size 23 GiB is set Command (m for help): t Partition number (1-3, default 3): Hex code (type L to list all codes): 8e You cannot change a partition into an extended one or vice versa. Delete it first. Type of partition 3 is unchanged: Extended Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) Syncing disks. [root@Server ~]# reboot