如是觀齋


此心本真如,妄想始蔽覆,顛倒無明,長淪生死,猶盲人夜行,永不見日。業相既起,境界為緣,業起緣生,重重束縛,何有自在?
須知體即法身,相即般若,用即解脫,若止觀則成定慧,定慧以明心,德相圓矣!

2007年11月7日 星期三

How to dual boot Ubuntu and Windows XP without changing the Windows MBR

(轉載文章,網址已忘。經實驗發現方法未必可行,詳情參考本站文章「如何在筆記型電腦外接式硬碟第二分割區中Live安裝Ubuntu 7.10」及「如何在筆記型電腦外接式硬碟第二分割區中Live安裝Ubuntu 7.10 續篇」)
--------------------------------------------------------------------------------

How to dual boot Windows and linux without changing the Windows Master Boot Record:

(I'm assuming you've read other FAQs on how to install linux to your partition of choice. I recommend creating a partition on a second hard drive. That's the risk free option if you don't want to destoy Windows on your primary partition. But you should be able to create a partition on your primary hard drive by using software that can non-detructively resize your Windows partition. QTParted is a good program which can be downloaded if you're running the ubunut live CD. Back up though. It doesn't always work. I don't think the partition resizer in the ubuntu installer can do non-destructive.)

When installing ubuntu, install the boot loader (GRUB) to a floppy disk instead of the MBR. ie. when prompted for grub location enter: /dev/fd0

Boot into ubuntu with the floppy.

Open a terminal window.

Copy your bootloader from the floppy to a file called bootsect.lnx with this command:
dd if=/dev/fd0 of=bootsect.lnx bs=512 count=1

Save that file somewhere that you can access from within Windows. ie a FAT partition, a USB drive, a floppy (but not your boot floppy!) Don't try saving it to an NTFS Windows XP partition from within linux. (Bad!)

Reboot into Windows. (hint: take the floppy out of the drive. Keep it somewhere as a rescue boot floppy.)

Copy bootsect.lnx from wherever you had stored it to c:\bootsect.lnx

Open a file called c:\boot.ini
(It's normally a hidden read-only file, so you may have to change the folder and file options.)

After opening boot.ini add the following line to the end of it and save it:
c:\bootsect.lnx=”Linux”

Reboot your system.

You will be prompted to boot either Windows or Linux and your MBR hasn't been changed at all!

It's magic!
I use this setup to boot ubuntu from the third partition of my second hard drive. As ubuntu is on a second drive I haven't made any changes to my Windows partition at all! Risk free.

(If you do screw up your MBR and can't get into Windows try booting your Windows rescue CD and then type 'fdisk /mbr' to restore it. If you already have ubuntu installed I think you can make a boot floppy this way, but I"m not 100% certain: In a console, type grub-intall /dev/fd0.)

0 個意見:

張貼留言

訂閱 張貼留言 [Atom]

<< 首頁