Debian amd64 5.0.3, WinXP, GRUB and getting them to play nicely with one another...


Results 1 to 12 of 12

Thread: Debian amd64 5.0.3, WinXP, GRUB and getting them to play nicely with one another...

  1. #1
    Join Date
    Dec 2009
    Posts
    8

    Debian amd64 5.0.3, WinXP, GRUB and getting them to play nicely with one another...

    Long story short, I can boot to Debian but not WinXP. Long story follows...

    It's been about 4 days since I installed Debian amd64 Lenny and 4 days since I was able to boot to WinXP. I've spent most of that time crawling google looking for an answer to my problem. As such, I've provided what I think is all the information that someone would need to help me (if not, please ask). FYI, I'm very new to Linux but not to Microsoft/Windows.

    First off, I have 1 SATA hard drive that has WinXP and Debian on it:
    fdisk -l output:
    Code:
    Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x9ef8fc24
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1       97262   781256983+   7  HPFS/NTFS
    /dev/sda2           97263       98169     7285477+  83  Linux
    /dev/sda3           98170      121601   188217540    5  Extended
    /dev/sda5           99077      121601   180932031   93  Amoeba
    /dev/sda6           98170       99076     7285414+  82  Linux swap / Solaris
    
    Partition table entries are not in disk order
    GRUB appeared to install just fine and boots Debian with no problems whatsoever. The problem is when I go to boot WinXP, I get the following:
    Code:
    root (hd0,0)
      Filesystem type unknown, partition type 0x7
    savedefault
    makeactive
    chainloader +1
    The relevant portion of my menu.lst file is as follows:
    Code:
    title		Debian GNU/Linux, kernel 2.6.26-2-amd64
    root		(hd0,1)
    kernel		/boot/vmlinuz-2.6.26-2-amd64 root=/dev/sda2 ro quiet
    initrd		/boot/initrd.img-2.6.26-2-amd64
    
    title		Debian GNU/Linux, kernel 2.6.26-2-amd64 (single-user mode)
    root		(hd0,1)
    kernel		/boot/vmlinuz-2.6.26-2-amd64 root=/dev/sda2 ro single
    initrd		/boot/initrd.img-2.6.26-2-amd64
    
    ### END DEBIAN AUTOMAGIC KERNELS LIST
    
    # This is a divider, added to separate the menu items below from the Debian
    # ones.
    title		Other operating systems:
    root
    
    
    # This entry automatically added by the Debian installer for a non-linux OS
    # on /dev/sda1
    title		Microsoft Windows XP Professional
    root		(hd0,0)
    savedefault
    makeactive
    chainloader	+1
    Here's the output of the grub geometry (hd0) command:
    Code:
    geometry (hd0)
    drive 0x80: C/H/S = 0/255/63, The number of sectors = 1953525168, /dev/sda
       Partition num: 0,  Filesystem type unknown, partition type 0x7
       Partition num: 1,  Filesystem type is ext2fs, partition type 0x83
       Partition num: 4,  Filesystem type unknown, partition type 0x93
       Partition num: 5,  Filesystem type unknown, partition type 0x82
    I've tried switching root to rootnoverify with no success.

    I've already tried running FIXMBR and FIXBOOT in the WinXP recovery console which completely FUBR'd everything. Wasn't able to boot XP or GRUB or Linux so I ended up reinstalling Linux to get the GRUB boot menu back.

    I've also tried banging my head on the desk. No results as of yet

    If anyone has any idea on how to get my system dual booting with XP and Debian I'd LOVE to hear them. I'm pretty much at my wits end.

    Thanks!!!
    -Mystick

  2. #2
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,984
    MystickPhoenix,

    How about booting it manually?

    When you see the Grub manual press the "c" key to get a Grub prompt.

    In a Grub prompt try the following
    Code:
    root (hd0,0)
    chainloader +1
    boot
    If Grub has an issue with any of the lines it reports back to you immediately and you then know which line is causing problem.

    Your menu.lst looks OK to me but manual booting is the key step to ask Grub "What the hell is gping on?"

    The "makeactive" should have no effect because Linux never uses the bootable flag so sda1 once marked bootable will not get changed. The "rootnoverify" is similar to "root" but a split second faster. I never use the former myself.

    I have AMD64 CPU PC and Grub is not known to have problem with any processors.

    Bye the way

    Welcome to JustLinux!

    If you point a gun at my head to say what is wrong with your booting menu I would save my skin by suggesting may be it is your partition table. sda5 should start at the beginning of the extended partition sda3. In your case it starts after sda6. I have not seen such thing before and according to theory this should not be possible. Thus Xp may be frightened by this odd feature. If Xp does not know how to cope with the partition table it will refuse to boot as it could not guarantee its read/write operations.

    Logical partitions inside an extended partition should be consecutive. The ith partition carries the hard disk address for the i+1th partition. From my experience the partition type 93 " Amoeba is usually a result after a hard disk corruption. If you continue to experience difficulty my recommendation is to delete the extended partiton sda3, using a Live CD and create a new extended partition with the first logical partition sda5 for your swap. The unallocated space can then be after sda5.
    Last edited by saikee; 12-29-2009 at 08:35 AM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  3. #3
    Join Date
    Dec 2009
    Posts
    8
    Unfortunately, I've tried that as well. No error messages (except for the same "Filesystem type unknown...") and it hangs right after the "boot" command.

  4. #4
    Join Date
    Dec 2009
    Posts
    8
    Not sure if this changes your recommendation at all, but GParted seems to feel that sda3 is a "parent" partition of sda5 and 6:



    Will removing sda3 also remove 5 and 6? I'd like to keep what's on 6 but it's not 100% necessary.

    Thanks!

  5. #5
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,984
    sda3 is just an envelope defining the boundary of the extended partition. From your Post #1
    Code:
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1       97262   781256983+   7  HPFS/NTFS
    /dev/sda2           97263       98169     7285477+  83  Linux
    /dev/sda3           98170      121601   188217540    5  Extended
    /dev/sda5           99077      121601   180932031   93  Amoeba
    /dev/sda6           98170       99076     7285414+  82  Linux swap / Solaris
    sda3 starts at cylinder 98170 and ends at 121601 which is the end of the hard disk. Inside it sda6 starts at 98170 and ends at 99076. The sda5 then continues at 99077 to 121601 cylinder.

    In the partition table stored in the MBR Linux or any other operating system can only know the first logical partition is located at the 98170 cylinder. It has to go into the 98170th cyclinder to read the first logical partition table in order to know where the next one to start from. Something is not quite right about your partition table.

    Linux tolerates more errors in the partition table than MS systems. I only suspects your Xp did not like the partition table so changing it back to a conventional way might help.

    If you delete an extended partition (in your case sda3) all the logical partitions (sda5 and sda6) will disappear.

    Your /home partition should be type 83 and not 93.

    In your case I would concentrate on making Xp running again as a new Debian installation is pretty quick.

    If your Xp can't run after fixmbr then something may be wrong with it. I would remove sda5 (and if necessary sda2) so that there is nothing for Xp to complain about before doing "fixmbr". You don't normally need "fixboot" unless you are multi-booting Xp with Win2k, Vista or Win7 as each of them use a different (time or version specific) boot loader in the boot sector.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  6. #6
    Join Date
    Dec 2009
    Posts
    8
    Thanks very much. I'll first try removing everything but the WinXP... if that doesn't work, I'll re-install Debian onto 1 partition (home, swap, etc, all on the same partition) so as to simplify things and rule some other things out.

    Will let you know how it goes.
    Thanks!

  7. #7
    Join Date
    Dec 2009
    Posts
    8
    Current state:

    I've got WinXP up and running, Debian installed in a second partition. Only problem is that GRUB doesn't start up and therefore, I can't boot Debian. Is there a way to get Debian running using the XP bootloader so that I can leave the XP OS alone and happy?

  8. #8
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,984
    You can use Xp's NTLDR to boot Debian. My Just booting tips Task E4 refers. However if NTLDR can chainload Debian Grub then Debian must be already bootable by Grub. NTLDR can only boot a Linux by chainloading installed as I described in Task E4.

    For the first Linux I usually use a Linux Live CD to create a Type 83 partition for Debian and another Type 82 for swap, say using cfdisk.

    During Debian installation I would tell the installer to use the Type 83 partition to format as Ext3 and mount it as /. The installer would know how to use the swap without instruction. The /home in this case is inside /. I never have any trouble install any of the 100+ Linux this way. The 2nd and above Linux I only create a Typr 83 partition.

    When you install Debian and wanting to use GRub to dual boot you have to install Grub in the MBR. You can do this after a Linux installation using a Linux Live CD. My Just booting tips has tonnes of tips.

    You can use a logical or primary partition for Type 83 or 82 in Linux installation.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  9. #9
    Join Date
    Dec 2009
    Posts
    8
    Awesome. I'll have a look through the posts in your sig and let you know if I have problems or success.

    thanks!

  10. #10
    Join Date
    Dec 2009
    Posts
    8

    Thumbs up Success!!!!!

    I used E4 in your "Just Booting Tips" writeup to edit the XP boot.ini file, adding linux to the Operating Systems area. E4 was suprisingly easy

    I'm currently typing this from Debian and, as I didn't muck with anything else, WinXP should be perfectly happy as "nothing" has changed for it.

    Now? I can play with Debian while still having XP as a backup for some of the programs that I can't find linux replacements for (some of my audio editing software for instance).

    Thank you so much Saikee!!!! You rock!

  11. #11
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,984
    MystickPhoenix,

    Glad to see you are enjoying booting two operating systems.

    I am only passing on the knowledge the forum members have taught me over the years.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  12. #12
    Join Date
    Dec 2009
    Posts
    8
    Confirmed: writing this from XP. I realize that we all stand upon the shoulders of others, but very few present the necessary information as well as you have.

    Thanks again!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •