LinuxQuestions.org
Review your favorite Linux distribution.
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-12-2005, 07:02 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

I recommend to cut the loss and forget the Debian and Grub 0.95 are causing the the problem with fd0.

The most you lose is the ability to use fd0 with your version of Debian. You should try a Live CD and test with the fd0. I confirmed that I had the same problem and so there is no evidence a hardware fault.

As far as I am aware fd0 is used by both Linux and Grub. There is a good possibility of something to do with the kernel.

You can generate Grub floppy (unattached to a system) by a Live CD, say from Ubuntu, Mepis, Damn Small Linux.. Why keep flogging a dead horse?

I take it you have completed the Step 1 of my suggestion without a problem.
 
Old 11-12-2005, 01:24 PM   #17
slap
LQ Newbie
 
Registered: Nov 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Ok I managed to download an Ubuntu live and get it up and running without too much trouble.

I assume I'll be able to create a grub floppy from Ubuntu using "grub-install /dev/fd0"

Is this correct?
Thanks again
 
Old 11-12-2005, 05:09 PM   #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
No

grub-install transfers a Linux boot loader onto a floppy. Your Debian has a problem of reading fd0 so it is out.

If you do a grub-install with Ubuntu it only boots Ubuntu and no good to your Debian. right?

So you only want Ubuntu to create a Grub floppy unattached to an operating system so that you can use it as a trump card to boot every system in a PC, including Debian and XP.

I repeat the instruction below

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

The traditional method of locating the original source of stage1 and stage2 files is to ask Linux to find it for you. So while in Ubuntu (from Live CD) do a

find / -name stage1

The record I kept indicates Ubuntu keeps these two files in /lib/grub/i386-pc directory. You then cd to the directory located by the find command and do the two dd statements .

dd if=stage1 of=/dev/fd0 bs=512 count=1
dd if=stage2 of=/dev/fd0 bs=512 seek=1

That is the method recommended by "Linux in a nutshell" and also the "Grub Manual"
-----------------------------------------
 
Old 11-13-2005, 07:47 PM   #19
slap
LQ Newbie
 
Registered: Nov 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Ok I screwed up big time, now I can't boot either OS. Here is what I did...

1. I was able to create the boot floppy from the Ubuntu Live Cd.

2. I used the windows recovery cd and ran FIXMBR. The output was
Code:
\Device\Harddisk0\Partiton0
Windows still did not boot.

3. Now I used the windows recovery and ran FIXBOOT.
The output was
Code:
 target partition is E:
4. So..when I attempt to boot from the hard drive get
Code:
NTLDR is missing
5. I'm not really sure how to use the GRUB floppy.
To boot Debian from the floppy...
Code:
root (hd0,0) chainloader +1 boot

and I get
Code:
NTLDR is missing Please any key to restart
 
Old 11-14-2005, 02:43 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
To use the Grub floppy you tyoe one line at a time, exactly as what I have showed to you

root (hd0,0) <---- tells Grub the root partition to be booted is in 1st disk 1st partition. Frub will responds back by telling you the partition type/ 0x07 for NTFS and 0x83 for Linux.

chainloader +1 <---- tells Grub you want it to boot the boot loader in side the root partition of (hd0,0). A silence from Grub means it has found it. Grub will tell you immediately if there is a problem

boot <------- is the green light for Grub to go ahead.

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

The Grub floppy can also allow you to boot Debian if you know the name of its kernel. I have just tried my Debian in hda15 as follow (to make sure it works before writing this reply)

root (hd0,14)
kernel /boot/vmlinuz-2.2.20-idepci root=/dev/hda15 ro
boot

and it works.

I initially made a mistake in the name by using idecpi instead of idepci and Grub responds no such file. I then boot it with hda27 Slackware's kernel because it has no extra bits after vmlinuz.

root (hd0,14)
kernel (hd0,26)/boot/vmlinuzi root=/dev/hda15 ro
boot

And Debian was booted up. Then I could see my mistake by ls /boot in Debian.

So the tool is there for you to use. You have to study each step and substitute the relevant partition and kernel name in your case.

Normally a Linux needs to boot both kernel (vmlinuz) and the initial ramdisk initrd but the latter isn't used by my Debian.

---------

Go ahead to boot Debian first, try the Windows later

Last edited by saikee; 11-14-2005 at 02:47 AM.
 
Old 11-14-2005, 03:02 PM   #21
slap
LQ Newbie
 
Registered: Nov 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Ahhhh I see, I didn't know I needed to add the kernel information. The kernel I'm using is 2.6.8-11-amd64-generic. So at the GRUB prompt I need to run.

Code:
root (hd0.0) kernel /boot/vmlinuz-2.6.8-11-amd64-generic root=/dev/hda1 ro boot
I'll give this a try when I get home in a few. Getting the debian back up is my primary concern. I've been without windows for a few months but I'm kind of getting the itch to play a little BF2. I forsee a reinstall of XP once I get Debian booting again.
 
Old 11-14-2005, 05:00 PM   #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
I repeat do each line at a time, not all 3 ine one line please

root (hd0.0)

kernel /boot/vmlinuz-2.6.8-11-amd64-generic root=/dev/hda1 ro

boot

because you get a reply if something goes wrong. Grub would tell you what kind of problem if it can't do the thing you instruct it to do.

Also you will be wasting my time if you cant boot XP with the grub floppy.

Your original Grub instructions to boot XP by /boot/grub.menu.lst were

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

With Grub floppy booting into a Grub prompt you omit the title line and add

boot

after pressing "Enter" for the last line.

and the XP should come up. If it fails it is because you have changed the connection or BIOS boot sequence.
 
Old 11-14-2005, 06:38 PM   #23
slap
LQ Newbie
 
Registered: Nov 2005
Posts: 17

Original Poster
Rep: Reputation: 0
okay...

Code:
root (hd0,0)
Code:
kernel /boot/vmlinuz-2.6.8-11-amd64-generic root=/dev/hda1 ro
Code:
boot
This doesn't not give any errors. It begins to boot then I get the following error
VFS: Cannot open root device "<NULL>" or unknown block (8,1). Please append a corect "root=" boot option

Is hda1 not my root partition? I tried root=dev/hda (1,2,5,6) and none worked.
 
Old 11-14-2005, 06:42 PM   #24
GNewbie
Member
 
Registered: Sep 2005
Distribution: (U/K/X)buntu 6.1 (newer box) / D*mn Small Linux (older box)
Posts: 314

Rep: Reputation: 31
if you need to get into windows and do file maintenance, try using bart's pe...

http://webserver.computoredge.com/ed...ver&issue=2345

i had a boot.ini problem and was able to rename the file and change the name of my backup to boot.ini.

worked like a charm.

if you want quick results, you can forget about including mcafee, spybot, adaware, etc... you can probably just slipstream barts and your xp disk as per the instructions.

best of luck,

GN
 
Old 11-14-2005, 06:53 PM   #25
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
In Grub prompt you can type help to get the commands available to you

geometry (hd0)

will list all the partitions in the fist disk. That should give you some idea of your root partition.

Do also geometry (hd1) and so on to know your own partitions.

Also Grub will confirm the partition type after the first statement. Does this match your expectation? Type 0x83 partition is Linux, 0x7 is NTFS, 0x82 is swap.

You should also get a line of text if Grub accepts yopur kernel statement

I got the feeling that you have 2 partitions of /boot in hda1 and / in hda6.

Therefore

root (hd0,5)

kernel (hd0,0)/boot/vmlinuz-2.6.8-11-amd64-generic root=/dev/hda6 ro

boot

should yield result.

Last edited by saikee; 11-14-2005 at 06:58 PM.
 
Old 11-14-2005, 07:00 PM   #26
slap
LQ Newbie
 
Registered: Nov 2005
Posts: 17

Original Poster
Rep: Reputation: 0
yes after entering root (hd0,0) I get Filesystem type is ext2fs partition type 0X83

Grub also accepts my kernel statment.

The error occurs a few seconds after the boot process starts.

I will attempt your suggestion...
 
Old 11-14-2005, 07:49 PM   #27
slap
LQ Newbie
 
Registered: Nov 2005
Posts: 17

Original Poster
Rep: Reputation: 0
output from the geometry commands

geometry (hd0)
Code:
drive 0x80: C/H/S = 1023/255/63
Code:
Number of sectors = 156368016, LBA
Code:
Parititon number 0: Filesystem type ext2fs partition type 0x83
Code:
Parititon number 4: Filesystem type unknown partition type 0x82
Code:
Parititon number 5: Filesystem type ext2fs partition type 0x83
geometry (hd1)
Code:
drive 0x81: C/H/S = 1023/240/63
Code:
Number of sectors = 72303840, LBA
[CODE]Parititon number 0: Filesystem type unknown partition type 0x7/CODE]

Thank you again for your time and suggestions
 
Old 11-15-2005, 02:34 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
OK slap. I have been answering a few other posts and may not remeber evrying you have got. However reading back I am sure your Debian was bootable before.

The exact way Debian boots up itself is described in /boot/grub/menu.lst, which I thought you have been able to access, instead of keep guessing as what we did together.

Now I realise you also have a Live Ubuntu CD so lets do the minimum.

In case I haven't told you before a Live CD can rescue a distressed Linux and you have Debian's Grub working nicely before in the MBR, so let's put its Grub back. I was side-tracked by its inability to write Grub on fd0.

I describe the steps as follow

Boot up Ubuntu Live CD
click system/root terminal<-----------Ubuntu should tell you the password, if not type su in terminal
mkdir /mnt/hda6 <--------------make a temp. directory in /mnt
mount /dev/hda6 /mnt/hda6 <----------mount device hda6 on the temp directory
chroot /mnt/hda6 <------------you change root to Debian hda6. If you manage this far then you are inside Debian now, it is fun isn't it?
grub-install /dev/hda <----------------You ask Grub to install itself into the whole disk of hda, that mean MBR of hda
reboot

Remove the Live CD and Your Debian should be up again

Post mortem------------------

While inside Debian, either after change root or have it up and running, print out or write down the content of /boot/grub/menu.lst and unstand what has gone wrong with your previous instructions. I prefer you list its content here and tell us your comment.

-----------------------------------
Windows problem

You will notice that the No. of heads reported by Grub is different to previously reported in fdisk after you have deleted the 2nd partition. I don't like 240 in the middle of C/H/S because it should be 255 as hda.

You may need to do more investigation in cfdisk and fdisk. Do change it now. Report to us if you can mount it and obtain all its information.
 
Old 11-15-2005, 06:45 AM   #29
slap
LQ Newbie
 
Registered: Nov 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Thank you again for your patience. I'm learning a lot from each of your posts.

Yes you are correct, Debian was fully functional before I ran fixboot and fixmbr from windows restore cd. I'm confident my Debian problems were caused by that.

1. GRUB
I was only able to get to step 2 of your instructions. I created the directory with no problems. Here is the error output...

root@ubuntu:/# mount /dev/hda6 /mnt/hda6
mount: wrong fs type, bad option, bad superblock on /dev/hda6,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

2. Windows
I was able to mount the sda that contains the windows partitions. The following gave no errors.
root@ubuntu:/# mkdir /mnt/windows
root@ubuntu:/# mount /dev/sda1 /mnt/windows

3. fdisk
Just to be complete I ran fdisk again.

Disk /dev/hda: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

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

Disk /dev/sda: 37.0 GB, 37019566080 bytes
255 heads, 63 sectors/track, 4500 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 4499 36138186 7 HPFS/NTFS



(I'm off to work so it will be several hours before I'm back at this machine.)
 
Old 11-15-2005, 07:59 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
OK your Debian has proved stubborn.

Before doing anything why not add the type parameter in the mount statement since Grub has confirmed, also fdisk too, that hda6 is ext2. So try

mount -t ext2 /dev/hda6 /mnt/hda6

It may be just enough but if it does your situation is as follow.

Windows parition sda1 can be mounted but not yet bootable. This is the time to do a back up of your data. When come to a push you might to to do a reinstall of XP. Have you tried booting XP with the instructions I gave in #22 post? What was the reply from Grub? The Grub floppy. unattached to a system, can boot any system and is a very important tool.

Debian was working fine before untill XP's MBR overwrote Grub. Now the partition cannot be mounted. However you can still boot it with the Grub floppy except you do not have the exact loaction of the kernel and its name. My guessed location has not been successfull.

root (hd0,5) <---------------assumes your /root is in hda6
kernel (hd0,0)/boot/vmlinuz-2.6.8-11-amd64-generic root=/dev/hda6 ro<-----------assumes /boot is in hda1, /root in hda6
boot

You have not ey report back the error from the above after I have swap the

root=/dev/hda6 with root=/dev/hda1

in the kernel statement. As far as from your information Grub took in the root and kernel statements without complaint. This indicated

/boot/vmlinuz-2.6.8-11-amd64-generic

was discovered in (hd0,0) and the filename is correct.

I need to know what kind of error you were getting after telling Grub

root (hd0,5) and NOT root (hd0,0)
root=/dev/hda6 and NOT root=/dev/hda1 in the kernel statement.

It is possible that you may not have implemented everything I said. I have managed to hang on to your kernel name from hda1 by calling the kernel (hd0,0)/boot/vmlinuz------- instead of just /boot/vmlinuz................
 
  


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-30-2005 11:05 PM
Fedora Core 3 Dual Boot, Dual Hard drives, Grub Boot Loader Denali03 Linux - Newbie 1 03-04-2005 01:44 PM
Dual Boot gone horribly wrong, help!! pantheman Linux - Newbie 7 07-28-2004 01:49 AM
Dual-Boot gone wrong? RallyMonkey Fedora - Installation 7 05-17-2004 10:41 PM
LILO using wrong kernel on dual boot system MS3FGX Linux - General 7 03-08-2004 12:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:14 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