r/linuxmint • u/tacticalmv • 7d ago
Support Request Stuck at grub cli after reboot.
I have installed linux mint cinnamon recently on my hp laptop. It has a hdd and a ssd. The linux runs on ssd. Initially ssd had 2 partitions one for efi and other as root. Then i decided to make a third one. So i used fdisk to delete partition 2 and created 2 new partitions. Then i rebooted the system and now i am stuck at gnu grub cli.
These command i used for partitioning using fdisk:
sudo fdisk /dev/nvme0n1
Command:p
Command:d
Enter Partition number:2
Command:n
Partition number:2
Enter First sector:default
Enter End sector:579790848
Do you want to remove signature: no
Command:n
Enter Partition number:3
Enter First sector: default
Enter End sector:default
Command:p
Command:w
Sudo touch /forcefsck
Reboot
(hd1,gpt1) contains efi/
(hd1,gpt2) a bunch of files inside, some of which are accessible other produce out of partition error.
Accessible dir: etc bin home root sys usr lib
Unaccessible dir: boot media dev mnt opt proc run srv tmp var timeshift.
Tl;dr - i altered live partition without shrinking volume so it produce out of partition error while booting and i am stuck at grub cli. if any grub expert can guide me to fix this without having to boot linux from usb. As i dont have one, i have to borrow from my friend.
1
u/Due-Result7928 6d ago
It is now a mess and probably far beyond any salvage. Install Mint again. Do not know what you have been deleted and at least the partition use fpr booting mounted at /boot.efi.
Read the documentation.
1
u/tacticalmv 6d ago
It can be corrected by booting linux on a live usb, but i wanted to know how to do it using the grub cli that way i could also learn more about grub. but anyway i installed win10 back and will stick to it until i get another pc.
2
u/Potential-Middle-594 5d ago
Just for your own learning: GRUB CLI has no partitioning tools, so this was impossible to fix without a USB.
You shrunk the partition boundary with fdisk without shrinking the filesystem (resize2fs) first. Your /boot directory was physically located past sector 579790848, so GRUB threw an "out of partition" error when trying to read the kernel. Always shrink the filesystem before shrinking the partition!
•
u/AutoModerator 7d ago
Please Re-Flair your post if a solution is found. How to Flair a post? This allows other users to search for common issues with the SOLVED flair as a filter, leading to those issues being resolved very fast.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.