2.4: Created new partition by resizing existing one, got bad geometry error & host won't boot
by davecan from LinuxQuestions.org on (#4VQB1)
This is my first time going through LFS (to properly learn linux the really hard way instead of mashing around for commands here and there) and I'm working within an Ubuntu 18.04 VM as the host machine for the build. (it's the default ubuntu/bionic64 vagrant box)
After running into compilation issues in a previous thread I started over and this time encountered an issue with the partition table.
Here's the partitions that exist by default when I start the VM:
Code:major minor #blocks name
8 0 31457280 sda
8 1 31456239 sda1
8 16 10240 sdbI set the disk to 30GB in the vagrantfile before VM build.
Following the advice of section 2.4 I created a separate LFS partition /dev/sda2. This required me to resize /dev/sda1 down to 10GB and create /dev/sda2 out of the remaining 20GB free space left over. I did this through cfdisk.
Problem was, when I rebooted the system I got a "bad geometry" error and it failed to boot. Googling some SO answers showed this to be a partition table problem.
If I do in fact need to create a separate partition for LFS here, how do I do that so I get /dev/sda1 = 10GB and /dev/sda2 = 20GB and the machine will actually boot after?


After running into compilation issues in a previous thread I started over and this time encountered an issue with the partition table.
Here's the partitions that exist by default when I start the VM:
Code:major minor #blocks name
8 0 31457280 sda
8 1 31456239 sda1
8 16 10240 sdbI set the disk to 30GB in the vagrantfile before VM build.
Following the advice of section 2.4 I created a separate LFS partition /dev/sda2. This required me to resize /dev/sda1 down to 10GB and create /dev/sda2 out of the remaining 20GB free space left over. I did this through cfdisk.
Problem was, when I rebooted the system I got a "bad geometry" error and it failed to boot. Googling some SO answers showed this to be a partition table problem.
If I do in fact need to create a separate partition for LFS here, how do I do that so I get /dev/sda1 = 10GB and /dev/sda2 = 20GB and the machine will actually boot after?