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.
|
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 what other crucial information can I provide? |
fdisk -l or parted -l input/output would be useful. So would efibootmgr input/output, and content of the installed system's fstab.
|
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
|
Quote:
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. |
All times are GMT -5. The time now is 06:23 PM. |