LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help with Dual booting Opensuse 11.3 and Windows XP (https://www.linuxquestions.org/questions/linux-newbie-8/help-with-dual-booting-opensuse-11-3-and-windows-xp-821789/)

Squeak92 07-23-2010 07:53 PM

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.

lugoteehalt 07-23-2010 08:04 PM

How about running grub-install as root?

Squeak92 07-23-2010 08:45 PM

Dude, no idea what that means.

vikas027 07-23-2010 08:51 PM

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.

syg00 07-23-2010 08:57 PM

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'

Squeak92 07-23-2010 09:06 PM

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:~>

syg00 07-23-2010 09:31 PM

Looks like you missed the closing (single) quote.

Squeak92 07-25-2010 06:56 AM

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

saikee 07-25-2010 07:56 AM

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!

Squeak92 07-25-2010 08:55 AM

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

saikee 07-25-2010 09:14 AM

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"

Squeak92 07-25-2010 10:24 AM

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.

saikee 07-25-2010 10:47 AM

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.

Squeak92 07-25-2010 10:52 AM

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.

saikee 07-25-2010 11:26 AM

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.

Squeak92 07-25-2010 07:48 PM

Hey, thanks for your reply. How do I go about doing that? They're both connected at all times, might have something to do with the fact that one is listed as the "Third IDE Master" and the other as the "Fourth IDE Slave", not sure how that's happened as I'm fairly sure I plugged both HDDs into the red sockets on the MB.

Perhaps I if unplug the windows one from it's fourth IDE slave slot and put it in the third IDE slave or fourth IDE master slot that will make a difference?

I'm really at a loss for what to do, and it's odd things like these that prevented me from migrating in the past.

syg00 07-25-2010 10:23 PM

Check the jumpers at the back of the drives - if you have 80 wire IDE cables (and you should) set the drives to "cable select".
May change the BIOS order of the drives (one time), but you should be able to talk to them.

lugoteehalt 07-26-2010 06:07 AM

Quote:

Originally Posted by Squeak92 (Post 4045208)
Hey, thanks for your reply. How do I go about doing that? They're both connected at all times, might have something to do with the fact that one is listed as the "Third IDE Master" and the other as the "Fourth IDE Slave", not sure how that's happened as I'm fairly sure I plugged both HDDs into the red sockets on the MB.

Perhaps I if unplug the windows one from it's fourth IDE slave slot and put it in the third IDE slave or fourth IDE master slot that will make a difference?

In your first post it says SATA drives. These have little sort of 4 pin connectors into the mother board, as far as I know.

The point is, afik, 'master' and 'slave' are concepts that apply to ATAPI drives; these have a long twin row of many pins when they plug into the mother board. So the thing appears to be set up for ATAPI when it should be set up for SATA??

Were it me I'd plug the Windows (Bill worries about human overpopulation) drive into the number 1 SATA socket and the Linux drive into the second. But this might require some rewriting of the /etc/fstab file and grub's configuration file. So don't know if it's good advice in your situation.

Squeak92 07-26-2010 04:32 PM

I thought it was wierd they were listed as IDE master and IDE slave. I'm in XP atm and in device manager both hard drives are there, I'm not sure why linux wouldn't pick up on the other drive...

saikee 07-26-2010 06:21 PM

The Sata disks on some mobo are labelled as IDE disks so I wouldn't worry too much aboout the names in the Bios.

It is very rare that a hard disk detected in the Bios usable in one OS and not in another.

I would suggest you to boot up OPenSuse CD and use it as a Live CD to check if it can see the other disk that an installed version can't. Also try another distro to make sure.

lugoteehalt 07-27-2010 05:15 AM

Most of the other posters know more about this than me, but why not just try:
Code:

su
supply root password

Then, at the command prompt type grub-install .

Squeak92 07-30-2010 06:02 AM

Okay so I have changed them on my motherboard so there is 3rd IDE master and 3rd IDE slave.

Using another distro to see if the drive is there is not possible. Is there no sort of command I can type, get a report for and then let the experts look at?

saikee 07-30-2010 08:06 AM

The first step is to check the disks reported in the Bios pages. This is the hardware detection level.

The next step is the Bios information will be made available to the operating system. If a Linux is used then all partitioning tools will report the same number of hard disks. So the easiest is
Code:

fdisk -l
If you got only one disk reported the other components of the Linux would not have more information. Since you are using OpenSuse so try this in the root terminal to let what Grub sees
Code:

grub
geometry (hd0)
geometry (hd1)
geometry (hd2)
quit


Squeak92 07-30-2010 10:28 AM

I don't understand!

grub> geometry (hd0)
drive 0x80: C/H/S = 30401/255/63, The number of sectors = 488397168, /dev/disk/by-id/ata-WDC_WD2500JS-0
0NCB1_WD-WCANK3323598
Partition num: 0, Filesystem type unknown, partition type 0x82
Partition num: 1, Filesystem type is ext2fs, partition type 0x83
Partition num: 2, Filesystem type is ext2fs, partition type 0x83

grub> geometry (hd1)

Error 21: Selected disk does not exist

grub> geometry (hd2)

Error 21: Selected disk does not exist

grub>

How does it not exist...

Linux hd is master and windows hd is slave, is that right?

lugoteehalt 07-30-2010 11:43 AM

Quote:

Originally Posted by Squeak92 (Post 4050156)
Linux hd is master and windows hd is slave, is that right?

Nothing to do with it if they are SATA drives, describe the plug that goes into the motherboard from the drive - you said you replugged them in or something, no need to take it apart.

As you may know but in case you don't: Assuming it's a SATA drive it is just a fairly simple plug that goes from the drive into the motherboard. The master/slave type drives have a ribbon cable with a long thin plug, with a twin line of many connectors, on the end and the slave drive is not plugged into the motherboard it is plugged into a socket on the side of the ribbon cable. At least that is what I am used to, tend to use old hardware.

The SATA drive needs two connections 1/ the above into the mother board and 2/ a power supply from the power supply.:)

Become the root user:
Code:

su
give root password as requested
fdisk -l

The program lshw lists the hardware, but it won't be helpful unless used by root.

johan1391 07-30-2010 12:50 PM

Im also new to linux, could you not just install rEFIt?

saikee 07-30-2010 04:57 PM

Squeak92,

I think we have here before.

The Post #14 confirms that your Linux does not detect the second disk.

By Post #23 the Grub inside Linux also does not detect the second disk.

I suspect your second hard disk isn't reported in the Bios as OpenSuse would have used it if the Bios got it.

Whatever you have been doing the hardware is not connecting. I would power down the PC, open the box, pull the connectors out one at a time and plug it back a few times to see if I get better connections.

johan1391,

not too sure about your suggestion. Think rEFIt is a Mac program and is for gpt partitions. Linux does not need efi assistance to boot a gpt disk. The hard disk here uses msdos partition table.

Squeak92 08-01-2010 11:49 AM

But my Bios must recognize it, because when I go to hard drives both are listed there, and I change the boot priority to switch between linux and windows.

saikee 08-01-2010 06:26 PM

OK let's take stock. Can we summarise your situation as per your Post #1.

Currently you have an installed Linux in one Sata disk and another Sata with only Xp inside. The WD model number WD2500JS does confirm your LInux disk is a Sata.


Both system will work if you select its hard disk as the first bootable disk. Therefore you can use either system as long as you change the first bootable disk in the Bios.

You want to dual boot them without going through the Bios as Grub has such function to alter the disk order at boot time.

---------------------------------------

The problem is Grub from the Linux disk cannot see the XP disk. Neither could your Linux which is OpenSuse. We don't know if Xp can see the OpenSuse disk but with a driver EXt2/3 partition will not be mounted by a Xp.

This is a high unusual situation and we can only take the word from you.

You also implied that you could not get a second opinion by booting up another Linux Live CD to get a second opinion. This would have been helpful for the diagnostics.


Can you therefore confirm if Xp sees the Linux disk or not? It should show up in Disk Management even if Xp cannot mount its partitions?

Can you confirm if the above accurately reflects your current situation?

Do you know the hard disk model for the XP disk? It is for us to eliminate the possibility that it is not a WD PATA disk that might have been configured as a "single" and so could render it inoperable if booted as the 2nd disk when the Linux disk is the 1st disk. If such a PATA disk is selected as the 1st boot disk it might function satisfactorily. You have confirmed to us previously in Post #1 that your Xp is a Sata and so the above problem should not exist but it would help our diagnostics if we have the hard disk model number.


All times are GMT -5. The time now is 09:48 AM.