1

Topic: Unable to install XP or Vista on Dell Inspiron 530 with Ubuntu 8.04

Recently, I bought the Dell Inspiron 530 with Ubuntu Linux V8.04 pre-installed and 1 250gb SATA HD.  I tried to install XP Pro SP2 on it.  It comes with 4 primary partitions 1) Dell utility partition), 2) fat32 (Ubuntu cd contents), 3) ext3 Ubuntu 8.04, 4) linux-swap.  XP cannot be installed since 4 primary partitions already exist.

I created an extended partition (using Gparted) and moved linux swap to the extended partition.  Edited menu.lst in Linux so grub can present XP as a boot option.  Now with 3 primaries, I started the install of XP SP2.  After initial partition creation (logical partition within the extended partition) and after files are copied to that partition (/dev/sda6), after the first reboot, the boot loader (I assume XP's, since it overwrites the linux bootloader) gives an error message "Disk error".

After restoring the Linux boot loader, boot to Windows XP (using the grub bootloader) and I get Error 12: Invalid device requested.

I booted to Dell's Utility partition, and ran their diagostic tools and no memory or disk errors were found.

I initially thought that since XP cannot recognize a SATA drive without a driver disk (using F6 during initial install), I would have to go through the process of slipstreaming the driver (I don't have a floppy drive).  I then tried to do the same thing but with Vista instead (it comes with SATA drivers?).  I got the same identical errors as with the XP installation.

I'm stuck here.  How do I get XP and/or Vista installed?  The BIOS is set for SATA/IDE, not SATA/RAID.

Partition 2 (/dev/sda2) is shown in Gparted with the 'boot' flag, so I assume that's the 'active' partition.  Boot.ini, NTLDR, etc. is also there.  Partion /dev/sda6 (partition(5) using boot.ini notation) is where XP is being installed.  Not sure why the XP installer chose to put the boot files in partition 2, but there doesn't appear to be a way to control that.

Here's what I've tried so far:

- In grub, I have root (hd0,5)|(new line) makeactive|chainloader +1 (doesn't 'makeactive' make this partition active?)
- I made the XP partition 'active' using Gparted (set flag to 'boot').  Same Error 12: Invalid device requested
- Try setting partition 1 (Dell utility), and the other Linux partitions as 'hidden' as Gparted (booting to the LiveCD).  It would only set partition 1 as hidden - it wouldn't hide the Linux ext3 or swap partition as hidden.
- Try marking first 2 partitions as 'hidden'
    - 1st 2 partitions show as 'Inactive os/2 boot manager', but have drive letters assigned
    - 2nd 2 partitions (linux and linux swap) also have drive letters
    - Create 40gb logical in extended partition for the XP installation
    - XP setup complains that the "...disk does not contain an XP-compatible partition"
    - Had to restore grub afterwards

I've read other post in the forum and I'm not sure what the difference is between Gparted marking a partition as 'hidden' and changing the partition ID to x83

Also, I've read posts that say that Windows cannot be installed to an logical partition (within an extended partition).  But as I indicated above, boot.ini, NTLDR, etc. were copied to partition 2 which was active.

2 (edited by stormhead 2008-10-19 18:39:56)

Re: Unable to install XP or Vista on Dell Inspiron 530 with Ubuntu 8.04

Hi!

danno3 wrote:

I'm stuck here.  How do I get XP and/or Vista installed?  The BIOS is set for SATA/IDE, not SATA/RAID.

Microsoft has designed the Windows setup process to only properly install Windows on a primary partition. However, a way o install Windows to a logical partition exists - it includes interruptingthe setup process at a given point, manually copying and modifying some files, and continuing the setup process from there. As far as I remember it, I woukdn't suggest this for novice users.
A step-by-step description of the whole process has surfaced at several points on this board; you'll likely stumble across it in threads dealing with multi-boot configurations.
However, it is usually a really simple task to move an existing Linux installation from one partition to another: First, copy the existing installation to a new partition. Then mount that partition and correct the device names within the fstab and GRUB configuration file (don't forget the device names within the kernel parameters and the templates from which new lines are automatically generated!). Re-install GRUB, pointing to the new root partition - and you're done.
This way you could move your existing Linux system to a logical partition, then re-format the old (and now unneeded) Linux root partition - and install XP there.

Partition 2 (/dev/sda2) is shown in Gparted with the 'boot' flag, so I assume that's the 'active' partition.  Boot.ini, NTLDR, etc. is also there.  Partion /dev/sda6 (partition(5) using boot.ini notation) is where XP is being installed.  Not sure why the XP installer chose to put the boot files in partition 2, but there doesn't appear to be a way to control that.

Windows writes its boot loader to the first (by partition table entry number) "windows-readable" partition it finds. Since it understands FAT32, it has installed the boot loader on the "Ubuntu CD" partition.
In fact, you can control where the boot loader is installed: Simply make sure Windows sees no "windows-readable" partitions before the setup process starts; this will result in the boot loader being written to the Windows system partition. Since Windows uses the file system ID stored in the partition table to determine if it can read the partition, it is complertely sufficient to change the file system ID there using the linux fdisk tool on the command line (the graphical GParted application can't do this job). Simply change the ID of the FAT32 partition to e.g. "82" (which indicates a Linux partition), then install XP, and afterwards chanbe the ID back to its previous value.

3

Re: Unable to install XP or Vista on Dell Inspiron 530 with Ubuntu 8.04

stormhead wrote:

However, a way o install Windows to a logical partition exists - it includes interruptingthe setup process at a given point, manually copying and modifying some files, and continuing the setup process from there...A step-by-step description of the whole process has surfaced at several points on this board; you'll likely stumble across it in threads dealing with multi-boot configurations.

I have not been able to locate any post in the Gparted forum about installing Windows to a logical partition, other than the idea I found about modifying registry entries (interrupting setup) by using a hex editor to change drive letter references.  That failed the same way as my attempt has.  Even though the boot files NTLDR, boot.ini, etc. are located in a primary partition, I assume that Windows chokes on the other system files being located in a logical partition.

Even if I move the linux partition from primary to logical, that would leave only 1 available primary partition.  Isn't partition 1 that infamous DSR partition that's on most Dells - can I get away with deleting that one (it's activated via F12)?

Also, I'm not sure if partition 2 (supposedly the Ubunto CD partition) may already have the necessary SATA and other drivers already integrated that the Ubuntu DVD does not have.

Excuse my ignorance, but I'm a newbie at Linux and editing partition info.

stormhead wrote:

...Then mount that partition and correct the device names within the fstab and GRUB configuration file (don't forget the device names within the kernel parameters and the templates from which new lines are automatically generated!).

I'm looking at /etc/fstab and the lines that point to the partition location is commented out #dev/sda3 and the following line contains a very long UUID=... and I'm not sure how to edit that.  Also, not sure about "...and the templates from which new lines are automatically generated".  The kernel parameters for the menu entry for Linux contains the same UUID (root=UUID...) as in fstab.

4 (edited by stormhead 2008-10-23 09:27:15)

Re: Unable to install XP or Vista on Dell Inspiron 530 with Ubuntu 8.04

Hi!

danno3 wrote:

I have not been able to locate any post in the Gparted forum about installing Windows to a logical partition

Have a look at http://gparted-forum.surf4.info/viewtopic.php?id=1598 (the 12th post, written by cmdr @ 2008-08-19 23:00:16).

Even though the boot files NTLDR, boot.ini, etc. are located in a primary partition, I assume that Windows chokes on the other system files being located in a logical partition.

If I get cmdr's post right, this does work well - although I haven't tried it myself.

Even if I move the linux partition from primary to logical, that would leave only 1 available primary partition.

... which would be enough - since Windows only needs one partition.
Just to ensure I've got your partitioning schemes right: Your "original" layout was

hda1    pri             Dell Utility Partition
hda2    pri    FAT32    Ubuntu CD contents
hda3    pri    ext3     Ubuntu root
hda4    pri    -        Linux swap

Then you changed this to your current state:

hda1      pri             Dell Utility Partition
hda2      pri    FAT32    Ubuntu CD contents
hda3      pri    ext3     Ubuntu root
hda4      ext              extended
  hda5    log    -        Linux swap
  hda6    log    NTFS     Windows system, created by Windows setup

My suggestion in this case would be to boot from the GParted LiveCD and first delete (!) sda6. Then copy hda3 into the extended partition (maybe you'll have to shrink it beforehand, depending on the sizes). The result would look like this:

hda1      pri             Dell Utility Partition
hda2      pri    FAT32    Ubuntu CD contents
hda3      pri    ext3     Ubuntu root (original)
hda4      ext              extended
  hda5    log    -        Linux swap
  hda6    log    ext3     Ubuntu root (copy)

At this point, re-installing GRUB and adapting your fstab and menu.lst (all done on the new Ubuntu root within the logical partition, of course!) would be a good idea, so you can safely test how the system boots from its new partition.
If everything runs fine, you can simply install Windows into the previous Ubuntu root partition (don't forget to set/reset the partition ID on /dev/hda2 befiore & after the installation if you want to keep the Windows boot loader off hda2):

hda1      pri             Dell Utility Partition
hda2      pri    FAT32    Ubuntu CD contents
hda3      pri    NTFS     Windows system, re-formatted during Windows setup
hda4      ext              extended
  hda5    log    -        Linux swap
  hda6    log    ext3     Ubuntu root

The result: Windows & Ubuntu on the same hard drive - wothout losing any of the pre-existing partitions (maybe they're useful or something...)

Isn't partition 1 that infamous DSR partition that's on most Dells - can I get away with deleting that one (it's activated via F12)?

Of yourse you can delete this partition - but I don't know if this has any negative effects on your system. So I'd simply keep it - see my explanations above.

Also, I'm not sure if partition 2 (supposedly the Ubunto CD partition) may already have the necessary SATA and other drivers already integrated that the Ubuntu DVD does not have.

The system came with Ubuntu pre-installed? Then maybe you can ask Dell... or compare the contents of this partition to an Ubuntu CD... or simply leave this partition untouched (you maybe should create a backup of this on CD/DVD).

I'm looking at /etc/fstab and the lines that point to the partition location is commented out #dev/sda3 and the following line contains a very long UUID=... and I'm not sure how to edit that.

There are several ways how to specify the partition that is to be mounted withinn fstab.
One way ist teh "standard" /dev/hda1 scheme I used in my prior post. The great advantage of this is that you can specify any partition this way, the partition specifications are short and well readable, and if you have an idea about your partition layout, you'll immediately know which line references to which partition, so it's easy to maintain and manipulate.
Ubuntu has chosen another way: Most file systems contain an UUID - an ID that is stored insaide the filesytem and that (should be) unique world-wide. When specifying a partition by UUID, the machine scans all partitions it finds and builds a lift of their file system UUIDs. Afterwards, it mounts the file systems with the specified UUIDs in the specified places. Advantage of this method: If you e.g. insert a new partition before an existing one (and change the partition order in the MBR partition table!), you'd have to manually change your fstab if you used the "standard" scheme, since the partition name has changed. However, the UUID variant is robust against this change - since the file system's UUID didn't change during inserting & reordering partitions. But there's no advantage without disadvantage: You can only mount a partition this way if Linux understands its UUID (or if it carries one). For e.g. FAT32 or NTFS partitions, I think this won't work, so you'd have to specify them the "traditional" way!
There are one or two more ways to specify which partition to mount where, but these are not relevant right here - you can read about them in the fstab man page if you're interested.
As a result, I'd say that you don't have to change your UUID, since it won't be changed during your operations. However, please keep in mind that after copying the Ubuntu partition, you'll have two partitions with identical file system UUIDs on your hard drive - and I don't know how the system handles this situation (maybe it throws an error and refuses to mount anything... Maybe it mounts a random partition out of these two... no idea). So if you want to try how your Ubuntu system works from its new logical partition befiore you install Windows, you simply should create a backup of your fstab and then change the partition specification back to the "/dev/hda1" scheme.

Also, not sure about "...and the templates from which new lines are automatically generated".  The kernel parameters for the menu entry for Linux contains the same UUID (root=UUID...) as in fstab.

It should be safe to switch to the "standard" naming scheme here, too. To be safe & sure, simply create a backup before any manipulation - if something goes wrong, you can boot any Linux Live CD and revert the files to their original state.

5 (edited by danno3 2008-10-26 09:33:12)

Re: Unable to install XP or Vista on Dell Inspiron 530 with Ubuntu 8.04

Thanks for all of your help so far.  Here's what I did with the results:
- Copy partition using Gparted to /dev/sda6
- mount /dev/sda6, then edit /boot/grub/menu.lst and change UUID references to /dev/sda6 (or root (hd0,5)) as needed
- edit /etc/fstab and change UUID references to /dev/sda6
- reboot to verify that /dev/sda6 was booted to successfully
- deleted /dev/sda3 (old linux partition) and rebooted successfully
   - strange info in Gparted - mount point for /dev/sda6 shows /, /dev/.static/dev (it used to show just /)
- used cfdisk /dev/sda to change partition ID's on first 2 partitions (fat16, w95 fat32) to 83 and removed boot flag on 2nd partition /dev/sda2.
- booted to XP SP2 install CD
   - first 2 partition still were recognized as fat16 and fat32 by the installer
   - all 4 partitions with data were assigned drive letters, even the linux and linux swap partitions (shown by installer as 'unknown') as C: E: F: G: (in that order).  The new primary partition that was created was assigned drive letter H:.
- stopped XP install at 2nd reboot.  Restored grub and rebooted to Linux.  Gparted still showed the first 2 partitions as fat16 and fat32, even though I had changed the partition ID's to 83 (confirmed when I ran cfdisk).  Not sure why the results are different.

Previously (prior to moving Linux to logical partition), I had tried using Gparted to mark the first 2 partitions as hidden and this is what happened when attempting to install XP:
- 1st 2 partitions show as 'Inactive os/2 boot manager', but have drive letters assigned
- 2nd 2 partitions (linux and linux swap) also have drive letters
- Create 40gb logical in extended partition
- XP setup complains that the "...disk does not contain an XP-compatible partition"
- Had to restore grub afterwards even though I had aborted the install

Not sure how to prevent XP from seeing all of these partitions and assigning them drive letters.  Attempts to hide and/or change partition ID's have failed to prevent this problem.  Lots of bad things can happen when the XP system partition is not drive letter C:.  At least XP is proceeding past the file copy stage now that it's being installed to a primary partition.  I guess I can now try the 'cmdr' technique you had referenced (and I had missed during my previous searches) to allow XP installation to a logical partition.

6

Re: Unable to install XP or Vista on Dell Inspiron 530 with Ubuntu 8.04

What I didn't realize is that although the XP installer assigns drive letter to the partitions it sees, it seems to get 'corrected' after installation completes.  Here's what I did:

Attempted to use Gparted to copy NTFS partition to new logical partition, but the copy option was not available.  After installing the package NTFSprogs and rebooting, I was able to complete the partition copy. 

Rebooted to XP - chkdsk was run on drive F: (where the logical partition is) and installation completed, but with errors.  Checked the event log.  Tons of severe errors where a service failed to start because the the binary could not be found.  Constant references in \windows\setuperr.log to h:\windows\system32\... (the old location in the primary partition).  Searching the registry showed endless references to h:\.

Retried install of XP to primary and copy partition and modify boot.ini during 1st reboot (file copy).
- Prior to installation, use Gparted to mark partitions 1 (Dell Utility) and 2 (the Ubuntu restore partition) as hidden
- During the initial phase of XP installation, the hidden partitions are shown as 'Inactive os/2 boot manager', but have drive letters assigned.  2nd 2 partitions (linux and linux swap) also have drive letters assigned
- After initial file copy stage completed, boot to Ubuntu LiveCD and restore grub with root (hd0,5)|setup (hd0)
- boot to Linux, mount /dev/sda3 (the initial XP primary partition location) and edit boot.ini and change partition() parameter from 3 to 6 (/dev/sda7 which will be created in next step) in both places
- Use Gparted to copy partition to /dev/sda7
- Mount /dev/sda3 and delete everything but NTLDR, boot.ini, and NTDETECT.COM
- reboot and allow XP installation to complete
- After installation completed, somehow the XP system partition was assigned drive c: (yipee!) and the initial 'staging' partition (/dev/sda3) was assigned drive h:.  During the 1st phase of XP installation (partition creation and selection), the drive letters were f: and h: respectively.
- What will happen when I unhide the hidden partitions?  No problem, partition 1 assigned drive f: and partition 2 got e:

I believe that copying the partition at the first XP installation reboot (file copy phase) and hiding the first 2 primary partitions made the difference.

Now that I have survived this ordeal, now it's time to really complete the torture by installing Vista to a logical partition ;-)

2 remaining minor questions:

danno3 wrote:

- deleted /dev/sda3 (old linux partition) and rebooted successfully
   - strange info in Gparted - mount point for /dev/sda6 shows /, /dev/.static/dev (it used to show just /)

danno3 wrote:

Gparted still showed the first 2 partitions as fat16 and fat32, even though I had changed the partition ID's to 83 (confirmed when I ran cfdisk).  Not sure why the results are different.

Thanks again for all your help (and to cmdr).