LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-30-2014, 12:18 PM   #1
kestreltowers
LQ Newbie
 
Registered: Aug 2013
Location: Chirk, Wrexham, Wales
Distribution: Debian 8
Posts: 19

Rep: Reputation: Disabled
Grub2 dual-boot changed after updates 29-04-2014


I partitioned 250 Gb HDD on eMachines model eME7322 runninig Windows 7 Premium to allow 100 Gb for Linux OS successfully last August (with EVO2's help). Yesterday, using the Linux partition running Debian 7 I carried out an auto-upgrade. This is the dpkg.log:

=====================================================================
dpkg.log

======================================================================

There were no error reports. However, later I restarted the machine and noticed that the Windows option was no longer in the Grub boot screen. Linux boots and functions as normal.

I searched around using Debian and Grub as search terms, but couldn't find anything that helped. I thought it must be something in the MBR. I downloaded and ran bootinfoscript

=========================================================================

Boot Info Script 0.61 [1 April 2012]


============================= Boot Info Summary: ============================

=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (,msdos5)/boot/grub on this drive.

sda1: __________________________________________________________________________

File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /BOOTMGR /BOOT/BCD

sda2: __________________________________________________________________________

File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /Boot/BCD

sda3: __________________________________________________________________________

File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files: /Windows/System32/winload.exe

sda4: __________________________________________________________________________

File system: Extended Partition
Boot sector type: Unknown
Boot sector info:

sda5: __________________________________________________________________________

File system: ext4
Boot sector type: -
Boot sector info:
Mounting failed: mount: /dev/sda5 already mounted or sda5 busy

sda6: __________________________________________________________________________

File system: swap
Boot sector type: -
Boot sector info:

============================ Drive/Partition Info: ==========================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sda1 2,048 29,362,175 29,360,128 27 Hidden NTFS (Recovery Environment)
/dev/sda2 * 29,362,176 29,566,975 204,800 7 NTFS / exFAT / HPFS
/dev/sda3 29,566,976 266,555,759 236,988,784 7 NTFS / exFAT / HPFS
/dev/sda4 266,557,438 488,396,799 221,839,362 5 Extended
/dev/sda5 266,557,440 479,324,159 212,766,720 83 Linux
/dev/sda6 479,326,208 488,396,799 9,070,592 82 Linux swap / Solaris


"blkid" output: ________________________________________________________________

Device UUID TYPE LABEL

/dev/sda1 784E93FF4E93B3FA ntfs PQSERVICE
/dev/sda2 12F6951CF6950161 ntfs SYSTEM RESERVED
/dev/sda3 5CA8DA96A8DA6DD0 ntfs eMachines
/dev/sda5 a4229f23-a7d8-402a-bd7b-aaf696480f69 ext4
/dev/sda6 9ea5efc5-d50b-4cfd-981a-0785ae009131 swap

================================ Mount points: ==============================

Device Mount_Point Type Options

/dev/disk/by-uuid/a4229f23-a7d8-402a-bd7b-aaf696480f69 / ext4 (rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered)


======================== Unknown MBRs/Boot Sectors/etc: ====================

Unknown BootLoader on sda4

00000000 02 ce 00 00 a0 e0 00 00 02 ce 00 00 a8 e1 00 00 |................|
00000010 02 ce 00 00 08 e2 00 00 02 ce 00 00 60 e2 00 00 |............`...|
00000020 02 ce 00 00 e4 e2 00 00 02 ce 00 00 38 e3 00 00 |............8...|
00000030 02 ce 00 00 f8 e3 00 00 02 ce 00 00 48 e4 00 00 |............H...|
00000040 02 ce 00 00 f4 e4 00 00 02 ce 00 00 a8 e8 00 00 |................|
00000050 02 ce 00 00 f8 e8 00 00 02 ce 00 00 10 ea 00 00 |................|
00000060 02 ce 00 00 60 ea 00 00 02 ce 00 00 78 eb 00 00 |....`.......x...|
00000070 02 ce 00 00 d8 eb 00 00 02 ce 00 00 50 d6 00 00 |............P...|
00000080 02 cf 00 00 f8 d6 00 00 02 cf 00 00 48 d7 00 00 |............H...|
00000090 02 cf 00 00 e4 d7 00 00 02 cf 00 00 34 d8 00 00 |............4...|
000000a0 02 cf 00 00 bc d8 00 00 02 cf 00 00 40 d9 00 00 |............@...|
000000b0 02 cf 00 00 ec d9 00 00 02 cf 00 00 74 da 00 00 |............t...|
000000c0 02 cf 00 00 24 db 00 00 02 cf 00 00 d0 db 00 00 |....$...........|
000000d0 02 cf 00 00 98 dc 00 00 02 cf 00 00 e4 dc 00 00 |................|
000000e0 02 cf 00 00 3c dd 00 00 02 cf 00 00 54 df 00 00 |....<.......T...|
000000f0 02 cf 00 00 a4 df 00 00 02 cf 00 00 54 e0 00 00 |............T...|
00000100 02 cf 00 00 a4 e0 00 00 02 cf 00 00 ac e1 00 00 |................|
00000110 02 cf 00 00 0c e2 00 00 02 cf 00 00 64 e2 00 00 |............d...|
00000120 02 cf 00 00 e8 e2 00 00 02 cf 00 00 3c e3 00 00 |............<...|
00000130 02 cf 00 00 fc e3 00 00 02 cf 00 00 4c e4 00 00 |............L...|
00000140 02 cf 00 00 f8 e4 00 00 02 cf 00 00 ac e8 00 00 |................|
00000150 02 cf 00 00 fc e8 00 00 02 cf 00 00 14 ea 00 00 |................|
00000160 02 cf 00 00 64 ea 00 00 02 cf 00 00 7c eb 00 00 |....d.......|...|
00000170 02 cf 00 00 dc eb 00 00 02 cf 00 00 54 d6 00 00 |............T...|
00000180 02 d0 00 00 fc d6 00 00 02 d0 00 00 4c d7 00 00 |............L...|
00000190 02 d0 00 00 e8 d7 00 00 02 d0 00 00 38 d8 00 00 |............8...|
000001a0 02 d0 00 00 c0 d8 00 00 02 d0 00 00 44 d9 00 00 |............D...|
000001b0 02 d0 00 00 f0 d9 00 00 02 d0 00 00 78 da 00 fe |............x...|
000001c0 ff ff 83 fe ff ff 02 00 00 00 00 90 ae 0c 00 fe |................|
000001d0 ff ff 05 fe ff ff 02 90 ae 0c 00 70 8a 00 00 00 |...........p....|
000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200


========= Devices which don't seem to have a corresponding hard drive: =====

sdb

=============================== StdErr Messages: ===========================

xz: (stdin): Compressed data is corrupt

I don't understand the reports and do not know how or where to examine the config file for Grub.
 
Old 04-30-2014, 03:05 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,221

Rep: Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349
The output shows Grub installed on the mbr with the core.img file where it belongs pointing to sda5, where Debian is. The bootinfoscript output you posted is incomplete and obviously doesn't include the grub.cfg file which is in /boot/grub. Since you can boot to Debian, do that and navigate to that file and see if you have a windows menuentry. If not, you may need to install os-prober and update grub as explained at the bottom of the page at the link below:

https://wiki.debian.org/Grub

If you don't understand, you could post the grub.cfg file here or run the bootinfoscript again.
 
Old 05-01-2014, 04:31 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 5,802

Rep: Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378
... in addition to what yancek said:

on my system, os_prober is installed.
you can run it manually like this:
Code:
/etc/grub.d/30_os-prober > sometextfile
, then extract the menuentry { Windows.....
from that file and insert it into /boot/grub/grub.cfg

it's a hack, but i've done it many times.

the question remains, why didn't grub do that automatically.
 
Old 05-01-2014, 11:24 AM   #4
kestreltowers
LQ Newbie
 
Registered: Aug 2013
Location: Chirk, Wrexham, Wales
Distribution: Debian 8
Posts: 19

Original Poster
Rep: Reputation: Disabled
Thank you, yancek and ondoho. Yes, os_prober is installed. There is no menuentry {Windows .... in grub.cfg
I am hesitating to execute
Quote:
Then edit /etc/default/grub and make sure you have a line like
Code:
GRUB_DISABLE_OS_PROBER=false
Finally run update-grub2
from Debian Wiki. I confess I don't know how to "run update-grub2" I have been reading the aptitude User's Manual. Still, not sure what I'm doing and with MBR I want to be sure that I don't screw-up. I realise that I have never made a backup of the installation. I see that rsync is the app of the year.

Last edited by kestreltowers; 05-02-2014 at 05:10 AM. Reason: improve html display
 
Old 05-01-2014, 01:02 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 5,802

Rep: Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378
of course you shouyld try debian wiki first.
just edit the file as it says, then run
Code:
sudo update-grub
in a terminal.

in case that doesn't work you can try what i suggested. (ask again if you din't understand)

ps: update-grub2 and update-grub should be the same command on new systems.
pps: instead of writing [unquote] you should write [/quote]
 
Old 05-01-2014, 02:28 PM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,221

Rep: Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349
Quote:
GRUB_DISABLE_OS_PROBER=false
If you change that to true, you won't be able to run os-prober. Leave it alone and try: sudo update-grub first. All that does is search for boot code on your partitions and edit the grub.cfg file if there are changes.
 
Old 05-01-2014, 03:56 PM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 5,802

Rep: Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378
@yancek: i think you got op's last post wrong.
it says: make sure you have a line like GRUB_DISABLE_OS_PROBER=false...
 
Old 05-01-2014, 04:58 PM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,221

Rep: Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349
Quote:
yancek: i think you got op's last post wrong.
it says: make sure you have a line like GRUB_DISABLE_OS_PROBER=false...
Might be. He indicated he was 'hesitant to edit' it so I wanted to let him know there was no reason to edit.
 
Old 05-02-2014, 04:48 AM   #9
kestreltowers
LQ Newbie
 
Registered: Aug 2013
Location: Chirk, Wrexham, Wales
Distribution: Debian 8
Posts: 19

Original Poster
Rep: Reputation: Disabled
Oh, so simple :-) Thank you. I became su as my installation doesn't run sudo. Then,

Code:
\#: update-grub
and it was fixed! Now, the boot sequence with Windows options is back.

Last edited by kestreltowers; 05-02-2014 at 05:12 AM. Reason: improve html display
 
  


Reply

Tags
debamd64, grub2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub2, Dual boot and RAID problems kimdino Linux - Desktop 4 01-27-2014 03:52 PM
[SOLVED] How to repair grub2 in MBR? win7/10.10 dual boot. Nizzok Linux - Newbie 9 01-11-2013 09:56 AM
Messed UP Boot Order on dual-boot, don't know GRUB2, need help -- another's PC hilyard Linux - Newbie 4 06-25-2011 12:57 AM
[SOLVED] Editing the grub2 boot menu in a dual boot machine Chriscrof Linux - Newbie 13 07-15-2010 01:14 AM
Problems with dual boot, grub2 auto os prober mhbell Ubuntu 2 11-04-2009 10:11 AM


All times are GMT -5. The time now is 07:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration