Debian This forum is for the discussion of Debian Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-06-2007, 02:59 AM
|
#1
|
Member
Registered: Nov 2004
Location: Budapest, Hungary
Distribution: Debian
Posts: 110
Rep:
|
Dual boot Debian Etch and XP with GRUB - Debian installed First - one HDD
Hi
I have set up my usual Debian setup on my new laptop, but the company I work for requires me to VPN in the system through a Netscreen Firewall, which supplies an SPD file for the VPN connection. This can only be used from Windows, so there I go, stuck with Bill again...
Since I already have Debian configured, and I read on the net that I need Windows first, I am a bit confused if this will work or not. I had a 10GB partition free, to which I am currently installing XP on a FAT32 filesystem for compatibility. As I understand, from now on, my Laptop will only boot to Windows, as NTLDR took over the MBR. How can I get GRUB back, and able to dual-boot? Should I insert the Debian CD again, and do a rescue, or something similar?
Thanks for any suggestions,
Ben
|
|
|
01-06-2007, 07:15 AM
|
#2
|
Member
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 364
Rep:
|
You can always beckup your MBR, and then restore it using al ive CD. Then booting to Debian, and doing a grub-install should work.
Backing up:
Code:
dd if=/dev/hda of=MBR-backup bs=446 count=1
Then, install windows, and afterwards boot a live CD. To restore the MBR, do:
Code:
dd if=MBR-backup of=/dev/hda bs=446 count=1
Where /dev/hda is your hard disk. Afterwards, login to Debian as root and do:
Code:
grub-install /dev/hda
This should detect the Windows installation and add it to your boot menu. Anotherway, in which you don't need to backup the MBR, is to simply chroot into the debian installation from a live-cd and then doing a grub-install.
Last edited by saman007uk; 01-06-2007 at 07:21 AM.
|
|
|
01-06-2007, 09:53 AM
|
#3
|
LQ Newbie
Registered: Mar 2006
Posts: 15
Rep:
|
I have similar problem. I have 200GB sata disk. There I had windows XP and DEBIAN. But I reinstalled WINDOWS XP and GRUB have lost. Now, windows is booting only. I want install linux, but I can see only partition 200GB. In windows XP I can see 30GB for linux and 170GB NTFS(aproximately). What should I make with this?
sorry about my english
Last edited by Chinook06; 01-06-2007 at 09:56 AM.
|
|
|
01-06-2007, 10:25 AM
|
#4
|
Member
Registered: Nov 2004
Location: Budapest, Hungary
Distribution: Debian
Posts: 110
Original Poster
Rep:
|
Hi
I am done, thanks for the quick response.
What I did was the following.
I installed Debian (weeks ago) on a 10GB partition and 512 for SWAP. I left another 9,5GB for Windows. Once my Debian install was done and stable, I installed XP on the 9,5GB partition. This safely killed of GRUB of course. Now, after I posted here, and got the response, I replugged the CD drive, and booted from the same exact Debian NET install CD. In the boot prompt I started the Install with
It booted, and asked me questions as if I was setting up a new system. Obviously, it doesnt matter what you answer for the questions, but of course you should kind of set the Right keymap for the keyboard  for example I need Japanese, so I used that.
When the Resuce window comes up, there will be as many choices as many partitions you have to choose from. I chose the second one, as the first one is SWAP, second is Debian Root, and 3rd is XP. Now, you have several options, executing a shell, or just simply reinstalling GRUB. It asked me where I wanted to install it, so I entered
Once I rebooted, I got the friendly GRUB screen, so I chose my current kernel, and booted. Now, to allow XP to breathe, I had to edit
Code:
/boot/grub/menu.lst
and added this right below my linux boot parameters
Code:
title windows XP
root (hd0,2)
chainloader +1
makeactive
Note root (hd0,2) where 2 stands for the third partition. 0,1,2
Best regards, and thanks again for the suggestions.
Ben
|
|
|
01-07-2007, 08:46 AM
|
#5
|
LQ Newbie
Registered: Mar 2006
Posts: 15
Rep:
|
I have resolved it parially. I have two disks (/dev/hda(primary with GRUB) and /dev/sda (with windows XP and debian)). When I set boot disk sda in bios. Windows is started. When I set boot disk hda in bios. Grub is started, but I can start only DEBIAN. When I choose windows, then PC is started boot from hda and hanged. How can I set boot windows?
|
|
|
01-07-2007, 09:12 AM
|
#6
|
LQ Newbie
Registered: Mar 2006
Posts: 15
Rep:
|
I have resolved it parially. I have two disks (/dev/hda(primary with GRUB) and /dev/sda (with windows XP and debian)). When I set boot disk sda in bios. Windows is started. When I set boot disk hda in bios. Grub is started, but I can start only DEBIAN. When I choose windows, then PC is started boot from hda and hanged. How can I set boot windows?
Boot parameters:
Quote:
title Debian GNU/Linux, kernel 2.6.8-2-686
root (hd1,1)
kernel /boot/vmlinuz-2.6.8-2-686 root=/dev/sda2 ro
initrd /boot/initrd.img-2.6.8-2-686
savedefault
boot
title Microsoft Windows XP Professional
root (hd1,0)
savedefault
makeactive
chainloader +1
|
sorry for my english
Last edited by Chinook06; 01-07-2007 at 09:13 AM.
|
|
|
01-07-2007, 09:22 AM
|
#7
|
Member
Registered: Nov 2004
Location: Budapest, Hungary
Distribution: Debian
Posts: 110
Original Poster
Rep:
|
Hi
It seems like NTLDR is on your second disk for sure. SO when you boot from there, you will get Windows. How many partitions you have on your second disk and what are they?
And if I may ask, why is GRUB installed on a different physical device than your system? There could be some advantages for that, I just dont know it.
Your menu.lst shows that your Debian install is on the 2nd partition of the second HDD, while Windows is on the first one. Is this correct?
What I would try is to install GRUB on the second HDD, on the second partition, and then set your BIOS to boot from your second HDD, and leave your existing menu.lst for the GRUB config. However, as I am nowhere near being advanced, maybe it wouldnt hurt to hear out some other users comments.
Best regards,
Ben
title Debian GNU/Linux, kernel 2.6.8-2-686
root (hd1,1)
kernel /boot/vmlinuz-2.6.8-2-686 root=/dev/sda2 ro
initrd /boot/initrd.img-2.6.8-2-686
savedefault
boot
title Microsoft Windows XP Professional
root (hd1,0)
savedefault
makeactive
chainloader +1
|
|
|
01-07-2007, 09:48 AM
|
#8
|
LQ Newbie
Registered: Mar 2006
Posts: 15
Rep:
|
Quote:
Originally Posted by bence8810
Hi
It seems like NTLDR is on your second disk for sure. SO when you boot from there, you will get Windows. How many partitions you have on your second disk and what are they?
|
My partitions are:
hda1-ntfs
sda1-ntfs windows
sda2-ext2 linux
sda3-swap
sda4-ntfs
Maybe
Quote:
Originally Posted by bence8810
Your menu.lst shows that your Debian install is on the 2nd partition of the second HDD, while Windows is on the first one. Is this correct?
|
Yes.
Quote:
Originally Posted by bence8810
And if I may ask, why is GRUB installed on a different physical device than your system? There could be some advantages for that, I just dont know it.
What I would try is to install GRUB on the second HDD, on the second partition, and then set your BIOS to boot from your second HDD, and leave your existing menu.lst for the GRUB config. However, as I am nowhere near being advanced, maybe it wouldnt hurt to hear out some other users comments.
|
I first installed Windows on second disk. Then I started to installed of Debian. Grub saved automaticly on first disk when I had set boot from second disk in bios.
|
|
|
01-07-2007, 09:58 AM
|
#9
|
Member
Registered: Nov 2004
Location: Budapest, Hungary
Distribution: Debian
Posts: 110
Original Poster
Rep:
|
Hi
If I were you, I would install GRUB on the second partition of your second HDD, and then set that for boot, and see how it goes.
You can do this by booting to your linux, and then issue
Code:
grub-install /dev/sda2
But before you do so, read the man page, so to see if you also agree with this step or not.
Ben
|
|
|
01-07-2007, 10:07 AM
|
#10
|
Member
Registered: Jun 2006
Location: Des Moines
Distribution: Debian Lenny
Posts: 59
Rep:
|
If I'm reading this thread correctly -
edit the windows entry in your /boot/grub/menu.lst to look like this:
Code:
title Windows XP
root (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
chainloader +1
then set bios to boot disk hda.
Last edited by luis14; 01-07-2007 at 10:10 AM.
|
|
|
01-07-2007, 10:41 AM
|
#11
|
LQ Newbie
Registered: Mar 2006
Posts: 15
Rep:
|
luis14: Thanks. Windows boot over grub from first drive!
|
|
|
01-07-2007, 10:45 AM
|
#12
|
Member
Registered: Jun 2006
Location: Des Moines
Distribution: Debian Lenny
Posts: 59
Rep:
|
Your welcome - glad that worked for you.
|
|
|
All times are GMT -5. The time now is 12:54 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|