Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Ubuntu and Win XP in partitions with no boot menu

  1. #1
    Join Date
    Sep 2006
    Beans
    9

    Ubuntu and Win XP in partitions with no boot menu

    Hi,

    I have Windows XP in sda1 partition and installed ubuntu 11.04 in sda7 partition through a live CD. After the installation of ubuntu, i got "Error Loading Operating System" error, and after a long search, i found the below thread and done as per instructions.
    https://help.ubuntu.com/community/Grub2#ChRoot

    I am able to boot into ubuntu, but I also want the boot menu to ask everytime i power on.

    boot info script results are posted below.
    Code:
                      Boot Info Script 0.60    from 17 May 2011
    
    
    ============================= Boot Info Summary: ===============================
    
     => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of 
        the same hard drive for core.img. core.img is at this location and looks 
        for (,msdos7)/boot/grub on this drive.
     => Syslinux MBR (3.61-4.03) is installed in the MBR of /dev/sdb.
    
    sda1: __________________________________________________________________________
    
        File system:       swap
        Boot sector type:  -
        Boot sector info:  
    
    sda2: __________________________________________________________________________
    
        File system:       Extended Partition
        Boot sector type:  -
        Boot sector info:  
    
    sda5: __________________________________________________________________________
    
        File system:       swap
        Boot sector type:  -
        Boot sector info:  
    
    sda6: __________________________________________________________________________
    
        File system:       swap
        Boot sector type:  -
        Boot sector info:  
    
    sda7: __________________________________________________________________________
    
        File system:       ext4
        Boot sector type:  -
        Boot sector info:  
        Operating System:  Ubuntu 11.04
        Boot files:        /grub/grub.cfg /boot/grub/grub.cfg /etc/fstab 
                           /grub/core.img /boot/grub/core.img
    
    sdb1: __________________________________________________________________________
    
        File system:       vfat
        Boot sector type:  Windows XP: FAT32
        Boot sector info:   No errors found in the Boot Parameter Block.
        Operating System:  
        Boot files:        
    
    ============================ Drive/Partition Info: =============================
    
    Drive: sda _____________________________________________________________________
    
    Disk /dev/sda: 500.1 GB, 500106780160 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976771055 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    
    Partition  Boot  Start Sector    End Sector  # of Sectors  Id System
    
    /dev/sda1    *             63   209,760,704   209,760,642  82 Linux swap / Solaris
    /dev/sda2         209,760,766   976,751,999   766,991,234   f W95 Extended (LBA)
    /dev/sda5         209,760,768   537,438,509   327,677,742  82 Linux swap / Solaris
    /dev/sda6         537,438,573   865,116,314   327,677,742  82 Linux swap / Solaris
    /dev/sda7         865,116,378   976,751,999   111,635,622  83 Linux
    
    
    Drive: sdb _____________________________________________________________________
    
    Disk /dev/sdb: 8032 MB, 8032092160 bytes
    255 heads, 63 sectors/track, 976 cylinders, total 15687680 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    
    Partition  Boot  Start Sector    End Sector  # of Sectors  Id System
    
    /dev/sdb1    *          8,192    15,687,679    15,679,488   b W95 FAT32
    
    
    "blkid" output: ________________________________________________________________
    
    Device           UUID                                   TYPE       LABEL
    
    /dev/sda1        0601ebb5-c9ab-458c-8ceb-60a8c9bbfa68   swap       
    /dev/sda5        9793a65c-7475-4548-bc82-8d96b0978e70   swap       
    /dev/sda6        0e449b1b-34fe-4edc-b39f-9ff705c9ea73   swap       
    /dev/sda7        5712dc68-9f11-463e-8567-899d9de09eda   ext4       
    /dev/sdb1        2410-9B82                              vfat       JO-8
    
    ================================ Mount points: =================================
    
    Device           Mount_Point              Type       Options
    
    /dev/sda7        /                        ext4       (rw,errors=remount-ro,commit=0)
    /dev/sdb1        /media/JO-8              vfat       (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush)
    
    
    ============================= sda7/grub/grub.cfg: ==============================
    
    --------------------------------------------------------------------------------
    #
    # 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 {
    true
    }
    
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos7)'
    search --no-floppy --fs-uuid --set=root 5712dc68-9f11-463e-8567-899d9de09eda
    if loadfont /usr/share/grub/unicode.pf2 ; then
      set gfxmode=auto
      load_video
      insmod gfxterm
    fi
    terminal_output gfxterm
    if [ "${recordfail}" = 1 ]; then
      set timeout=-1
    else
      set timeout=10
    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/10_linux ###
    if [ ${recordfail} != 1 ]; then
      if [ -e ${prefix}/gfxblacklist.txt ]; then
        if hwmatch ${prefix}/gfxblacklist.txt 3; then
          if [ ${match} = 0 ]; then
            set linux_gfx_mode=keep
          else
            set linux_gfx_mode=text
          fi
        else
          set linux_gfx_mode=text
        fi
      else
        set linux_gfx_mode=keep
      fi
    else
      set linux_gfx_mode=text
    fi
    export linux_gfx_mode
    if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
    ### END /etc/grub.d/10_linux ###
    
    ### BEGIN /etc/grub.d/20_linux_xen ###
    ### END /etc/grub.d/20_linux_xen ###
    
    ### BEGIN /etc/grub.d/20_memtest86+ ###
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    if [ "x${timeout}" != "x-1" ]; then
      if keystatus; then
        if keystatus --shift; then
          set timeout=-1
        else
          set timeout=0
        fi
      else
        if sleep --interruptible 3 ; then
          set timeout=0
        fi
      fi
    fi
    ### END /etc/grub.d/30_os-prober ###
    
    ### 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 ###
    --------------------------------------------------------------------------------
    
    =========================== sda7/boot/grub/grub.cfg: ===========================
    
    --------------------------------------------------------------------------------
    #
    # 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,msdos7)'
    search --no-floppy --fs-uuid --set=root 5712dc68-9f11-463e-8567-899d9de09eda
    if loadfont /usr/share/grub/unicode.pf2 ; then
      set gfxmode=640x480
      load_video
      insmod gfxterm
    fi
    terminal_output gfxterm
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos7)'
    search --no-floppy --fs-uuid --set=root 5712dc68-9f11-463e-8567-899d9de09eda
    set locale_dir=($root)/boot/grub/locale
    set lang=en_IN
    insmod gettext
    if [ "${recordfail}" = 1 ]; then
      set timeout=-1
    else
      set timeout=10
    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/10_linux ###
    if [ ${recordfail} != 1 ]; then
      if [ -e ${prefix}/gfxblacklist.txt ]; then
        if hwmatch ${prefix}/gfxblacklist.txt 3; then
          if [ ${match} = 0 ]; then
            set linux_gfx_mode=keep
          else
            set linux_gfx_mode=text
          fi
        else
          set linux_gfx_mode=text
        fi
      else
        set linux_gfx_mode=keep
      fi
    else
      set linux_gfx_mode=text
    fi
    export linux_gfx_mode
    if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
    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,msdos7)'
    	search --no-floppy --fs-uuid --set=root 5712dc68-9f11-463e-8567-899d9de09eda
    	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=5712dc68-9f11-463e-8567-899d9de09eda 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,msdos7)'
    	search --no-floppy --fs-uuid --set=root 5712dc68-9f11-463e-8567-899d9de09eda
    	echo	'Loading Linux 2.6.38-8-generic ...'
    	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=5712dc68-9f11-463e-8567-899d9de09eda ro single 
    	echo	'Loading initial ramdisk ...'
    	initrd	/boot/initrd.img-2.6.38-8-generic
    }
    ### END /etc/grub.d/10_linux ###
    
    ### BEGIN /etc/grub.d/20_linux_xen ###
    ### END /etc/grub.d/20_linux_xen ###
    
    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry "Memory test (memtest86+)" {
    	insmod part_msdos
    	insmod ext2
    	set root='(/dev/sda,msdos7)'
    	search --no-floppy --fs-uuid --set=root 5712dc68-9f11-463e-8567-899d9de09eda
    	linux16	/boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
    	insmod part_msdos
    	insmod ext2
    	set root='(/dev/sda,msdos7)'
    	search --no-floppy --fs-uuid --set=root 5712dc68-9f11-463e-8567-899d9de09eda
    	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    if [ "x${timeout}" != "x-1" ]; then
      if keystatus; then
        if keystatus --shift; then
          set timeout=-1
        else
          set timeout=0
        fi
      else
        if sleep --interruptible 3 ; then
          set timeout=0
        fi
      fi
    fi
    ### END /etc/grub.d/30_os-prober ###
    
    ### 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 ###
    --------------------------------------------------------------------------------
    
    =============================== sda7/etc/fstab: ================================
    
    --------------------------------------------------------------------------------
    # /etc/fstab: static file system information.
    #
    # Use 'blkid -o value -s UUID' to print the universally unique identifier
    # for a device; this may be used with UUID= as a more robust way to name
    # devices that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    nodev,noexec,nosuid 0       0
    /dev/sda7       /               ext4    errors=remount-ro 0       1
    /dev/sda1       none            swap    sw              0       0
    /dev/sda5       none            swap    sw              0       0
    /dev/sda6       none            swap    sw              0       0
    /dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
    --------------------------------------------------------------------------------
    
    =================== sda7: Location of files loaded by Grub: ====================
    
               GiB - GB             File                                 Fragment(s)
    
     454.730740547 = 488.263414784  boot/grub/core.img                             1
     434.654458046 = 466.706670592  boot/grub/grub.cfg                             1
     412.949322701 = 443.400958976  boot/initrd.img-2.6.38-8-generic               2
     454.729016304 = 488.261563392  boot/vmlinuz-2.6.38-8-generic                  1
     426.651982307 = 458.114077696  grub/core.img                                  1
     426.646592140 = 458.108290048  grub/grub.cfg                                  1
     412.949322701 = 443.400958976  initrd.img                                     2
     454.729016304 = 488.261563392  vmlinuz                                        1
    
    =============================== StdErr Messages: ===============================
    
    unlzma: Decoder error
    Please help me in finding that.

    Thanks in advance !
    Last edited by srujanabobba; September 13th, 2011 at 08:00 PM.

  2. #2
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Ubuntu and Win XP in partitions with no boot menu

    @srujanabobba, this is urgent.

    If you are in Ubuntu in your sda7 partition, open a terminal and run this command, now:

    Code:
    sudo swapoff -a
    You say that Windows is (was) on sda1. It is now a swap partition. It may be rescuable if you don't use it - hence the recommended command above. I'm posting quickly to give you this message. I will post more fully in a few minutes.
    Ubuntu 16.04 Desktop Guide - Ubuntu 14.04 Desktop Guide - Forum Guide to BBCode - IRC #ubuntuforums

    Member: Not Canonical Team

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  3. #3
    Join Date
    Jun 2011
    Location
    United Kingdom
    Beans
    Hidden!
    Distro
    Lubuntu Development Release

    Re: Ubuntu and Win XP in partitions with no boot menu

    Why is sdb windows, then?

  4. #4
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Ubuntu and Win XP in partitions with no boot menu

    Quote Originally Posted by MG&TL View Post
    Why is sdb windows, then?
    No boot files. My guess is that it is a data partition. You may be right, but I fear not. Let's get those swap partitions switched off before the OP does anything else.
    Ubuntu 16.04 Desktop Guide - Ubuntu 14.04 Desktop Guide - Forum Guide to BBCode - IRC #ubuntuforums

    Member: Not Canonical Team

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  5. #5
    Join Date
    Sep 2006
    Beans
    9

    Re: Ubuntu and Win XP in partitions with no boot menu

    Quote Originally Posted by coffeecat View Post
    @srujanabobba, this is urgent.

    If you are in Ubuntu in your sda7 partition, open a terminal and run this command, now:

    Code:
    sudo swapoff -a
    You say that Windows is (was) on sda1. It is now a swap partition. It may be rescuable if you don't use it - hence the recommended command above. I'm posting quickly to give you this message. I will post more fully in a few minutes.

    Thanks for a quick reply. I have executed the command.

  6. #6
    Join Date
    Sep 2006
    Beans
    9

    Re: Ubuntu and Win XP in partitions with no boot menu

    Quote Originally Posted by coffeecat View Post
    No boot files. My guess is that it is a data partition. You may be right, but I fear not. Let's get those swap partitions switched off before the OP does anything else.
    I am not sure about sdb. Sdb1 is a pen drive

  7. #7
    Join Date
    Aug 2007
    Location
    a puddle in Manchester
    Beans
    9,208
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Ubuntu and Win XP in partitions with no boot menu

    /dev/sdb looks like a flash drive
    MacBook Pro 10,1 retina

  8. #8
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Ubuntu and Win XP in partitions with no boot menu

    Quote Originally Posted by srujanabobba View Post
    I am not sure about sdb. Sdb1 is a pen drive
    Yes, you are quite right. It's 8GB, so it will be a flash drive and not your Windows partition.

    Ok next bit of rescue. You need to edit /etc/fstab in Ubuntu so that it does not mount sda1. Open a terminal, and:

    Code:
    gksudo gedit /etc/fstab
    Be careful when you edit this file. A mistake could make Ubuntu unbootable. This is your /etc/fstab contents:

    Code:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid -o value -s UUID' to print the universally unique identifier
    # for a device; this may be used with UUID= as a more robust way to name
    # devices that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    nodev,noexec,nosuid 0       0
    /dev/sda7       /               ext4    errors=remount-ro 0       1
    /dev/sda1       none            swap    sw              0       0
    /dev/sda5       none            swap    sw              0       0
    /dev/sda6       none            swap    sw              0       0
    /dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
    Have you already edited this, by the way? That's not how the Ubuntu installer would set it up. Anyway, edit the /dev/sda1 line so that it looks like:

    Code:
    #/dev/sda1       none            swap    sw              0       0
    Now reboot and you are safe to proceed.

    The next step would be to use testdisk to try to recover the Windows partition and I will get back to you on that. I will post in instalments because there is a lot else to say. I have also asked someone else to join in.

    EDIT: he has!
    Ubuntu 16.04 Desktop Guide - Ubuntu 14.04 Desktop Guide - Forum Guide to BBCode - IRC #ubuntuforums

    Member: Not Canonical Team

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  9. #9
    Join Date
    Sep 2006
    Beans
    9

    Re: Ubuntu and Win XP in partitions with no boot menu

    Quote Originally Posted by coffeecat View Post
    Have you already edited this, by the way? That's not how the Ubuntu installer would set it up. Anyway, edit the /dev/sda1 line so that it looks like:
    No. I didnt edited this file earlier. I have commented the sdb1 line now.

  10. #10
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Ubuntu and Win XP in partitions with no boot menu

    Quote Originally Posted by srujanabobba View Post
    No. I didnt edited this file earlier. I have commented the sdb1 line now.
    I hope you mean the sda1 line. That is the one you need to comment out. sda1 was (presumably) your Windows partition and is now one of your swap partitions. You need to prevent any writes to it.

    Quackers and I have had a brief discussion behind the scenes and we are agreed that testdisk is needed. This is a link that Quackers sent me:

    http://members.iinet.net.au/~herman546/p21.html

    And this is one I like to recommend:

    http://www.howtogeek.com/howto/15761...buntu-live-cd/

    I suggest that you read both before you do anything to get an idea of what needs to be done. Testdisk will scan your hard disk and offer to recover any deleted partitions it finds. You will have to hope that the NTFS filesystem that was in sda1 is undamaged.

    I'll post this now so that you can start reading those links. I have one other point to make, but I'll post that separately.
    Ubuntu 16.04 Desktop Guide - Ubuntu 14.04 Desktop Guide - Forum Guide to BBCode - IRC #ubuntuforums

    Member: Not Canonical Team

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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