You are not logged in.

#1 2010-06-04 19:06:45

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

"A disk read error occured"

Ok, so this is a strange one:

I use an usb stick for my /boot partition and for unlocking the dm-crypt/LUKS encrypted drive.
I want to move that to another stick, so I created the partitions (the boot partition and the data partition that gets used as normal), copy all the boot files there, and install grub onto the stick's MBR.

I proceed to rebooting and get greeted by a nice error message:

A disk read error occured
Press CTRL+ALT+DEL to reboot

I actually pulled my hair out for 2 hours trying to reinstall grub, recreate the partition table and all the partitions (I must have done this at least 5 times), before I thought of trying to boot my other PC from the stick. And it worked as expected, but my laptop still spits out the error message. The original stick still works though. So, this has to be a BIOS problem, anyone know what the heck can be going on? Why would the laptop error out while trying to boot from the stick?

I believe the stick doesn't have any hardware errors, since it wasn't used much, it's an old 512MB one that I used for a really short time,  and also since it boots without problems in the other PC. How could I check it for errors, just to be sure? badblocks program? something else?


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#2 2010-06-06 15:15:57

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: "A disk read error occured"

Check if the partition is marked as bootable, some bioses are a bit picky about that. You can also try to do a dd from your currently working drive to the one you want to use (if the partition on the working drive fits in the new disk).

To check if there are any bad sectors maybe you can try badblocks and see if anything strange comes up.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2010-06-08 11:31:17

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: "A disk read error occured"

So, can someone explain this to me?
This is how it actually went - read on, it's a mystery (to me, at least):

1) I wanted to replace my 8GB usb stick for a 512MB, since I mostly used it as a physical key to booting the laptop. So, I partition the "new" stick with two equally sized partitions - NTFS for some small documents, and ext2 for the boot partition. I have the original drive formatted in a similar way, with 2 partitions.

2) Being lazy, instead of just installing grub I dd'ed the whole MBR of the other drive onto this one. When I rebooted I was reminded that the MBR also contains the partition table.

3) So I recreate the partition table and partitions, dd only the 446 bytes used for the bootloader and get that disk error thingy. I try booting with the original stick, and it gets a grub error 17. I know it hasn't changed, so I reset the BIOS settings, boot again, and now it boots, but still only with the original stick (phew, that was close).

4) I then proceed to zeroing out and repartitioning the new stick, followed by manually installing grub from the grub shell onto the drive MBR. After rebooting, I get the disk read error again. I try placing the drive in all of the usb slots.

I repeat step 4 about 5-6 times.

After reading your reply R00KIE, I checked the original stick and it didn't have the boot flag set on any partition, so that couldn't have been the problem. Just for the fun of it I set the boot flag to the ext2 partition, and I run badblocks on the drive - badblocks exits with no output, so that means no errors? I tried a non-destructive read-write test as well, no output either.

5) After rebooting, I now get a blank screen instead of the error. So I'm thinking "progress". I try putting the stick into a different usb slot, reboot again, and lo and behold - it now boots. I try rebooting and put it in the slot it was before, and it boots correctly again.

It's been about 5 boots now and it works, but what happened here? I'm hesitant to shred the original stick now...are there gremlins living in my BIOS, or in my head? Is this PEBKAC?


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#4 2010-06-08 12:34:27

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: "A disk read error occured"

Unfortunately there are a few things we never get to understand, this might be one of them.

Like I said before, some bios are picky about the boot flag, one of my machines doesn't even display the usb disks in the boot menu if no partition is marked as bootable, on top of that the drive's mbr must have the correct signature (0xaa55) or the bios will also refuse to boot from the disk (I guess this may be set by fdisk, it should be).

Other times you have to do a cold boot so everything gets initialized again and some changes are detected, a reboot is not enough sometimes.

And then there are the gremlins, most of the times they behave nicely but every once in a while they decide to throw a party and all sort of strange things happen tongue

Now seriously, maybe you can try to dd your "new" drive to a file, zero the drive and dd things back and see if it still works, if it does and if it is ok to keep that file then no worries, you can reuse your "old" drive for something else. If anything goes wrong you can always get what you need from the dd image.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2010-06-08 20:47:31

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: "A disk read error occured"

I did a couple of cold boots too, didn't help. I actually have no clue how it started working, or what the problem was in the first place.
This really troubles me. I'm troubled.

Last edited by moljac024 (2010-06-09 01:13:24)


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#6 2010-06-08 22:15:05

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: "A disk read error occured"

I know how you feel. Grub is magic, sometimes.
For example, when I transfered my Arch installation over from one 20 GB disk to another 20 GB disk (slightly different partition layout, new filesystems, copied with rsync -a), I couldn't get Grub to boot, no matter what I tried with grub-install and the 'setup' grub command.
In the end I stuck to Lilo.


1000

Offline

Board footer

Powered by FluxBB