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-25-2006, 05:27 PM   #1
sr_25
Member
 
Registered: Nov 2005
Location: Colorado
Posts: 122

Rep: Reputation: 15
help with grub-install.


I finally found out after about my 7th triple boot install that my hard drive was going out so I have replaced it. Now, I am having difficulty installing grub.

First some generic info. I am triple booting Windows 2000, XP pro and Slackware 10.2. I downloaded grub from here:
...http://slackware.it/en/pb/browse.php?q=10.2/extra/grub

I created my grub floppy and it works flawlessly. Here is what works when booting from the floppy:
...root (hd0,7)
...kernel /boot/vmlinuz root=/dev/hda8 ro
...boot

Okay, so now when I type:
...install-grub /dev/hda
I get the following:
...rm: cannot remove '/boot/grub/stage1': Is a directory

From a search here I turned this up:
Edit etc/fstab
...from "/dev/hda1 /c vfat defaults 1 0"
and changed it to:
..."/dev/hda1 /c vfat iocharset=utf8,umask=000 0 0"

I then checked in Konqueror under permissions and owner, group, and others has been changed to 'Can view and modify contents', but I still get the same error:
..rm: cannot remove '/boot/grub/stage1': Is a directory

So what have I done incorrectly?

Thanks,

Another Linux Newbie!
 
Old 01-25-2006, 05:35 PM   #2
LLS
Member
 
Registered: Sep 2003
Location: North America
Distribution: FC6 FC7 F8
Posts: 75

Rep: Reputation: 15
Check this how to for ideas
http://www.fedoraforum.org/forum/showthread.php?t=975
 
Old 01-25-2006, 06:30 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
TWO Windows installs and only one Linux!!!! tragic...

Here is the ultimate multi-boot guru's grand achievement: http://www.justlinux.com/forum/showt...hreadid=143973

If he can boot 100, then any of us can surely boot 2 or 3
 
Old 01-25-2006, 06:35 PM   #4
sr_25
Member
 
Registered: Nov 2005
Location: Colorado
Posts: 122

Original Poster
Rep: Reputation: 15
Okay, I used a FC4 rescue cd and booted up. Then chroot'ed and ran grub, but when I get to this:
... setup (hd0)
I get this for output:
... Checking if "/boot/grub/stage1" exists... no
... Checking if "/grub/stage1" exists... no

...Error 15: File not found

Looks like I really hosed something up!
Any other suggestions?
 
Old 01-25-2006, 06:39 PM   #5
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Honolulu, HI
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
grub from prompt

# setup (hd0)

Last edited by bosewicht; 01-25-2006 at 06:42 PM.
 
Old 01-25-2006, 06:42 PM   #6
sr_25
Member
 
Registered: Nov 2005
Location: Colorado
Posts: 122

Original Poster
Rep: Reputation: 15
grub-install /dev/hd0
and I get this:
.../dev/hd0: Not found or not a block device.

 
Old 01-25-2006, 06:44 PM   #7
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Honolulu, HI
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
try typing grub at the prompt. You should then be at something like grub#
then type
setup (hd0)
 
Old 01-25-2006, 06:52 PM   #8
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
Right let me have a go

Since you can boot up the Linux then if grub-install fails you can try it in a Grub shell. Just invoke one when you have the root privilege
Code:
grub
root (hd0,7)
setup (hd0)
To setup Grub you must have in /boot/grub these two files

stage1
stage2

The line root (hd0,7) tells Grub go into hda8 to search for it and set itself up in (hd0) which is the whole disk. To Grub that means MBR.

Nothing to it.

If it doesn't work do these

(1) Check stage1 and stage2
(2) To boot it manually (ultimate solution)

The "just booting tips" has all the tricks summarised, inluding the one mentioned above. It is in my signature.
-------------------------------------------------------

The technique used to boot 2 systems is the same for booting a 100 systems. It is actually easy than you guys think, especially if you understand the "chainloading" part. In a nutshell you try to boot every system the way a WIndow is booted.

Last edited by saikee; 01-25-2006 at 07:00 PM.
 
Old 01-25-2006, 07:07 PM   #9
sr_25
Member
 
Registered: Nov 2005
Location: Colorado
Posts: 122

Original Poster
Rep: Reputation: 15
Okay, thanks for all the rapid responses.

typed: "grub"
then "setup (hd0)"
...Error 12: Invalid device requested

What in the hell does this mean? Now I am completely confused so lets see if I have anything right.

1. When in GRUB the first line I type should identify the partition to boot, which since I've installed Slack to hd0,7. Outside of GRUB this should be hda8 right?
..."root (hd0,7)"
output->"Filesystem type is ext2fs, partition type is 0x83"
2. The second line defines the kernel.
..."kernel /boot/vmliuz root=/dev/hda8 ro"
output->"[Linux-bzImage,setup=ox1400,size=0x131676]"
3. The third line is just boot.
..."Boot"

At least this is what I think is right from the searching I have done!?!

Anyone care to shoot my pc for me, I don't know what else to try!
 
Old 01-25-2006, 07:15 PM   #10
sr_25
Member
 
Registered: Nov 2005
Location: Colorado
Posts: 122

Original Poster
Rep: Reputation: 15
Okay, maybe that is the problem I have two FOLDERS in /boot/grub called stage1 and stage2.
Now in folder "stage1" I have a file called stage1 that is 512 b, and in the folder "stage2" I have a file called stage2 this is 101.6 kb.

Is this the problem?
 
Old 01-25-2006, 07:17 PM   #11
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Honolulu, HI
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
Type grub

1)Set the GRUB's root device to the partition containing the boot directory like this:

grub> root (hd0,0)

Filesystem type is ext2fs, partition type 0x83

For example Windows 2000 in hd0,0 ; Windows XP in hd0,1, slackware /boot partition in hd0,2 So in this case the command should be: > root (hd0,2)

If you are not sure which partition actually holds this directory, use the command 'find' like this:

grub> find /boot/grub/stage1

This will search for the file name '/boot/grub/stage1' and show the devices which contain the file.
Once you've set the root device correctly, run the command 'setup'.

2) Then, run the command setup

grub> setup (hd0)

Checking if "/boot/grub/stage1" exists....... no
Checking if "/grub/stage1" exists....... yes
Checking if "/grub/stage2" exists....... yes
Checking if "/grub/e2fs_stage1_5" exists....... yes
Running "embed /grub/e2fs_stage1_5 (hd0)"....... 15 sectors are embedded
succeded
Running "install /grub/stage1 (hd0) (hd0) 1+15 p (hd0,2)/grub/stage2 /grub/grub.conf....... succeded
Done

This command will install GRUB boot loader on the Master Boot Record (MBR) of the first drive.

3) Type quit

grub> quit

GRUB is now in the MBR.

4) Finally, you may have to edit your /boot/grub/grub.conf, for example with nano:

> nano /boot/grub/grub.conf

(/etc/grub.conf or /boot/grub/grub.conf or /boot/grub/menu.lst, they are the same file) This file has the boot partitions of the disk/s.

Just follow the format and add whatever you need for the other OS'es
 
Old 01-25-2006, 07:18 PM   #12
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
Grub needs them in /boot/grub.

The copying should have been just the file and the the whole directory in each case.
 
Old 01-25-2006, 07:37 PM   #13
sr_25
Member
 
Registered: Nov 2005
Location: Colorado
Posts: 122

Original Poster
Rep: Reputation: 15
Wow, I've almost pulled all my hair out!

saikee, I have copied stage1 and stage2 to: /boot/grub.

bosewicht, when I type: grub> "find /boot/grub/stage1" I notice it is searching my floppy drive, how can that be right! Oh yeah, and I still get the error file not found because it's searching my floppy. How can "find /boot/grub/stage1" be looking on my floppy shouldn't be looking in say the obvious place like: /boot/grub.

Sincerely,

Confused.
 
Old 01-25-2006, 07:42 PM   #14
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 is because you were booting from the floppy.

If you invoke the Grub shell after booting into SLackware you will find the search being conducted inside the hard disk.

Have you restored the boot loader yet or not?
 
Old 01-25-2006, 07:55 PM   #15
sr_25
Member
 
Registered: Nov 2005
Location: Colorado
Posts: 122

Original Poster
Rep: Reputation: 15
Hold on I have rebooted and under Konqueror I don't see the files: stage1 or stage2, but when I try to copy them over from the /boot/stage1 and 2 folders it says they are already there.

Show hidden files is checked so what gives?
 
  


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
Grub error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 11:29 AM
fc3 install doesnt install grub properly onto sata drive sabo Linux - Newbie 4 02-03-2007 05:04 PM
[GRUB]how to install grub onto another partition Liquid_T<NL> Linux - Newbie 1 09-05-2005 10:46 AM
Accidental Install of Windows Second....Install GRUB? Brnzwngs Linux - Newbie 6 08-12-2005 02:10 PM
install grub gpamkenny Linux - Software 1 01-20-2005 05:41 PM


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