LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-04-2010, 08:42 PM   #1
ishipaco
LQ Newbie
 
Registered: May 2009
Location: Long Beach, CA
Distribution: Ubuntu 12.10
Posts: 18

Rep: Reputation: 1
Question Can't boot from CD drive


My wife's desktop computer is running Ubuntu 10.4, with no problems after the recent upgrade, on a single 640GB HD.

I decided to add a new 320GB HD with a clean install of Windows XP. I thought I could then reinstall Grub, either by booting the original Linux system on the original HD or using a live CD, and evolve her computer into a dual boot arrangement. I use a dual boot system on my own computer, but I did it the easy way: I did a clean install of WinXP on a new HD, got it running, and then did a clean install of Ubuntu on a second HD. Grub found its way around and everything went smoothly.

Now I had the opposite and less desirable situation of an already installed Ubuntu system and wanting to add and integrate a new Windows install. I formatted the entire new HD as NTFS, using gparted under Ubuntu. I then tried to install WinXP from the MS CD. I changed the boot sequence in BIOS. When I booted, the system completely ignored the CD drive and went directly to the HDs to try to boot!

Problem: The computer insists on booting the HDs; it ignores the BIOS setting. Therefore, I can't boot from the CD drive and install WinXP. Here are some further symptoms:

1.) I get a Grub prompt: "grub restore>". So I tried the MS WinXP disc in my own computer. With a BIOS change, it booted into the WinXP setup program, as expected, direct from the CD. My conclusion: the WinXP installation disc is OK.

2.) I disconnected the new HD and rebooted. I was still able to boot into the original Linux system, but the CD drive was still ignored.

4.) I reconnected the new HD and DISCONNECTED the Linux drive. Rebooted. The system still ignored the CD drive, went for the HD, and ended up with an error command line prompt: "grub restore>". With my Linux system completely disconnected and a freshly partitioned HD installed, where was this Grub prompt coming from???

5.) So I disconnected BOTH drives (i.e., NO HDs installed!). Then the system booted up the WinXP CD and windows setup. But, of course, I didn't have any HD installed. When I reboot after re-connecting the new HD, the system once again ignores the CD drive and I get the Grub restore prompt. Conclusion: the CD/DVD drive is working OK.

QUESTION: Does Grub write something to the BIOS/CMOS? I didn't think it did. But then, why do I keep getting this bizarre grub prompt when the only things installed are a clean NTFS-partitioned HD and a WinXP disc in the CD drive?

As always, I hope I'm not asking for something that should be obvious. I should add that most of these boot attempts were after changing ALL three boot devices (boot priority/sequence) to the CD/DVD drive in the BIOS. Still no luck.
 
Old 06-04-2010, 09:02 PM   #2
tvynrylan
LQ Newbie
 
Registered: May 2010
Posts: 10

Rep: Reputation: 0
I'm guessing GRUB was either already on or somehow got onto the drive you intended to use for Windows. I don't know precisely what you did when you were formatting the NTFS partition, but one of those steps likely put some piece of GRUB on that disk. I'd bet that if you ran

hexdump -C /dev/sdX | less

where sdX is the target Windows drive, you'd get some GRUB-looking content on the first few sectors of the drive.

That said, it sounds like your BIOS is full of crap or otherwise is incorrectly configured. Does the BIOS have a boot menu? Can you enter the boot menu and manually select the CD drive for booting? (Just about every BIOS made in the last couple years has a boot menu - you have to whack the right key at startup.)

And no, GRUB does not write to the BIOS in any way.
 
Old 06-04-2010, 09:05 PM   #3
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
Is the new hard drive connected to the same ide ribbon as the cd/dvd drive? If yes, have you checked the jumper settings to make sure one is master and the other set to slave?
 
Old 06-05-2010, 01:31 AM   #4
tommyttt
Member
 
Registered: Oct 2009
Location: Federal Way, WA
Distribution: openSUSE 11.4 x86_64, openSuSE 12.1, Fedora 15
Posts: 207

Rep: Reputation: 34
Grub does not write to your BIOS, it only gets drive information from the BIOS. When you say you're changing the BIOS, are you actually going into the BIOS setup and changing the boot order and boot devices, or just selecting a boot device from a list? If you're changing the BIOS settings, it sounds like they are not being saved when you exit. You did save those settings, correct? Usually with the f10 key or selecting save on the last page. Have you encountered any messages about cmos checksum being bad? That could indicate a cmos battery going bad

Tom
 
Old 06-05-2010, 03:19 PM   #5
ishipaco
LQ Newbie
 
Registered: May 2009
Location: Long Beach, CA
Distribution: Ubuntu 12.10
Posts: 18

Original Poster
Rep: Reputation: 1
Yes, I changed the BIOS to boot from the CD. There are two settings there: one for hard disk boot priority, which only matters if there are more than two HDs and the BIOS is set to first try booting from the HD. Then there are three settings for "first boot device," "second boot device," and "third boot device." Initially I set the first boot device to the CD/DVD drive. When I still couldn't boot from the CD drive, I then set all three settings to the CD drive, with the same results. Yes, I saved my settings (F10) and know they were saved, since they still have my changed settings everytime I re-enter the BIOS.

I think the next thing to try is tvynrylan's suggestion to inspect the first few sectors of the clean NTFS-formatted partition for grub info. But I just don't understand how I can still be getting a grub rescue message with only a clean newly-partitioned NTFS drive installed.
 
Old 06-05-2010, 03:26 PM   #6
ishipaco
LQ Newbie
 
Registered: May 2009
Location: Long Beach, CA
Distribution: Ubuntu 12.10
Posts: 18

Original Poster
Rep: Reputation: 1
To Nexus: Both HDs and the CD/DVD drive are SATA; no IDE stuff involved.

I've never had any other problems with the BIOS. The MB is less than one year old. There have been no symptoms of failing battery. In the old days, the first sign of this was a failure of the BIOS to remember the current date and time. No such problems.
 
Old 06-05-2010, 03:57 PM   #7
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
Do you get the option to press a function key to bring up the boot menu? It might be something like F11 it all depends on the bios manufacturer.
 
Old 06-05-2010, 06:20 PM   #8
ishipaco
LQ Newbie
 
Registered: May 2009
Location: Long Beach, CA
Distribution: Ubuntu 12.10
Posts: 18

Original Poster
Rep: Reputation: 1
Nexus:

Yes, after changing the boot sequence in the BIOS, there is still the option to press a function key to bring up a boot menu while the system is booting. I accessed this a couple of times. It had a default tick next to the HD option in the list. I scrolled down and chose the CD/DVD drive option, but still the same result: no boot from the CD drive.

It seems strange that, with NO HDs installed, the BIOS manages to find and boot from the CD/DVD drive, as expected. With either HD installed, however, it ignores the CD drive and seems to be accessing a Grub system. I still need to examine the boot sectors on the clean NTFS drive. That could be very revealing.

BTW, I mentioned that I had first formatted the new drive as NTFS, but using gparted in Ubuntu. Thinking this might have somehow caused the problem, I then completely deleted the partition using gparted (it then was "unallocated space") and then re-allocated it and formatted it as NTFS using Norton Partition Magic under Windows. That didn't seem to make any difference.
 
Old 06-05-2010, 11:40 PM   #9
ishipaco
LQ Newbie
 
Registered: May 2009
Location: Long Beach, CA
Distribution: Ubuntu 12.10
Posts: 18

Original Poster
Rep: Reputation: 1
Unhappy Strange Grub Activity

I finally got around to examining the new HD I wanted to install WinXP on to see if there were any traces of Grub. Here's what I did:

I hooked the new HD up to my own dual-boot computer using a HD docking device and an eSata connection from the drive to my computer. As expected, neither WinXP nor my Ubuntu OSs could see the drive, although BIOS recognized it. This was because the drive is entirely unallocated, i.e., no partitions at all. Note that, although there were no partitions, the drive had been partitioned and formatted as both NTFS and Linux Ext3 during earlier efforts. Those earlier partitions, although deleted, were never secure-erased. Perhaps this is important.

I ran WinXP and used Norton Partition Magic to create a brand new NTFS primary partition on the new HD. This was finished so fast that I'm sure there was no complete secure-erase formatting done on the drive. Then, of course, WinXP could see the drive, empty though it be. As expected.

Then I rebooted into Ubuntu (10.4) and looked at all my HDs using gparted. Everything looked great, including the new HD (D) with NTFS file system on it. FYI, I have a 640GB HD (A) with WinXP & NTFS installed, a second 640GB HD (B) with Ubuntu 10.4 and Ext4 installed, and a third NTFS HD (C) used for data.

I then examined the first few sectors of every drive, using hexdump from a Linux terminal. I entered the following commands

Code:
gary@grande:~$ sudo hexdump -C /dev/sda | less
gary@grande:~$ sudo hexdump -C /dev/sdb | less
gary@grande:~$ sudo hexdump -C /dev/sdb6 | less
gary@grande:~$ sudo hexdump -C /dev/sdc | less
gary@grande:~$ sudo hexdump -C /dev/sdd | less
To my surprise, I found the following data present in the first part of the HDs sectors for sda (my WinXP boot drive), sdb (my Linux boot drive), sdc (my NTFS data drive), and sdd (the newly partioned NTFS drive):

Code:
00000180  7d e8 2e 00 cd 18 eb fe  47 52 55 42 20 00 47 65  |}.......GRUB .Ge|
00000190  6f 6d 00 48 61 72 64 20  44 69 73 6b 00 52 65 61  |om.Hard Disk.Rea|
000001a0  64 00 20 45 72 72 6f 72  0d 0a 00 bb 01 00 b4 0e  |d. Error........|

00000330  27 03 c3 6c 6f 61 64 69  6e 67 00 2e 00 0d 0a 00  |'..loading......|
00000340  47 65 6f 6d 00 52 65 61  64 00 20 45 72 72 6f 72  |Geom.Read. Error|

00000410  c7 5a 00 00 00 00 00 00  ff ff ff ff 2f 67 72 75  |.Z........../gru|
00000420  62 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |b...............|
Note that I also dumped the first bytes from a large Ext4 partition (sdb6) which is simply a Linux data partition not meant to boot from. The above grub traces were not found on that drive.

My Question: Given all the above, although I expected to find grub traces in my two boot drives, sda and sdb, why am I finding traces of grub on a newly partioned drive with a fresh NTFS file system installed by Partition Magic running under the WinXP OS? Is it residual data from earlier partitioning? Is it because, although I created everything under Windows, I am analysing everything using Linux tools? Is it more than interesting that my NTFS data drive (sdc) also has grub traces in its first sectors?

I would be thankful if anyone can give me an explanation of what's going on.
 
  


Reply



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
again-dual boot windows XP, 1st drive-linux Mepis 8.0 2nd drive marvinudy Linux - Newbie 2 06-09-2009 09:51 AM
using GRUB 1.5 with boot on sata-drive and system on usb drive(ipod photo) Scorp-D Linux - Laptop and Netbook 1 03-16-2007 02:34 AM
Can't boot with SUSE 9.3 - trying to install on system with IDE drive and SADA drive tbering Linux - Kernel 1 05-30-2006 11:35 AM
Laptop DVD drive has died, will linux boot from an external drive? Stevetgn Linux - Newbie 2 05-14-2005 05:18 PM
boot from floppy drive then insall linux redhat9 from HARD DRIVE Shiraz Ahmed Linux - Software 0 08-23-2004 05:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:16 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
Open Source Consulting | Domain Registration