LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   trying to boot linux from windows boot loader (https://www.linuxquestions.org/questions/linux-general-1/trying-to-boot-linux-from-windows-boot-loader-444353/)

monkey_eater 05-13-2006 04:46 AM

trying to boot linux from windows boot loader
 
hello

Im new to linux, Any way trying to get my dual boot (windows server 2003 and Fedora 4) to boot off the windows boot loader'

system setup like this

MBR - current boot loader GRUB

hda1 = windows
hda2 = / fedora
hda3 = /home
swap
hda6 vfat(fat32)

i mount the hda6 then use the

"dd if=/dev/hda2 of=/mnt/hda6/fedora.bin bs=512 count=1"
creates the file
then go in to windows edit the boot.ini
G:\ferdora.bin "Fedora"

so i boot the system, i havent deleted grub yet coz i want to be sure the it will work first. So i use grub to go to the chain loader select the fedora and nothing happens, well some error message.

i did this before using a system that all ready was setup with the same software that i didnt setup myself and it worked fine.

Can some one help me or even give a different way this can be achived.

Thank you all!

SkyEye 05-13-2006 05:15 AM

You are creating a copy of the whole Linux file system (partition) on a Windows partition. That's not required as far as I've done. Try
Code:

dd if=/dev/hda2 of=/mnt/hda6/fedora.bin bs=512 count=1
instead. This command only gets the first 512b from the Linux file system.

This thing worked for LILO. I never tried to use Windows boot manager when I was using GRUB. But I guess this works too. (I haven't looked into GRUB internels yet)

monkey_eater 05-13-2006 05:19 AM

sorry i did have the 'bs=512 count=1' in the line of code just for got to add it.

SkyEye 05-13-2006 05:25 AM

Well, what was the error message?

Being more descriptive can help us for helping you :-)

pixellany 05-13-2006 08:11 AM

I dont understand what your dd command is supposed to be doing. If you wanted to copy the mbr, you would not use a partition number---you want the 1st 512 bytes of the **disk**--not of the 1st partition.
eg: "dd if=/dev/hda of=<pathtofile> etc"

Actually, note that grub is really the first 446 bytes (after that is a 64-byte partition table, and then the 2-byte "signature") Do if you just want grub, use bs=446

SkyEye 05-13-2006 11:10 PM

Quote:

Originally Posted by pixellany
Actually, note that grub is really the first 446 bytes (after that is a 64-byte partition table, and then the 2-byte "signature") Do if you just want grub, use bs=446

That's why I said I haven't looked into GRUB internals. Well, here's someone who did..

michaelk 05-14-2006 08:01 AM

Was grub ever installed at hda2?

FYI Using window boot.ini to boot grub.
http://www.geocities.com/epark/linux...w2k-HOWTO.html

In your case since you do not have a seperate /boot you would install grub to hda2.

saikee 05-14-2006 01:06 PM

Have a look at Task E4 of the last link of my signature.

I think it will work out. That you can use the existing Grub to boot to Window. In Window's NTLDR it lists itself and Linux so that you can boot to either there. Once you are happy with it you can restore Windows's MBR (Task B1 or B2 of the same link) and overwriting Grub at the same time.

Using Windows NTLRD you need to copy the file "fedora.bin", created in Linux using the dd command, into the "C" drive of your XP or Win2k.

Basically NTLRD does not support Linux and so can't (or won't) read a Linux partition to find its boot loader for chainloading. A user must round up each Linux's first 512 bytes of the Linux partition (the boot loader) and copies into the Windows partition for NTLRD to use. It is a pain in the ar?e because Linux can't write on NTFS partition and so "fedora.bin" has to be transfer into a floppy or a Dos partition first and fetched into XP or Win2k later. Editing "boot.ini" also need it to be "unhide" first and "hide" it on completion.

Personally I would stick with Grub or make a bootable Grub floppy or Grub CD to boot the PC. There is no PC system that cannot be booted by a Grub floppy so why bother with NTLRD?

Bobymc 05-15-2006 07:54 AM

My pardon;
Speaking of GRUB ,

I have Java system(SUSE) wich is the 'GRUB' of FEDORA 'GRUB' on those GRUB contain WINDOZE.

Those 3 system of mine works fine on 1 drive.
No floppy/'tweaking' at the beginning of the world, just plain install.

Sorry to ask what are you guys getting at 'on the GRUB'?.

Bobymc 05-16-2006 09:05 AM

Saike is brilliant.

Let's skip the FLOPPY.

I boot Windoze from compact Flash, why not make bootable GRUB on the CompactFlash.

It's very fast, I guarantee.

Regards

saikee 05-16-2006 01:00 PM

Just like the Linux kernel the boot loaders like Grub or Lilo requires a fast response similar to that from a hard disk. USB devices are limited by the USB transmission rate and this causes the standard kernel to panic and the boot loader to hang if a system is booted from a USB device.

A slower bootloader is often used to boot a USB device.


All times are GMT -5. The time now is 10:04 PM.