Discussion:
[lfs-support] Get only to GRUB rescue prompt after attempting to reduce size of Linux partition
Luciano
2018-06-08 09:36:59 UTC
Permalink
Hello,


After resizing partition following directions on the LFS book and
elsewhere, I get only to GRUB rescue mode now.

My original partitions were:

*******************************************
/dev/sda1 Linux ext4 start at 2048 ................end at
974694399 on a 464 GB hard disk
/dev/sda2 Extended
/dev/sda5 swap partition

/dev/zram0
/dev/zram1


Host system is Lubuntu 16.04 LTS on Intel PC. I was going to create a 20 GB
partition named /dev/sda3
by reducing the size of /dev/sda1 using fdisk.

I was able to get 'version-check.sh' to run ok in preparation, as described
in LFS book. But after using fdisk and rebooting, I only get GRUB rescue
prompt now. Searched many forums, one specially got my
attention (https://ubuntuforums.org/showthread.php?t=2213466), also
Google'd as (
https://www.google.com/search?ei=2I4OW8b3NYnXzgL9noLQCA&q=reboot+only+gives+grub+rescue+prompt+not+able+to+reboot+from+disk&oq=reboot+only+gives+grub+rescue+prompt+not+able+to+reboot+from+disk&gs_l=psy-ab.3...596982.615277.0.616448.77.71.2.0.0.0.489.11166.0j24j13j9j1.47.0....0...1c.1.64.psy-ab..30.30.6790...0j0i67k1j0i10k1j0i10i67k1j0i22i30k1j0i22i10i30k1j33i160k1j33i21k1.0.EdD6Qjtxbo0)
but haven't found a way out just as yet. Tried booting from liveCD of
Lubuntu, also Boot Repair and GParted ISO's, but it does not boot from
CD/DVD, only has option from floppy and hard disk as Boot First device on
Boot Menu of BIOS.

Here are some standard output from "grub rescue>" when turning computer on:


error: attempt to read or write outside of partition
Entering rescue mode...
grub rescue> ls
(hd0) (hd0,msdos5) (hd0,msdos1) (fd0)
grub rescue>ls (hd0)/boot
error: unknown filesystem.
grub rescue> ls (hd0,msdos5)/boot
error: unknown filesystem.
grub rescue> ls (hd0,msdos1)/boot

error: attempt to read or write outside of partition
grub rescue> ls /
./ ../ lost+found/ etc/ media/ var/ bin/ boot/ dev/ home/ lib/ mnt/ .ssh/
proc/ root/ run/ sbin/ vmlinuz srv/ sys/ tmp/ usr/ initrd.img
initrd.img.old .rpmdb/ snap/ cdrom/ opt/ core vmlinuz.old forcefsck
grub rescue> set root=(hd0)/
grub rescue> insmod linux
error: attempt to read or write outside of partition.
grub rescue> _

Hope someone can point a way out of this situation as I resolved to finally
improve my Linux skills and installing LFS on a 2006 desktop is a first
test.
Don Cross
2018-06-08 11:44:26 UTC
Permalink
Post by Luciano
Hello,
After resizing partition following directions on the LFS book and
elsewhere, I get only to GRUB rescue mode now.
http://en.wikipedia.org/wiki/Posting_style
Hi Luciano,

Did you use resize2fs to shrink your filesystem before you changed the
partition size? If not, that is probably where your problem was. Not sure
how you can fix it now. Maybe somebody else has an idea?

Loading...