grub fails to boot OS images on second hard drive

Bug #1018419 reported by dlotton
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Dell Precision T3400
SATA Slot0: (sda) Xubuntu 12.04 + Win7 (new hard drive)
SATA Slot1: DVD-RW drive
SATA Slot2: (sdb) Kubuntu 10.04 + Win Vista (old hard drive moved from SATA slot0)

I recently installed Xubuntu 12.04 on my machine. I wanted to preserve the Win Vista and Kubuntu 10.04 installs that already existed on the machine and add a Win7 install.

Here are the steps I took:
1) remove original hard drive from SATA slot0
2) install new hard drive on SATA slot0
3) install win7 on first partition of new HD
4) install the old HD in SATA slot2 (SATA slot1 has DVD)
5) install Xubuntu 12.04 on second partition of new HD

During Xubuntu install, all of the OS's were detected (Xubuntu 12.04 + Win7 on SATA slot0, and Kubuntu 10.04 + Vista on SATA slot2).

When I boot, there are grub menu entries for all four OS's, but only Win7 and Xubuntu (both on the new HD in SATA slot0 - sda) are bootable.

If I select either OS (Vista or Kubuntu 10.04) on the original HD (now in SATA slot2 - sdb) I get the message "you need to load the kernel first" and I eventually get returned to the grub menu.

On advice in this thread (http://ubuntuforums.org/showthread.php?t=2007743) I used the boot-repair utility to try to fix the problem.

Boot info output from boot-repair is here (http://paste.ubuntu.com/1053651/), or see attached text file.

After running boot-repair, the error I now get when trying to boot from either OS on sdb is "no such partition". **Intersetingly**, If I hit 'c' on the grub menu and type in the 'ls (hd1,5)/' command, I get 'no such partition'. I then type 'exit' to get back to the menu and hit 'c' again and repeat 'ls (hd1,5)/' and it works. There is a vmlinuz and an initrd.img. If I continue with the commands below, the screen eventually goes blank and seems to hang.

linux (hd1,5)/vmlinuz root=/dev/sdb5 ro
initrd (hd1,5)/initrd.img
boot

Note that if I boot into the Xubuntu 12.04 OS I can mount and inspect all of the other OS partitions on sda and sdb.

Revision history for this message
dlotton (yellow56) wrote :
Revision history for this message
Phillip Susi (psusi) wrote :

It sounds like the drive may be dieing, or at least there is some problem communicating with it. Please open the disk utility and check the SMART status of the drive. You may also want to run the long self test. If that all checks out, then try to repeat the ls (hd1,5) command and see if it consistently fails the first time, then starts working.

Revision history for this message
dlotton (yellow56) wrote :

I will check the SMART status, but I really don't think this is a case of the drive going bad.

I had no issue whatsoever when it was the primary drive on the machine. I merely moved it to another SATA slot when I installed Xubuntu 12.04. Also, I can mount and access the drive with no problems when booted to the Xubunutu 12.04 OS image.

I'll check the SART status.

Revision history for this message
dlotton (yellow56) wrote :
Download full text (4.9 KiB)

No errors logged in SMART status...

smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-25-generic] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family: Western Digital Caviar Blue Serial ATA
Device Model: WDC WD3200AAKS-75B3A0
Serial Number: WD-WMAT12896977
LU WWN Device Id: 5 0014ee 000a74d1e
Firmware Version: 01.03A01
User Capacity: 320,072,933,376 bytes [320 GB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: 8
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Thu Jun 28 21:45:09 2012 MDT
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: (0x82) Offline data collection activity
     was completed without error.
     Auto Offline Data Collection: Enabled.
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: ( 6000) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
     Auto Offline data collection on/off support.
     Suspend Offline collection upon new
     command.
     Offline surface scan supported.
     Self-test supported.
     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: ( 73) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x303f) 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 0x002f 200 200 051 Pre-fail Always - 0
  3 Spin_Up_Time 0x0027 156 154 021 Pre-fail Always - 3166
  4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 124
  5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
  7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
  9 Power_On_Hours 0x0032 063 063 000 Old_age Always - 27612
 10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0
 11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0
 12 Power_Cycle_Count 0x0032 100 100 ...

Read more...

Revision history for this message
Phillip Susi (psusi) wrote :

Could you check the *other* drive? Also, while it does seem to be ok, it wouldn't hurt to run the long self test on this drive since it appears to not have had one since it was new, and has a few years of run time on it now.

Revision history for this message
dlotton (yellow56) wrote :

Exteneded self test completed without error.

Also, no errors reported on the new drive.

Revision history for this message
Phillip Susi (psusi) wrote :

And still if you go to the grub console and run ls (hd1,5)/ the first time it errors? But repeating it works?

Revision history for this message
dlotton (yellow56) wrote :

I don't have access to the machine for a couple of days so I can't test it again right now, but yes, I did that three times. I would enter the console, type the command, fail, exit the console, re-enter the console, type command again, and it would work. I wonder if it was loading the bootloader on the second disk when I exited the console? All of the grub menu entries were the same.

Revision history for this message
Phillip Susi (psusi) wrote :

When you get a chance, try just reissuing the command without exiting and re-entering the console.

Revision history for this message
dlotton (yellow56) wrote :

Okay, so typing the 'ls (hd1,5)/' command twice fails both times. If I exit and re-enter, it works...

HOWEVER,
if I 'exit' a second time I get

No boot device available -
 strike F1 to retry boot, F2 for setup utility
  Press F5 to run onboard diagnostics

Pressing F1 seems to get me back to the beginning of the cycle.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Phillip Susi (psusi) wrote :

You appear to have grub2 installed in the MBR of sdb, yet grub legacy is actually installed in the filesystem. Your bios is probably configured to boot the broken grub in sdb firs,t then when you exit, it falls back to sda. Choose which system you want to be in charge of booting. If you want Xubuntu, then boot into it and run sudo dpkg-reconfigure grub-pc and select both drives in the menu, then boot into Kubuntu, and remove the grub package. If you want Kubuntu, then boot into Kubuntu and run sudo apt-get install grub-pc and select both drives in the menu, then boot into Xubuntu and run apt-get remove grub-pc.

Changed in grub2 (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.