LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-11-2005, 11:16 AM   #1
slap
LQ Newbie
 
Registered: Nov 2005
Posts: 17

Rep: Reputation: 0
dual boot gone wrong


I'm trying to get a dual boot setup, currently I can not boot into windows. When I installed Debian, by mistake I put Grub onto the MBR. (or something like that.) From what I've read online I can use Grub to boot XP but I'm having a little trouble. FYI...Debian in on the Samsung IDE and XP is on the SATA raptor. Thank you in advance for your help and suggestions...

Here is my menu.list file
title Windows XP
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1

Here is the output of fdisk -l
Device Boot Start End Blocks Id System
/dev/hda1 * 1 851 6835626 83 Linux
/dev/hda2 852 9733 71344665 5 Extended
/dev/hda5 852 1037 1494013+ 82 Linux swap / Solaris
/dev/hda6 1038 9733 69850588+ 83 Linux

Device Boot Start End Blocks Id System
/dev/sda1 * 1 4499 36138186 7 HPFS/NTFS
/dev/sda2 4500 4500 8032+ b W95 FAT32


I've searched the net with google and I think I found my problem but it's a bit over my head Here is the output of fdisk -l /dev/sda1

Disk /dev/sda1: 37.0 GB, 37005502464 bytes
255 heads, 63 sectors/track, 4498 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

This doesn't look like a partition table
Probably you selected the wrong device.

Device Boot Start End Blocks Id System
/dev/sda1p1 ? 13578 119522 850995205 72 Unknown
Partition 1 does not end on cylinder boundary.
/dev/sda1p2 ? 45382 79243 271987362 74 Unknown
Partition 2 does not end on cylinder boundary.
/dev/sda1p3 ? 10499 10499 0 65 Novell Netware 386
Partition 3 does not end on cylinder boundary.
/dev/sda1p4 167628 167631 25817+ 0 Empty
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order
 
Old 11-11-2005, 11:33 AM   #2
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Your Sata is corrupted. XP will not loaded as it doesn't know how to deal with it.

My recommendation is boot to Debian, log in as root, in terminal mode just run cfdisk to delete your sda2, as it is too small to hold anything but may cause a system to abandon the attempt to read it.

After the deletion, exit Debian and reboot to see if the problem persists.

Your Windows booting commands look OK to me and may boot if XP can read the Sata.
 
Old 11-11-2005, 11:44 AM   #3
TruongAn
Member
 
Registered: Dec 2004
Location: Vietnam (Việt Nam)
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 728

Rep: Reputation: 33
Put grub in MBR is not a mistake, it is what you have to do.
In the menu.lst file, you specified that you have installed Windows XP in hda1 partition, but hda1 was a linux partiton.
So where did you install window?
What is the error message when you try to boot window?

And, for further post, but the command output in the tage [code] to make your better appear.
 
Old 11-11-2005, 12:30 PM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I believe Windows is in sda1 and the IDE disk hda has earmarked as the first bootable disk and so Grub calls it (hd0). Sata is therefore (hd1) to Grub. The truncated menu.lst does show Grub has prepared to boot Windows from partition (hd1,0) and that is sda1 which matches the fdisk-l information of

/dev/sda1 * 1 4499 36138186 7 HPFS/NTFS

Also there is no FAT or NTFS partition in the other disk.

It is the duty of every system to check the integrity of itself on booting. If sda has erroneous entries in the partition table no system knows how to get over it and the easiest way out is to refuse to boot. It will happen to Linux too but the current case is sda is a 100% Windows disk and may not be affecting Debian.
 
Old 11-11-2005, 12:48 PM   #5
slap
LQ Newbie
 
Registered: Nov 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Thank you for the replies. I apoligize if my post was difficult to read.


TruongAn:
Windows was installed first on the Sata drive and Debian afterwards on the IDE drive. Windows was bootable before the Debian installion. I've never had a problem booting Debian. From debain, I can mount the sata drive and read files if that matters.

Also I don't get any errors when I attempt to boot windows. I get the screen with the contents of my menu.list file and a blinking cursor.


Saikee:
I will attempt to delete the sda2 partion. Is there any additional information I need to know other than what you posted.
 
Old 11-11-2005, 01:15 PM   #6
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
slap,

If you want to play safe print out the content of fdisk -l.

Then you boot up into Debian, log in as root and activate a Grub shell by typing at the terminal

grub

Then you can use Grub to interrogate sda by typing

geometry (hd1)

If the number of cylinders/heads/sectors matches then it would be quite safe to delete sda2, which incidentally is only 8032 bytes.

Your description confirms Grub did manage to pass the control to XP but XP itself failed to boot up. It is not a Linux problem and XP has to deal with it itself.

If after deleting the partition (don't forget to reboot) you still couldn't get XP up then my suggestion is to dig out XP's installation disk and let XP carry out the repair job. XP will advise you to do a re-installation if it couldn't cope with the damage. If you want to save your data it is time to make a backup before permitting XP to do a re-install.
 
Old 11-11-2005, 01:21 PM   #7
slap
LQ Newbie
 
Registered: Nov 2005
Posts: 17

Original Poster
Rep: Reputation: 0
OK, I deleted the sda2 partion and no luck on the reboot. I get the following screen...

Booting 'Windows XP'
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1

and a blinking cursor.

I have the Windows disk handy. I've read online that the fixmbr command might work but my concern is that windows will make debian unbootable. How can I avoid this?
 
Old 11-11-2005, 01:56 PM   #8
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Easy, just boot to Debian, log in as root, pop a floppy into the drive and type

grub-install /dev/fd0

Exit Debian and you should be able to boot up your existing arrangement from the floppy (can still boot to MBR if floppy is removed)

You can proceed to restore XP's MBR. I always use a DOS bootable floppy (with fdisk.exe inside), boot it up and type

fdisk /mbr

This beats the XP installation CD with fixmbr as it takes a lot longer. There are still people around thinking XP's MBR must be restored by its original CD. Good luck to them.

Once XP's MBR takes over you will only be able to get your Debian back by the floppy. As you can boot Debian you can always restore its Grub any time by typing

grub-install /dev/hda

Therefore you can swap the boot loader any number of times but my fear restoring XP's MBR may not be enough to get over your current problem.

By the way even if you lose the Grub floppy Debian can still be rescued by any Live CD.
 
Old 11-11-2005, 02:19 PM   #9
slap
LQ Newbie
 
Registered: Nov 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Hmm I got an error...

debian:/# grub-install /dev/fd0
/dev/fd0: Not found or not a block device.
 
Old 11-11-2005, 05:42 PM   #10
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
OK this one got me too.

I ran my Debian Sarge and it has the same problem with Grub-install. Debian Sarge uses V 0.95 of Grub but the latest is 0.97.

I am 85% certain that this is a bug because I can do

mkdir /mnt/fd0
mount /dev/fd0 /mnt/fd0

and was able to read and write to the floppy with Debian. It is only the combination of 0.95 version of Grub and Debian (with 2.6.7 kernel) that doesn't work properly.

I also tried Ubuntu 5.0.4 because it also has Grub 0.95. Ubuntu also reported /dev/fd0 isn't a BIOS drive. So it seems that is a dead end. Ubuntu has a 2.6.10 kernel.

Lastly I ran Kanotix 9.2004, which has a 2.6.8 kernel. I checked its Grub 0.95 first (type Grub at root terminal and the version will show up) before dooing a grub-install /dev/fd0

It worked!

There was a time I relegiously creating a bootable floppy for every Linux I installed but I stopped doing it as I have found one Grub floppy, unattached to a system, can boot all of them. May be this the the way for you to go.

-----------------------------------
Step 1 - Arrange the boot loader Grub inside Debian's root partition

I am guessing the root partition of your Debian is in hda1 so putting Grub in hda1 is

grub-install /dev/hda1

If you omit 1 after hda it goes into the whole disk which is the MBR. Do feel free to alter hda1 to the directory you specify as / for Debian.

The above works as I did it with Debian before so it is bomb proof.

-----------------------------------
Step 2 - How to make a bootable Grub floppy unattached to an operating system

I have typed this method repeatedly recently so if you don't mind please refer to

Post #9 and #15 of this thread Make sure you read the alterations I put in #15

You may be relieved to learn that the poster got it working and was very happy about it.

-----------------------
Step 3 - To boot Debian manually with Grub floppy (unattached to system)

You boot up the floppy into a Grub prompt. You then type

root (hd0,0)
chainloader +1
boot

That should boot up the Grub hiding inside hda1. The floppy-Grub then hands over the control to the hda1-Grub and you get back 100% of what your current condition is now now, but without the need of the MBR.

-------------------------

Step 4 -- To boot Windows with Grub floppy (unattached to system)

Yes why not. This in fact is the acid test. You basically type the parts of Debian's /boot/grub/menu.lst on Windows but omitting the "title" line and add "boot" after thelast line, like this

rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1
boot

If your XP is good it will be booted by the Grub floppy, otherwise try to restore the MBR

Good luck

Last edited by saikee; 11-11-2005 at 05:45 PM.
 
Old 11-11-2005, 11:11 PM   #11
DSargeant
LQ Newbie
 
Registered: Nov 2005
Distribution: Mandriva 2006
Posts: 21

Rep: Reputation: 15
There's an alternative way . use the windows way by using the boot.ini. Search for" mbrwiz Solution Dual Boot Windows and Linux" in the Linuxquestions.org. this method is fool proof and it will work everytime. It's all done in windows. You won't need luck.
 
Old 11-11-2005, 11:25 PM   #12
slap
LQ Newbie
 
Registered: Nov 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Sorry for the delay of my reply, I just got back home.

Quote:
Originally posted by DSargeant
There's an alternative way . use the windows way by using the boot.ini. Search for" mbrwiz Solution Dual Boot Windows and Linux" in the Linuxquestions.org. this method is fool proof and it will work everytime. It's all done in windows. You won't need luck.
I'm confused by this. Did you read the OP? I can't boot into windows.
 
Old 11-11-2005, 11:48 PM   #13
slap
LQ Newbie
 
Registered: Nov 2005
Posts: 17

Original Poster
Rep: Reputation: 0
I think I might have bigger problems with my floppy drive.

debian:/dev# mkdir /mnt/fd0
debian:/dev# mount /dev/fd0 /mnt/fd0
mount: you must specify the filesystem type
 
Old 11-12-2005, 03:48 AM   #14
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
No

Just put in -tand then the file type should do it. I tried it out myself, remeber?

I am fairly comfortable with it being a bug because I have also verified it in Grub shell

You can do it also to prove Debian can accept (fd0) but can write to it, so (fd0) being not a BIOS drive is incorrect.

If you type Grub at shell

root (fd0) will get Grub to report back what kind of file type in (fd0)

The grub-install /dev/fd0 can be achieved in Grub shell by

root (hd0,0) <-----------------indicating the Debian Grub files location
setup (fd0) <------------------put Grub into fd0

Above failed too.

Therefore, together with the same response I got from Ubuntu I think it is a bug.
---------------------------------------------

I don't have much problem for people advocating XP's NTloder to multi-boot because I also have it too in the box booting 10 systems, which is its limit. Since I got 50+ systems I have to use Grub for all of them.

When the operating systems have been "properly" arranged, each with a boot loader inside its root partition, then all of them can be booted up by Grub (in a floppy, a CD, a root partition or in MBR), using the same 3 lines of commands but changing the partition reference only. You can get anything simpler and neater than this

Root (hdi,j) <-----------tell Grub the root partition is located in ith disk jth partition.
cahinloader +1 <-----------tell Grub to boot the system's boot loader
boot <-----------green light for Grub to go for it

For 50+ systems I also have 50+ bootloaders and can confirm that between Grub, Lilo and NTloader the first needs the least amount of work to boot. I would even say Grub needs 1/10 of NTloader's effort but is able to boot 10 times more systems. NTloader also has a limitation of booting only one DOS-based of M$ system (select from DOS, Win3x,Win9x etc). Grub in my box boot 2 DOS, 2 Windows, 1 Win2k and 1 XP, beside the remainder of the 50+ systems.

I do believe Linux users are wasting their time to avoid Linux boot loaders and trying to multi-boot with Windows. Yes it can be done but it is a awfully long way to get to when there are at least 2 short cuts offered by Lilo and Grub. This is the opinion from a guy who have walked through every pace in all the three routes

Last edited by saikee; 11-12-2005 at 03:49 AM.
 
Old 11-12-2005, 07:43 AM   #15
slap
LQ Newbie
 
Registered: Nov 2005
Posts: 17

Original Poster
Rep: Reputation: 0
salkee thank you for your patience...

I guess I'm still a newbie because I still can't mount the floppy. I even went into the bios to confirm the floppy is there because I can't say i use it all that often.

debian:/# mount -t ext2 /dev/fd0 /mnt/fd0
mount: special device /dev/fd0 does not exist

grub> root (fd0)
root (fd0)

Error 21: Selected disk does not exist

Perhaps the floppy is called something else? How would I confirm that?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Backed into a corner...Sarge/Media Center dual boot installation gone wrong integrale Debian 21 08-31-2005 12:05 AM
Fedora Core 3 Dual Boot, Dual Hard drives, Grub Boot Loader Denali03 Linux - Newbie 1 03-04-2005 02:44 PM
Dual Boot gone horribly wrong, help!! pantheman Linux - Newbie 7 07-28-2004 02:49 AM
Dual-Boot gone wrong? RallyMonkey Fedora - Installation 7 05-17-2004 11:41 PM
LILO using wrong kernel on dual boot system MS3FGX Linux - General 7 03-08-2004 01:50 AM


All times are GMT -5. The time now is 08:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration