Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
Lately, I've been getting grub errors upon rebooting my local server, specifically errors 16, 17, and 18 (which one shows up is random). Reinstalling grub from a livecd solves the error for 1 or 2 reboots, but it eventually comes back. I've reinstalled the OS (first was debian stable, second is Ubuntu) which was okay for around 10 reboots, but now it's starting again. The filesystem is okay (at least badblocks doesn't turn up anything (Reiserfs)) and I don't have another disk that I can try out (aside from the terribly old ones).
Any ideas? Should I just dish out for a new disk to try out, since the problem doesn't appear to be on the software side (or is there something I missed trying?)?
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369
Rep:
I could be that the boot sector is just bad .
As last possibility delete the primary sector , it mostly delete every think
Create a new primary sector and use gparted to set the boot flag at on again
Agreed. While logged in as root, use hdparm or smartctl to run some low-level drive tests (see the relevant man pages). You may also want to see if smartd is running, as it is not enabled by default on all distributions (Slackware, for instance, though I frankly don't understand why).
If the SMART is reporting problems, BACK UP IMMEDIATELY and plan to switch out the drives. Ditto if any of those drive-level tests reports serious errors.
The one other possibility is that something is wrong with the GRUB configuration (wrong addressing type, etc). AFAIK, this kind of thing is rare these days as everything is fairly standardized on LBA, but you never know.
okay, I have to leave soon, so a few questions that might be obvious with simple searches:
1. suppose that I have to resort to the last ditch erase the primary sector method: should I just use dd for that?
2. Hmm, hdparm gives off
HDIO_GET_UNMASKINTR failed: Inappropriate ioctl for device
HDIO_GET_DMA failed: Inappropriate ioctl for device
HDIO_GET_KEEPSETTINGS failed: Inappropriate ioctl for device
with default switches. Are those bad? smartctl hasn't turned up anything bad yet: I've enabled smartd to start at next reboot once the long smartctl test is done.
Another note: the grub config's worked for at least around a year, it's just been tripping out lately. Still not sure why.
Another possibility I just remembered from a different thread: bad memory. You may want to run memtest86. I don't think that's the problem, but it doesn't hurt to make sure it's ruled out.
As for the IOCTL problems: is this a SATA drive? If so, there's a problem in older tools because SATA is really the ATA or ATAPI protocol riding on top of SCSI, but the tools don't understand that. For instance, only the latest Slackware (12.1) has a new enough version. Otherwise, you'll need to upgrade. However, if the drive is PATA this doesn't apply and we're back to step 1.
Erasing the primary sector: this will make your drive unbootable as the first chain loader lives there (it's where the BIOS goes to find it). What you can do, if you're desperate, is back up the entire drive (preferably onto another known good drive of equal or greater size) using a drive imager and then perform a low level destructive test on the drive (where data is written on the drive and the old data is not preserved). If this works, and smartctl reports nothing, then your drive is probably sane and you'll have to look elsewhere.
Hmm, I've done memtest86, but I almost always got impatient and didn't let the test run all the way. Maybe I should try it again...
Hmm, it's a pata drive. Bah.
Smartctl didn't turn up anything bad (the expected lifetime of the drive appeared good), and it looks like the rest of the info looks okay. Oh boy, I'm sleepy. I'll have to look into this tomorrow...
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369
Rep:
Quote:
Originally Posted by storkus
Erasing the primary sector: this will make your drive unbootable as the first chain loader lives there (it's where the BIOS goes to find it). e.
Mike
Yes that is why I write before after deleting the primary sector
create a new one , but the boot flag at on again .
Result every thing is new and boot able again
I have done it several time and works well
Mostly I do it with the install CD of Kubuntu , before she actually
start installing I switch off the main power , my HD is clean and boot able again
Most likely gparted will do the job too
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.