PDA

View Full Version : A linux virgin's first dive.. GRUB?



czarspuppet
20th August 2006, 08:59 PM
I install FC5 with the basic options w/ complete partition removal. System restarts w/o CD and I get.... a prompt

grub> _

The last symbol sat there, blinking at me, telling me.. "stupid! stupid! stupid! stupid! stupid!"
Great, just great, a command line bootloader. I thought bootloaders went out of style over a decade ago. Out of fear I reinstall immediately, finding the option to not use a dreaded bootloader.. At the end I still got the damned prompt..

grub> kill yourself

Error 27: Unrecognized command

:confused:

bob
20th August 2006, 09:05 PM
You're going to need a bootloader, whether grub or some third party version. If you want to install grub at this point, here's a quick method:

1. Boot off the 1st Fedora CD or use the Fedora Rescue CD
2. At the boot prompt type 'linux rescue'
3. The rescue mode will find the fedora installation
4. Type 'chroot /mnt/sysimage' (without quotes)
5. Type 'grub-install /dev/hda' (assuming that Fedora is on the first hard drive - it would be hdb if second, etc.)

Reboot and see if you get Fedora this time.

czarspuppet
20th August 2006, 09:06 PM
You're going to need a bootloader, whether grub or some third party version. If you want to install grub at this point, here's a quick method:

1. Boot off the 1st Fedora CD or use the Fedora Rescue CD
2. At the boot prompt type 'linux rescue'
3. The rescue mode will find the fedora installation
4. Type 'chroot /mnt/sysimage' (without quotes)
5. Type 'grub-install /dev/hda (assuming that Fedora is on the first hard drive - it would be hdb if second, etc.)

Reboot and see if you get Fedora this time.
did it, same prompt.

edit: isnt grub obviously installed anyways?

bob
20th August 2006, 09:08 PM
That was quick! Guess you'd already tried that, huh? Well, can you give us some specifics of your hard drives and partitions? Do you have Windows currently installed? Might help if we knew if there was raid involved too.

dickinsd
20th August 2006, 09:11 PM
:-D like the kill yourself command.

I may be wrong - but I am fairly sure you NEED a boot loader, however when working correctly you should see a fedora logo and it will usually countdown for about 8 seconds before loading the default OS - if you plan on only having one OS you can edit the number of seconds the Grub boot loader screen waits.

You don't need to reinstall, I think you will be able to follow these instructions for advice as how to repair or add a grub boot loader to an existing system:

Repairing the Grub boot loader (http://www.linuxjourney.com/modules/newbb/viewtopic.php?topic_id=106&forum=8).

Have a read through and see if it helps you out.

Dave

czarspuppet
20th August 2006, 09:12 PM
That was quick! Guess you'd already tried that, huh? Well, can you give us some specifics of your hard drives and partitions? Do you have Windows currently installed? Might help if we knew if there was raid involved too.
I had already tried that before thread'ing here.
1 40GB hard disk. The default partition options(whatever those are?) w/ all partitions removed before installation (so no windows). Assume that theres no RAID ;)

anything else?

hold on I should reproduce this error message I got, 1 minute

czarspuppet
20th August 2006, 09:17 PM
sh-3.1# /mntsysimage
sh-3.1# grub-install /dev/hda
/dev/hda: Not found or not a block device

bob
20th August 2006, 09:24 PM
Well, it doesn't seem to like /dev/hda, maybe bad terminology? If it's a sata drive, might want /dev/sda ? So, let's try and find out: While you've got the rescue disc booted, try 'fdisk -l' (that's the lower case L) to see what the computer thinks the drive's all about. Please post the response.

czarspuppet
20th August 2006, 09:37 PM
http://img520.imageshack.us/img520/7572/screeeeenshoootca8.jpg
imageshack being a hoe today.. hope it displays.

czarspuppet
20th August 2006, 09:43 PM
I'm guessing that /dev/hdc1 or /dev/hdc2 is the correct path...

EDIT: ...or not.. lol

EDIT: oooo /dev/hdc looks like the ticket

EDIT: I'm taking my verified disk for round 3 of install. All default :0 Another nix'er suggested my installation is buggered. Selected complete partition removal.

czarspuppet
20th August 2006, 10:32 PM
okay, same problem.. or is this even a problem?

How do I get to the graphical grub menu? apparently there be one...

bob
20th August 2006, 10:40 PM
Well, yes, there is a graphical grub menu - it's blue; not much more to say about it. However, you're right about the 'grub-install /dev/hdc' (don't use the 'hdc2') being the correct path in your case. So, let's try the stuff from post #2, but substitute 'hdc' and it should work.

czarspuppet
20th August 2006, 10:57 PM
grub-install /dev/hdc
~

GRUB Loading stage1.5.



GRUB loading, please wait...
Error 21
_ <-- blink blink blink blink (stupid stupid stupid stupid stupid)

bob
20th August 2006, 11:04 PM
(Still can't figure out where hda and hdb went???? - it's SUPPOSED to be hda, then hdb and 3rd drive hdc). Well, let's try this:
grub-install --recheck /dev/hdc

czarspuppet
20th August 2006, 11:11 PM
grub-install --recheck /dev/hdc
~

grep: /boot/grub/device.map: No such file or directory
/sbin/grub: Not found.

EDIT: yea thats how anaconda set it up for me.. This spare comp of mine used to run as a PVR box under winXP, but the freeware PVR software for windows pales to the nix stuff (so they say).. I thought I'ld give nix a shot.. I'ld be trying this out on one of my other boxes but the lot of em need to be rebuilt (just moved back to NOLA).

:p

pewterdragn
20th August 2006, 11:24 PM
/dev/hdc means that the drive is installed on the secondary master IDE channel... most likely added to the system after system build.

Since you are getting to stage1.5 grub is loading fine... it just can't find your /boot directory on start.



Error 21 means : Selected disk does not exist
This error is returned if the device part of a device- or full file name
refers to a disk or BIOS device that is not present or not recognized by the
BIOS in the system.

Is the disk setup in your BIOS correctly? Make sure the disk is not OFF... set it to AUTO.

If is it set to AUTO, please post your grub.conf and device.map here.

czarspuppet
20th August 2006, 11:31 PM
If is it set to AUTO, please post your grub.conf and device.map here....how? should be AUTO.

EDIT: Yep, AUTO, and yep, Channel 2 Master (IDE) I suspected that too. I had a bent slot that made me put the DVDROM and the HD (a sexy rubber enhanced Seagate) on different channels.

bob
20th August 2006, 11:35 PM
Thanks, Pewterdragn - that's finally an reason for the weird labelling. I think you're onto the right track there.

czarspuppet
20th August 2006, 11:37 PM
Just very, very strange. You could try 'whereis grub' and see if it even recognizes anything or just returns "grub" without a location.

Frankly, I'm at a loss. Your single drive should be reading 'hda', not 'hdc' and I can think of no reason why that's happening if there's only one drive in that machine. You say you wiped the drive earlier. What was on it before? Not something with hidden partitions? How did you remove the partitions?
As far as im concerned, windows installer (used a win2k disk) showed all disk space as unallocated at around my 2nd install attempt. I havn't done a complete format but I reallllly doubt that will change anything.. unless nix file system sees raw data?

:)

EDIT: I try redo this with HD on channel 1 Master and DVDROM on channel 3 (didn't know this thing had 3 IDE channels. humpft.. gunna find that 3rd slot)

pewterdragn
20th August 2006, 11:44 PM
I'm assuming that you have one DVD-ROM and one HDD... no windows disks...

I think we really need to see you device.map and grub.conf to get much further...

Also, your parition table looks like you choose the defaults... small /boot and an LVM partition for everything else. Let us know if thats not the case.

** I really dislike LVM :P I guess I'm oldschool with my partitioning **

bob
20th August 2006, 11:46 PM
Well, let's go and see if we can make sense of the grub.conf (hopefully THAT exists!). So, from your rescue cd:


less /boot/grub/grub.conf

pewterdragn
20th August 2006, 11:47 PM
I try redo this with HD on channel 1 Master and DVDROM on channel 3 (didn't know this thing had 3 IDE channels. humpft.. gunna find that 3rd slot)

When you are using IDE you have two controllers, each with a MASTER and a SLAVE channel. The primary controller has MASTER (hda) and SLAVE (hdb) devices and the secondary controller has MASTER (hdc) and SLAVE (hdd). You'll only see the second devices if you plug something into the second port on the ribbon cable (I don't recommend that).

czarspuppet
20th August 2006, 11:47 PM
I dare someone to ask me if I have a floppy disk drive :P

And for some reason the BIOS thinks I have 4 IDE channels.. silly SIS chipset.

EDIT: pewter I've had things run alone on the slave position before, it either works or it doesnt. :P

bob
20th August 2006, 11:48 PM
Pewterdragn, I'm currently in another distro - please tell him the path to device.map - thanks & I'll let you fix this up with that info.

czarspuppet
20th August 2006, 11:52 PM
fdisk now shows the drive as hda after the move to IDE channel 1 master. (wonder what it would do in my SATA system?)

still, the old commands in various ways give the same result.. want Ishould do a full format and reinstall before we continue? :)

EDIT: no I havn't adjusted the partitioning, but I've read about it. I figure the simple installation should be enough gooey to get a PVR running... don't really care for file system tweaking.

pewterdragn
20th August 2006, 11:52 PM
device.map is right next to grub.conf:


cat /boot/grub/device.map

czarspuppet
20th August 2006, 11:54 PM
device.map is right next to grub.conf:


cat /boot/grub/device.map
no such file or directory

pewterdragn
20th August 2006, 11:57 PM
fdisk now shows the drive as hda after the move to IDE channel 1 master. (wonder what it would do in my SATA system?)

still, the old commands in various ways give the same result.. want Ishould do a full format and reinstall before we continue? :)

Follow the commands previously posted so we can see some of your config first. You almost never have to re-install with Fedora... you can work yourself out of a corner of almost anything ;)

pewterdragn
21st August 2006, 12:00 AM
Are you booted from rescue disk? if so, try:

cat /mnt/sysimage/boot/grub/grub.conf
cat /mnt/sysimage/boot/grub/device.map

if your boot directory is empty do this:

mount /dev/hda1 /mnt/sysimage/boot

then try the previous commands while I run out to the store for 15 minutes ;)

czarspuppet
21st August 2006, 12:02 AM
if your boot directory is empty do this:

mount /dev/hda1 /mnt/sysimage/boot

then try the previous commands while I run out to the store for 15 minutes ;)
~
mount:
Cannot read /ect/fstab: No such file or directory

czarspuppet
21st August 2006, 12:12 AM
Are you booted from rescue disk? if so, try:

cat /mnt/sysimage/boot/grub/grub.conf
http://img217.imageshack.us/img217/6711/etalsh6.jpg

cat /mnt/sysimage/boot/grub/device.map
~
# this device map was generated by anaconda
(hd0) /dev/hdc

I think having installed and then tweaked as hdc might be a problem.. It still mentions hdc there at any rate.

pewterdragn
21st August 2006, 12:30 AM
Yeah thats a problem: device.map needs to be hda since you changed the cables.

Do you know how to edit the file?

jim
21st August 2006, 12:49 AM
As quoted above...

"Dam you Logical Volumes"
I too am old school when partitioning...

Well if you really want to re-install Partition the drive your self. This way you know what is going on.

100 /boot
1000 /swap

the rest /root

Enjoy if that is the way you go!

czarspuppet
21st August 2006, 01:24 AM
10 minutes until install finishes.

....why am I thinking about penguins?

EDIT: ohh hi Jim, I just moved from buffalow :P

pewterdragn
21st August 2006, 01:26 AM
....why am I thinking about penguins?


haha :)

Cause they are cute? :cool:

czarspuppet
21st August 2006, 01:35 AM
Problem solved. It would seem for this configuation having hdc = IDE channel 2 Master = bad.

booted into fedora, its very pretty.

Later :p

PS yes I did reinstall, no I didn't format.

pewterdragn
21st August 2006, 01:38 AM
Glad to hear its working for you!

bob
21st August 2006, 02:01 AM
Excellent news! Enjoy it, you've earned it!