LinuxQuestions.org
Review your favorite Linux distribution.
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
 
LinkBack Search this Thread
Old 12-16-2007, 08:48 AM   #1
festhead
LQ Newbie
 
Registered: Sep 2007
Posts: 12

Rep: Reputation: 0
grub: windows on logical partition


hi,

how do I boot into windows with grub?
my windows is installed on hda7, which is a part of hda4 (logical partition)

i (re-) installed windows after linux (i know...), and fixed the mbr already, but the new windows is not accessable

thx!
 
Old 12-16-2007, 08:56 AM   #2
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 488
Blog Entries: 1

Rep: Reputation: 55
Hello, festhead.
I won't claim to be an expert on this, because I normally install windows in hda1, as recommended. That said, however, you can remap partitions in GRUB (read 'info grub') to make windows think it is running on the first partition.
Regards,
Bill
 
Old 12-16-2007, 10:23 AM   #3
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,300
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by festhead View Post
how do I boot into windows with grub?
my windows is installed on hda7, which is a part of hda4 (logical partition)
Before you do what I describe below, copy "/boot/grub/menu.lst" to "/boot/grub/menu.lst.good" or the equivalent.

My Windows entry in "/boot/grub/menu.lst" looks like this:
Code:
title           Microsoft Windows XP Home Edition
root            (hd0,0)
savedefault
makeactive
chainloader     +1
If you change (hd0,0) to (hd0,7), you will be able to boot Windows. You might have to toggle the "bootable" flag using fdisk.
 
Old 12-16-2007, 12:22 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,806

Rep: Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923
Ain't gunna work.
Even though you installed Windoze to a logical partition, the actual loader code (ntldr, boot.ini) has to be in a primary partition.
That's what you need to chainload to.
 
Old 12-17-2007, 08:21 AM   #5
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,300
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by syg00 View Post
Even though you installed Windoze to a logical partition, the actual loader code (ntldr, boot.ini) has to be in a primary partition.
That's what you need to chainload to.
I forgot about needing to change the "boot.ini" file. Your "boot.ini" will look like this:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows XP Home" /noexecute=optin /fastdetect
You need to change the "partition(X)" to "partition(7)". I have never heard of this "primary" partition restriction.
 
Old 12-17-2007, 04:17 PM   #6
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,300
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by syg00 View Post
Ain't gunna work.
Even though you installed Windoze to a logical partition, the actual loader code (ntldr, boot.ini) has to be in a primary partition.
That's what you need to chainload to.
If I read the GRUB manual correctly, you set the current root device to hda7 with the "root (hd0,7)" line. The Windows bootloader is in the first sector of a Windows partition. The "chainloader +1" tells GRUB to read the first sector of the current partition. As long as the "boot.ini" file is modified to use the correct partition, (e.g. multi(0)disk(0)rdisk(0)partition(7)\WINDOWS), everything should work.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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
GRUB/boot problems after deleting extra Windows logical partition atoms999 Linux - Newbie 7 03-15-2007 09:52 PM
Can Grub /LILO be installed on the logical partition? canaan Linux - Newbie 13 12-19-2005 09:18 PM
Add logical ntfs partition to GRUB loader ! Bonch Debian 1 12-09-2004 10:01 AM
grub stage 2 file on logical partition? Samsara Linux - Newbie 2 02-12-2004 03:47 PM


All times are GMT -5. The time now is 01:33 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration