LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 01-11-2007, 02:49 AM   #16
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

Mohrravvian,

If you have implemented my previous suggestion you should have a text screen as the qfxmenu should have been disabled. That means you now has a Grub prompt by pressing "c" key quickly when you see the Booting screen.

In a Grub prompt to talk to Grub and can boot all system manually. So try theses lines in a Grub prompt
Code:
root (hd1,0)
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
boot
You don't need the "title" statement but require a "boot" statement at the end otherwise the lines in menu.lst are the instruction to boot every system manually.

Also in the Grub prompt you can do all the things in a Grub shell (the one you invoked inside Suse).

Normally rootnoverify = no need to verify the partition. I have suggested using only the "root" as modern Grub knows it is a Windows and wouldn't spend time to verify it.

Last edited by saikee; 01-11-2007 at 02:50 AM.
 
Old 01-11-2007, 05:25 AM   #17
Mohrravvian
LQ Newbie
 
Registered: Jan 2007
Location: USA
Distribution: openSuSE 10.2
Posts: 13

Original Poster
Rep: Reputation: 0
saikee...

I tried your advice again, just to be sure, but unfortunately it still didn't work.

During the boot process, there is no GRUB prompt at all... and I tried pressing C through the entire boot process, and it doesn't do anything.

After the BIOS, basically the first thing that appears is "GRUB read error". So, I think it's just not loading GRUB at all. No GRUB screens are coming up, gfx or otherwise. I still have the first # in there to disable the gfx, and it's not working. So, I cannot get to a GRUB shell there, because nothing happens when you press c or any other keys except CTRL+ALT+DEL.

So, not sure what's next to try...

Mohrravvian
 
Old 01-11-2007, 06:07 AM   #18
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
This will not be strange and can depend on how you boot up Suse with the CD.

If your Suse works like a Live CD then it has its own Linux and so you could be just editing the Live CD Linux instead of the version inside the partition hda6 of the hard disk.

Generally if you boot up any Live CD you have to create a temporary directory in /mnt to mount Suse. That is the sure way to edit the installed Suse.

I suggest you either use Suse as a pure Live CD, if it can be done by not telling it not to boot from the hard disk, or use any Live CD. Obtain the root privilege by terminal command "su". The password is waived normally in a Live CD. You can then do the following in the terminal mode
Code:
mkdir /mnt/hda6
mount /dev/hda6 /mnt/hda6
chroot /mnt/hda6
Now you are actually inside Suse of hda6. Depending the ability of the Live CD it may allow you to edit the Suse menu.lst with the graphic editor kwrite. If it doesn't then try to edit it with "vi"
Code:
kwrite /boot/grub/menu.lst
or
Code:
vi /boot/grub/menu.lst
vi can be difficult to use so if you have a problem type :q or :q! to quit. To save is :w. Type x to delete a character, type i for insertion and the "Esc" key to stop insertion.

Once the /boot/grub/menu.lst in the hda6 has been save you can restore it in the MBR and then exit back to the Live CD by
Code:
grub-install /dev/hda
exit
You are now back in the Live CD Linux. On a reboot the Suse should come up as expected.

I recommend you using a Live CD other than Suse as that is a general method for rescuing any unbootable Linux. There is no harm in using Suse CD but make sure you know it is the Linux in hda6 that needs to be edited. Depending on your skill you can edit "inside" or "outside" Suse. The way I described is to do it inside.

Last edited by saikee; 01-11-2007 at 06:13 AM.
 
Old 01-11-2007, 07:01 AM   #19
Mohrravvian
LQ Newbie
 
Registered: Jan 2007
Location: USA
Distribution: openSuSE 10.2
Posts: 13

Original Poster
Rep: Reputation: 0
saikee...

well, i know that the CD i have is not a Live CD. I installed this from the same CDs onto an older PC before I did the one I am having trouble with, and that one worked correctly immediately with no issues with the boot loader (it setup XP and linux without any problems, but it had only one hard drive).

In addition, when I boot up I have to go through the Installation procedure, which then offers "New Install", "Repair Installed System" and "Boot Installed System". It is the latter that I choose. After choosing this option, it says "Now booting from /dev/hda6", so I am fairly certain that it is booting me into the correct place and not a Live CD.

Also, I used the text editor gedit when I redid your advice this morning, just to be sure it would be properly edited without any interference from YaST. But, it still didn't load the GRUB.

So, I don't think the Live CD is an issue...
 
Old 01-11-2007, 08:11 AM   #20
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 Let make the most lethal weapon in booting then ----> a Grub bootable floppy.

The steps are fully documented in Chapter 3.1 of the Grub Manual. If you make one it has no operating system attached to it and so it is a pure Grub on it own. In other word you cut off the middleman Linux.

You can source the two files stage1 and stage2 from your Suse after booting it up by CD by command
Code:
find / -name stage1
You should find two alternatives at least. One from /boot/grub directory which you should "NOT" used as it may have been modified. It is the one from /usr/lib/grub/i386-Suse directory that is the one you after. Stage2 should be in the same directory. Change to that directory and dd the two files out into a floppy, which needs not be formatted, just any scrap one will do as long as it can be read.
Code:
dd if=stage1 of=/dev/fd0 bs=512 count=1
dd if=stage2 of=/dev/fd0 bs=512 seek=1
Now on booting up the Grub floppy you get a Grub prompt. Use it to boot up your systems manually.

I have already given you the instruction for Windows.

Your Suse should boot by
Code:
root (hd0,5)
configfile /boot/grub/menu.lst
If you still have a problem with the menu.lst then boot it as follow
Code:
root (hd0,5) 
kernel /boot/vmlinuz root=/dev/hda6 vga=0x31a resume=/dev/hda7 splash=silent showopts 
initrd /boot/initrd 
boot
Once you are satisfied with the menu do a grub-install into device hda to restore Grub into the MBR.

If the bootable Grub floppy works as predicted go to the bank, open a safe-deposit box to lock it up. You have to treat it with care as there is no known PC system a Grub floppy cannot boot. It is the most lethal weapon in the booting business. You can quote me on that too.
 
Old 01-11-2007, 08:30 AM   #21
Mohrravvian
LQ Newbie
 
Registered: Jan 2007
Location: USA
Distribution: openSuSE 10.2
Posts: 13

Original Poster
Rep: Reputation: 0
I don't have a floppy drive on that PC. Can you use a USB flash drive, or is floppy the only way? The BIOS does support booting a USB drive first.
 
Old 01-11-2007, 08:51 AM   #22
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
See the Task J3 of the last link of my signature to create a bootable Grub CD. It is the same thing but you only need one file to make an iso file with and it is done in Linux so make Suse work for its keeps.

Last edited by saikee; 01-11-2007 at 08:53 AM.
 
Old 01-12-2007, 08:34 AM   #23
Mohrravvian
LQ Newbie
 
Registered: Jan 2007
Location: USA
Distribution: openSuSE 10.2
Posts: 13

Original Poster
Rep: Reputation: 0
Ok. I made a CD but I didn't try booting it yet.

I know you're in the UK, so I need to ask while you're awake !

If I wanted to repair / restore the windows boot system, what would I do? Let's say I just wanted to forget about booting linux and just fix it so that Windows boots up normally. How would I do this?

I have the XP Pro installation CD. I tried to use the recovery console via the repair CD, and it says "Which Windows do you want to repair?" and the only option is "D:\Windows". I assume this means that the windows partition has been reassigned the "D" instead of "C"? And this probably causes a problem?

Don't worry, I'll still try your GRUB boot CD, and what I'd like to do is set it up so that Windows loads by default unless the GRUB CD is in and I choose to boot from it.

Thanks for all the help.

Mohrravvian
 
Old 01-13-2007, 12:49 AM   #24
Mohrravvian
LQ Newbie
 
Registered: Jan 2007
Location: USA
Distribution: openSuSE 10.2
Posts: 13

Original Poster
Rep: Reputation: 0
Ok... I used the Boot CD, and got to the GRUB prompt!

Then, I tried to use the commands which you listed before to boot into Windows. These commands:

Code:
root (hd1,0)
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
boot
They worked, XP started up as if nothing were wrong. I'm using it now. Success!

WHen I tried to use the Linux commands, however, I got an error. THe command I used was

Code:
root (hd0,5)
And the error I received was something like "ERROR reading from disk" or something of that nature.

So, it will not boot linux. But, so far so good... sounds like that isn't the issue.

Also, would love to know why the windows repair console says "D:\Windows" rather than "C:\Windows"... is that fixable? How?

I mean, yeah, I could just keep booting everything from the CD, including windows, but... I have a wife.... :P

Any idea how to get Windows to get back into shape, and how to get Linux to boot from the GRUB CD?

Thanks!

Mohrravvian
 
Old 01-13-2007, 02:05 AM   #25
jpaulson
LQ Newbie
 
Registered: Dec 2006
Distribution: Fedora
Posts: 9

Rep: Reputation: 0
Fixing the XP disk boot sector

Hi.
You ask how to get your Windows XP to boot directly from it's own disk in a native manner instead of going via your Linux on a separate disk, this would enable you to do whatever you like with the Linux disk. I have just had this same problem and the procedure is...........

You need to repair the MBR (Master Boot Record) on your windows disk. The very simple command in XP is "fixmbr" without any options unless you have more than one Windows op sys on the computer. fixmbr is only available from what Microsoft call the Recovery Console. To access this you need your genuine Windows XP setup disk which is not included with many PC's ( Do not use any old supplied "Restore" disk included with your PC without being very very careful it may just trash your entire disk).

If you do not have the XP setup disk then you can download a 5MB file from Microsft which will build a set of 6 Floppy disks, and these will boot the machine into setup. You then start the Recovery Console by pressing R and this will give you a new prompt line at which you type fixmbr.

These links describe the whole job in simple detail.

http://support.microsoft.com/KB/314503 entitled.."Computer stops responding with a black screen when you start Windows XP"
( terrible english, think about it! )

This article links to.....307654 "How to install etc Recovery Console"
Which in turn links to.....310994 "Obtaining XP setup disks"

CAUTION. Since we have all been playing with bios boot orders and odd names for disks it is a very good idea for just this time to a.) physically unplug all other disks and b.) check the bios that it is now only recognising the still connected windows disk in the boot order.

Once you have fixed the MBR of course you will have no access via that route to your Linux. Accordingly you need to confirm beforehand that by changing the BIOS boot order to the Linux disk that your Linux boot etc is still all OK. The linux should not be a problem and you should be able to use all the techniques discussed with saikee and others to remap drives etc. and edit the menu.lst ( or grub.conf in some cases where menu.lst is only a pointer or is missing).

Good Luck
JP
 
Old 01-13-2007, 03:35 AM   #26
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
How to restore XP MBR is described in Task B1 and B2 in the last link of my signature. Any MS compatible system that can be booted up and has fdisk.exe can do this job. My advice is even without the XP installation CD and no floppy drive one can download a FreeDos CD iso image to burn it into a CD. I don't think it is required in the current case. The last link of my signature has tips to boot most of the PC systems you can find. Print it out if you have any booting problem.

Mohrravvian's system has 3 Windows partitions; sda1 in type 7 for ntfs, hda1 in type 7 for ntfs and hda2 in type c for fat32 described in Post #11. Since the first disk (hd0) is an IDE (I hope it is now fixed as Mohrravvian has only one hand and unable to create confusion in the disk order) XP installer then called hda1 as C and sda1 as "D" because that is the order it got from the Bios.

Mohrravvian reported in Post #24 that the Windows in (hd1,0)<---meaning the 1st partition of the 2nd disk boots because the two map statements swap the disk order temporarily on-the-fly to let sda1 regained the first bootable disk status.

There is absolutely no need to do any repair. Have respect for Grub! Let it do its job. People seem to have too many hands and can't wait to interfere!

-------------------------------------------------
How to proceed further from this point

Let's say your Windows boots manually with a Grub CD. You are therefore almost there.

The instructions that you are using to boot the systems up are the very commands that you need to put inside Linux's /boot/grub/menu.lst eventually to boot everything automatically, so do try to understand them.

You can now try to boot up Suse manually using the original menu.lst from post #12
Code:
root (hd0,5)
kernel /boot/vmlinuz root=/dev/hda6 vga=0x31a resume=/dev/hda7 splash=silent showopts
initrd /boot/initrd
boot
The difference of booting a system automatically and manually is you drop the "title" statement and add the red "boot" statement as the green light for Grub to fire up the system.

Once Suse boots up edit its menu.lst to include the lines that work.

Your two systems should live happliy thereafter. Shame about the hand though.
 
Old 01-13-2007, 09:02 AM   #27
Mohrravvian
LQ Newbie
 
Registered: Jan 2007
Location: USA
Distribution: openSuSE 10.2
Posts: 13

Original Poster
Rep: Reputation: 0
saikee

Well, as I said in Post #24, I did try the linux codes you described in your last post. However, after entering the first line "root (hd0,5)", it gives an error message. So, linux will not boot via GRUB yet, only windows. What can I do to fix the linux booting?

jpaulson

FYI, I do have my original XP CD (my system is built by me, not prebuilt) and so that is not an issue. I used the recovery console as described in my earlier posts, including using the fixMBR command, but it did not fix the situation.

I haven't tried any fdisk commands, I am not familiar with those and I guess I'll have to do a little research on how to use that.

Anyway, so those are the 2 things I want to do:

1. Get linux to boot from the GRUB boot disk
2. Get XP to boot without it

Thanks.
 
Old 01-13-2007, 09:18 AM   #28
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
Well I need to know the exact error message.

Your previous post has confirmed that by "geometry (hd0)" command the partition #5 to Grub is
Code:
   Partition num: 5,  Filesystem type is reiserfs, partition type 0x83
Thus on seeing a command
Code:
root (hd0,5)
Grub should report
Code:
Filesystem type is reiserfs, partition type 0x83
At this point Grub is not asked to do anything yet. You have declared to Grub that the root partition you want to boot is the 6th partition of the 1st disk and the response from Grub is the partition type it uncovers.

If you declare "root (hd0,0)" Grub should return filing system unknow Type 0x07 because Grub cannot read a NTFS partition.
 
Old 01-13-2007, 09:26 AM   #29
Mohrravvian
LQ Newbie
 
Registered: Jan 2007
Location: USA
Distribution: openSuSE 10.2
Posts: 13

Original Poster
Rep: Reputation: 0
The error is:

Code:
GRUB Error 25 - Disk Read Error
This is after I enter the command "root (hd0,5)".

With the windows command "root (hd1,0)", GRUB does exactly what you descibed: it returns the message "filesystem unknown Type 0x07".

Thanks!

Moh
 
Old 01-13-2007, 09:44 AM   #30
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
Well your Suse installation has gone south then.

The error means Grub cannot read its content. The command of
Code:
kernel /boot/vmlinuz root=/dev/hda6
mean Grub must go inside the /boot directory, fins a file call vmlinuz and load it up as a kernel. If Grub has a problem to read the hard disk then that is the end of this thread. The reading error may explain why you could not restore Grub into the MBR.

I suggest you to carry out a re-installation, a clean one, and make sure the installer "format" hda6. Watch it like a hawk.

If there is anything valuable inside Suse use the installation CD to boot it up and copy the data out now!
 
  


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
Problem with Boot up loader blackman890 Mandriva 1 04-09-2005 07:12 PM
problem with boot loader makaveli0129 Mandriva 1 11-01-2004 11:20 PM
boot loader Problem sashhoney Linux - Newbie 0 07-24-2003 02:33 AM
boot loader problem rzee Linux - Newbie 12 02-14-2003 11:49 AM
boot loader problem.. rzee Linux - General 1 02-13-2003 01:43 PM


All times are GMT -5. The time now is 05:03 AM.

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