LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-06-2006, 07:37 AM   #1
m3tal
LQ Newbie
 
Registered: Nov 2006
Posts: 9

Rep: Reputation: 0
Booting windows with grub


Linux works fine, but when I try to boot windows with GRUB, the screen just goes black (The computers still on), and I have to restart and use linux. I use linux more often than windows, but I still have to do some things on it.

Thanks for any help.
 
Old 11-06-2006, 09:34 AM   #2
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: SuSE, Ubuntu
Posts: 3,511

Rep: Reputation: 58
Please provide some details about your configuration. Where's Windows installed (1st or 2nd HDD)? Most helpful would be the output of fdisk -l, your menu.lst and grub.conf.
 
Old 11-06-2006, 09:42 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
Quote:
Originally Posted by abisko00
Please provide some details about your configuration. Where's Windows installed (1st or 2nd HDD)? Most helpful would be the output of fdisk -l, your menu.lst and grub.conf.
And tell us if it ever worked- if it stopped working after you changed something---etc.
 
Old 11-06-2006, 09:59 AM   #4
m3tal
LQ Newbie
 
Registered: Nov 2006
Posts: 9

Original Poster
Rep: Reputation: 0
Linux and windows are on the same HD, just different partitions. I think that it stopped working because I deleted an empty partition that was before the windows one.

And abisko, where do I find those things you mentioned (menu, fdisk, etc)
 
Old 11-06-2006, 10:20 AM   #5
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: SuSE, Ubuntu
Posts: 3,511

Rep: Reputation: 58
fdisk -l is a command that has to run with root permissions.
The location of menu.lst may depend on your distribution. Have a look in /boot/grub.
For grub.conf look in the same directory or /etc.

Most probably the partition number has changed. Once you locate menu.lst, you'll find that the partitions are addressed something like (hdx,y). x addresses the drive. hd0 is the first drive on the controller. y points to the partition. If you previously had 3 partitions (Linux, something, Windows), Windows would be on hd0,2. After deleting partition "something", Windows would change to hd0,1. Change this parameter below "title windows" accordingly. You need root permissions to be able to save the changes.
 
Old 11-06-2006, 10:20 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
Quote:
Originally Posted by m3tal
Linux and windows are on the same HD, just different partitions. I think that it stopped working because I deleted an empty partition that was before the windows one.

And abisko, where do I find those things you mentioned (menu, fdisk, etc)
Open a terminal and do this:
Code:
su  (to take on root powers)
fdisk -l   (to see how your drives are partitioned)
(on some systems, you might need to do /sbin/fdisk -l)
---copy and paste to put the output of fdisk into a post---
To edit the grub config file:
Code:
cd /boot/grub
ls     (look for a file named "menu.lst" or "grub.conf")
 Open with an editor, eg:
nano menu.lst   OR
gedit menu.lst   OR
kate menu.lst
GRUB manual here
 
Old 11-06-2006, 11:29 AM   #7
m3tal
LQ Newbie
 
Registered: Nov 2006
Posts: 9

Original Poster
Rep: Reputation: 0
Results of fdisk:

Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda2 * 9 9267 74372917+ 7 HPFS/NTFS
/dev/sda3 9269 9725 3670852+ 83 Linux
/dev/sda4 9726 9726 8032+ 82 Linux swap / Solaris

This is what my windows part on the menu.lst file looks like:

title Windows NT/2000/XP (loader)
root (hd0,1)
savedefault
makeactive
chainloader +1
boot

And can someone with windows post what their menu.lst file (or similar) looks like?

Last edited by m3tal; 11-06-2006 at 04:17 PM.
 
Old 11-07-2006, 07:32 AM   #8
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,210

Rep: Reputation: 55
My Pc came with a small hidden partition before the main Windows XP parition. This is apparently used for restoring Windows. Some Linux distributions would try and set this first partition sda1/hd0,0 as the Windows partition and the boot into Windows failed because what I needed was sda2/hd0,1. When I first installed Linux I made the mistake of thinking that my Windows installation had been trashed. I wonder whether this 'empty first partition' was important to your Windows boot.
 
Old 11-07-2006, 01:49 PM   #9
m3tal
LQ Newbie
 
Registered: Nov 2006
Posts: 9

Original Poster
Rep: Reputation: 0
Maybe... But why would it? Its not really related to the window boot is it?
 
Old 11-07-2006, 01:57 PM   #10
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Rep: Reputation: 32
It's probably a vendor recovery partition.
 
Old 11-07-2006, 03:39 PM   #11
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,210

Rep: Reputation: 55
I also wonder if the lack of an sda1 on your system is causing confusion. What happens if you try hd0,0 instaed of hd0,1

My menu.1st is below

Quote:
title SlackwareLinux-11.0 smp current(on /dev/sdb3)
root (hd1,2)
kernel /boot/vmlinuz061018 root=/dev/sdb3 ro
savedefault
boot

title SlackwareLinux-11.0 smp (on /dev/sdb3)
root (hd1,2)
kernel /boot/vmlinuz-generic-smp-2.6.17.13 root=/dev/sdb3 ro #hda=ide-scsi
initrd /boot/initrd.gz
savedefault
boot

title SlackwareLinux-2.6 (old system) (on /dev/sdb1)
root (hd1,0)
kernel /boot/vmlinuz060821_3 root=/dev/sdb1 ro
savedefault
boot


title SlackwareLinux-11.0 2.4 (on /dev/sdb3)
root (hd1,2)
kernel /boot/vmlinuz-satai-2.4.33.3 root=/dev/sdb3 ro
savedefault
boot

title Slamd64 (on /dev/sdb10)
root (hd1,9)
kernel /boot/vmlinuz root=/dev/sdb10 ro
savedefault
boot


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title Microsoft Windows XP Home Edition
root (hd0,1)
savedefault
makeactive
chainloader +1
 
Old 11-07-2006, 04:43 PM   #12
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,483

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
As suggested, use "(hd0,0)"
 
Old 11-07-2006, 04:56 PM   #13
m3tal
LQ Newbie
 
Registered: Nov 2006
Posts: 9

Original Poster
Rep: Reputation: 0
I tried that and it said it wasn't there. I'll just check my partitions again and post if there is an update or something I haven't noticed before.

Any help..?

Last edited by m3tal; 11-08-2006 at 09:24 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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Booting Windows from the Grub Prompt Kurzweil Linux - Software 26 08-22-2014 08:21 AM
GRUB not booting to windows qwert1029in Linux - Newbie 1 07-08-2006 08:00 PM
Problem with booting windows in GRUB meinherzbrennt Linux - Newbie 17 09-10-2004 08:46 AM
GRUB windows xp not booting mirage Linux - Newbie 2 05-14-2003 03:10 PM
booting windows xp with grub! help!! fisch79 Linux - Software 1 02-20-2003 10:03 PM


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