Find the answer to your Linux question:
Results 1 to 3 of 3
Until yesterday I had Windows 7 and Ubuntu installed, but I wanted to get rid of Win 7. Some programs just didn't want to work, so I installed Windows XP ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2011
    Posts
    1

    DUAL BOOT Problem after WIN Reinstall


    Until yesterday I had Windows 7 and Ubuntu installed, but I wanted to get rid of Win 7. Some programs just didn't want to work, so I installed Windows XP on this partition via WinToFlash.

    After the install I haven't been able to boot any OS, but the Win XP with the USB Device. With Ubuntu Live CD I finally got Ubuntu and Grub working and booting.

    But now I can't boot Windows XP, the bootloader also still said Windows 7 loader.

    fdisk -l output
    Code:
    Disk /dev/sda: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x3dcc92ef
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1          13      102400    7  HPFS/NTFS
    Partition 1 does not end on cylinder boundary.
    /dev/sda2              14        5463    43772400    7  HPFS/NTFS
    Partition 2 does not end on cylinder boundary.
    /dev/sda3            5463        9730    34270209    5  Extended
    Partition 3 does not end on cylinder boundary.
    /dev/sda5            5463        9469    32173056   83  Linux
    /dev/sda6            9469        9730     2096128   82  Linux swap / Solaris
    sda2 Windows Partition


    grub.cfg looks like this now

    Code:
    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #
    
    ### BEGIN /etc/grub.d/00_header ###
    if [ -s $prefix/grubenv ]; then
      set have_grubenv=true
      load_env
    fi
    set default="0"
    if [ "${prev_saved_entry}" ]; then
      set saved_entry="${prev_saved_entry}"
      save_env saved_entry
      set prev_saved_entry=
      save_env prev_saved_entry
      set boot_once=true
    fi
    
    function savedefault {
      if [ -z "${boot_once}" ]; then
        saved_entry="${chosen}"
        save_env saved_entry
      fi
    }
    
    function recordfail {
      set recordfail=1
      if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
    }
    
    function load_video {
      insmod vbe
      insmod vga
      insmod video_bochs
      insmod video_cirrus
    }
    
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos5)'
    search --no-floppy --fs-uuid --set=root 97f31094-7111-48a8-93b4-e013a0170919
    if loadfont /usr/share/grub/unicode.pf2 ; then
      set gfxmode=1280x1024
      load_video
      insmod gfxterm
    fi
    terminal_output gfxterm
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos5)'
    search --no-floppy --fs-uuid --set=root 97f31094-7111-48a8-93b4-e013a0170919
    set locale_dir=($root)/boot/grub/locale
    set lang=en_US
    insmod gettext
    if [ "${recordfail}" = 1 ]; then
      set timeout=-1
    else
      set timeout=4
    fi
    ### END /etc/grub.d/00_header ###
    
    ### BEGIN /etc/grub.d/05_debian_theme ###
    set menu_color_normal=white/black
    set menu_color_highlight=black/light-gray
    if background_color 44,0,30; then
      clear
    fi
    ### END /etc/grub.d/05_debian_theme ###
    
    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries.  Simply type the
    # menu entries you want to add after this comment.  Be careful not to change
    # the 'exec tail' line above.
    
    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #
    
    ### BEGIN /etc/grub.d/00_header ###
    menuentry "Windows XP Pro" --class windows --class os {
    	insmod part_msdos
    	insmod ntfs
    	set root='(/dev/sda2)'
    	search --no-floppy --fs-uuid
    	chainloader +1
    }
    
    menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	set gfxpayload=$linux_gfx_mode
    	insmod part_msdos
    	insmod ext2
    	set root='(/dev/sda,msdos5)'
    	search --no-floppy --fs-uuid --set=root 97f31094-7111-48a8-93b4-e013a0170919
    	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=97f31094-7111-48a8-93b4-e013a0170919 ro   quiet splash vt.handoff=7
    	initrd	/boot/initrd.img-2.6.38-8-generic
    }
    menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	set gfxpayload=$linux_gfx_mode
    	insmod part_msdos
    	insmod ext2
    	set root='(/dev/sda,msdos5)'
    	search --no-floppy --fs-uuid --set=root 97f31094-7111-48a8-93b4-e013a0170919
    	echo	'Loading Linux 2.6.38-8-generic ...'
    	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=97f31094-7111-48a8-93b4-e013a0170919 ro single 
    	echo	'Loading initial ramdisk ...'
    	initrd	/boot/initrd.img-2.6.38-8-generic
    }
    
    menuentry "Memory test (memtest86+)" {
    	insmod part_msdos
    	insmod ext2
    	set root='(/dev/sda,msdos5)'
    	search --no-floppy --fs-uuid --set=root 97f31094-7111-48a8-93b4-e013a0170919
    	linux16	/boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
    	insmod part_msdos
    	insmod ext2
    	set root='(/dev/sda,msdos5)'
    	search --no-floppy --fs-uuid --set=root 97f31094-7111-48a8-93b4-e013a0170919
    	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
    }
    
    
    
    
    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries.  Simply type the
    # menu entries you want to add after this comment.  Be careful not to change
    # the 'exec tail' line above.
    ### END /etc/grub.d/40_custom ###
    
    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f  $prefix/custom.cfg ]; then
      source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###
    ### END /etc/grub.d/40_custom ###
    I hope you can help me booting windows again



    //// UPDATE

    after changing the set root=(hd0,1)

    I get the error "no argument specified"

    ///edit

    after deleting the search line i get no errors, instead i get a blinking cursor and nothing happens
    Last edited by MrBonsai; 10-10-2011 at 06:47 AM.

  2. #2
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,272
    Hello MrBonsai!

    How's your problem. I think your not suppose to edit the file above?


    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    I'm guessing that this might be the reason for your blinking cursor.
    nujinini
    Linux User #489667

  3. #3
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    You shouldn't edit grub.cfg manually. Execute sudo update-grub command in Terminal. It will detect Windows OS and setup dual boot correctly.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  4. $spacer_open
    $spacer_close

Posting Permissions

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