Find the answer to your Linux question:
Results 1 to 8 of 8
Hi. I'm brand new to all this -- I just completed my first successful linux installation on Friday. I'm certain that my problem is a common one, but I can't ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2007
    Posts
    5

    Question Help w/ GRUB, menu.lst, dual boot to XP problems


    Hi. I'm brand new to all this -- I just completed my first successful linux installation on Friday.

    I'm certain that my problem is a common one, but I can't seem to find the answer when I search these forums or Google Linux. If you can point me to the appropriate post or site, I'd greatly appreciate it.

    The problem:
    - I can no longer boot to Windows XP after having successfully installed Ubuntu.
    - GRUB gives me two windows options, but when I select either one the screen simply goes black. No output. No disk activity. Nothing. The computer just hangs, doing nothing.

    My set-up:
    - I have a Sony VAIO desktop w/ two internal 250 GB drives, with Windows XP (Meida Center Edition)
    - Before I installed Ubuntu, I physically swapped the two drives so that I could keep the "C:" drive intact.
    - My primary drive (i.e. what used to be my "D:" drive before the swap) contains the linux partition(s) on the first 110 GB, and the remaining 128 GB is still an NTFS formatted partition.
    - My secondary/slave drive (i.e. what used to be my "C:" drive before the swap) contains Windows.
    - Click here to see what my partitions looked like prior to me swapping the hard drives and installing Ubuntu.

    What I've done so far:
    - searched online for solutions to this problem
    - read through the GRUB manual
    - ensured that my menu.lst file was using "map" to virtually swap the drives.
    - checked my menu.lst file against several other examples online and played around with several of the variables.
    - You can see a copy of my current menu.lst file by clicking here.

    I'm not sure what to try next. From what I've been reading, everything should be working just fine. Unfortunately, it isn't.

    If you could help (or point me in the direction of help) I'd greatly appreciate it!

    Thanks for your time!

    Regards,

    Ryan

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Hi ryanryan,

    Welcome to the LinuxForums.

    open terminal and execute this
    Code:
    sudo fdisk -l
    sudo less /boot/grub/menu.lst
    post output here.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Apr 2007
    Posts
    5
    Quote Originally Posted by devils_casper
    sudo fdisk -l
    Disk /dev/hda: 250.0 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/hda1 * 7161 13773 53118922+ 83 Linux
    /dev/hda2 14058 30401 131283180 7 HPFS/NTFS
    /dev/hda3 1 7160 57512668+ 83 Linux
    /dev/hda4 13774 14057 2281230 5 Extended
    /dev/hda5 13774 14057 2281198+ 82 Linux swap / Solaris

    Partition table entries are not in disk order

    Disk /dev/hdb: 251.0 GB, 251000193024 bytes
    255 heads, 63 sectors/track, 30515 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/hdb1 * 1 784 6297448+ 12 Compaq diagnostics
    /dev/hdb2 785 30515 238814257+ 7 HPFS/NTFS

  4. #4
    Just Joined!
    Join Date
    Apr 2007
    Posts
    5
    Quote Originally Posted by devils_casper
    sudo less /boot/grub/menu.lst[/code]
    post output here.
    # menu.lst - See: grub(, info grub, update-grub(
    # grub-install(, grub-floppy(,
    # grub-md5-crypt, /usr/share/doc/grub
    # and /usr/share/doc/grub-doc/.

    ## default num
    # Set the default entry to the entry number NUM. Numbering starts from 0, and
    # the entry number 0 is the default if the command is not used.
    #
    # You can specify 'saved' instead of a number. In this case, the default entry
    # is the entry saved with the command 'savedefault'.
    # WARNING: If you are using dmraid do not change this entry to 'saved' or your
    # array will desync and will not let you boot your system.
    default 0

    ## timeout sec
    # Set a timeout, in SEC seconds, before automatically booting the default entry
    # (normally the first entry defined).
    timeout 10

    ## hiddenmenu
    # Hides the menu by default (press ESC to see the menu)
    #hiddenmenu

    # Pretty colours
    #color cyan/blue white/blue

    ## password ['--md5'] passwd
    # If used in the first section of a menu file, disable all interactive editing
    # control (menu entry editor and command-line) and entries protected by the
    # command 'lock'
    # e.g. password topsecret
    # password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
    # password topsecret

    #
    # examples
    #
    # title Windows 95/98/NT/2000
    # root (hd0,0)
    # makeactive
    # chainloader +1
    #
    # title Linux
    # root (hd0,1)
    # kernel /vmlinuz root=/dev/hda2 ro
    #

    #
    # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

    ### BEGIN AUTOMAGIC KERNELS LIST
    ## lines between the AUTOMAGIC KERNELS LIST markers will be modified
    ## by the debian update-grub script except for the default options below

    ## DO NOT UNCOMMENT THEM, Just edit them to your needs

    ## ## Start Default Options ##
    ## default kernel options
    ## default kernel options for automagic boot options
    ## If you want special options for specific kernels use kopt_x_y_z
    ## where x.y.z is kernel version. Minor versions can be omitted.
    ## e.g. kopt=root=/dev/hda1 ro
    ## kopt_2_6_8=root=/dev/hdc1 ro
    ## kopt_2_6_8_2_686=root=/dev/hdc2 ro
    # kopt=root=UUID=26d085d2-5d95-43dd-b2c4-2908cbef2785 ro
    # kopt_2_6=root=/dev/hda1 ro

    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=(hd0,0)

    ## should update-grub create alternative automagic boot options
    ## e.g. alternative=true
    ## alternative=false
    # alternative=true

    ## should update-grub lock alternative automagic boot options
    ## e.g. lockalternative=true
    ## lockalternative=false
    # lockalternative=false

    ## additional options to use with the default boot option, but not with the
    ## alternatives
    ## e.g. defoptions=vga=791 resume=/dev/hda5
    # defoptions=quiet splash

    ## should update-grub lock old automagic boot options
    ## e.g. lockold=false
    ## lockold=true
    # lockold=false

    ## altoption boot targets option
    ## multiple altoptions lines are allowed
    ## e.g. altoptions=(extra menu suffix) extra boot options
    ## altoptions=(recovery) single
    # altoptions=(recovery mode) single

    ## controls how many kernels should be put into the menu.lst
    ## only counts the first occurence of a kernel, not the
    ## alternative kernel options
    ## e.g. howmany=all
    ## howmany=7
    # howmany=all

    ## should update-grub create memtest86 boot option
    ## e.g. memtest86=true
    ## memtest86=false
    # memtest86=true

    ## should update-grub adjust the value of the default booted system
    ## can be true or false
    # updatedefaultentry=false

    ## ## End Default Options ##

    title Ubuntu, kernel 2.6.17-11-generic
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.17-11-generic root=/dev/hda1 ro quiet splash
    initrd /boot/initrd.img-2.6.17-11-generic
    quiet
    savedefault
    boot

    title Ubuntu, kernel 2.6.17-11-generic (recovery mode)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.17-11-generic root=/dev/hda1 ro single
    initrd /boot/initrd.img-2.6.17-11-generic
    boot

    title Ubuntu, kernel 2.6.17-10-generic
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/hda1 ro quiet splash
    initrd /boot/initrd.img-2.6.17-10-generic
    quiet
    savedefault
    boot

    title Ubuntu, kernel 2.6.17-10-generic (recovery mode)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/hda1 ro single
    initrd /boot/initrd.img-2.6.17-10-generic
    boot

    title Ubuntu, memtest86+
    root (hd0,0)
    kernel /boot/memtest86+.bin
    quiet
    boot

    ### 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/hdb1
    title Windows NT/2000/XP
    root (hd1,0)
    savedefault
    makeactive
    map (hd0) (hd1)
    map (hd1) (hd0)
    chainloader +1


    # This entry automatically added by the Debian installer for a non-linux OS
    # on /dev/hdb2
    title Windows XP Media Center Edition
    root (hd1,1)
    savedefault
    makeactive
    map (hd0) (hd1)
    map (hd1) (hd0)
    chainloader +1

  5. #5
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    everything is correct. check the contents of /boot/grub/device.map file. if there isn't any entry of /dev/hdb, add this line
    Code:
    (hd1)   /dev/hdb
    save file and check if Windows Boot up now.
    in case it doesn't work, 'swap' harddisks again. does windows boot up?
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #6
    Just Joined!
    Join Date
    Apr 2007
    Posts
    5

    Question

    Well, I checked the device.map file and the entry for hd1 is already there. Over the past several days I've entertained a host of other variations in my menu.lst file. I've changed 0s to 1s and 1s to 0s and back again. I've dropped the "map" lines, put them back in. Tried removing "makeactive", "savedefault". Changed root to rootnoverify, then back again. Nothing, thus far has worked. I'm beginning to wonder if the problem is something other than the menu.lst file.

    Regardless, I (phsyically) swapped the hard disks back again and, yes, Windows boots just as it always did before.

    Here's what I'm thinking about doing next. I'm going to try installing linux on the same disk as Windows. That way, both Windows and Linux will be on hda. As for hdb, I'll just reformat it and cut it into two partitions -- one NTFS and one EXT3.

    But this leads to anther question:
    Do I need to make any extra partitions on my primary drive so that the /boot partition will be on the first n MBs of the disk?

    Thanks again for your help,

    Ryan

  7. #7
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Do I need to make any extra partitions on my primary drive so that the /boot partition will be on the first n MBs of the disk?
    No. Linux doesn't care about partition type and loacation. you can install Linux in Logical Partition. create an Extended Partition and leave Free/Unpartitioned space. select 'Unpartitioned' space in Partition Section during Installation. installer will create/format partitions and setup dual boot for you.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  8. #8
    Just Joined!
    Join Date
    Apr 2007
    Posts
    5
    Quote Originally Posted by devils_casper
    No. Linux doesn't care about partition type and loacation. you can install Linux in Logical Partition. create an Extended Partition and leave Free/Unpartitioned space. select 'Unpartitioned' space in Partition Section during Installation. installer will create/format partitions and setup dual boot for you.
    Okay, that's what I'm going to do next. I'll resize my Windows partition (on hd0) and leave about 100 GB unallocated at the end, then I'll let ubuntu use the "unpartitioned" space during installation.

    Probably won't get around to doing this until the weekend, though. I need to make another backup of both drives before I continue. I'll let you know how things go.

    Thanks!

    Ryan

Posting Permissions

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