LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-26-2008, 12:12 AM   #1
ajungstein
LQ Newbie
 
Registered: Dec 2008
Posts: 2

Rep: Reputation: 0
Thumbs up Difficulty loading Vista Partition through Grub


Dear Linux Community,

I was hoping you could help me with a problem I have been having. I installed Gentoo using a minimal install CD with a grub bootloader and unfortunately I am having trouble booting my existing windows partition. When grub starts, I get the option to boot through linux (which works as expected) or boot through windows Vista. I select the windows Vista option and I get the following respective window displaying the following error message:

Code:
   Booting 'Microsoft Windows Vista'
rootnoverify (hd0,0)
chainloader +1

Error 13: Invalid or unsupported executable format

Press any key to continue...
Since this process fails, I tried using the grub command line to gain some insight on my problem. I utilize the TAB completion interface to verify what is going on. After I type rootnoverify( and use the tab completion it successfully shows that one of the possible disks to boot from is hd0.

When I type rootnoverify(hd0, and use tab completion, I get the following message:

Code:
Possible partitions are:
Partition num: 0, Filesystem type unknown, partition type 0x7
Partition num: 1, Filesystem type is ext2fs, partition type 0x83 
Partition num: 2, Filesystem type unknown, partition type 0x82
Partition num: 3, Filesystem type is ext2fs, partition type 0x83
My partitions are set in the following manner:
Partition 0: Windows vista partition
Partition 1: Linux boot partition
Partition 2: Linux swap partition
Partition 3: Linux root partition

At first, I thought that my windows partition might be damaged and the filesystem type cannot be detected by grub. I loaded linux in order to gain some more insight regarding my current partitions and their respective filetypes. I ran the following commands in the linux terminal with the following results:

Code:
#fdisk /dev/sda
The number of cylinders for this disk is set to 19457. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
  (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help):p

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/trac, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier 0x495d0lab

   Device  Boot    Start     End       Blocks   Id  System
/dev/sda1   *          1   17322    139132336    7  HPFS/NTFS
/dev/sda2   *      17322   17326        38727+  83  Linux
/dev/sda3          17327   17389       506047+  82  Linux swap / Solaris
/dev/sda4          17390   19457     16611210   83  Linux
I am confused since linux recognizes my filesystem type for the windows partition sda1, whereas grub has a problem recognizing the NTFS filesystem type. I am guessing that the problem might be the the filesystem type is HPFS/NTFS.

I was hoping someone could help me fix this issue. At this point, recovering the files in my windows partition is my top priority. I am willing to reinstall linux at any time. Please note that I have no preference in terms of using grub as a bootloader. I used to have the default windows boot loader load both windows or Ubuntu at any time and worked perfectly. Any insight regarding on how to solve this problem would be greatly appreciated. Thanks!

Last edited by ajungstein; 12-26-2008 at 01:11 PM.
 
Old 12-26-2008, 12:46 AM   #2
htnakirs
Member
 
Registered: Mar 2007
Posts: 239

Rep: Reputation: 34
IT seems the active partition option has not been set. Search up on this. The Vista partition needs to be set Active. You get this option when installing grub, I am not sure how to edit the menu.lst file afterwards.
 
Old 12-26-2008, 12:58 AM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Try adding

makeactive

between rootnoverify and chainloader
 
Old 12-26-2008, 01:42 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,416

Rep: Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197
Looks like an extraneous blank in the rootnoverify - after the comma.
 
Old 12-26-2008, 02:30 AM   #5
james2b
Member
 
Registered: Feb 2007
Location: Washington state, USA
Distribution: Ubuntu Mate 18.04, Mint 19.1
Posts: 363

Rep: Reputation: 45
Smile

Only one partition can be flagged as; "active or boot" for each drive. And so for your drive, the sda1 (ntfs, windows partition) must be marked as the only active boot partition. You can fix that by booting to a Linux tool called; GParted, here; http://gparted.sourceforge.net/ , also here is the grub site; http://www.gnu.org/software/grub/manual/grub.html ,also in your grub boot file for windows Vista you need to have it look like this; title Vista
root (hd0,0)
makeactive
chainloader +1
You can not use the makeactive option with rootnoverify because that sets the grub's root device without mounting, and the grub needs to mount a partition to make it active. To list all partitions most people use this here; fdisk -l , and windows XP and Vista will show the filesystem type as HPFS/NTFS, so that is correct, but you may need to run that check disk tool from booted to windows disk to repair the Vista NTFS file system. Also for grub every item must be exactly correct, and your; rootnoverify (hd0, 0) has a extra space which can not be there, it must be like this with no spaces; (hd0,0).

Last edited by james2b; 12-26-2008 at 02:35 AM. Reason: add more
 
Old 12-26-2008, 02:46 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,416

Rep: Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197
Quote:
Originally Posted by james2b View Post
Only one partition can be flagged as; "active or boot" for each drive. And so for your drive, the sda1 (ntfs, windows partition) must be marked as the only active boot partition.
No true for Linux (at least) boot-loaders.
This is a legend perpetuated because the Windoze boot-loaders check this flag. grub and lilo don't care - and neither they should.
If using either of these, the boot flag is irrelevant. I have found some BIOS code that checks for it though - obviously influenced by Redmond.
 
Old 12-26-2008, 01:10 PM   #7
ajungstein
LQ Newbie
 
Registered: Dec 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you for all the responses. I tried the following but unfortunately did not succeed. I have listed the results for each attempt to fix my problem.

syg00: You are right. There is an extraneous blank in my initial post. It was a typo I made when copying the information. I actually did not have a blank in my original grub configuration.

billymayday: I tried adding the command makeactive between rootnoverify and chainloader. Unfortunately I get the same error as my initial post. That is:
Code:
Error 13: Invalid or unsupported executable format
james2b: I haven't tried the gparted boot through a live cd yet. I assume that I am supposed to eliminate the boot flag on my linux boot partition and try to re-boot windows through grub. I'll be trying this shortly.

Thank you everyone for all the help. Any additional help would be appreciated.
 
Old 12-26-2008, 04:17 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,416

Rep: Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197
Let's see your /boot/grub/menu.lst
 
Old 12-26-2008, 05:55 PM   #9
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
In order to get a clearer picture of your setup, how about downloading the "boot_info_script.txt" to your desktop, and then do the following as root user:
Code:
bash ~/Desktop/boot_info_script.txt
That will create a "RESULTS.txt" file in the same directory from where the script is run, namely your desktop; please copy/paste the contents of that file to your next post. That will help clarify your setup and hopefully what your problem might be.

Last edited by CJS; 12-26-2008 at 06:02 PM.
 
  


Reply


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
Hang at grub loading +1 Vista in a logical partition lambchops468 Linux - General 3 09-30-2007 09:45 PM
dual booting fedora with vista - boot error - "GRUB loading stage 2" ans Fedora 2 08-20-2007 06:12 AM
Grub failing to load. Vista removed partition / need help restoring Jarru Linux - General 9 07-15-2007 08:48 AM
Grub loader not loading Windows XP or Fedora Core 1 after changing partition size. zetafunc Fedora - Installation 17 06-12-2005 01:27 AM
Loading GRUB from FAT32 partition jucovschi Linux - General 5 12-20-2003 09:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:23 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