Web Analytics Made Easy -
StatCounter A cautionary tale of duel-booting... - CodingForum

Announcement

Collapse
No announcement yet.

A cautionary tale of duel-booting...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • A cautionary tale of duel-booting...

    Ok, so I consider myself to be rather proficient with computers in general and have been using Linux as a second OS since RedHat7.3 was released (a long time). In that time, I have seen some rather interesting problems with Windows stepping on partition tables and the such, but this one was new to me.

    First, the system specs: a windows xp sp2 prim Os installed on a 120GB IDE drive (only IDE device), and Ubuntu 9.10 (upgraded from 9.4) installed on a small section of a 320GB SATA2 drive. GRUB 1.92 (wasn't upgraded to GRUB 2.x when the system auto updated to Ubuntu 9.10) loaded onto the MBR (if you've encountered this before you can already see the issue).

    Now, the task. Xp had degraded badly, but, since it does that often, I had a backup of the complete install. Thus all I needed to do was load Linux, clear the prime XP drive, and copy my backup over (this would be the third time for this system).

    The mistake that brought the problem to my attention was that I had forgotten that the other times I had done this I had simple deleted the files rather than formatting the partition. When I formatted, it changed the partition identify that GRUB uses to boot the targeted OS. This meant that my freshened XP was intact but un-bootable unless I edited GRUB's settings, which I was inexplicable unable to do.

    When I told the user of the system, they said not to worry about it too much, just purge Linux from the system and all would be well (live disk works for the usage). This I did as well as using the XP repair tool to to rebuild the MBR.

    When I rebooted the system, I was amazed to see that GRUB was still there and complaining because I had formatted the drive with it's config files on it. After about 8 hours of digging through everything I knew to do including a fresh install of XP, reinstalling Ubuntu to put a new copy of GRUB over the bad one, pulling out some old tools (FDisk and a few others) I finally gave up and cracked the box open. After pulling what I thought was the offending drive out (the 120GB IDE) and rebooting with the expectation of seeing the generic "No OS Found" message I was presented with GRUB's complaining again.

    This baffled me. GRUB should not have been there, but it was. I replaced the IDE drive and popped the SATA drive out and the system booted just fine.

    What I believe happened was that the original install had gotten confused and placed GRUB on the IDE drive's boot sector as well as the boot sector of the first SATA device. So all the freaking out I had done trying to clear and rebuild the MBR had actually worked, but was limited to the IDE drive alone.

    While I was looking for any direction I could, I saw that I am not the only person that has had this issue, but no one had obviously stated what the problem was or how to fix it.

    So, what to avoid? If you dual-boot, I would advise not mixing drive types on the system. This is the first time I've ever heard of anything like this and everyone I've talked to about this looks at me like I'm recounting an alien abduction story. So, learn from my mistake...or at the least, if your system does something completely unexpected like this, start with pulling hardware

  • #2
    Originally posted by M.Jackson View Post
    This meant that my freshened XP was intact but un-bootable unless I edited GRUB's settings, which I was inexplicable unable to do.
    Why couldn't you edit it? I haven't used GRUB 2.x but with older versions you could edit any boot entries by pressing 'e' at the GRUB menu. Did that feature get taken out?
    OracleGuy

    Comment


    • #3
      get hirens bootdisk. try some of the mbr tools or perhaps a good old fashioned low level format. get a nice drink it will take awhile.
      - Firebug is a web developers best friend! - Learn it, Love it, use it!
      - Validate your code! - JQ/JS troubleshooting
      - Using jQuery with Other Libraries - Jslint for Jquery/other JS library users

      Comment


      • #4
        Originally posted by oracleguy View Post
        Why couldn't you edit it? I haven't used GRUB 2.x but with older versions you could edit any boot entries by pressing 'e' at the GRUB menu. Did that feature get taken out?
        Pressing 'e' allows you to edit it, something that I did about ten times in the process of hunting down various details, but it does not save the edit. For that you have to boot linux and edit the file /boot/grub/grub.cfg in 1.9x and /boot/grub/menu.lst in 2.x. This did not work despite being remounted with -o rw and root access. All of which I am having to attribute to a conflict created by having two independent copies of GRUB, but I really don't know.

        @DanInMa I think you missed the point. I can format a drive as well as anyone else, and did twice, but I had no idea that there were two drives grabbing the boot sequence (since that is not possible in most configurations), so a simple 'low level format' just wasted time.

        Comment


        • #5
          Originally posted by M.Jackson View Post
          Pressing 'e' allows you to edit it, something that I did about ten times in the process of hunting down various details, but it does not save the edit. For that you have to boot linux and edit the file /boot/grub/grub.cfg in 1.9x and /boot/grub/menu.lst in 2.x. This did not work despite being remounted with -o rw and root access. All of which I am having to attribute to a conflict created by having two independent copies of GRUB, but I really don't know.

          @DanInMa I think you missed the point. I can format a drive as well as anyone else, and did twice, but I had no idea that there were two drives grabbing the boot sequence (since that is not possible in most configurations), so a simple 'low level format' just wasted time.
          It's been a while since I've played with this type of stuff, but one thought, did you ever change the boot order in the BIOS? I'm wondering if somehow GRUB installed on the MBR of the first boot disk, then you switched it, and it installed on the other disk?
          Create accessible online surveys -::- Koobten.com - compare netbook prices and reviews -::- Affordable, reliable hosting for less than $20 per year
          Zend Certified Engineer

          Comment


          • #6
            I considered that, but this BIOS (cheap main board) does not differentiate between SATA and IDE in boot order. If it did, then the second copy of GRUB (if I had gotten it there by some serious SNAFU) wouldn't have ever had a chance to issue boot instructions once XP had been installed on the first drive, thus, I would have never known it was there.

            I would like to quote myself here, "... everyone I've talked to about this looks at me like I'm recounting an alien abduction story."

            Comment

            Working...
            X
            😀
            🥰
            🤢
            😎
            😡
            👍
            👎