Problem with booting after resizing partition

General support questions
Post Reply
primoz
Posts: 2
Joined: 2018/10/14 09:32:03

Problem with booting after resizing partition

Post by primoz » 2018/10/14 09:46:02

I have Centos 7.
I wanted to extend partition, so i did step 1 of https://askubuntu.com/a/119458/881838.
Then i have restart :(

At boot i get dracut:
Warning: Could not boot
Warning: /dev/cl/root does not exists
Warning: /dev/cl/swap does not exists
Warning: /dev/mapper/cl-root does not exists

Please help

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Problem with booting after resizing partition

Post by hunter86_bg » 2018/10/14 17:53:36

Load Live media and run

Code: Select all

fdisk -l your_damaged_disk
Have in mind that usually if you boot from USB - the first disk is the actual USB, while the second one is your damaged one.

Also clarify if you created your CentOS under UEFI or Legacy Mode. If your UEFI is damaged the recovery will be hard.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Problem with booting after resizing partition

Post by TrevorH » 2018/10/14 19:55:51

If you deleted/defined the partition as per that link, did you double check that the new starting position of the recreated partition was on the exact same identical sector number. Even being off by 1 sector is enough to mean it's not valid any more and will cause your symptoms. You will have needed to list the old partition table in sector mode so that the starting sector number was listed and not the starting cylinder (as cylinders contain lots of sectors).
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

primoz
Posts: 2
Joined: 2018/10/14 09:32:03

Re: Problem with booting after resizing partition

Post by primoz » 2018/10/14 21:35:16

I did put exact same identical sector number (2048). Checked 3x.

Why running fdisk -l ? + fdisk doesn't exists in dracut.
I have only one disk in server at /dev/sdb1

YBellefeuille
Posts: 319
Joined: 2012/03/06 22:30:17
Location: Ottawa

Re: Problem with booting after resizing partition

Post by YBellefeuille » 2018/10/15 02:12:43

primoz wrote:
2018/10/14 09:46:02
I wanted to extend partition, so i did step 1 of https://askubuntu.com/a/119458/881838.
The link suggests that you can resize a partition even if it's mounted. (It says that versions of GParted older than 0.17 "will refuse to resize a mounted partition".)

Is that really possible? Is that what you did?

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Problem with booting after resizing partition

Post by TrevorH » 2018/10/15 06:10:23

Show the output from fdisk -lu /dev/sda (amend if yours is not sda).
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Problem with booting after resizing partition

Post by hunter86_bg » 2018/10/15 14:42:52

My guess is that the partition table was the new fancy UEFI stuff - GPT, and as fdisk is not the tool for that - it converted the partition table to the old style.
That's why i asked for "fdisk -l". Don't ask me how I learned that lesson ;)

By the way, did you use default partitioning when creating the CentOS ? Do you remember if you used UEFI and XFS as File System ?
If you used ext*-based FS - you have a chance to recover your data via tool called "extundelete". Otherwise , you need to know the exact start/end locations of your partitions and I'm not sure that after recreation of GPT partition table with same boundaries, that the data will be available.

I guess some experimentation on a test VM will help.

So, as a summary:
1. Provide 'fdisk -l /dev/your_disk" from a Recovery CD.
2. Do you remember if you are using UEFI or MBR? You can verify that by selecting the boot menu and checking if there is an entry for your CentOS7.
3. Did you use defaults like XFS and default partitioning - if yes - what size is your disk (fdisk -l should show that).

Post Reply