Hi all, I'd like to deploy a solution with dual-booting systems where CentOS 5.3 is already installed and WinXP will be installed to a separate disk. I found http://apcmag.com/how_to_dual_boot_linux_and_windows_xp_linux_installed_first.htm?page=1 and it seems straight forward enough, although the description is for Ubuntu. The problem as I see it, is that the how-to differs from how CentOS looks in /etc/grub.conf and the boot-loader in Ubuntu with respect to making grub work again after the Windows install. I found Tldp.org mentioning dual-boot plenty, but most or all articles listed are using lilo as a boot-loader, which seems a bit obsolete and besides I can't quite translate the instructions from lilo to grub. 8-/ Basically, what would I need to change in the how-to from apcmag.com above?? Thanks for any pointers. -- BW, Sorin ----------------------------------------------------------- # Sorin Srbu [Sysadmin, Systems Engineer] # Dept of Medicinal Chemistry, Phone: +46 (0)18-4714482 >3 signals> GSM # Div of Org Pharm Chem, Mobile: +46 (0)701-718023 # Box 574, Uppsala University, Fax: +46 (0)18-4714482 # SE-751 23 Uppsala, Sweden Visit: BMC, Husargatan 3, D5:512b # Web: http://www.orgfarm.uu.se ----------------------------------------------------------- # () ASCII ribbon campaign - Against html E-mail # /\ # # MotD follows: # CentOS: When you need Enterprise uptime, without Enterprise pricing. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 5106 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20090416/1f9f2040/attachment-0002.bin>
>-----Original Message----- >From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] OnBehalf>Of Sorin Srbu >Sent: Thursday, April 16, 2009 2:09 PM >To: 'CentOS mailing list' >Subject: [CentOS] Dual-boot with WinXP, CentOS already installed > >I'd like to deploy a solution with dual-booting systems where CentOS 5.3 is >already installed and WinXP will be installed to a separate disk. > >I found >http://apcmag.com/how_to_dual_boot_linux_and_windows_xp_linux_installed_first.htm?page=1>and it seems straight forward enough, although the description is forUbuntu.> >The problem as I see it, is that the how-to differs from how CentOS looksin>/etc/grub.conf and the boot-loader in Ubuntu with respect to making grubwork>again after the Windows install.Googled some more. Realised /boot/grub/menu.lst *is* /etc/grub.conf... Duh! Also some people say it's better to have Windows installed to the first harddrive and the first partition (so that C: is the where it should be on 1st hd/1st partition). Would I be better off disconnecting the drive containing CentOS and reconnect it when I'm done installing Windows. Then boot with CentOS rescue and reinstall grub to the Windows-hd MBR? -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 5106 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20090416/791cc88f/attachment-0002.bin>
Kai Schaetzl
2009-Apr-16 13:31 UTC
[CentOS] Dual-boot with WinXP, CentOS already installed
Sorin Srbu wrote on Thu, 16 Apr 2009 14:08:57 +0200:> Basically, what would I need to change in the how-to from apcmag.com above??It's like that tutorial says. Forget about backing up grub.conf. This is nonsense. You want to make a backup before changing it, just in case, but not because of the XP installation. After the installation you have to reinstall grub with "grub-install" (from a live disk) and add the chainloader stuff to grub.conf. mount /dev/sda2 /mnt/linux (if that is where you linux resides) grub-install --root-directory=/mnt/linux /dev/sda (if you want to install it to the partition use sda2 instead of sda, then the partition has to be active, so that you can boot from it) Instead of using grub-install you can backup the mbr before the installation and then restore it afterwards. You can easily get bad results from that if you mistype, though. Kai -- Kai Sch?tzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com
Kai Schaetzl
2009-Apr-16 14:32 UTC
[CentOS] Dual-boot with WinXP, CentOS already installed
Sorin Srbu wrote on Thu, 16 Apr 2009 14:35:40 +0200:> Googled some more. Realised /boot/grub/menu.lst *is* /etc/grub.conf... Duh!You want to change /boot/grub/grub.conf, nothing else !> > Also some people say it's better to have Windows installed to the first > harddrive and the first partition (so that C: is the where it should be on > 1st hd/1st partition).Doesn't matter.> > Would I be better off disconnecting the drive containing CentOS and > reconnect it when I'm done installing Windows. Then boot with CentOS rescue > and reinstall grub to the Windows-hd MBR?Why? If you want to put them on separate *hardware* then you don't have to reinstall anything. Just make sure that the CentOS drive is the first boot drive. Kai -- Kai Sch?tzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com
David G. Miller
2009-Apr-16 17:32 UTC
[CentOS] Dual-boot with WinXP, CentOS already installed
"Sorin Srbu" <sorin.srbu at orgfarm.uu.se> wrote:> Hi all, > > I'd like to deploy a solution with dual-booting systems where CentOS 5.3 is > already installed and WinXP will be installed to a separate disk. > > I found > http://apcmag.com/how_to_dual_boot_linux_and_windows_xp_linux_installed_first.htm?page=1 > and it seems straight forward enough, although the description is for Ubuntu. > > The problem as I see it, is that the how-to differs from how CentOS looks in > /etc/grub.conf and the boot-loader in Ubuntu with respect to making grub work > again after the Windows install. > > I found Tldp.org mentioning dual-boot plenty, but most or all articles listed > are using lilo as a boot-loader, which seems a bit obsolete and besides I > can't quite translate the instructions from lilo to grub. 8-/ > > Basically, what would I need to change in the how-to from apcmag.com above?? > Thanks for any pointers.As noted in other replies, Windows not not play well with anything else. Your best bet would be to disable/remove/disconnect the drive with CentOS and then do the Windows install to the other drive. Once Windows is installed, you can reconnect the CentOS drive and then easily edit grub.conf to boot Windows using the "chainloader" directive. This approach will only work if there are no primary partitions on the CentOS drive that Windows recognizes. Windows (just like DOS) assigns drive letters to partitions in drive number order starting with the primary partitions and then moving on to the extended partitions. The bottom line is that you want the first Windows partition on the non-CentOS drive to get assigned drive letter C: when Windows boots. As long as Windows doesn't recognize the partition type (e.g., ext3), no drive letter gets assigned. The problem with suggestions to just install Windows and then either use another boot loader or repair the grub installation is that you are stuck doing that work through Windows. My experience has been that Windows isn't as easy to work with for making changes to the boot loader and any approach that overwrites the Windows boot loader may leave you with Windows not being bootable. The approach I described above leaves the Windows boot loader in place although you may need to edit C:\boot.ini to make sure it can still find Windows when both disks are "present." Here is the grub.conf that I use on my laptop. The internal drive boots to either CentOS or Windows while Fedora 10 and Ubuntu are on an external USB drive. # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,2) # kernel /vmlinuz-version ro root=/dev/hda6 # initrd /initrd-version.img #boot=/dev/hda default=0 timeout=5 splashimage=(hd0,2)/grub/splash.xpm.gz hiddenmenu title CentOS (2.6.18-92.1.22.el5) root (hd0,2) kernel /vmlinuz-2.6.18-92.1.22.el5 ro root=LABEL=/ rhgb initrd /initrd-2.6.18-92.1.22.el5.img title CentOS (2.6.18-92.1.18.el5) root (hd0,2) kernel /vmlinuz-2.6.18-92.1.18.el5 ro root=LABEL=/ rhgb initrd /initrd-2.6.18-92.1.18.el5.img title Fedora (2.6.27.19-170.2.35.fc10.x86_64) root (hd1,0) kernel /vmlinuz-2.6.27.19-170.2.35.fc10.x86_64 ro root=UUID=232029fe-c524-47b4-a5d6-d45c0ce7e56b rhgb nomodeset initrd /initrd-2.6.27.19-170.2.35.fc10.x86_64.img title Ubuntu (2.6.27-7 x86_64) root (hd1,4) kernel /vmlinuz-2.6.27-7-generic ro root=LABEL=uSlash initrd /initrd-2.6.27-7-generic title Windoze rootnoverify (hd0,0) chainloader +1 My grub.conf points to Windows on a partition on the internal drive. Yours would point to Windows on the "second" drive (probably hd1). Likewise, your boot.ini will need to point to Windows with something like: multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP" changing to: multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP" Note the change -----^ I'm assuming your Windows disk would end up being /dev/hdb in a Linux world. If your system is using SATA drives or the Windows drive would be something other than /dev/hdb, you may need to make some adjustments to what I have suggested. Cheers, Dave -- Politics, n. Strife of interests masquerading as a contest of principles. -- Ambrose Bierce
Kai Schaetzl
2009-Apr-17 10:31 UTC
[CentOS] Dual-boot with WinXP, CentOS already installed
Sorin Srbu wrote on Fri, 17 Apr 2009 09:37:53 +0200:> How do you mean broken?Sorin, why do you think I replied to you? The person using the broken configuration is "David G. Miller". Kai -- Kai Sch?tzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com
Guy Boisvert
2009-Apr-17 15:28 UTC
[CentOS] Dual-boot with WinXP, CentOS already installed
Sorin Srbu wrote:> > Apparantely Windows can bork up after a while if the system files aren't on > C:. I was thinking the Windows installer will see the linux partitions and > try to name them C: and D: etc, thus Windows will be installed on E: or F:, > which might not go down well with some programs. >Unless you install Linux on FAT, Winblows won't see it. Guy Boisvert, ing IngTegration inc.
Guy Boisvert
2009-Apr-17 15:30 UTC
[CentOS] Dual-boot with WinXP, CentOS already installed
Sorin Srbu wrote:> > Isn't reinstalling GAG the same thing as reinstalling grub. What's the > incentive so to speak? Is GAG so much better, or just easier to work with > than grub? >Easier. GAG has its own boot media (diskette or cd). It has a graphical interface and is very easy. Guy Boisvert, ing. IngTegration inc.
On Thu, 2009-04-16 at 14:08 +0200, Sorin Srbu wrote:> Hi all, > > I'd like to deploy a solution with dual-booting systems where CentOS 5.3 is > already installed and WinXP will be installed to a separate disk. > > I found > http://apcmag.com/how_to_dual_boot_linux_and_windows_xp_linux_installed_first.htm?page=1 > and it seems straight forward enough, although the description is for Ubuntu. > > The problem as I see it, is that the how-to differs from how CentOS looks in > /etc/grub.conf and the boot-loader in Ubuntu with respect to making grub work > again after the Windows install. > > I found Tldp.org mentioning dual-boot plenty, but most or all articles listed > are using lilo as a boot-loader, which seems a bit obsolete and besides I > can't quite translate the instructions from lilo to grub. 8-/ > > Basically, what would I need to change in the how-to from apcmag.com above?? > Thanks for any pointers.---- Just one question for you.. What brand of mother board do you have? There is a better way than trying to kill an OS via Grub or any boot loader via software. JohnStanley