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

Thread: Add sub-entries to GRUB

  1. #1
    Join Date
    Dec 2008
    Beans
    13

    Add sub-entries to GRUB

    Hello everyone,

    I am currently triple-booting, XP-32, Windows 7 64-bit, and Ubuntu 9.04.

    I had 7 and XP installed with 7 as my default OS to load. After installing Ubuntu, GRUB took over which is normal.

    Now I only have one entry in GRUB saying Windows Vista (loader). If I press enter with it highlighted, I can see the sub-entries (Windows 7 and Windows XP).

    What I would like to do is have GRUB include these sub-entried in its initial display without having to go through "Windows Vista (loader)" and then choose.

    I will really appreciate your help and I am willing to supply all information needed.

    Thank you,

  2. #2
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Add sub-entries to GRUB

    You cannot easily, grub just chainboots to a working windows normally with the boot flag on:

    Vista/win7 copies boot manager to one
    http://members.iinet.net/~herman546/...MGR_is_missing
    Moral of the story - look on other NTFS partitions for the missing bootmgr and Boot directory.

    Windows combines its boot loaders so you can choose which to boot. Some boot files are moved from the second install to the first. If installing the second windows there is a work around but once installed I do not know if you can separately repair them and get the same result. You could try moving the boot flag and running the repairs on each windows separately check that it boots ok by itself, then reinstall grub.

    To get each MS to have its own boot loader make a partition and set its boot flag on, then install the 2nd product in it. Multibooters, Pictures here worth 1000+ words
    http://www.multibooters.co.uk/multiboot.html
    A user who installed two windows & it worked to boot from grub directly
    http://ubuntuforums.org/showthread.php?t=1271600
    For info on UEFI boot install & repair - Updated Mar 2015:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  3. #3
    Join Date
    Apr 2008
    Beans
    3,317
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: Add sub-entries to GRUB

    Edit: The same instruction work for Windows 7. Just replace Vista by "Window7" everywhere.

    Try this
    Boot into Vista.

    Step 1 Edit the Vista boot loader

    Go to "Start". Type "cmd" and press "Ctrl+Shift+Enter". This will open a Vista commandline as an administrator. Type

    Code:
      
    bcdedit /set {bootmgr} device boot
    bcdedit /set {bootmgr} timeout 0
    bcdedit /delete {ntldr} /f
    (don't close the command line)

    Step 2 Fix the XP bootsector.

    Insert your Vista DVD in the DVD drive and wait for a few second. (If you don't have a Vista DVD/CD let me know and I can show you different ways to accomplish this step)
    At the command line:
    Code:
    E:\boot\bootsect  /nt52 D: /force
    Here "E" needs to be replaced by the drive letter of your DVD drive and "D" by the drive letter of your XP partition. (Just look in "My Computer" to determine the drive letters. Even if you know the drive letters, I suggest to double check. Vista and XP probably use different drive letters. You need to use the drive letters used by Vista)


    Boot into Ubuntu.
    and open a terminal (Applications->Accessories->Terminal)


    Step 3 Add Vista to "menu.lst"

    Open menu.lst via


    Code:
    gksudo gedit /boot/grub/menu.lst
    Your current entry for Vista will later actually boot XP. So you might want to edit the title. Also you should create a similar entry for Vista. (if you need help with that post the output of "sudo fdisk -lu")



    Step 4 Move the boot files from XP to Vista

    Type

    Code:
     sudo fdisk -lu
    and determine the device name of the XP partition and the device name of the Vista parition.
    In the following I assume that XP is on /dev/sda1 and Vista is on /dev/sda2.

    Code:
     sudo mkdir /mnt/{XP,Vista}
    sudo mount /dev/sda1 /mnt/XP
    sudo mount /dev/sda2 /mnt/Win
    sudo mv /mnt/XP/{Boot,bootmgr} /mnt/Vista
    Of course you need to replace /dev/sda1 by the device name of the XP partition and /dev/sda2 by the device name of the Vista partition.
    Sometimes the directory Boot is called BOOT instead. Use "ls -l /mnt/XP" to determine the correct spelling.


    Reboot and hopefully you will be able to boot into all your OSs from the Grub menu.
    Last edited by meierfra.; December 23rd, 2009 at 04:04 PM.

  4. #4
    Join Date
    Dec 2008
    Beans
    13

    Re: Add sub-entries to GRUB

    @ meierfra.

    As mentioned in my thread I have Windows 7 installed and not VISTA.

    Would your instructions still apply or some modifications are needed to be suitable for 7?

    Thank you,

  5. #5
    Join Date
    Apr 2008
    Beans
    3,317
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: Add sub-entries to GRUB

    Sorry, I got confused with the "Windows Vista (loader)". But the same instructions work for Windows 7.

  6. #6
    Join Date
    Dec 2008
    Beans
    13

    Re: Add sub-entries to GRUB

    I do not know which of your commands caused it, but one of my hard drive shows as RAW in Windows now. I am in the process of recovering.

    I highly suggest you look into your books since something is majorly wrong!!

  7. #7
    Join Date
    Apr 2008
    Beans
    3,317
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: Add sub-entries to GRUB

    I never had any problems with these instruction before (and I used them several times). Did you use the wrong drive for "E:\boot\bootsect /nt52 D: /force"?

    If you would like some help recovering, boot into ubuntu, run the boot info script

    http://ubuntuforums.org/showthread.php?t=1291280

    and post the RESULTS.txt

    What partition is showing as raw? Are you able to boot into all your OS's?
    Last edited by meierfra.; December 24th, 2009 at 12:43 AM.

  8. #8
    Join Date
    Dec 2008
    Beans
    13

    Re: Add sub-entries to GRUB

    I was not wrong about drive letters. I double checked before proceeding. I am not sure why it happened.

    I am using GetDataBack for NTFS right now to copy all my data to another HD before reformatting. I trying TestDisk first with no luck. It was not able to find anything.

    An entire second HD is showing as raw. It is a 750GB HD that I use for data storage. After your instructions, I can boot either XP or 7 but not both depending on which one I repair.

  9. #9
    Join Date
    Apr 2008
    Beans
    3,317
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: Add sub-entries to GRUB

    Could you run the boot info script so that I can figure out what is going on?
    Last edited by meierfra.; December 24th, 2009 at 01:05 AM.

  10. #10
    Join Date
    Dec 2008
    Beans
    13

    Re: Add sub-entries to GRUB

    Quote Originally Posted by meierfra. View Post
    Could you run the boot info script so that I can figure out what is going on?
    I have to wait for the other software to finish analysis.

    How exactly can I run the boot info script?

    Thank you,

Page 1 of 2 12 LastLast

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
  •