Results 1 to 3 of 3

Thread: adding a xp partition in grub2

  1. #1
    Join Date
    Mar 2009
    Location
    India
    Beans
    233
    Distro
    Ubuntu 14.04 Trusty Tahr

    adding a xp partition in grub2

    hey guys i had ubuntu and slackware installed together for a while, i just needed xp to do some native language work so i installed it on my extra partition but then i messed up the grub menu, however i reinstalled it from live cd.. but now the problem is i dont know how to add a xp in that.

    i'll give you my fdisk -ls output :

    /dev/sda1 1 12803 102840066 83 Linux
    /dev/sda2 12804 14267 11759580 83 Linux
    /dev/sda3 14268 15035 6168960 82 Linux swap / Solaris
    /dev/sda4 * 15036 19457 35519715 7 HPFS/NTFS
    also the boot info :
    Code:
                      Boot Info Script 0.60    from 17 May 2011
    
    
    ============================= Boot Info Summary: ===============================
    
     => Grub2 (v1.97-1.98) 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 in partition 2 for (,msdos2)/boot/grub.
    
    sda1: __________________________________________________________________________
    
        File system:       ext4
        Boot sector type:  -
        Boot sector info:  
        Operating System:  
        Boot files:        
    
    sda2: __________________________________________________________________________
    
        File system:       ext4
        Boot sector type:  -
        Boot sector info:  
        Operating System:  Ubuntu 10.10
        Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
    
    sda3: __________________________________________________________________________
    
        File system:       swap
        Boot sector type:  -
        Boot sector info:  
    
    sda4: __________________________________________________________________________
    
        File system:       ntfs
        Boot sector type:  Windows XP
        Boot sector info:   No errors found in the Boot Parameter Block.
        Operating System:  Windows XP
        Boot files:        /boot.ini /ntldr /NTDETECT.COM
    
    ============================ Drive/Partition Info: =============================
    
    Drive: sda _____________________________________________________________________
    
    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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   205,680,194   205,680,132  83 Linux
    /dev/sda2         205,680,195   229,199,354    23,519,160  83 Linux
    /dev/sda3         229,199,355   241,537,274    12,337,920  82 Linux swap / Solaris
    /dev/sda4    *    241,537,275   312,576,704    71,039,430   7 NTFS / exFAT / HPFS
    
    
    "blkid" output: ________________________________________________________________
    
    Device           UUID                                   TYPE       LABEL
    
    /dev/ramzswap0                                          swap       
    /dev/sda1        23938b22-c9ae-4c49-8b67-0e6763f3d7af   ext4       
    /dev/sda2        dcc27a67-9124-47ff-924d-a1a33b6d9e23   ext4       
    /dev/sda3        249b5ce6-4d8a-4e56-a48d-4b2666e9e9be   swap       
    /dev/sda4        828858028857F2E1                       ntfs       
    
    ================================ Mount points: =================================
    
    Device           Mount_Point              Type       Options
    
    /dev/sda1        /home                    ext4       (rw,commit=0)
    /dev/sda2        /                        ext4       (rw,errors=remount-ro,commit=0)
    
    
    =========================== sda2/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 part_msdos
    insmod ext2
    set root='(hd0,msdos2)'
    search --no-floppy --fs-uuid --set dcc27a67-9124-47ff-924d-a1a33b6d9e23
    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='(hd0,msdos2)'
    search --no-floppy --fs-uuid --set dcc27a67-9124-47ff-924d-a1a33b6d9e23
    set locale_dir=($root)/boot/grub/locale
    set lang=en
    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
    ### END /etc/grub.d/05_debian_theme ###
    
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos2)'
        search --no-floppy --fs-uuid --set dcc27a67-9124-47ff-924d-a1a33b6d9e23
        linux    /boot/vmlinuz-2.6.35-22-generic root=UUID=dcc27a67-9124-47ff-924d-a1a33b6d9e23 ro   quiet splash
        initrd    /boot/initrd.img-2.6.35-22-generic
    }
    menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos2)'
        search --no-floppy --fs-uuid --set dcc27a67-9124-47ff-924d-a1a33b6d9e23
        echo    'Loading Linux 2.6.35-22-generic ...'
        linux    /boot/vmlinuz-2.6.35-22-generic root=UUID=dcc27a67-9124-47ff-924d-a1a33b6d9e23 ro single 
        echo    'Loading initial ramdisk ...'
        initrd    /boot/initrd.img-2.6.35-22-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='(hd0,msdos2)'
        search --no-floppy --fs-uuid --set dcc27a67-9124-47ff-924d-a1a33b6d9e23
        linux16    /boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos2)'
        search --no-floppy --fs-uuid --set dcc27a67-9124-47ff-924d-a1a33b6d9e23
        linux16    /boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry "Linux (on /dev/sda4)" {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos4)'
        search --no-floppy --fs-uuid --set 276c9a29-8d79-477d-8558-5c4df725d07d
        linux /boot/vmlinuz root=/dev/sda4 ro  vt.default_utf8=0 vga = 773
    }
    ### 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 ###
    --------------------------------------------------------------------------------
    
    =============================== sda2/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
    # / was on /dev/sda2 during installation
    UUID=dcc27a67-9124-47ff-924d-a1a33b6d9e23 /               ext4    errors=remount-ro 0       1
    # /home was on /dev/sda1 during installation
    UUID=23938b22-c9ae-4c49-8b67-0e6763f3d7af /home           ext4    defaults        0       2
    # swap was on /dev/sda3 during installation
    UUID=249b5ce6-4d8a-4e56-a48d-4b2666e9e9be none            swap    sw              0       0
    --------------------------------------------------------------------------------
    
    =================== sda2: Location of files loaded by Grub: ====================
    
               GiB - GB             File                                 Fragment(s)
    
     101.931451321 = 109.448062464  boot/grub/core.img                             1
     100.033288479 = 107.409925632  boot/grub/grub.cfg                             1
     102.021272182 = 109.544506880  boot/initrd.img-2.6.35-22-generic              3
     101.991933346 = 109.513004544  boot/vmlinuz-2.6.35-22-generic                 2
     102.021272182 = 109.544506880  initrd.img                                     3
     101.991933346 = 109.513004544  vmlinuz                                        2
    
    ================================ sda4/boot.ini: ================================
    
    --------------------------------------------------------------------------------
    [boot loader]
    
    timeout=30
    
    default=multi(0)disk(0)rdisk(0)partition(4)\WINDOWS
    
    [operating systems]
    
    multi(0)disk(0)rdisk(0)partition(4)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
    
    --------------------------------------------------------------------------------
    so anybody please help me i need to submit the work after two days !! or i'm screwed ! ( i know i shouldnt mess with my machine but i thought its like old times when you only have to update the menu.list !! .. its been a while since i dual-booted linux with xp..)

    Thank you.
    Last edited by Elfy; June 5th, 2011 at 09:12 AM. Reason: quote to code change
    "Well son, the first thing you can do is - stop complaining." - Dad with love.
    Question Everything !!!

  2. #2
    Join Date
    May 2007
    Location
    The New Forest
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: adding a xp partition in grub2

    Try

    Code:
    sudo update-grub

  3. #3
    Join Date
    Mar 2009
    Location
    India
    Beans
    233
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: adding a xp partition in grub2

    Quote Originally Posted by forestpiskie View Post
    Try

    Code:
    sudo update-grub
    oh thanks !!! i thought updating grub wont work cause its grub2 .. but again i m a dumba** ! lol.
    "Well son, the first thing you can do is - stop complaining." - Dad with love.
    Question Everything !!!

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
  •