stuck at grub rescue (attempt to read or write outside of partition)
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
stuck at grub rescue (attempt to read or write outside of partition)
I recently made the switch to linux I chose alpine and fedora:
I was making a partition using cfdisk with alpinelinux on a 1Tb hard drive, I declared the type to linux filesystem and wrote changes to disk. My pc immediately rebooted and entered grub mode with the following message:: error: attempt to read or write outside of partition
entering grub rescue.
I need some help to get back to my partition or something?
Is the 1TB disk you refer to an external or non operating system disk? Creating and formatting a partition won't do what happened in your case and I would not expect the computer to automatically reboot after making a partition change which is what it seems you are saying. Did you use the entire disk to create/format a partition. And again, what if anything was on the disk?
Seems to me the partition table change may have invalidated a previously installed Grub, and it may need to be reinstalled if there's still a good OS installation on the disk. If there is none, then wiping 30 or so sectors following the MBR sector could be helpful until such time as you install an OS. Answers to yancek's questions should be telling.
Seems to me the partition table change may have invalidated a previously installed Grub, and it may need to be reinstalled if there's still a good OS installation on the disk. If there is none, then wiping 30 or so sectors following the MBR sector could be helpful until such time as you install an OS. Answers to yancek's questions should be telling.
hi yancek the drive is not an external I was partitioning the pc's internal drive(hdd), I partitioned 128Gib of the drive...
I recently tried rescuing grub with setting the:>set prefix and >set boot commands it still responds the same error "attempt to read or write outside of partition"
let me share more of the grub rescue:
###Note### The following is the current configs, I had made a lot of changes these are not default###NOTE###
Code:
error: attempt to read or write outside of partition
entering grub rescue
>ls
(hd0) (hdo,gpt3) (hd0,gpt2) (hd0,gpt1)
>ls (hd0,gpt3)
filesystem: ext2
> set
root=hd0,gpt3
cmdpath=(hd0,gpt1)/EFI/BOOT
prefix=(hd0,gpt3)/boot/grub
boot=hd0,gpt3
>insmod normal
error: attempt to read or write outside of partition
>
so this is my list of partitions in the drive(I think)
what other crucial information can I provide?
The best way to go about such a situation is to not panic, and to use a "live cd" or a specialized live cd called a "rescue cd".. It just happens to be that Slackware is an excellent rescue disk (not a cd, but dvd/usb).. With this you can boot the Kernel on the disk, with any available partition as your /root, and set up a full environment to get things fixed.
The best way to go about it, is to use such a disk to boot your pc, then:
1. Analyze the partition situation (intact? content still there?)
2. Repair your bootloader
3. If that doesn't work, repair the rest of your boot sequence (Kernel/init)
4. If that doesn't work, rescue any content you need from the partition(s) or some other more advanced solutions/attempts at repair
I have live boot and managed to get my important files safe on a usb and just restarted from the beginning. thanks guys zeebra, mrmazda & ywncek
That's great. Good to hear!
Conventional wisdom says to ALWAYS use backups when doing major system operations. And that's true for everyone. I can't say how many times I've gotten myself into such situations (and out quite often too), but my experience verifies to me the correctness of the conventional wisdom. And still also.. No matter how many times you've done these things, and feel 100% sure everything will be fine (you know these things in and out), you should still ALWAYS make backups when doing major system operations.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.