7

Possible Duplicate:
Is it possible to boot Ubuntu using the Windows bootloader?

I have installed Ubuntu 12.04 Alpha 2 on a partition separate partition from Windows and was wanting to know how to add the OS to the boot.ini so I can boot into Ubuntu.

3 Answers3

3

Windows XP? Well...

This has been working since the early days of NT4:

  • boot into your linux
  • mount your Windows boot drive R/W to /media/fat
  • perform dd if=/dev/sdxY of=/media/fat/linux.bin bs=512 count=1 as root, replace sdxY with your linux partition
  • edit your boot.ini to look like mine:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(5)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(5)\WINDOWS="Microsoft Windows XP Professional" /NOEXECUTE=OPTIN /FASTDETECT
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Professional (Safe mode)" /BASEVIDEO /SOS
c:\CMDCONS\BOOTSECT.DAT="Microsoft Windows XP recovery console" /CMDCONS
c:\linux.bin="Grub (loader)" 

Your results may vary: Grub2 might need downgrading to Grub 1.x for this to work.

aquaherd
  • 6,220
  • Will this work if your Windows XP drive uses NTFS? (yes I still "use" XP...I'm more of a Mac + Linux user now but still have my old machine) – Sridhar Sarnobat Dec 07 '21 at 03:42
  • just try it - you are copying a file of 512 bytes to the root directory c:.

    If ntfs is not mountable from linux, copy it to a FAT-formatted usb-stick, then boot windows and copy it.

    – aquaherd Dec 07 '21 at 16:37
  • It did. I later realized that you are creating a file on the file system so once it's mounted it doesn't matter what the type is. – Sridhar Sarnobat Dec 07 '21 at 17:13
  • 1
    @aquaherd Thanks! I knew it worked like that but couldnt remember the details and spent like an hour googling superfluous approaches till I finally found your answer. Booting Haiku OS from NT loader to dualboot haiku and the original OS. – Florian Heigl May 30 '23 at 01:15
0

You don't add Ubuntu to boot.ini. You add a windows partition to grub.

If you must do it, it is described here for implementations with bitlocker and TPM.

RobotHumans
  • 29,530
0

I use EasyBCD (because i have trouble installing GRUB on a EFI motherboard with fakeraid). There is a free version for noncommercial use at the bottom of the page.

As far as I remember, i set up the windows boot loader to chainload grub. There is a automatic method in EasyBCD, but it didn't work for me.

Instead I made it boot into a legacy GRUB with the following menu.lst:

# NeoSmart NeoGrub Bootloader Configuration File
#
# This is the NeoGrub configuration file, and should be located at C:\NST\menu.lst
# Please see the EasyBCD Documentation for information on how to create/modify entries:
# http://neosmart.net/wiki/display/EBCD/

# Boot automatically after 0 secs.
timeout 0

# By default, boot the first entry.
default 0

title (hd0,4)
root (hd0,4)
kernel /vmlinuz root=UUID=5827fd40-9b04-4f8a-bb0f-df1612670d89 ro
initrd /initrd.img

Note: (hd0,4) means that my root partition is on /dev/sda5. UUID=X is the uuid of this volume. You can find this with sudo blkid.