How to boot linux kernel without bootloader?

Setting up dual-boot with Windows 2000 and Red Hat Linux

  • I would like to have the option of booting either Windows 2000 or Red Hat Linux WITHOUT the use of a floppy for the latter. The Gory Detail: I have successfully installed Windows 2000 (SP2) and Red Hat Linux 8.x on my computer, each on a separate hard drive. By default, the system will boot Windows 2000 (this is the desired behavior). I can run Red Hat if I boot off a floppy drive. It appears this should be the way to do a dual-boot system: 0. Install the operating systems -- this is done. 1. Create an image of the Linux boot 2. Copy it onto the Windows primary drive 3. Edit the Windows 2000 boot.ini. It's possible that I'm doing something wrong in steps 1 or 3. 1. For the boot image, from Window, I've tried this: dd if=e:\images\boot.img of=f:\bootsect.lin where boot.img is taken from the Red Hat CD-ROM. another online faq recommended, in linux mode: dd if=/dev/hdc1 of=/bootsect.lin bs=512 where /dev/hdc1 is the mount point of /boot. However, this is incorrect because /boot contains several files; the result of this command has been a 512-byte file. 2. I've not been able to mount an NTFS file system on Linux, so I've worked strictly via floppy. (How do I mount an NTFS-formatted file system on Linux? 3. When editing the boot.ini file on windows 2000, I do the following: f: attrib -s -h boot.ini vi boot.ini These is what boot.ini looks like: [boot loader] timeout=5 default=multi(0)disk(0)rdisk(0)partition(1)\WINNT [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Professional" /fastdetect multi(0)disk(0)rdisk(0)partition(1)\bootsect.lin="Red Hat Linux" F:\bootsect.lin="Red Hat Linux - F drive" Followed by: attrib +s +h boot.ini The default option is to boot Windows 2000; this works great. If I try either of the other two variants, I see: "Windows 2000 could not start because the following file is missing or corrupt" ... "ntoskrnl.exe" Is this the best way to do it? What am I doing wrong? Configuration detail (perhaps TMI): Software: Windows 2000, SP2 Installed on internal hard drive, partitions f:, g:, h: and i: Red Hat Linux 8.0 (kernel 2.4.18-14) Installed on modular bay hard drive, partitions /boot, / and swap Hardware: Dell Latitude 800 laptop, 1Ghz, 512Mb, 32Mb color card. This computer has an internal drive, an internal media drive, and a modular bay. The internal drive: 60Gb, four partitions, Windows 2000 installed Internal media drive: CD-RW, mounted as device e: (W2k) or /mnt/cdrom (Linux) Modular bay hard drive: 20Gb, three partitions, Red Hat Linux 8.0 installed At times, the modular bay hard drive may be swapped out with a second battery, DVD, or floppy. Obviously when this happens, I don't intend to be running Linux. I have two docking stations, one with a modular bay that will support a floppy or CD-ROM. (The bus speed is too slow for a DVD, which is beyond the scope of this question.)

  • Answer:

    You gave up too soon with your 512-byte file. You aren't copying a file from your boot partition, you're copying the boot *sector*, which is a mere 512 bytes long. I've done what you're trying to do, so take heart - it can be done. Your 'dd if=/dev/hdc1 of=/bootsect.lin bs=512 count=1' is right - this will give you a file called bootsect.lin at the root of your filesystem. It will contain your boot sector which points to the begining of the OS. Copy this file somewhere on your Windows hard drive so Windows can use it. Mounting an NTFS filesystem under linux is problematic at best, and as far as I know only reading is supported as yet. Stick the file on a FAT-formatted floppy to get it to Windows if necessary. If you have copied bootsect.lin to f:\, then your boot.ini file should work (it does for me, though I'm using c:\, not f:\...) If this still doesn't work, let me know what exactly is going wrong and I'll try to duplicate it on my machine. Best of luck, -Haversian

illuminati-ga at Google Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.