Grub Breaking Daily

Yesterday I got a grub error saying that it was missing a file. I reinstalled grub with the live cd and it fixed the problem. Today I boot and I get a blinking grub cursor. It doesn’t do anything and I can’t type anything. I booted onto the livecd and tried to reinstall grub, this time it didn’t work and I was stuck with a blinking cursor again. I had to boot off a grub cd to get into my system(something I don’t favor).

In the install I picked all defaults, which means that on the grub installation part I did not check that I wanted it to install to mbr. Should I have done this?

Anyway, how can I fix this issue? I really want to use openSUSE 12.3, but if it isn’t going to consistently boot I don’t have a place for it in my life. Please understand, I am not mad at the community or the OS, I just need a consistent OS that will provide me at least some stability in my life.

I would be glad to post any logs to resolve this issue. :slight_smile:

The first thing to check is HDD integrity. Any errors in SMART? Also in case of dirty shutdown grub may fail to read filesystem (it does not support journal at the moment).

Hi !

Is openSUSE 12.3 the only OS that you have on your machine ?

A personal remark:

You sound a bit frustrated, but you still could be a bit friendlier, which would probably help you in the end as well.

Yes, it is the only OS.

I tried. Initially while I was typing it I was frustrated, but realized as I continued typing that this is nobody’s fault and that I am just experiencing an issue.

Hi, welcome here !

OK then you should probably follow the advice

SMART (Self Monitoring And Repair Tool) information of your hard disk can be obtained by e.g. the command

smartctl -a /dev/sda 

as root in a terminal (e.g. after becoming root in a terminal by typing ‘su -’).

Have a look at

man smartctl

and possibly at

man badblocks

as well.
But be careful, ‘badblocks’ has the potential to destroy all your partitions and data on your hard disk.

Did you encounter any dirty shutdown as arvidjaar asked?

Good luck
Mike

Thanks Mike.

Here is the output of smartctl -a /dev/sda

smartctl 6.0 2012-10-10 r3643 [x86_64-linux-3.7.10-1.1-desktop] (SUSE RPM)
Copyright (C) 2002-12, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Hitachi Travelstar 5K500.B
Device Model:     Hitachi HTS545032B9A300
Serial Number:    100730PBP304D6CGSLRM
LU WWN Device Id: 5 000cca 61fc6b5cd
Firmware Version: PB3OC64G
User Capacity:    320,072,933,376 bytes [320 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    5400 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 6
SATA Version is:  SATA 2.6, 3.0 Gb/s
Local Time is:    Tue Mar 19 10:31:03 2013 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)    Offline data collection activity
                    was never started.
                    Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0)    The previous self-test routine completed
                    without error or no self-test has ever 
                    been run.
Total time to complete Offline 
data collection:         (  645) seconds.
Offline data collection
capabilities:              (0x5b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    Offline surface scan supported.
                    Self-test supported.
                    No Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003)    Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01)    Error logging supported.
                    General Purpose Logging supported.
Short self-test routine 
recommended polling time:      (   2) minutes.
Extended self-test routine
recommended polling time:      ( 106) minutes.
SCT capabilities:            (0x003d)    SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   062    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0005   100   100   040    Pre-fail  Offline      -       0
  3 Spin_Up_Time            0x0007   196   196   033    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0012   099   099   000    Old_age   Always       -       1931
  5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000b   100   100   067    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0005   100   100   040    Pre-fail  Offline      -       0
  9 Power_On_Hours          0x0012   089   089   000    Old_age   Always       -       5086
 10 Spin_Retry_Count        0x0013   100   100   060    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       1559
191 G-Sense_Error_Rate      0x000a   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   099   099   000    Old_age   Always       -       229
193 Load_Cycle_Count        0x0012   073   073   000    Old_age   Always       -       276510
194 Temperature_Celsius     0x0002   177   177   000    Old_age   Always       -       31 (Min/Max 9/48)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0
223 Load_Retry_Count        0x000a   100   100   000    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%      4097         -
# 2  Short offline       Completed without error       00%      4095         -
# 3  Short offline       Aborted by host               60%         4         -
# 4  Short offline       Completed without error       00%         3         -
# 5  Short offline       Completed without error       00%         3         -
# 6  Short offline       Completed without error       00%         2         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.



I don’t see anything crazy in here.

This happened after a clean shutdown last night.

tdrusk said

Today I boot and I get a blinking grub cursor. It doesn’t do anything and I can’t type anything. I booted onto the livecd and tried to reinstall grub, this time it didn’t work and I was stuck with a blinking cursor again. I had to boot off a grub cd to get into my system(something I don’t favor).

Same happened here today, OS12.3 with Grub2, fresh install from yesterday.
So I changed via >yast >bootloader to Grub, and system started well, only issue some silly entrances there and bodhi-linux on /sda2 was not listed.
By curiosity I changed again to Grub2, also starting right now without changing anything in its settings, starting from /

Martin

I will try this. Shi I’ll even use Lilo if it boots into my machine.

tdrusk,

scanned through your output of smartctl. It looks good.

If you ever would want to know a bit more about the output have a look at the link
Monitoring Hard Disks with SMART | Linux Journal
given at the bottom of the man page of smartctl.

Good luck
Mike

Cool. I figured nothing was wrong with my drive but it is always good to check. Thanks for your help. I will report back after a reboot. Trying plain ol’ grub.

It is still possible that root is not completely free and cleanly unmounted on shutdown. Not sure how to debug it though … could you make available /var/log/messages* files that span several reboots?

Okay. I just did a reboot and it is working correctly with Grub(1). I am going to leave it at that and see how it rolls. Thanks guys!

This should not normally happen check your repositories and make sure you don’t have any dangerous ones active.

zypper lr

Post here if in doubt

Here ya go. I try to stick with defaults unless I need a certain app.

#  | Alias                     | Name                               | Enabled | Refresh
---+---------------------------+------------------------------------+---------+--------
 1 | X11:Utilities             | X11:Utilities                      | Yes     | Yes    
 2 | ftp.gwdg.de-suse          | Packman Repository                 | Yes     | Yes    
 3 | google-talkplugin         | google-talkplugin                  | Yes     | Yes    
 4 | libdvdcss repository      | libdvdcss repository               | Yes     | Yes    
 5 | repo-debug                | openSUSE-12.3-Debug                | No      | Yes    
 6 | repo-debug-update         | openSUSE-12.3-Update-Debug         | No      | Yes    
 7 | repo-debug-update-non-oss | openSUSE-12.3-Update-Debug-Non-Oss | No      | Yes    
 8 | repo-non-oss              | openSUSE-12.3-Non-Oss              | Yes     | Yes    
 9 | repo-oss                  | openSUSE-12.3-Oss                  | Yes     | Yes    
10 | repo-source               | openSUSE-12.3-Source               | No      | Yes    
11 | repo-update               | openSUSE-12.3-Update               | Yes     | Yes    
12 | repo-update-non-oss       | openSUSE-12.3-Update-Non-Oss       | Yes     | Yes    


Quick question(to avoid making another thread). I added a repo X11:Utilities. Let’s say for example that X11:Utilities included a new version of kde. Will Zypper pull updates from there instead of the opensuse repo? If so, How can I set priority for my repositories(kind of like apt-pinning)? When would it be necessary to do such a procedure?

Started laptop after work: Grub2 fails again, black screen, giving GRUB written and blinking cursor.

Shutdown yesterday was regular, no silly repos working here, it is only OSS, NonOSS, Update and Packman

Martin

Quick question(to avoid making another thread). I added a repo X11:Utilities. Let’s say for example that X11:Utilities included a new version of kde. Will Zypper pull updates from there instead of the opensuse repo? If so, How can I set priority for my repositories(kind of like apt-pinning)? When would it be necessary to do such a procedure?

Depends if you changed repos to install the package. In Yast press view and select repositories. Then select the repo on the left and click the switch system package i box above RPM list. That will switch priority of all installed rpms from that repo to that repo.

Just an update, It has not messed up yet since I switched to grub1.

On 2013-03-20 14:06, tdrusk wrote:

> Here ya go. I try to stick with defaults unless I need a certain app.
>
>
> Code:
> --------------------
> # | Alias | Name | Enabled | Refresh
> —±--------------------------±-----------------------------------±--------±-------
> 1 | X11:Utilities | X11:Utilities | Yes | Yes
> 2 | ftp.gwdg.de-suse | Packman Repository | Yes | Yes
> 3 | google-talkplugin | google-talkplugin | Yes | Yes
> 4 | libdvdcss repository | libdvdcss repository | Yes | Yes
> 5 | repo-debug | openSUSE-12.3-Debug | No | Yes
> 6 | repo-debug-update | openSUSE-12.3-Update-Debug | No | Yes
> 7 | repo-debug-update-non-oss | openSUSE-12.3-Update-Debug-Non-Oss | No | Yes
> 8 | repo-non-oss | openSUSE-12.3-Non-Oss | Yes | Yes
> 9 | repo-oss | openSUSE-12.3-Oss | Yes | Yes
> 10 | repo-source | openSUSE-12.3-Source | No | Yes
> 11 | repo-update | openSUSE-12.3-Update | Yes | Yes
> 12 | repo-update-non-oss | openSUSE-12.3-Update-Non-Oss | Yes | Yes
>
>
> --------------------
>
>
> Quick question(to avoid making another thread). I added a repo
> X11:Utilities. Let’s say for example that X11:Utilities included a new
> version of kde. Will Zypper pull updates from there instead of the
> opensuse repo?

No, neither zypper nor yast will pull more recent version from a
different repository, that’s a feature. A “zypper up” will apply newer
versions of packages coming from the same repo than the originals. Or
rather, the same “vendor”.

There are several methods to force a package to change vendor. One is
using “zypper dup fromrepo” (see man for correct syntax). Another is in
yast, repo view, switch system package to this repo. The one I use is
display in yast the contents of the repo I want to switch to, display
the version tab, and then I go package by package selecting the version
I want. It is tedious, but safe.

> If so, How can I set priority for my repositories(kind of
> like apt-pinning)? When would it be necessary to do such a procedure?

Priorities can be changed in the yast module for repository management.
Or “zypper mr …”

When you select a new package to be installed, or something is
autoselected for dependencies, and it is found on several repos, it
comes from the repo with the lower priority number (I believe). Unless
the requirements specify a version above a number.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)