Suse 11 XP dual boot

I currently have Suse 11 installed and need to dual boot with XP. Is there a way to add the XP installation without wiping and reinstalling Suse?

Where did you install opensuse on the first primary
partition than the answer is NO.
Because Windows XP must be installed on first primary partition.
If the first primary partition is free you can install Windows XP there.
Windows XP will write in MBR so opensuse wil not start , but you can use you,re install CD or DVD to
restore GRUB

Perhaps there is a way. What is the setup of partitions on your hard drive/s? PLease in Suse open a console and execute tis command:

sudo /sbin/fdisk -l

And copy/paste the results you get back here so the situation can be assessed.

Thanks for the replies. The first primary is a Linux partition.

Device Boot Start End Blocks Id System
/dev/sda1 * 1 204 1638598+ 83 Linux
/dev/sda2 205 3395 25631707+ 83 Linux
/dev/sda3 3396 30401 216925695 f W95 Ext’d (LBA)
/dev/sda5 14493 30401 127789011 c W95 FAT32 (LBA)
/dev/sda6 3396 3787 3148677 82 Linux swap / Solaris
/dev/sda7 3788 10315 52436128+ 83 Linux

If sda1 is not the Linux root partition and if you can sacrifice it, then there is a chance. XP will not install unless there is a primary partiion in the first position (sda1) where it can place its bootloader. It’s not a requirement for XP to go on sda1, but it is a requirement for its bootloader to go there.

You abbreviated the output from fdisk so I can’t see how large sda1 is, although it looks smallish. But maybe you can install the XP boot codes there or XP itself in toto.

Depends on (1) whether sda1 is Suse’s root partition (2) how big sda1 is (3) whether you can do without sda1 for Linux purposes.

What’s on sda1 and how big is it?

Sorry about that. sda1 is /boot (it is pretty small, but I can’t check the actual size until this evening), sda2 is / and sda7 is /home (I may have sda2 and sda7 reversed). sda3 and sda5 are both fat32 partitions with network shared data. There is plenty of room on either of the current fat32 partitions for the XP installation. I just really want to avoid reinstalling and configuring Suse.

@swerdna’s method is probably best; sda1 is more than large enough to put XP’s “system volume” (the boot files) on; you could then shrink sda5 and add another logical on which the XP “boot volume” (the OS itself, and yes, the names seem backward, but you need to know this to install it that way; complain to Bill) can be installed.

There is possibly (just possibly) another way. You have an unused primary partition slot. Is the entire drive partitioned? If you have remaining space, you could use that as the primary XP needs. The partition table would look strange (but it is already out of sequence), but it should work. If you do not have anymore space, you might be able to shrink the last partition within the extended, that is, sda5, and shrink the extended that holds it (sda3). This would free up space that could be used for a new primary. Using a single primary would eliminate the need for a split system/boot volume XP install.

By the way, you don’t show two FAT32 partitions, only one, which is sda5. sda3 is the extended; it doesn’t hold any data. You also have ~4GB of unused space between sda7 and sda5; you could squeeze the XP boot volume (the OS) there but still you will need to use sda1 as the system volume.

PLease post the information from Suse’s partitioner back here. Follow these very unusual steps:
Create a text file called like partitions.txt and open it in your text editor (gedit, kwrite or kate). Leave it open and do the following:
Open a console/terminal and enter su to get rootly powers. Maximise the console so it occupies the screen. Enter yast to activate a text-based system tuner. Arrow down to System and right to Partitioner, press Enter.
Answer Yes to continue
If there is a checkmark in the box Show Details then tab to that place and press Enter to take the Details out and to get the abbreviated display.
Use your mouse to block out all the dialogue on the screen from and including: the last entry in the table (probably sda7) up to the top – then goto the top menubar and select Edit → Copy.
Straigt away go to the open text file and from the top menubar select Edit → paste.

Now you’ll have a nice compact presentation of the partitions, their sized, mount points and filesystems. Save the file.

Exit the Yast Partitioner and come back to this thread and copy/paste the contents of the file back here. Use the forum button "wrap

 tags around the selected text" to get a decent looking display here.

Then we can suggest a step by step way ahead for you to consider.
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         204     1638598+  83  Linux
/dev/sda2             205        3395    25631707+  83  Linux
/dev/sda3            3396       30401   216925695    f  W95 Ext'd (LBA)
/dev/sda5           14493       30401   127789011    c  W95 FAT32 (LBA)
/dev/sda6            3396        3787     3148677   82  Linux swap / Solaris
/dev/sda7            3788       10315    52436128+  83  Linux
  │/dev/sda │    232.8 GB│   │WDC-WD2500JB-00R│         │
  │/dev/sda1│      1.5 GB│   │Linux native    │/boot    │
  │/dev/sda2│     24.4 GB│   │Linux native    │/        │
  │/dev/sda3│    206.8 GB│   │Extended        │         │
  │/dev/sda5│    121.8 GB│   │Win95 FAT32 LBA │/windata │
  │/dev/sda6│      3.0 GB│   │Linux swap      │swap     │
  │/dev/sda7│     50.0 GB│   │Linux native    │/home    │
  │/dev/sdb │    298.0 GB│   │WDC-WD3200AAJB-0│         │
  │/dev/sdb1│    298.0 GB│   │Win95 FAT32 LBA │/SigShare│

Thanks that’s great. So let me ask: would you be happy to put windows on sda5 (/windata)? I think you said earlier that would be OK?

I propose you transfer all the data from sda1 (/boot) across to sda2 (/root – into a new directory called /boot). Then you can format sda1 back to fat32 or ntfs (whatever, just so long as windows can read it). and then you install windows on sda5. That will overwrite the Grub bootloader currently in the Master Boot Record. Then you would reinstall Grub to the Master Boot Record.

If you like that idea we would proceed quite slowly, one item at a time.

Do you want to do that?

@mingus725 – I have not previously personally transferred a separate /boot partition’s files across to a directory /boot on the root partition. Do you see any problem with that plan or have you any suggestions in addition to it.

Swerdna, thanks for helping me out with this. Moving the data from and formatting sda1 and installing XP on sda5 sound like a good plan. Once I move /boot to sda2 will I still be able to boot or will I need to complete the XP installation before I can get back to Suse?

I have created a new folder /boot_new and copied everything from /boot. I also relocated all of the data from sda5 so it is empty.

If I format sda5 as ntfs, will I bee able to read/write to that drive from Suse?

@swerdna & @roguedog -

Important thing is to insure the permissions remain intact (the command “cp -a” will do that). If the files have already been copied to /boot_new, then the sda1 partition needs to be dismounted, the files in /boot_new copied to /boot, and then /boot_new can be deleted. The mounting of sda1 needs to be removed from /etc/fstab; with the changes below, all needs to done together before rebooting.

The tricky detail is that the grub syntax in menu.lst and its installation was different with /boot on its own partition. So, if there is a root line in the boot stanza in /boot/grub/menu.lst it needs to be changed from “root (hd0,0)” to “root (hd0,1)”; if there is no root line and the (hd0,0) is on the kernel and initrd lines, change it there. Then the kernel line will need to have “/boot” inserted before the kernel file name, i.e., from “kernel /vmlinux . . .” to “kernel /boot/vmlinux . . .”, and on the initrd line from “initrd /initrd . . .” to “initrd /boot/initrd . . .” Then grub needs to be reinstalled to the MBR. These changes can be made thru the YaST Boot Loader gui, or if the changes are made beforehand in a text editor, then YaST will pick those up when it starts. Then grub needs to be reinstalled to the MBR straightaway because currently it has a pointer to sda1 when it needs to be sda2. Alternatively, the generic boot code could be written to the MBR and the bootable (active) flag set for sda2. Either way, the grub now in the MBR needs to be overwritten before rebooting.

@swerdna, I assume you plan to address installing XP on separate system and boot volumes? . . .

@roguedog, yes you will be able to read/write from openSUSE to the XP partition.

I emphasize that all the files includng the hidden ffiles plus the permissions and ownership in the separate partition /boot should cross to /boot_new on the root partition.

If you aren’t sure of that, do it again using the form (as root – su to root):
cp -a /boot/* /boot_new/
Once you unmount /boot you rename the directory /boot_new to /boot.

Then reinitialize menu.lst in Yast –> bootloader –> Other –> propose new configuration (plus under the “Boot Loader Installation” Tab put the X in the Master Boot Records option). I think that method will take care of al the stuff mingus725 mentioned in this paragraph:

The tricky detail is that the grub syntax in menu.lst and its installation was different with /boot on its own partition. So, if there is a root line in the boot stanza in /boot/grub/menu.lst it needs to be changed … Then grub needs … Either way, the grub now in the MBR needs to be overwritten before rebooting.

Then you reboot to Suse. Once that’s working OK you don’t straight away install windows. First you use the Yast partitioner to format the partition sda1 to fat32. And you check that sda1 still has the active flag set to mark it as the active partition for the drive. You can check that through the command fdisk -l (as root) where you should still see the asterisk on sda1.

When that’s done you’re ready for windows. Tell us when you’re that far along.

PS I said the above in the belief you installed Suse fromn the installation DVD which has tools to fix the bootloader should something go wrong. Do you have the Suse installation DVD?

I now have a shiny new /boot folder on sda2. sda1 has been formatted to FAT32, sda5 has been resized to make room for sda8 which is where XP will be installed. sda8 has also been formatted to FAT32.

I did come across something strange. Before renaming /boot_new to /boot, I renamed /boot to /boot_old (just in case). I then rebooted and everything went well so I unmounted /boot_old and set it not to mount on start up. Rebooted again with good results so I formatted sda1 which had /boot_old on it. /boot_old no longer exists, but is still listed in my file browser. The folder is empty and it doesn’t seem to be causing any problems. I tried to delete it (move to trash) but, it shows up again after reboot.

Forgot to mention…Yes, I do have the Suse installation DVD.

The origin and destination of /boot_old is too hard for me to track mentally. Just check it’s not a mount for a mounted partition (probably not). Look in Yast partitioner to be sure. If it is there, then unmount it permanently in Yast partitioner. Once it’s not a mount point use this command to delete it:
sudo rm -R /boot_old

OK you can boot to Suse and the partitions have been prepared, sda1 and sda8. Boot off your windows install cd and install windows. I get a bit wary of fat32 partitions made in Linux. I’d re-format them if you can with the windows partitioner (preferably to ntfs) just before or as part of the installation.

You can easily mount ntfs read/write in Linux, later.

Suse’s boot code in the Master Boot Record will be overwritten and you will only be able to boot to windows after it is installed, but fix that later.