| View previous topic :: View next topic |
| Author |
Message |
Helena Veteran


Joined: 02 Apr 2003 Posts: 1035 Location: Den Dolder, The Netherlands
|
Posted: Tue Mar 16, 2004 12:41 pm Post subject: Mini-How-To: boot Linux from within Windows |
|
|
This guide is experimental - use at your own risk
Version 0.1, date: 2004-03-16
This tip helps you to boot Linux from within Windows. You may use this if you don't want to install GRUB in the primary HD's Master Boot Record (MBR) and you don't want to use another bootloader (e.g. Powerquest's BootMagic).
NOTE: I have borrowed this trick some time ago and I cannot remember the location where I found it. As soon as I find it I'll mention it here.
1. Introduction
The Gentoo installation handbook suggests to install GRUB in the MBR. However, there are occasions when you don't want to do that. Fortunately, you can install GRUB into the boot record of the /boot-partition; however then you need another method to get started. If said /boot-partition is a primary partition and also the active partition, the system will do that for you and you can skip reading this how-to. If, as many people do, you are dual-booting with Windows, some effort is necessary. This how-to assumes you have Windows 2000/XP on your first hard disk; an excellent thread about dual-booting Windows from the second hard disk can be found here: https://forums.gentoo.org/viewtopic.php?t=18319. Also, for clarity we will assume the hard disk is an ordinary IDE/ATAPI disk, for serial ATA or RAID some minor modifications are necessary.
2. Modify the GRUB installation
When it comes to installing GRUB (http://www.gentoo.org/doc/en/handbook/handbook.xml?part=1&chap=9#doc_chap2) modify according to this: | Code: | grub> root (hd0,2)
grub> setup (hd0,2)
grub> quit | if e.g. your boot-partition is /dev/hda3.
3. Prepare Windows
Now, immediately save a copy of the partition boot record with | Code: | | dd if=/dev/hda3 of=bootsect.lnx bs=512 count=1 | Save the file "bootsect.lnx" to a place where you can access it from Windows, e.g. a floppy disk; I always use a FAT32 partition to this end. Now reboot into Windows. Copy the file "bootsect.lnx" to the root of the C:-partition.
4. Modify the Windows boot menu
Windows 2000/XP use a hidden read-only file describing possible O/S-es to start. This file is called C:\boot.ini, and is a simple text file. From Windows XP, it's easy to edit this file: just right-click on "My Computer" and choose "Properties". Select the "Advanced" tab and "Startup and Recovery / Settings". Here you will find an "Edit" button. Under Windows 2000, you will have to manually unlock this file, which is done easiest from Windows Explorer (remember to set Folder options to show hidden files first!). Add the following line to boot.ini: | Code: | | C:\bootsect.lnx="Gentoo Linux" | Character case and the text between the quotes are unimportant. You may also want to set the time to display this menu to something like 10 seconds. Now exit and save the modifed file and reboot.
Last edited by Helena on Tue Mar 16, 2004 12:58 pm; edited 2 times in total |
|
| Back to top |
|
 |
bmichaelsen Veteran


Joined: 17 Nov 2002 Posts: 1276 Location: Hamburg, Germany
|
|
| Back to top |
|
 |
Helena Veteran


Joined: 02 Apr 2003 Posts: 1035 Location: Den Dolder, The Netherlands
|
Posted: Tue Mar 16, 2004 12:57 pm Post subject: |
|
|
| Thanks for the tip, I didn't know about that. How does this compare to the forum? |
|
| Back to top |
|
 |
bmichaelsen Veteran


Joined: 17 Nov 2002 Posts: 1276 Location: Hamburg, Germany
|
Posted: Tue Mar 16, 2004 1:00 pm Post subject: |
|
|
| Quote: | | How does this compare to the forum? |
The hope is people are aware of it even if your post is older than a month.
And can easier be updated and maintained. _________________ etc-proposals, your friendly config file updater! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|