LinuxQuestions.org
Visit Jeremy's Blog.
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 08-14-2005, 09:20 AM   #1
IwantLINUX
Member
 
Registered: Oct 2004
Location: India
Distribution: RH9,Fedora
Posts: 75

Rep: Reputation: 15
Question Grub!!!!!!!!!!!!!!!


Hi members,

I am having a problem with booting. Earlier i was having two hard disks, primary master (hda for windows) and primary slave ( hdb1 for linux native). I installed GRUB on my primary master's MBR, now my master hard disk has crashed and i made my slave disk as master and installed the GRUB on its MBR. But the problem is i cannot boot my system to linux, if i connect only my linux disk as master, i get "/ label not found" and then "kernel panic---no init found". I am getting the GRUB splash screen and choice, but it is not able to boot. If i connect another HDD as master (with grub installed on MBR) and change the linux disk to slave, it boots fine.
==========================================================
This is working grub.conf (with both the disks)

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd1,0)
# kernel /boot/vmlinuz-version ro root=/dev/hdb1
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd1,0)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd1,0)
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /boot/initrd-2.4.20-8.img
title windows
rootnoverify (hd0,0)
chainloader +1
===========================

This is non-working grub.conf (with only linux disk as master)

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd1,0)
# kernel /boot/vmlinuz-version ro root=/dev/hdb1
# initrd /boot/initrd-version.img
boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd0,0)
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /boot/initrd-2.4.20-8.img
# title windows
# rootnoverify (hd0,0)
# chainloader +1

===========================

pls help
 
Old 08-14-2005, 09:45 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Try using the device name and not the partition label - ie, change:
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/

To:
kernel /boot/vmlinuz-2.4.20-8 ro root=/dev/hda1

Assuming hda1 is your root partition.
 
Old 08-15-2005, 11:36 AM   #3
IwantLINUX
Member
 
Registered: Oct 2004
Location: India
Distribution: RH9,Fedora
Posts: 75

Original Poster
Rep: Reputation: 15
Hi,

i tried changing it to kernel /boot/vmlinuz-2.4.20-8 ro root=/dev/hda1
but it still gives me error:
========================================
hda1:bad access: block=2 count=2
end_request: I/O error, dev 03:01 (hda),sector 2
EXT3-fs: unable to read superblock
mount: error 22 mounting ext3
pivotroot : pivot_root(/sysroot,sysroot/initrd) failed:2
umount /initrd/proc failed:2
freeing unused kernel memory: 132k freed
kernel panic: no init found: Try passing init=option to kernel
=====================

PS: My hda in this case is my hdb (when I am able to boot, with two drives connected and using linux disk as slave)

Last edited by IwantLINUX; 08-15-2005 at 11:38 AM.
 
Old 08-15-2005, 12:16 PM   #4
Kilahchris
Member
 
Registered: Jan 2003
Location: NY
Distribution: Suse 9.0
Posts: 202

Rep: Reputation: 30
you do need to keep /boot/vmlinuz-2.4.20-8 ro root=/dev/hda1

If linux drive is now the primary master.



Im wondering if you need to create a new Initrd
maybe because the initial initrd was a snapshot of hdb1 which is now really hda1???

wouldnt hurt to type man mkinitrd and follow the instructions on created a new ramdisk image.?

mkinitrd will copy a new ramdisk image to /boot

Last edited by Kilahchris; 08-15-2005 at 12:19 PM.
 
Old 08-19-2005, 12:25 PM   #5
IwantLINUX
Member
 
Registered: Oct 2004
Location: India
Distribution: RH9,Fedora
Posts: 75

Original Poster
Rep: Reputation: 15
Hi,

Sorry for the delay. Kilahchris, your advise really seems to be right to the point, but i am still lost...Actually i am only able to boot, if i connect another disk as master. In this case, if i run mkinitrd it will still make my linux disk as slave. I tried using CD rescue mode, with linux disk as master, but it fails with error "Error mounting / file system on /dev/hda1" Invalid argument. Also, i i create a bootable disk, then also it will copy the same initrd.img, with my linux disk as slave. Pls let me know.
 
  


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
Setting password on grub, wha to do after changing default values in /boot/grub/menu. sarajevo Linux - Security 1 08-17-2005 08:01 PM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 08:33 AM
Grub setup problem (/boot/grub/stage1 not found) davidas Debian 2 04-28-2004 08:13 PM
Why grub prompt after installing Grub inder Debian woody 3.0r2? velan Debian 1 04-20-2004 04:55 AM
1st HDD = RH9.0 (grub) ... How do I modify grub when adding 2nd hard disk ? Onyx^ Linux - Software 1 09-05-2003 09:16 AM

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

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