Error attempt to read or write outside of disk cd0

I tried to install Xubuntu 13.10 on an older computer. I noticed some difficulties during installation that may be relevant to my problems. Notably: The screen resolution was extremely low. The wi...

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.

Проинсталлировал на внешний 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  (Прочитано 7001 раз)

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)
grub rescue > set prefix=(hd0,1)/boot/grub
grub rescue > ls /boot/grub
grub rescue > insmod normal
grub rescue > normal
Но после ввода «ls /boot/grub» у меня снова появилось первое сообщение. Не понимаю, что делать. На Ubuntu второй день, да и тот с флешки.
А еще 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  Все   Вверх

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:

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's user avatar

cas

72.3k7 gold badges112 silver badges178 bronze badges

asked May 25, 2016 at 17:06

Grey's user avatar

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

Luciano Andress Martini's user avatar

User avatar

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).



User avatar

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
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.


User avatar

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).


User avatar

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).


Recently I tried to exit out of a game client (Diablo 3) and my computer completely froze up. I tried to use Ctrl+Alt+Delete to force it to close after about 3 minutes and got no response. After another 5 minutes my computer restarted itself. When it booted back up instead of getting GRUB after my BIOS I got and error saying that my computer couldn’t identify the boot device, that I should plug it back in and press a button. I restarted again and got a different error which has since persisted.

error: attempt to read or write outside of disk ‘hd0’.
grub rescue> _

I tried referencing https://askubuntu.com/questions/397485/what-to-do-when-i-get-an-attempt-to-read-or-write-outside-of-disk-hd0-error to figure out how to fix my problem since I have no knowledge of how to use grub rescue. Here’s what I got:

grub rescue> ls
(hd0) (hd0,msdos2) (hd0,msdos1) (fd0)
grub rescue> ls (hd0)
error: unknown filesystem
grub rescue> ls (hd0,msdos2)
error: unknown filesystem
grub rescue> ls (hd0,msdos1)
error: unknown filesystem
grub rescue> ls (fd0)
error: failure reading sector 0x2 from 'fd0'.
grub rescue> 

Any ideas of how to troubleshoot this would be greatly appreciated.

My system has a partition for Ubuntu 13.04 and Windows 7. Please ask if any of hardware would be relevant (although I’m not sure how to check it without my OS)

Community's user avatar

asked Apr 6, 2014 at 2:16

avorum's user avatar

3

The best (and fastest) thing to do in this situation, is to do the following:

  • Turn off the PC
  • Remove the hard drive from the PC
  • Get a second blank hard drive (or second PC)
  • Insert the blank hard drive and install an operating system on the new hard drive (or boot into the second PC)
  • Using a SATA to USB cable (you can find one on ebay cheap), plug the old hard drive into the new PC.
  • Copy all the files to a separate folder on the new hard drive
  • Using Gparted Live burned to a CD (THE PROGRAM IS FREE), wipe the hard drive and rebuild the NTFS filesystem (try google if you need help doing this).
  • Insert the now blank original hard drive into the original laptop.
  • Reinstall your OS
  • Using an external hard drive (or by directly connecting the other hard drive using the same SATA to USB cable), copy all the data back to the first hard drive (into a SEPARATE folder — do NOT overwrite!)
  • Now, reinstall all your programs, and use the data you just copied to restore all your settings and saved games.

Trust me, this may be painstaking but unless you are really lucky, it will be WAY FASTER and WAY CHEAPER than trying to recover the data. Trust me, I’ve fixed it but it takes like more than 24 hours straight sometimes, and that’s after you have a good data recovery software. Since that time, the above steps are what I do if I ever run into a similar issue. It’s way faster than taking a chance that you may spend forever just to maybe fix the broken file system with recovery software.

Good luck! Sorry about your luck, I hope this helps.

As long as the entire hard drive is not corrupted, by doing my method above you won’t need any data recovery programs or spend countless hours trying to get it working again.

answered Apr 6, 2014 at 3:25

superuser's user avatar

superusersuperuser

3,3387 gold badges25 silver badges36 bronze badges

4

Error exists because /boot is far away from beginning of the disk

The best solution write boot into its own partition

details are here

answered Sep 4, 2020 at 18:47

Eugen Konkov's user avatar

Eugen KonkovEugen Konkov

5141 gold badge7 silver badges18 bronze badges

Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

User avatar

cabbagetreemo

Level 3
Level 3
Posts: 140
Joined: Fri Mar 31, 2017 2:36 am
Location: Spain

error attempt to read or write outside of disk ‘hd0’ [Solved] (unclear how)

I have seen a few posts with similar issues but they have either not been resolved or it has been unclear which suggested solution actually worked so in the interest of not just trying every possible solution I find and hoping that no further damage is caused I am starting a new thread.

I have a Lenovo ThinkPad T530 which has been running Windows 7 Home Premium. I want to keep Windows on this computer because it has a full (not 365) version of Microsoft Office and I have not yet found a replacement for PowerPoint which is to my liking (but that’s a topic for another time), but I also want to run Linux (I am using 18.2 Cinnamon 64-bit).

I followed the guide here https://kompjuteras.com/en/how-to-insta … h-windows/ and made my Linux partition ~100 GB. Immediately after install I booted both Windows and Linux and everything seemed fine so I went about installing software and making the theme the way I like it on Linux. Afterwards I decided to check that everything was still OK and tried to boot Windows, the screen was black for a few minutes (not sure exactly how long) and then I got an option to either boot Windows in safe mode or run memtest or press esc to cancel. I cancelled and tried to check the Linux install. Now I consistently see the message

Code: Select all

error attempt to read or write outside of disk 'hd0'
Press any key to continue...

but Linux does mange to boot after pressing enter.

There is a recovery partition installed by Lenovo on the HDD but I don’t have any Windows install disks since this is an OEM licence (I know, even worse than a retail licence). However, I do have an older HDD which was cloned to the current HDD in the past due to signs of failure so the Windows install can probably be recovered from there if necessary.

If I do have to reinstall Linux, is it possible to move all my installed programs and changed settings over? I am using Julia and atom which are a bit of a pain (but doable) to install and, for example, texlive-full just takes a really long time to install.

Last edited by cabbagetreemo on Mon Oct 09, 2017 12:33 am, edited 1 time in total.

User avatar

cabbagetreemo

Level 3
Level 3
Posts: 140
Joined: Fri Mar 31, 2017 2:36 am
Location: Spain

Re: error attempt to read or write outside of disk ‘hd0’

Post

by cabbagetreemo » Sat Sep 30, 2017 3:59 am

@Mute Ant, I don’t know what you mean by install grub, the grub menu appears to be working fine, it is only after selecting Windows that boot fails (it didn’t immediately after installing Mint) or selecting Mint that the error message appears before a reluctant boot.

@syg00 I don’t know if it would have made a difference whether I booted mint on the HDD or the live media but here is the output you requested from the live media

Code: Select all

mint@mint ~ $ sudo parted /dev/sda "print free"
Model: ATA ST500LM021-1KJ15 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
        32.3kB  1049kB  1016kB            Free Space
 1      1049kB  1574MB  1573MB  primary   ntfs            boot
 2      1574MB  377GB   376GB   primary   ntfs
        377GB   377GB   1048kB            Free Space
 4      377GB   482GB   105GB   extended
 5      377GB   474GB   96.6GB  logical   ext4
 6      474GB   482GB   8271MB  logical   linux-swap(v1)
 3      482GB   500GB   17.9GB  primary   ntfs
        500GB   500GB   24.6kB            Free Space

Mute Ant

Re: error attempt to read or write outside of disk ‘hd0’

Post

by Mute Ant » Sat Sep 30, 2017 9:37 am

The proper dual-boot installation sequence is…

o Get Windows working to its own satisfaction.

o Install Mint, or start your installed Mint partition. You can use the Live Session Mint DVD to start the OS in /dev/sda5 for example.

o Install GRUB… sudo grub-install /dev/sdasudo update-grub

It’s normal for Windows to get upset when there’s foreign code booting the OS, because it looks like malware. If you must have Windows, and Windows insists on ‘repairing’ GRUB, work with that. Add a Linux Loader to the options offered by the Windows boot-loader, for example.

User avatar

cabbagetreemo

Level 3
Level 3
Posts: 140
Joined: Fri Mar 31, 2017 2:36 am
Location: Spain

Re: error attempt to read or write outside of disk ‘hd0’

Post

by cabbagetreemo » Mon Oct 09, 2017 12:32 am

After not having time to look at this computer since my last post, I came to try reinstalling Grub but before I did so I decided to try booting Windows… To my surprise, it worked perfectly (I dare say even booting faster than it used to, which was usually around 2 minutes). I rebooted Windows several times then booted Linux and did not get any error message. Then I booted Windows again, then Linux again, then left the computer powered off for some time, then Windows again and finally Linux again, from which I am writing this post.

I did not change anything since starting this thread so I cannot say what fixed it or if it is permanently fixed (fingers crossed that it is).

At any rate I will mark the thread solved but I am of course curious about any input as to why there were problems and why there are no longer problems (best candidate right now is ghosts).

Понравилась статья? Поделить с друзьями:
  • Error attaching to ose error 0x00000000 office 2010
  • Error ata device configuration change has occurred перевод
  • Error ata device configuration change has occurred как исправить
  • Error at opening the data source
  • Error at loading of ippcv library photoshop 2023 решение ошибки