LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 06-09-2016, 12:58 AM   #1
judoka
Member
 
Registered: Jul 2009
Distribution: Ubuntu 14.04 LTS, CentOS
Posts: 218

Rep: Reputation: 16
How to make grub recognize my win7 hd after power outage.


I have a custom dual boot machine with Ubuntu Linux and Windows 7. After power outage my Windows 7 can't load login screen. Ubuntu loads fine and I can access files for Windows 7 through it; however, when I try to log in to Windows, it refuses to load. The reason I want to log into windows is because I do graphics programming using Visual Studio and have everything set up for that. I tried all kinds of things that I was able to Google about how to fix a broken win7 boot, but no success. The problem is that Windows doesn't present any operating system to choose when I try to run "startup repair" so I cannot run "sfc /scanf" or any other restore command since the harddrive is not recognized. But I know that it's not the problem with HD or its connection to the motherboard since I can still access Window files through Linux. I tried posting on Windows7 forum with no success so I that the chances are higher that someone from the Linux community will be able to help me out. I installed Grub Customizer after firing it up and clicking on my Windows 7 (loader) (on /dev/sdc1) I see:
insmod part_msdos
insmod ntfs
set root='hd2,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos1 --hint-efi=hd2,msdos1 --hint-baremetal=ahci2,msdos1 AC7ACA3A7ACA0156
else
search --no-floppy --fs-uuid --set=root AC7ACA3A7ACA0156
fi
parttool ${root} hidden-
chainloader +1

does anyone see anything that can help fix the issue or is there another way to make Linux grub recognize win7 hd so I can boot into windows?

Last edited by judoka; 06-09-2016 at 12:59 AM.
 
Old 06-09-2016, 01:11 AM   #2
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
Can you post

fdisk -l

from command line of linux.

Does the Bios recognize the win disk?
 
Old 06-09-2016, 01:45 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,137

Rep: Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122
In addition let's see this (use [code] tags to maintain the layout).
Code:
sudo lsblk -f
sudo os-prober

Last edited by syg00; 06-09-2016 at 01:47 AM.
 
Old 06-09-2016, 01:41 PM   #4
judoka
Member
 
Registered: Jul 2009
Distribution: Ubuntu 14.04 LTS, CentOS
Posts: 218

Original Poster
Rep: Reputation: 16
Thanks guys, for such a quick response. Yes, bios sees the actual HD disk that has the win7 OS. Here's the output for fdisk -l:
Code:
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000185c6

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   195310641    97654297   83  Linux
/dev/sda2       195313662  1953523711   879105025    5  Extended
Partition 2 does not start on physical sector boundary.
/dev/sda5       195313664  1953124210   878905273+  83  Linux
/dev/sda6      1953126400  1953523711      198656   82  Linux swap / Solaris

Disk /dev/sdb: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x5a8ffe74

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63  1348075518   674037728    7  HPFS/NTFS/exFAT
/dev/sdb2      1348075520  1429995519    40960000   83  Linux
/dev/sdb3      1436831744  1464840191    14004224    7  HPFS/NTFS/exFAT
/dev/sdb4      1429999614  1436831743     3416065    5  Extended
/dev/sdb5      1429999616  1436831743     3416064   82  Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x22352234

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sdc2          206848  1953521663   976657408    7  HPFS/NTFS/exFAT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdd: 4000.8 GB, 4000787030016 bytes
256 heads, 63 sectors/track, 484501 cylinders, total 7814037168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xd7d7e619

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/sde: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000284c1

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1   *        2048     1026047      512000   83  Linux
/dev/sde2         1026048  1953523711   976248832   83  Linux
Here's the output for lsblk -f:
Code:
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000185c6

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   195310641    97654297   83  Linux
/dev/sda2       195313662  1953523711   879105025    5  Extended
Partition 2 does not start on physical sector boundary.
/dev/sda5       195313664  1953124210   878905273+  83  Linux
/dev/sda6      1953126400  1953523711      198656   82  Linux swap / Solaris

Disk /dev/sdb: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x5a8ffe74

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63  1348075518   674037728    7  HPFS/NTFS/exFAT
/dev/sdb2      1348075520  1429995519    40960000   83  Linux
/dev/sdb3      1436831744  1464840191    14004224    7  HPFS/NTFS/exFAT
/dev/sdb4      1429999614  1436831743     3416065    5  Extended
/dev/sdb5      1429999616  1436831743     3416064   82  Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x22352234

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sdc2          206848  1953521663   976657408    7  HPFS/NTFS/exFAT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdd: 4000.8 GB, 4000787030016 bytes
256 heads, 63 sectors/track, 484501 cylinders, total 7814037168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xd7d7e619

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/sde: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000284c1

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1   *        2048     1026047      512000   83  Linux
/dev/sde2         1026048  1953523711   976248832   83  Linux
yuri@yuri-desktop:~$ sudo lsblk -f
NAME   FSTYPE      LABEL           MOUNTPOINT
sda                                
├─sda1 ext4                        /
├─sda2                             
├─sda5 ext4                        /home
└─sda6                             
sdb                                
├─sdb1 ntfs        HP              
├─sdb2 ext4        Storage         
├─sdb3 ntfs        FACTORY_IMAGE   
├─sdb4                             
└─sdb5                             
sdc                                
├─sdc1 ntfs        System Reserved 
└─sdc2 ntfs                        
sdd                                
├─sdd1                             
└─sdd2 ntfs        Storage         
sde                                
├─sde1 xfs                         
└─sde2 crypto_LUKS                 
sr0
And here is the output for os-prober:
Code:
/dev/sdb1:Windows 7 (loader):Windows:chain
/dev/sdb3:Windows Recovery Environment (loader):Windows1:chain
/dev/sdc1:Windows 7 (loader):Windows2:chain
 
Old 06-09-2016, 01:51 PM   #5
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Hi.

Have you tried
Code:
sudo update-grub
...
 
Old 06-09-2016, 02:22 PM   #6
judoka
Member
 
Registered: Jul 2009
Distribution: Ubuntu 14.04 LTS, CentOS
Posts: 218

Original Poster
Rep: Reputation: 16
I tried doing that, but when I try to boot to win7 it still can't display the login screen after "start windows" phase. If I try to do a "startup repair" it doesn't display and OS in the "choose os repair" field and if I run startup repair anyway it throws an error that the hard disk cannot be found and if it is there it is not responding.
 
Old 06-14-2016, 07:27 PM   #7
judoka
Member
 
Registered: Jul 2009
Distribution: Ubuntu 14.04 LTS, CentOS
Posts: 218

Original Poster
Rep: Reputation: 16
Update: The problem was that win7 disk was too old, so it complained about drivers and didn't recognize the hd, but it only had to do with os cd being corrupted. Took me a bunch of time to figure that out. I ended up copying data from the hd and installing a fresh copy of win 10. It was time for an upgrade anyway

Last edited by judoka; 06-14-2016 at 07:29 PM.
 
1 members found this post helpful.
  


Reply

Tags
boot, grub, linux



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I make grub recognize a bootable sd card? fernandoamartin Linux - Laptop and Netbook 8 11-08-2013 08:22 AM
power outage blackmamba11 Linux - Server 1 12-03-2007 11:51 AM
power outage jbzy3000 Linux - General 2 02-24-2005 09:11 PM
Reboot after power outage oigeli Linux - General 1 12-02-2004 07:10 AM
Power Outage notslim General 30 08-28-2003 03:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration