It can be easily solved through the Grub rescue prompt. The first answer isn’t quite complete and I got the same error at first. Here is how it works:
1st we need to find the primary partition. This will be where the essential files needed for linux to boot will reside, so we enter this —
Grub> ls
You should now see a list comparable to (hd0) (hd0,msdos5) (hd0,msdos1). Note that you may have different partitions than myself, as well as multiple drives, but the process is the same.
Now search the partitions to find the primary —
Grub> ls (hd0)
Grub> ls (hd0,msdos5)
Grub> ls (hd0,msdos1)
Until grub outputs either a list of files on that partition or shows the filesystem type and date of last modification.
2nd we need to set up a few things once we’ve found our primary partition —
Grub> set prefix=(hd0,msdos1)/boot/grub
Grub> set root=(hd0,msdos1)
Grub> set
Once the last set command is executed Grub will output a list of different parameters. Now lets check that we’ve set the correct root and prefix —
Grub> ls /boot
Grub should output a list of files contained within /boot.
3rd we need to set the mount point and load the kernel —
Grub> linux /vmlinuz root=/dev/sda1
Grub> initrd /initrd.img
And lastly we boot the system —
Grub> boot
If you end up booting into the busybox shell, simply enter fsck /dev/sda1
. After that just enter exit
and your system will boot normally.
Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.
-
tonilib
- Level 2
- Posts: 64
- Joined: Mon May 15, 2017 1:18 pm
URGENT error: attempt to read or write outside of partition
I am about to cry…..
I left the computer as a 3rd night running ddrescue doing a cloning disk to disk.
When i got up this morning just the terminal was running but anything else had dissapeared…. the desktop and bars had dissapeared so i could work or do anything (i dont really now how to you the terminal much i use xwindows for linux mint even to install programs) . So I closed the terminal and switched off the laptop manually since i knew i could continue ddrescue with the log file!!
I disconnected the 2 disks i had attached and I restarted the computer….. this is what I got
error: attempt to read or write outside of partition
Entering rescue mode…
grub rescue>
what do I do now? take into the account i do not have another computer and i have a lot information in there since i emptied my new disk to clone the old disk in my laptop….. info that i dont want to loose!!
I have tried this
grub rescue > ls (hd0,msdos5)/ # this is root and bootloader of linux
grub rescue > set root=(hd0,msdos5)
grub rescue > set prefix=(hd0,msdos5
but when I do
Grub rescue> ls /boot says error: attempt to read or write outside of partition as well if I do
Grub rescue> ls /home gives the same error but
I can do fine:
Grub rescue> ls /media or ls /root or ls /lib
I have tried
grub rescue > insmod normal but it says the sames
error: attempt to read or write outside of partition
what can i do??
Thanks in advance
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
-
gm10
- Level 20
- Posts: 10480
- Joined: Thu Jun 21, 2018 5:11 pm
Re: URGENT error: attempt to read or write outside of partition
Post
by gm10 » Thu Nov 28, 2019 11:33 am
Make sure you didn’t just disconnect the wrong disk, because that’s what it sounds like. Unless you were trying to ddrescue off the disk you are now trying to boot from, and since using ddrescue implies that the disk was already damaged it might simply be too far gone now.
Either way I’d boot from the Linux Mint installation medium (create one at another computer if you don’t have one, ideally the 19.2 version) and check the status of the disk from there before writing anything to it.
-
tonilib
- Level 2
- Posts: 64
- Joined: Mon May 15, 2017 1:18 pm
Re: URGENT error: attempt to read or write outside of partition
Post
by tonilib » Thu Nov 28, 2019 6:26 pm
The other 2 disks where external hard disks… what is wrong is the internal HD.
is there something I can do from the Grub rescue prompt before trying to create a booting usb?
I was hoping not to have to do an live usb to boot… i don’t really know how… the other computer have is a old tower (bought in 2000) on windows xp full of dust…. i will try to connect it to a monitor and see what I can do.
-
gm10
- Level 20
- Posts: 10480
- Joined: Thu Jun 21, 2018 5:11 pm
Re: URGENT error: attempt to read or write outside of partition
Post
by gm10 » Thu Nov 28, 2019 6:54 pm
Well, that depends on how accurate your claims in the OP were. If (hd0,msdos5) really is the one that holds /boot and thus the kernel, then I don’t see a way around booting from any live environment to repair the drive and likely reinstall GRUB and the kernel and whatever else may have been lost.
But it’s also possible that you were not actually looking at the correct partition. Since this is an old legacy BIOS/MBR boot situation it would not surprise me if you had a separate partition for /boot (and /home). In that case you can load the kernel from that partition.
-
tonilib
- Level 2
- Posts: 64
- Joined: Mon May 15, 2017 1:18 pm
/boot /home structure needs cleaning. I cannot access to those folders
Post
by tonilib » Sun Dec 01, 2019 12:43 pm
After a night leaving ddrescue running to clone a external disk to another external disk and creating the log file in my internal hard disk, I got up and the laptop was stuck so i restarted it.
When it restarted:
error: attempt to read or write outside of partition
Entering rescue mode
Grub rescue>
I tried few things on internet but didn’t work…
So i have done a live usb…
I can see 2 devices in /media… one Acer whic is my windows partition and i can access to all the files… Great!!!
The second partition is the linux one 76GB having a large name b7f22c6d-85c1-445a-83f6 and same more numbers and later…
In the terminal when I get into this folder and I do a > ls it shows:
ls: cannot access ‘home’: Structure needs cleaning
ls: cannot access ‘boot’: Structure needs cleaning
And the same for the folder opt, etc, lib64, mnt, usr,cdrom
I can access media, dev, lib
I have tried to run fsck and fsck.ext4 many times… it starts great and then aborts …e2fsck aborted!
I ran it many times but it does fix some errors and aborts again.
it seems like the access to /home /boot is locked
What else I can do… to be honest I want to access to /home folder to save all the info i had there… if i cant recover the system … well i will install linux mint again (i hope this is possible) but i dont want to loose the info i had there!
How can i recover the info in /home?
How can i repair the boot?
How can I repair the system?
-
tonilib
- Level 2
- Posts: 64
- Joined: Mon May 15, 2017 1:18 pm
Re: /boot /home structure needs cleaning. I cannot access to those folders
Post
by tonilib » Sun Dec 01, 2019 1:13 pm
Oh well… I decided to run fsck again
fsck -y /dev/sda5
It aborted and I ran it again… like that 6 times and finally it finished it without aborting!!
I thought it was great but oh my god!!
fsck deleted all the folders that were locked and could access to it, therefore /home /boot /opt /etc /lib64 /mnt /usr /cdrom folders have been deleted… I had 34GB free in that partition … now I have 61GB… what do i do to recover my /home folder?
I am guessing with those folder missing my linux system is gone!!
-
Larry78723
- Level 14
- Posts: 5481
- Joined: Wed Jan 09, 2019 7:01 pm
- Location: Jasper County, SC, USA
Re: /boot /home structure needs cleaning. I cannot access to those folders
Post
by Larry78723 » Sun Dec 01, 2019 1:29 pm
At this point, I think a clean reinstall is in order. I hope you had your /home backed up. Nothing like a situation like this to emphasize the importance of back-ups.
Larry
If you have found the solution to your initial post, please open your original post, click on the pencil, and add (Solved) to the Subject, it helps other users looking for help, and keeps the forum clean.
-
gm10
- Level 20
- Posts: 10480
- Joined: Thu Jun 21, 2018 5:11 pm
-
pbear
- Level 16
- Posts: 6544
- Joined: Wed Jun 21, 2017 12:25 pm
- Location: San Francisco
Re: /boot /home structure needs cleaning. I cannot access to those folders
Post
by pbear » Sun Dec 01, 2019 3:48 pm
tonilib wrote: ↑
Sun Dec 01, 2019 12:43 pm
… to be honest I want to access to /home folder to save all the info i had there…
Sounds like you don’t have backups. That’s unfortunate. You might be looking at data recovery, which is complicated and a lot of work. Never had to do it myself, but TestDisk is the utility I see recommended. More info at Ubuntu Forum and CG Security.
Don’t do this right away. Wait to see whether anyone has a less drastic remedy. TestDisk is your last resort.
Проинсталлировал на внешний USB-диск Debian 8.6 64 bit. Вся инсталляция прошла нормально. Разбитие разделов делалось инсталлятором на автомате «один раздел на всё», на разделе ext4.
При загрузке с этого USB-диска появляется сообщение:
error: attempt to read or write outside of disk 'hd0'
И grub вываливается в rescue mode.
Смотрю, видит ли Груб диск. Диск есть и виден:
Смотрю корень диска:
ls (hd0,msdos1)/
./ ../ lost+found/ etc/ media/ ... boot/ ... и т. д.
Пытаюсь посмотреть каталог boot. И тут облом:
ls (hd0,msdos1)/boot
error: attempt to read or write outside of disk 'hd0'
Может быть, ему нужен слеш в конце? Нет, со слешем та же картина:
ls (hd0,msdos1)/boot/
error: attempt to read or write outside of disk 'hd0'
Начинаю проверять другие каталоги. И вот какая картина выясняется.
Grub может прочитать каталоги:
— media
— var
— sbin
— bin
— tmp
— sys
— run
— root
— proc
— home
— srv
— opt
И не может прочитать каталоги:
— etc
— usr
— lib
— lib64
— dev
— boot
— mnt
Может быть, файловая система кривая? Гружусь в RescueCD, проверяю через fsck -f -p — ошибок нет. Монтирую этот USB-диск в /mnt/disk, во все каталоги могу зайти.
Решил переставить Груб через chroot.
Прокидываю разделы устройств:
mount --bind /dev /mnt/disk/dev
mount --bind /sys /mnt/disk/sys
mount --bind /proc /mnt/disk/proc
Переключаюсь с помощью chroot на корень USB-диска:
chroot /mnt/disk /bin/bash
Узнаю версию mkcofig груба:
grub-mkconfig -v
grub-mkconfig (GRUB) 2.02~beta2-22+deb8u1
Перегенерирую конфиг груба:
grub-mkconfig -o /boot/grub/grub.cfg
... Все океюшки, ошибок нет ...
И переустанавливаю груб:
grub-install /dev/sdb
... Все океюшки, ошибок нет ...
Пергружаюсь, и снова Grub выпадает в rescue mode. И всё то же самое.
Что делать? Как заставить Grub загружать Linux?
- Печать
Страницы: [1] 2 Все Вниз
Тема: Grub не запускает ubuntu (Прочитано 7002 раз)
0 Пользователей и 1 Гость просматривают эту тему.
DNKru
Здравствуйте. Возникла вот такая проблема: решил установить ubuntu 13.10 (вычитал, что самое то для новичка). Диск поделил на три части: «/», «/home» и «раздел подкачки» (все «первичные»). Соответственно ubuntu поставил на раздел «/». Этот же раздел создал при установке первым (где-то вычитал, что это важно). После перезагрузки поначалу совсем ничего не появлялось (только полосочка _ в левом верхнем углу экрана). Потом вроде с помощью boot repair исправил проблему: Grub стал показывать признаки жизни. Но радоваться было особо нечему: появлялось сообщение:
error: attempt to read or write outside of disk 'hd0'
и предлагалось что-то ввести в поле
grab rescue>
Пытался что-то в Биосе наменять с AHCI и IDE, но не вышло (AHCI не нашел, был только какой-то RAID).
Потом пробовал делать таким образом:
grub rescue > set root=(hd0,1)
Но после ввода «ls /boot/grub» у меня снова появилось первое сообщение. Не понимаю, что делать. На Ubuntu второй день, да и тот с флешки.
grub rescue > set prefix=(hd0,1)/boot/grub
grub rescue > ls /boot/grub
grub rescue > insmod normal
grub rescue > normal
А еще Ubuntu с флешки тоже грузится через раз (по факту, иногда приходится раз по 15 перезагружаться, чтобы запустилось). Появляются сообщения вроде
[секунды] Kernel panic - not syncing: VFS: Unable to mount... что-то там
И еще один вид сообщений, что-то вроде «System halted».
Возникают они, как мне кажется, абсолютно рандомно, ибо параметры в начальном меню я никогда не меняю (3,4,5,6 ставлю, с ними запускается хоть. Что делают — даже не в курсе.), флешку не переставляю.
Буду очень благодарен за помощь.
maks05
Здравствуйте. Возникла вот такая проблема: решил установить ubuntu 13.10 (вычитал, что самое то для новичка).
Это главная ошибка. «Самое то» — это 12.04.4
DNKru
Это главная ошибка. «Самое то» — это 12.04.4
Возможности сменить не имею — с флешки сижу.
san-alex
1. Для новичков лучше всего 12.04, а не 13,10.
2. Не читай «где-то», читай наше Руководство для новичков. И, вообще, у нас неплохая документация на сайте.
3. Проверь диск и файловую систему на ошибки. Рандомное появления ошибки «Unable to mount» может говорить о проблемах с диском.
4. Попробуй восстановить Груб.
DNKru
4. Попробуй восстановить Груб.
Уже. Попробовал первый способ и chroot. В консоли никаких ошибок не выдало.
3. Проверь диск и файловую систему на ошибки. Рандомное появления ошибки «Unable to mount» может говорить о проблемах с диском.
Как это сделать?
Можно ли с лайв CD (флешки) поменять версию с 13ой на 12ую?
maks05
3. Проверь диск и файловую систему на ошибки. Рандомное появления ошибки «Unable to mount» может говорить о проблемах с диском.
Как это сделать?
Можно ли с лайв CD (флешки) поменять версию с 13ой на 12ую?
Самое простое — запусти дисковую утилиту, выбери носитель и посмотри данные SMART (еcли нужно, запусти проверку SMART). Ищи данные о сбойных секторах и ошибках перераспределения битых секторов.
Сколько лет винчестеру, под какой ОС и как интенсивно использовался?
Нет, поменять нельзя, но можно, работая на Ubuntu с одной флэшки, скачать образ 12.04.4 (сохранить на винчестер) и создать вторую загрузочную флэшку.
DNKru
Нет, поменять нельзя, но можно, работая на Ubuntu с одной флэшки, скачать образ 12.04.4 (сохранить на винчестер) и создать вторую загрузочную флэшку.
Да, я примерно об этом и говорил. А программы (UltraISO) как ставятся? Или есть способ без дополнительных программ обойтись? Что-нибудь из того, что уже установлено и есть в версии на флешке подойдет?
Сколько лет винчестеру, под какой ОС и как интенсивно использовался?
Года три должно быть, я думаю. Стояла Windows 7, использовался достаточно интенсивно.
« Последнее редактирование: 02 Марта 2014, 15:36:49 от DNKru »
maks05
Попробуйте использовать встроенную в Ubuntu программу «Создание загрузочного диска» (в 13.10 може тназываться по другому, но суть та же). Если не поможет, будем разбираться и пробовать другие программы. Флэшку используйте простую, без наворотов и дополнительных функций, но от известных производителей. Лучше всего Transcend или Kingston. Предварительно отформатируйте в FAT32 с помощью Gparted.
3 года — это почти предел, тем более при интенсивном использовании.
« Последнее редактирование: 02 Марта 2014, 16:21:27 от maks05 »
san-alex
maks05, насчет 3 лет для винчестера ты немного перегнул палку. Хотя, — как повезет.
Ты прочитай таки Руководство, ссылку на которое я дал. Чтобы на старые грабли не наступать.
DNKru
Поставил на еще одну флешку Ubuntu 12.04, установил все по инструкции из руководства (даже разделы через ту же программу расставил(см. спойлер)). И, вуаля: прогресс (регресс?). Появилась новая ошибка:
error: out of disk.
Решил, что сразу сюда отпишу, не буду сам пока лезть.
san-alex
Груб куда установил? Не на флэшку, случайно?
Восстанови Груб еще раз.
DNKru
Груб куда установил? Не на флэшку, случайно?
Его вообще как-то отдельно ставить нужно? Я инструкции из «Руководства» следовал только.
Вообще, я думал, что Груб вместе с самой системой ставится на тот же диск.
Ставил, кстати, не туда, где пометка «/», а вообще на диск, как в руководстве написали. И, я насколько понял, Груб у меня не сразу появлялся из-за того, что лежал не на самом диске, а в его разделе.
san-alex
Если поставил не на раздел, а на диск — то все правильно. А груб не появляется потому, что Ubuntu — единственная система. Если хочешь увидеть меню — нажми шифт при загрузке.
Но ошибка говорит о том, что что-то с грубом не в порядке. Восстанови еще раз.
DNKru
Восстанови еще раз.
Восстановил по первому и второму способам. Вроде то же самое. Не смог обновить на последних шагах. Мб с этим связано?
san-alex
Он корень не монтирует. Ты точно все правильно делаешь? Раздел правильный указываешь?
- Печать
Страницы: [1] 2 Все Вверх
I am getting the following grub error: attempt to read or write outside of disk 'hd0'
.
Is there any way to fix this error? I can’t boot into Debian because of this.
Partitions:
SCSI1 (0,0,0) (sda) - 250.1 GB ATA WDC WD2500BEVE-0
#1 Primary 249.0 GB B ext4
#5 logical 1.1 GB F swap swap
SCSI3 (0,0,0) (sdb) - 7.8 GB USB Flash Memory
#1 primary 7.8 BG B fat32
SCSI3 is a USB device to load in some firmware needed for the install of Debian.
cas
72.3k7 gold badges112 silver badges178 bronze badges
asked May 25, 2016 at 17:06
3
Because you’re usign debian, it will be very easy to recover grub, using the installation CD.
Boot the install Debian CD and select Advanced options -> Rescue Mode
There you will have options to reinstall grub or to go to a chroot shell, and reinstall grub using:
grub-mkdevicemap
grub-install /dev/sda
update-grub
answered May 25, 2016 at 17:25
Introduction
Some situations (such as BIOS limitations or this grub error) may require to create a separate/boot partition at the beginning of the disk and set up Ubuntu to use it
Here’s how to do it easily:
Procedures
Step 1 – boot on Live CD or live USB
Start the computer:
-Linux secure remixlivivecd or liveusb, then select “Try Ubuntu”, and then go directly to Step 3 below
-Or Ubuntu Live CD or live USB, select “Try Ubuntu” and go to step 2 below
Step 2 – install boot repair in a real-time session
After entering the Ubuntu real-time session, install boot repair in this way:
Connect to the Internet
Open the terminal (Ctrl + Alt + T) and type:
sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair
Step 3 – run GParted
Start GParted from any of the following:
-Dash (Ubuntu 11.04 and next): click the Ubuntu logo in the upper left corner of the screen, then type GParted and click the GParted icon that will appear
-Or system – > Management – > GParted menu (Ubuntu 10.04)
-Or type gksudo GParted in the terminal
Step 4 – create a 1GB partition at the beginning of the disk
Through GParted:
-Reduce one of the first partitions of the disk so that creates 1GB (= 1000mib) of free space at the beginning of the disk on which Ubuntu is installed. This free space must be within the first 100GB of the disk (the starting position of the disk at its end must not exceed 100GB). Important: to adjust the size of Windows Vista/7/8 partition, use windows tools instead of GParted
-In this free space, create a 1GB partition with format ext4
-On paper, write down the name of the new 1GB partition. This is usually similar to/dev/ sdxy (x is a letter and Y is a number)
Step 5 – run boot repair
Start boot repair from any of the following:
-Dash (Ubuntu 11.04 and next): click the Ubuntu logo in the upper left corner of the screen, then type boot and click the boot repair icon that will appear
-Or system – > Administration-> Boot repair menu (Ubuntu 10.04)
-Or type boot repair in the terminal
Step 6 – choose the right option
In boot repair:
-Click Advanced Options
-Go to the grub location tab
-Check the “separate/boot partition: sdxy” option (sdxy must be your 1GB partition)
-Click “apply”
-Note the URL that will appear on the paper ( paste. Ubuntu. COM/XXXXXX/)
-Turn off the computer
-Remove Live CD and/or live USB
-Turn on the computer. You should be able to boot to Ubuntu by now
English original
Introduction
Some situations (eg BIOS limitations, orthis GRUB bug) may require tocreate a separate /boot partition at the start of the disk, and setup Ubuntu to use it.
Here is how to do it very easily:
Procedure
Step 1 – Boot on a liveCD or liveUSB
Boot your computer either on:
– aLinux-Secure-RemixliveCD or liveUSB, then choose “Try Ubuntu”, then go directly toStep 3 below.
– or a Ubuntu live-CD or live-USB, choose “Try Ubuntu”, then go toStep 2 below.
Step 2 – Install Boot-Repair in the live-session
Once in the Ubuntu live session, installBoot-Repairthis way:
Connect internet
Open a terminal (Ctrl+Alt+T) and type :
sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair
Step 3 – Run gParted
Launch gParted from either:
– the Dash (Ubuntu 11.04 and next): click the Ubuntu logo in the top-left corner of the screen, then typegpartedand click on thegPartedicon that will appear.
– or System->Administration->gParted menu (Ubuntu 10.04)
– or by typinggksudo gpartedin a terminal
Step 4 – Create a 1GB partition at the start of the disk
Via gParted:
– Reduce one of the first partitions of the disk in order tocreate 1GB (=1000MiB) of free space at the start of the diskwhere Ubuntu is installed. This free space must be locatedinside the first 100GB of the disk(its end must not be located at more than 100GB from the start of the disk). Important: to resize Windows Vista/7/8 partitions, don’t use gParted but Windows tools instead.
– In this free space, create a1GB partition formatted in EXT4.
– On a paper, note the name of this new 1GB partition. This is generally something like /dev/sdXY(X is a letter, Y is a number).
Step 5 – Run Boot-Repair
Launch Boot-Repair from either:
– the Dash (Ubuntu 11.04 and next): click the Ubuntu logo in the top-left corner of the screen, then typebootand click on theBoot-Repairicon that will appear.
– or System->Administration->Boot-Repair menu (Ubuntu 10.04)
– or by typingboot-repairin a terminal
Step 6 – Choose the right option
In Boot-Repair:
– Click onAdvanced Options
– Go to theGRUB locationtab
– Tick the“Separate /boot partition: sdXY”option (sdXY must be your 1GB partition)
– Click“Apply”
– Note on a paper the URL (paste.ubuntu.com/XXXXXX/) that will appear.
– Shutdown the computer
– Remove the liveCD and/or liveUSB
– Start the computer. You should now be able to boot into Ubuntu.
Similar Posts:
-
hrsetrdr
- Posts: 179
- Joined: 2007-03-17 15:14
error: attempt to read or write outside of disk ‘hd0’
#1
Post
by hrsetrdr » 2018-09-12 22:00
I pulled my 17 yr. old Intel D850GB based build out of the closet, and fired it up. It had XP Home on it that (for some reason) wanted re-activation. I didn’t care about that, I wanted to put Fedora on it. However, during the boot process of the install disc, got the «display out of range» signal on the monitor. Not much I can do with that, so I tried other discs. I tried Debian 9.5 netinst, Ubuntu 16.04 sever…anything that would fit on a CD, as this machine does not have a DVD drive, and is too old to boot from USB. I would get the distros installed but upon reboot would get:
Code: Select all
error: attempt to read or write outside of disk 'hd0'
entering rescue mode
grub rescue>
Just for the record- the HDD is a Western Digital IDE 7200 RPM.
O.K., so I tried to fix this with:
Code: Select all
grub rescue > ls (hd0)
grub rescue > set root=(hd0)
grub rescue > set prefix=(hd0)/boot/grub
grub rescue > insmod normal
grub rescue > normal
But….that didn’t work. Upon reboot would still get «error: attempt to read or write outside of disk ‘hd0′».
I was successful getting an old copy of Debian 6.06(badly EOL) installed and working without any «hd0» errors.
Question:What does «error: attempt to read or write outside of disk ‘hd0′» actually indicate? Something wrong with the hard drive?
Something not working during partitioning?[/QUOTE]
Last edited by hrsetrdr on 2018-09-16 02:53, edited 1 time in total.
If you can’t explain it simply, you don’t understand it well enough.
(Albert Einstein).
-
hrsetrdr
- Posts: 179
- Joined: 2007-03-17 15:14
Re: error: attempt to read or write outside of disk ‘hd0’
#3
Post
by hrsetrdr » 2018-09-13 01:42
bw123 wrote:Did you try any of the solutions you found when looking up the error msg?
Yes, the solutions I came across from numerous sources were:
Code: Select all
grub rescue > ls (hd0)
grub rescue > set root=(hd0)
grub rescue > set prefix=(hd0)/boot/grub
grub rescue > insmod normal
grub rescue > normal
Which did not work.
However, one solution mentioned here was:
sashkello wrote:OK, SOLVED!
I figured hard drives can’t be the problem, and the motherboard doesn’t seem to have any obvious issues either, otherwise there’d be problems with working from USB boot, which works perfectly.
Then, the only place the problem might reside is somewhere in between these two. So, I cracked it open once again, removed the cable connecting the drive to the motherboard and noticed the tiniest of dust particles sitting on one of the contacts. It must have got there when I was replacing the drive for the very first time, and since I only disconnect the part of the cable which goes into the hard drive, it was sitting there unmoved all this time.
Phew! Such a stupid thing and so much trouble from it. Like my dad taught me: «If it doesn’t work, disassemble it and assemble it back, that will solve it in 90% of situations»
Worth investigating, I wasn’t looking for hardware problems up to this point, although as I mentioned- Debian 6.06 did install nicely without a hitch.
I have ‘new’ ribbon cables and IDE drives, I’ll tinker further, as I really want an up-to-date OS. I can pull packages from old-stable archives but no security updates.
If you can’t explain it simply, you don’t understand it well enough.
(Albert Einstein).
-
p.H
- Section Moderator
- Posts: 3015
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 122 times
Re: error: attempt to read or write outside of disk ‘hd0’
#4
Post
by p.H » 2018-09-13 10:21
It could be that the old BIOS is unable to read/write disk sectors beyond some limit, but GRUB needs to read data beyond that limit.
What is the capacity of the disk ? How did you partition it ?
You can try to install with a small partition (100 MB-1 GB) located at the beginning of the disk and mounted on /boot.
PS : the «solution» you mention cannot work on a partitioned disk. Anyway I do not see how it would help with your issue.
-
hrsetrdr
- Posts: 179
- Joined: 2007-03-17 15:14
Re: error: attempt to read or write outside of disk ‘hd0’
#5
Post
by hrsetrdr » 2018-09-18 18:10
p.H wrote:It could be that the old BIOS is unable to read/write disk sectors beyond some limit, but GRUB needs to read data beyond that limit.
What is the capacity of the disk ? How did you partition it ?
You can try to install with a small partition (100 MB-1 GB) located at the beginning of the disk and mounted on /boot.PS : the «solution» you mention cannot work on a partitioned disk. Anyway I do not see how it would help with your issue.
The hdd is a WD 250GB 7200rpm drive, The BIOS recognises the drive correctly. I checked(actually replaced) the cables and blew out the PATA connector on the drive, like was suggested in the quote in my post above. That made no difference. I tried a small partition(/boot) at the beginning of the disk, made no difference when trying to install the newer OS’s, still the «attempt to read or write outside of disk hd)» error.
However, I once again slipped in my Debian 6 disc, told it to use the whole disk, automatic partitioning…gave me a 249GB ext3 partition, and a 1GB swap. Boots great!
I’ve been wondering «what the difference is» between the Debian 6 and all the other newere install discs…maybe ext3 vs. ext4 file system writing…?
https://www.golinuxhub.com/2014/03/what … 3-and.html
^^makes note to self^^ try another Debian 9.5 install, using ext3 file system.
Anyway, I bought a refurb’d WD 80GB hdd for testing, maybe something wrong with the 250GB drive. :shrug: I’m pretty sure that an OS using ext4 can install on an IDE PATA drive. Ext4 was incorporated into the 2.6.28 kernel back in December 2008, but I only had one SATA drive at that time, so Lenny would have been installed on one of the older drives.
If you can’t explain it simply, you don’t understand it well enough.
(Albert Einstein).
-
hrsetrdr
- Posts: 179
- Joined: 2007-03-17 15:14
Re: error: attempt to read or write outside of disk ‘hd0’
#6
Post
by hrsetrdr » 2018-09-19 04:47
**In other news**
As part of my annual Fall update on all my old machines, I did a Debian 9.5 netinst on a Athlon xp1800
machine with a Maxtor 250GB IDE hard drive, that had no read/write outside of disk issues whatsoever.
Only real issue is both Firefox esr and Chromium refuse to run, has to do with the processor not having SSE2 instruction set.
https://support.mozilla.org/en-US/kb/yo … -supported
Epiphany is crippled, presumably for similar reasons.
Midori does work, but when visiting gmail displays in [very basic] basic html mode.
If you can’t explain it simply, you don’t understand it well enough.
(Albert Einstein).
Hello All,
I’m hoping someone can help me solve this issue — as I’m at my wits end. I had a perfectly functioning version of Ubuntu Desktop 20.04.01 LTS running on the server in question. I had to reformat it with Ubuntu Server for a temporary project.
I am now trying to re-install Ubuntu Desktop 20.04.01 LTS. The installation process seems to function as expected. I successfully complete the install wizard, keeping all of the defaults. Specifically, erasing the whole disk on a non-LVM instance.
After reboot I keep getting the following error: (screenshot here)
ERROR: attempt to read or write outside of disk 'hd0'. Entering rescue mode... grub rescue >
I feel like «I’ve tried everything» to get this to work, but I must be missing or overlooking something, so far I’ve done the following to troubleshoot:
-
Used GParted and erased all partitions before reinstalling Ubuntu Desktop 20.04.01 LTS
-
Completely secure erased all 8 Hard Drives on the server. Tried configuring in RAID0, 1, 5, and 10. All with resulting in the same error. The server is currently configured as a RAID0.
-
I have tried following the steps outlined in this ‘Ask Ubuntu’ Thread, this was never successful either
-
I have literally swapped out the 8 drives and tried using new drives and still, same error
This issue is even more frustrating since I had a perfectly working machine prior to this. Wondering if anyone can help offer any insights if you’ve run into this before — or maybe provide some tips on how to potentially resolve this issue going forward?
Any/All help is greatly appreciated!