View Full Version : Installing Gentoo, grub help.
Tbagz
21st October 2005, 08:25
I just ran the "grub-install" and got this back:
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
Installation finished. No errors reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script "grub-install".
(fd0) /dev/fd0
(hd0) /dev/hda
my partitions are:-----------------------------------blocks
/dev/hda1 /boot--------grub=(hd0,0)-------32M-----31720+
/dev/hda2 /swap-------grub=(hd0,1)-------512M----258552
/dev/hda3 extended----grub=???????-------9216M---9675288
/dev/hda5 /root--------grub=(hd0,2)or3?---4096M---2064856+
/dev/hda6 /home-------grub=(hd0,3)or4?---5120M---7610368+
Im stumpped :confused:
Tbagz
21st October 2005, 09:59
ok i see now. it is tryint to install grub to fd0, my floppy drive...lol
how o i get it to stop. and install to (hd0,0)?
falko
21st October 2005, 10:00
fd0 is your floppy drive. I guess there wasn't a diskette in there when the errors were reported. I think you can forget about the error. :)
Tbagz
21st October 2005, 10:06
how do I get it to install with out acessing the floppy?
I tried grub --no-floppy and now im in grub but I dont think it is installed......
falko
21st October 2005, 11:38
how do I get it to install with out acessing the floppy?
Good question. :confused:
If you don't need the floppy, remove/disconnect it from your computer.
Maybe you can then have a look at the Grub configuration, install Grub again with the floppy connected, and compare the new configuration and make the appropriate changes...
Tbagz
22nd October 2005, 09:44
one more question about grub
If my root partition is /dev/hda5 =(hd0,4) and grub is acking for root in the conf do i write (hd0,4) or is it asking for boot, when it says root? IO am getting conflicting answers from reading FAQs.
Any help would be great.
default 0
timeout 30
splashimage=(hd0,0)/grub/splash.xpm.gz
title=Gentoo Linux 2.6.11-r11
root (hd0,0)
kernel /kernel-2.6.11-gentoo-r11 root=/dev/hda3
Tbagz
22nd October 2005, 10:51
well I did this:
default 0
timeout 20
splashimage=(hd0,0)/grub/splash.xpm.gz
title=Gentoo Linux 2.6.12-r6
root (hd0,4)
kernel /kernel-2.6.11-gentoo-r11 root=/dev/hda5
upon reboot I got the splashscreen to choose the kernel. After choosing I get this:
Booting 'Gentoo Linus 2.6.12-r6'
root (hd0,4)
Filesystem type is ext2fs, partitin type 0x83
kernel /kernel-2.6.12-gentoo-r6 root=/dev/hda5
Error 15: File not found
Press any key to continue...
falko
24th October 2005, 16:29
On a Debian system it looks like this:
default 0
timeout 5
color cyan/blue white/blue
title Debian GNU/Linux, kernel 2.6.8-2-386
root (hd0,0)
kernel /boot/vmlinuz-2.6.8-2-386 root=/dev/sda1 ro
initrd /boot/initrd.img-2.6.8-2-386
savedefault
boot
title Debian GNU/Linux, kernel 2.6.8-2-386 (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.8-2-386 root=/dev/sda1 ro single
initrd /boot/initrd.img-2.6.8-2-386
savedefault
boot
HTH.
Tbagz
25th October 2005, 02:16
ok so instead of
default 0
timeout 20
splashimage=(hd0,0)/grub/splash.xpm.gz
title=Gentoo Linux 2.6.12-r6
root (hd0,4)
kernel /kernel-2.6.11-gentoo-r11 root=/dev/hda5
it should have been:
default 0
timeout 20
splashimage=(hd0,0)/grub/splash.xpm.gz
title=Gentoo Linux 2.6.12-r6
root (hd0,0)
kernel /kernel-2.6.11-gentoo-r11 root=/dev/hda1
But my next problem comes in here :D I know, I am sorry :D I went ahead and turned off the computer because It was 0500 in the morning. now I cant get back to where I was. when I try to mount and chroot i get file or directory not found. so I dont know how to mount back in to see my grub.conf of I just messed it up anyway and have to start over? I hope not but I will.
themachine
26th October 2005, 04:46
NOTE BEFORE ANYTHING: The bigest confusion is between what GRUB calls 'root' and what linux mounts as 'root' or '/'.
GRUB => root(hd0,0) specifies the 'root of where grub is installed', or in other words '/boot'.
LINUX => 'root' refers to the '/' partition.
now...
I'm assuming this:
/dev/hda => the primary disk
(hd0,0) => /dev/hda1 => /boot
(hd0,1) => /dev/hda2 => swap
(hd0,2) => /dev/hda3 => /tmp
(hd0,3) => /dev/hda4 => /
/boot/vmlinuz-2.6.12-9 => kernel
/boot/initrd-2.6.12-9.img => initrd image file
If your first partition (/dev/hda1) is '/boot' then the following is what you would want to do in order to setup grub.
I first run the grub-install util to install to the Master Boot Record:
grub-install /dev/hda
Then, setup grub by executing the 'grub' command:
# grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
Again, as stated above, in this section 'root' refers to the 'root directory that grub is installed' which is the first partition on our hda disk (/dev/hda1 => /boot). If you do *not* have a separate '/boot' partition... then this will be the '/' partition.
After this you should have the folder '/boot/grub' with associated files. Assuming your kernel is something like '/boot/vmlinuz-2.6.12-9' then you would need, at the least, the following in '/boot/grub/grub.conf':
(Please note that some distros recognize '/boot/grub/menu.lst' rather than '/boot/grub/grub.conf'... and most link them one way or the other so that both work.)
timeout 5
default 0
title Linux Kernel (vmlinuz-2.6.12-9)
root (hd0,0)
kernel /vmlinuz-2.6.12-9 root=/dev/hda4
# if using initial ramdisk, uncomment the following line
# initrd /initrd-2.6.12-9.img
line 1) Title line (obvious)
line 2) root(hd0,0) specifies the partition that holds grub ('/boot')
line 3) specifies where the kernel is on (hd0,0)... i.e '(hd0,0)/vmlinuz-2.6.12-9' is the same as '/boot/vmlinuz-2.6.12-9' and since you have specified 'root (hd0,0)' then the same thing is written as '/vmlinuz-2.6.12-9'. The second part to this is the 'root=' line. This directive specifies where your ROOT partition is... i.e '/'. So if '/dev/hda4' is the partition that is mounted as '/'... then you would want 'root=/dev/hda4'.
line 4) Specify where the initrd is found. This depends on how your kernel was compiled. To see, grep your kernel .config file (usually found as '/boot/config-[kernel version]') or wherever you compiled the kernel ('/usr/src/linux-2.6.12-9/.config' ... etc). Typing the following will show whether it was compiled:
cat /boot/config-2.6.12-9 | grep -i initrd
CONFIG_BLK_DEV_INITRD=y
for 'yes', or
CONFIG_BLK_DEV_INITRD=m
for 'module', or
CONFIG_BLK_DEV_INITRD=n
for 'no'
SAVING YOURSELF.... FROM A BROKEN GRUB INSTALL...
If you gotten yourself in a pickle, don't fret. Basically, when the system boots to the GRUB boot loader you can manually execute what *should* be in your /boot/grub/grub.conf.
So, you boot to GRUB and it does nothing.... do the following:
type 'c' for a grub> command prompt.
type 'root(hd0,0)' or whatever your 'grub root partition is'.
you should see something like:
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
if not, you might see
grub> root(hd0,2)
Filesystem type unkown
or something like that. Then type your kernel line (note that you can use TAB COMPLETION just like in bash... very nice!)
grub> kernel (hd0,0)/vmlinuz-2.6.12-9 root=/dev/hda4
[Linux-bzImage, setup=0x1400, size=0x124587]
if you type it wrong
grub> kernel (hd0,0)/vmlinuz2.6.12-9 root=/dev/hda4
Error 15: File not found
If you need to specify an initrd... just type that line too:
initrd (hd0,0)/initrd-2.6.12-9
Once your done, just type 'boot' and you should be good to go.
Tbagz
26th October 2005, 08:22
thanks machine, what you said seemed to work but on par with my current streak with gentoo I type boot and it seems to hang there. so I may just hang it up and begin from the begining again...lol. But your help is greatly appreciated.
falko
26th October 2005, 22:23
You can try to repair your system with a Linux rescue CD like Knoppix or Timo's Rescue CD ( http://rescuecd.sourceforge.net/download.html ).
themachine
26th October 2005, 23:24
thanks machine, what you said seemed to work but on par with my current streak with gentoo I type boot and it seems to hang there. so I may just hang it up and begin from the begining again...lol. But your help is greatly appreciated.
I think the key word here is.... "gentoo". Do yourself a favor, learn to hate gentoo.... and never look back. NEVER LOOK BACK!!! ;)
Tbagz
27th October 2005, 08:49
Ha, yeah I heard I should not start with gentoo. but I have heard good things. We'll see. i may start to fell the same way after one or two more of these. I think my main problem is not the version or linux. it is just me being a noob and not sure what im doing yet.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.