LinuxQuestions.org
Visit Jeremy's Blog.
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 07-23-2010, 07:53 PM   #1
Squeak92
LQ Newbie
 
Registered: Jul 2010
Posts: 16

Rep: Reputation: 0
Unhappy Help with Dual booting Opensuse 11.3 and Windows XP


Greetings, firstly I would like to tell you I'm somewhat inexperienced with linux, so complicated instructions will be lost on me.

Secondly, please don't just refer me to a guide, because I've read so many of them, and none of them seem to match my problem.

Basically, I have Opensuse 11.3 installed on a 250gb SATA, and I have windows XP installed on a 160gb SATA. Each OS has the whole drive dedicated to it.

Currently if I wish to change OS I have to reboot my PC, go into the boot options in the bios, and change the hard drive boot order. What I would like to do is have GRUB offer me Opensuse 11.3, or Windows XP.

I've noticed 11.3 has a neat little tool in YaST called "Boot loader". I'm sure I can somehow use that to do what I need to do, but I have no idea what I'm doing.

Any help appreciated, but please don't just post links to other guides. Thank you.
 
Old 07-23-2010, 08:04 PM   #2
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
How about running grub-install as root?
 
Old 07-23-2010, 08:45 PM   #3
Squeak92
LQ Newbie
 
Registered: Jul 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Dude, no idea what that means.
 
Old 07-23-2010, 08:51 PM   #4
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,300

Rep: Reputation: 102Reputation: 102
Hi,

This might not be exaclty what you are looking for, But it might help you in future.

The easiest way what I have found is to have a dual boot is :-

Quote:
1) Install Windows 7/XP/Vista e.t.c., such that you have a unformatted partition left.
Say you have a 160 GB Hard Disk, use C: drive as 20GB , D: Drive as 100GB. Then do not format the rest 40 GB.

2) Boot your machine from Linux Bootable DVD/CD.

3) When prompted to partition the Hard Disks for installation, use option "use free space and create deafult partition" It is something like that, I believe the third option.
 
Old 07-23-2010, 08:57 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,719

Rep: Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120
Generally the (distro) installer will find Windows if installed (this is not a grub{1} function) - did you have the Windows disk disconnected when you installed OpenSuSE ?.
From a terminal run this - it will ask for your root password. Post the output
Code:
su -c 'grep -Ev "(^$|^#)" /boot/grub/menu.lst'
 
Old 07-23-2010, 09:06 PM   #6
Squeak92
LQ Newbie
 
Registered: Jul 2010
Posts: 16

Original Poster
Rep: Reputation: 0
shane@linux-d6fb:~> su -c 'grep -Ev "(^$|^#)" /boot/grub/menu.lst
> su -c 'grep -Ev "(^$|^#)" /boot/grub/menu.lst
su: invalid option -- 'E'
Try `su --help' for more information.
shane@linux-d6fb:~>
 
Old 07-23-2010, 09:31 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,719

Rep: Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120Reputation: 2120
Looks like you missed the closing (single) quote.
 
Old 07-25-2010, 06:56 AM   #8
Squeak92
LQ Newbie
 
Registered: Jul 2010
Posts: 16

Original Poster
Rep: Reputation: 0
This looks more like what you're after!

default 0
timeout 8
gfxmenu (hd0,1)/boot/message
title openSUSE 11.3 - 2.6.34-12
root (hd0,1)
kernel /boot/vmlinuz-2.6.34-12-default root=/dev/disk/by-id/ata-WDC_WD2500JS-00NCB1_WD-WCANK3323598-part2 resume=/dev/disk/by-id/ata-WDC_WD2500JS-00NCB1_WD-WCANK3323598-part1 splash=silent quiet showopts vga=0x31a
initrd /boot/initrd-2.6.34-12-default
title Failsafe -- openSUSE 11.3 - 2.6.34-12
root (hd0,1)
kernel /boot/vmlinuz-2.6.34-12-default root=/dev/disk/by-id/ata-WDC_WD2500JS-00NCB1_WD-WCANK3323598-part2 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x31a
initrd /boot/initrd-2.6.34-12-default
 
Old 07-25-2010, 07:56 AM   #9
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Try this in OpenSuse 11.3

(1) Click "Computer", "more Applications", "system" then "xterm" to obtain a terminal in OpenSuse

(2) Become a root user (equivalent to Aministrator in a MS Windows) by terminal command
Code:
su
and then supply the root password.

(3) Edit Grub's configuration file (can only be done in a root terminal) by command
Code:
nano /boot/grub/menu.lst
(4) Navigate to the end of the file, that syg00 had asked to to display with Post #5 and you did it successfully with Post #8, and add the following lines
Code:
title Dude say my MS Windows installed as the 1st boot disk but now connected as 2nd disk
root (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
(5) Save the file by "ctrl+o" and quite the editor nano by "ctrl+x".

Your Windows should now boot if it reside in the 1st partition of the 2nd hard disk and known to Grub as (hd1,0). Grub1 is used by OpenSuse 11.3 and it counts everything from 0.

The trick is by the two map statements which swap the 1st disk (hd0) with the 2nd disk (hd1) on-the-fly as you have requested. You should always boot up the OpenSuse disk as the 1st disk. Grub will swap the disk order only if you boot the Windows and reverts the disk to the original state once you exit Windows.

You can afford chop off the hand that asks the Bios to change the disk order from now on as it has no further use if the job has been given to Grub!

Last edited by saikee; 07-25-2010 at 08:03 AM.
 
Old 07-25-2010, 08:55 AM   #10
Squeak92
LQ Newbie
 
Registered: Jul 2010
Posts: 16

Original Poster
Rep: Reputation: 0
I got very optimistic about this post, until

shane@linux-d6fb:~> su
Password:
linux-d6fb:/home/shane # nano /boot/grub/menu.lst
If 'nano' is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf nano
 
Old 07-25-2010, 09:14 AM   #11
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I actually tried it in my OpenSuse 11.3 as I have put it in a 1.5TB disk at a position where Grub complains the cylinder number exceeds the maximum permitted by the Bios. OpenSuse still uses Grub1 so I have to create a new boot menu for Grub2. My OpenSuse 11.3 has the same 2.6.34-12 kernel as your.

However my xterm prompt is "saikee@linux-cgwy:~>" and in root it is "linux-cgwy:/home/saikee#" fro OpenSuse 11.3 gnome i686. It is possible that you may be using a different version of may be in KDE, 64-bit etc.

Anyway this is a trivial issue because I selected "nano" as the easiest text editor. You can use "vi" or "vim" in lieu of "nano". It is just an text editor to change the grub1 configuration file /boot/grub.menu.lst. OpenSuse allows you to read it in a desktop by clicking it with file manager "Nautilus" or play around with it in graphic editor "gedit" (or kwrite in KDE desktop) but only in a root terminal that you can change it.

If you never use vi or vim before you may not survive it but with nano you can. You can check if nano is available by command
Code:
man nano
Usually you should find vi or vim in every Bash terminal but may be only 90% of them have nano.

---------------------------
Let say get a raw deal of having to use vi so the command is just
Code:
vi /boot/grub/menu.lst
You can only change thing in a file by pressing the "i" for insertion. At the end of the insertion you press "esc" key to conclude an insertion session.

To quite is ":q"

To save a file is ":w"

Last edited by saikee; 07-25-2010 at 09:25 AM.
 
Old 07-25-2010, 10:24 AM   #12
Squeak92
LQ Newbie
 
Registered: Jul 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Found nano in a software repository and have installed it now. Also, I'm using a KDE desktop as I find it preferable, had Gnome for a while on Ubuntu a few years ago but it wasn't as developed I don't think.

Anyway, I'm at a bit of a loss for what to do here because I'm intimidated by Nano! I'll post below the grub config file, and I know I'm asking to be spoon-fed here which is always annoying by people you help, but trust me I hate asking such favours.
Code:
GNU nano 2.2.2             File: /boot/grub/menu.lst

# Modified by YaST2. Last modification on Sat Jul 24 01:10:55 BST 2010
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader

default 0
timeout 8
##YaST - generic_mbr
gfxmenu  (hd0,1)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.3 - 2.6.34-12
      root
      kernel
      initrd
There is also one of those "don't change this comment" things for the failsafe boot option. Would you mind inserting the code into this as it should look? Many thanks.
 
Old 07-25-2010, 10:47 AM   #13
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Don't worry about changing menu.lst. The boot loader always prefer the contents of its configuration not touched by the inexperienced users but the whole thing is easy for most computer users. I often write my own menu.lst.

I highlighted in blue your menu.lst from your Post #8 and add the new addition in red
Code:
default 0
timeout 8
gfxmenu (hd0,1)/boot/message
title openSUSE 11.3 - 2.6.34-12
root (hd0,1)
kernel /boot/vmlinuz-2.6.34-12-default root=/dev/disk/by-id/ata-WDC_WD2500JS-00NCB1_WD-WCANK3323598-part2 resume=/dev/disk/by-id/ata-WDC_WD2500JS-00NCB1_WD-WCANK3323598-part1 splash=silent quiet showopts vga=0x31a
initrd /boot/initrd-2.6.34-12-default

title Failsafe -- openSUSE 11.3 - 2.6.34-12
root (hd0,1)
kernel /boot/vmlinuz-2.6.34-12-default root=/dev/disk/by-id/ata-WDC_WD2500JS-00NCB1_WD-WCANK3323598-part2 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x31a
initrd /boot/initrd-2.6.34-12-default

title Dude says my MS Windows installed as the 1st boot disk but now connected as 2nd disk
root (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
The lines in menu.lst starting with a "#" will not be act upon by Grub and are left there to help to explain inner working.

You Windows will boot if it is in the first partition. The sure way to know this is by posting here the output of
Code:
su
fdisk -l
If you have sdb1 marked with a "*" and has a partition Type 7 (for NTFS) then all systems are good and ready to go.

Last edited by saikee; 07-25-2010 at 10:48 AM.
 
Old 07-25-2010, 10:52 AM   #14
Squeak92
LQ Newbie
 
Registered: Jul 2010
Posts: 16

Original Poster
Rep: Reputation: 0
linux-d6fb:/home/shane # fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x5a2c5768

Device Boot Start End Blocks Id System
/dev/sda1 1 262 2103296 82 Linux swap / Solaris
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 262 2873 20972544 83 Linux
/dev/sda3 2873 30402 221121536 83 Linux

:EDIT:
Linux does not recognize/find the other hard drive, and Windows does not appear to notice this one, although I thought maybe it was a problem with jumper settings on the hdds, I did at one point use both hard drives in windows.

Last edited by Squeak92; 07-25-2010 at 10:58 AM. Reason: Sudden realization
 
Old 07-25-2010, 11:26 AM   #15
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
You do know now that nothing can be done until you make the second hard disk recognised in Linux.

As far as I know if a hard disk is recognised in a MS Windows (or a Linux) then it will be recognised in all operating systems.
 
  


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
Dual boot -fedora core 4 and windows xp- problem booting from windows xp cd r_desu Linux - Newbie 4 06-17-2007 04:33 PM
dual-booting with an existing windows dual-boot ShadStar Linux - Newbie 3 02-28-2007 03:05 PM
Dual Booting opensuse 10.2 and ubuntu 6.10 parthbakshi Linux - Distributions 1 02-27-2007 02:23 AM
Dual dual booting with Suse 9.1 pro and windows 98SE UDflyer Linux - General 1 07-30-2004 02:37 PM
Are you dual booting and Windows stopped working (booting) then here's the answer: rberry88 Linux - General 1 02-12-2004 09:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:20 PM.

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