View previous topic :: View next topic |
Author |
Message |
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Mon Apr 23, 2012 6:55 pm Post subject: Strong problem with GRUB (almost solved) |
|
|
Hello,
On my main machine, I had the following setup.
----
IDE :
sda1 : 320 GB data
sda2 : 15 MB Gentoo boot
sdb1 : 40 GB Ubuntu
sdb2 : 1.5 GB swap
SCSI :
sdc1 : 15 MB Gentoo boot
sdc2 : 18 GB Gentoo
sdc3 : 22 GB data
---
sdb is the disk used to boot, using Ubuntu Grub2 with a multi boot. Unfortunately, this disk corrupts it's data in case of power faillure and last time, corrupted even Grub.
After booting with Ubuntu liveCD, I was able to do a chkfs and was able to boot again on Ubuntu ... but grub failled to boot Gentoo saying it can't find sdc1 disk by it's UUID.
I wasn't able to re-install Grub as my Ubuntu was deprecated so I decided to upgrade to the LTS ...
Reboot and ... now it is not anymore to boot :
- booting on Ubuntu (so /sdb1) :
Quote: | mount : mounting /dev/disk/by-uuid/6493890... on /root failled : invalid argument |
booting on Gentoo (/sdc2)
Quote: | error : no such device hd2,1 cannot get C/H/S value |
Unfortunately, my scsi controler can't boot, so using Gparted, I created /sda2 and copy /sdc2 on it (Gentoo boot partition).
From Gentoo install CD, I chrooted on Gentoo and tried to install GRUB on (hd0) but boot is failling as well
(so /sda2) -> Error 17
with (so /sdc1) -> Error 21
I tried everything I found on the net w/o success :
Code: | find /boot/grub/stage1 | displays both (hd0,1) and (hd2,0) so I think the path is correct
as per fdisk, partitions are in the correct orders on all disks ...
I really don't know to do now ???? I'm lost (and I hate Grub ).
Any help greatly appreciated.
Laurent
Last edited by destroyedlolo on Wed Apr 25, 2012 10:41 pm; edited 1 time in total |
|
Back to top |
|
|
Dont Panic Guru
Joined: 20 Jun 2007 Posts: 322 Location: SouthEast U.S.A.
|
Posted: Mon Apr 23, 2012 9:18 pm Post subject: Re: Strong problem with GRUB |
|
|
destroyedlolo wrote: |
- with (so /sda2) -> Error 17
- with
(so /sdc1) -> Error 21
|
With Grub2, the numbering scheme to identify the partitions changed.
hd0 is still sda, but the second parameter starts at '1' now instead of '0'.
So /dev/sda2 would be (hd0,2), and /dev/sdc1 would be (hd2,1).
(hd0,1) is your data drive, so that would explain that error. And (hd2,0) doesn't exist in Grub2. |
|
Back to top |
|
|
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Mon Apr 23, 2012 10:35 pm Post subject: |
|
|
unfortunately, no because it's Grub1 I installed on Gentoo
So those numbers reflect my partitions. |
|
Back to top |
|
|
Dont Panic Guru
Joined: 20 Jun 2007 Posts: 322 Location: SouthEast U.S.A.
|
Posted: Mon Apr 23, 2012 11:06 pm Post subject: |
|
|
It might be worthwhile to confirm that grub is seeing your partition order in the same way as fdisk.
When you get your Grub1 menu during boot, hit the "c" key. This will give you a command menu.
Run:
Code: | geometry (hd0)
geometry (hd1)
geometry (hd2) |
See if that matches what fdisk is reporting. |
|
Back to top |
|
|
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Tue Apr 24, 2012 4:58 pm Post subject: |
|
|
Code: | livecd / # fdisk -l
Disque /dev/sda��: 320.1��Go, 320072933376 octets
255 t��tes, 63 secteurs/piste, 38913 cylindres, total 625142448 secteurs
Unit��s = secteurs de 1 * 512 = 512 octets
Taille de secteur (logique / physique)��: 512��octets / 512��octets
taille d'E/S (minimale / optimale)��: 512��octets / 512��octets
Identifiant de disque��: 0x000a44cc
P��riph��rique Amorce D��but Fin Blocs Id Syst��me
/dev/sda1 63 625105214 312552576 83 Linux
/dev/sda2 625105215 625137344 16065 83 Linux
Disque /dev/sdb��: 41.0��Go, 40982151168 octets
255 t��tes, 63 secteurs/piste, 4982 cylindres, total 80043264 secteurs
Unit��s = secteurs de 1 * 512 = 512 octets
Taille de secteur (logique / physique)��: 512��octets / 512��octets
taille d'E/S (minimale / optimale)��: 512��octets / 512��octets
Identifiant de disque��: 0xc03ae53d
P��riph��rique Amorce D��but Fin Blocs Id Syst��me
/dev/sdb1 * 63 76662179 38331058+ 83 Linux
/dev/sdb2 76662180 80035829 1686825 5 ��tendue
/dev/sdb5 76662243 80035829 1686793+ 82 partition d'��change Linux / Solaris
Disque /dev/sdc��: 73.4��Go, 73407488000 octets
254 t��tes, 63 secteurs/piste, 8959 cylindres, total 143374000 secteurs
Unit��s = secteurs de 1 * 512 = 512 octets
Taille de secteur (logique / physique)��: 512��octets / 512��octets
taille d'E/S (minimale / optimale)��: 512��octets / 512��octets
Identifiant de disque��: 0xe5f4e5f4
P��riph��rique Amorce D��but Fin Blocs Id Syst��me
/dev/sdc1 63 32003 15970+ 83 Linux
/dev/sdc2 32004 39092885 19530441 83 Linux
/dev/sdc3 39092886 143361917 52134516 83 Linux
|
Code: | grub> geometry (hd0)
drive 0x80: C/H/S = 0/255/63, The number of sectors = 625142448, /dev/sda
Partition num: 0, Filesystem type is ext2fs, partition type 0x83
Partition num: 1, Filesystem type is ext2fs, partition type 0x83
grub> geometry (hd1)
drive 0x81: C/H/S = 0/255/63, The number of sectors = 80043264, /dev/sdb
Partition num: 0, Filesystem type is ext2fs, partition type 0x83
Partition num: 4, Filesystem type unknown, partition type 0x82
grub> geometry (hd2)
drive 0x82: C/H/S = 0/254/63, The number of sectors = 143374000, /dev/sdc
Partition num: 0, Filesystem type is ext2fs, partition type 0x83
Partition num: 1, Filesystem type is ext2fs, partition type 0x83
Partition num: 2, Filesystem type is ext2fs, partition type 0x83
|
Looks good isn't it ? |
|
Back to top |
|
|
Dont Panic Guru
Joined: 20 Jun 2007 Posts: 322 Location: SouthEast U.S.A.
|
Posted: Tue Apr 24, 2012 6:59 pm Post subject: |
|
|
destroyedlolo wrote: | Looks good isn't it ? |
Yes, that all looks consistent.
Could you post the grub entries you have for booting? |
|
Back to top |
|
|
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Tue Apr 24, 2012 8:32 pm Post subject: |
|
|
Code: | default 0
timeout 30
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
title Gentoo Stable
root (hd0,1)
kernel /boot/vmlinuz-3.1.10-gentoo-r1 root=/dev/sda2
#kernel /boot/kernel-genkernel-x86-2.6.24-gentoo-r5 root=/dev/ram0 real_root=/d$
#initrd /boot/initramfs-genkernel-x86-2.6.24-gentoo-r5
# vim:ft=conf:
|
This one produce Error 17.
If I replace to (hd2,0), I got Error 21
PS: root=/dev/sda2 is "normal". It's because my Gentoo kernel places SCSI disks before IDE ones ... so what is /dev/sda2 for Gentoo is /dev/sdc2 for Grub, Gentoo's liveCD and Ubuntu ... It was working before this crash. |
|
Back to top |
|
|
Dont Panic Guru
Joined: 20 Jun 2007 Posts: 322 Location: SouthEast U.S.A.
|
Posted: Wed Apr 25, 2012 1:25 am Post subject: |
|
|
Let me paraphrase my understanding of Grub errors 17 and 21, and tell me if you are seeing anthing different.
Grub1 Error 17: Grub sees the partition, and it looks like Grub should know what to do with that partition, but Grub isn't able to find what it expects to find on that partition.
Grub1 Error 21: Grub is having a problem doing anything with the partition.
A common attempt to fix Error 17 would be to reinstall Grub.
A common fix for Error 21 involves finding a boot partition on another drive, and setting up your kernel and initramfs there.
Here's a couple of things you could try (they're not in order, and are all separate ideas):
(1) Double check and make sure /boot/<kernel-name> is what you want. When Grub looks at your boot partition, it doesn't know it was mounted /boot/ on your installed system. It sees everything as /. There should probably be a symlink pointing /boot to the main directory. Either that, or just drop the '/boot' portion of your kernel names.
(2) Reinstall Grub1
(3) Make a directory on your Ubuntu partion (such as /boot/gentoo), and place your kernel there. Then make a Grub entry for that kernel.
Basically, you would be using some of the space on your Ubuntu partion to act as a really big /boot directory. It won't really interfere with anything on Ubuntu. I suggest this since that is the only partition you have marked as 'bootable' in fdisk.
(4) Make an initramfs for your kernel, and include that in your Grub configuration. Unfortunately, you have really small boot partitions. And, the Error 17 makes me think Grub is still having trouble even reading your boot partitions. |
|
Back to top |
|
|
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Wed Apr 25, 2012 1:01 pm Post subject: |
|
|
Dont Panic wrote: | Grub1 Error 17: Grub sees the partition, and it looks like Grub should know what to do with that partition, but Grub isn't able to find what it expects to find on that partition. |
Yes ... but Code: | find /boot/grub/stage1 | is working so I don't understand.
Dont Panic wrote: | Grub1 Error 21: Grub is having a problem doing anything with the partition. |
As per all my reading on the internet, It means "Grub as a problem to locate my disk" and some people explain that Grub doesn't find disks reported by the BIOS. It is confirmed that Grub rely on the BIOS to find its disks ?
In this case, as both Gentoo and Ubuntu installed Grub (on different disks) are having problems ... I suspect my BIOS is corrupted ... I'll try to clear it and retry ...
Dont Panic wrote: | Here's a couple of things you could try (they're not in order, and are all separate ideas): |
1/ I will check if /boot link exists.
2/ I did Grub reinstallation several times without success (both Gentoo and Ubuntu ones).
3/ Dont Panic wrote: | Make a directory on your Ubuntu partion (such as /boot/gentoo), and place your kernel there. Then make a Grub entry for that kernel. |
The problem is this Grub doesn't work as well. Especially it doesn't find geometry of my SCSI disk.
But if erasing the BIOS doesn't solve the issue, I'll try to install Gentoo boot on Ubuntu partition ...
And if it doesn't work, then ... I WILL PANIC |
|
Back to top |
|
|
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Wed Apr 25, 2012 6:58 pm Post subject: |
|
|
Reseting the BIOS did help
I read that some BIOS can't boot from partition far in the HD ... so I'll move my boot partition to the begining of the disk ... |
|
Back to top |
|
|
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Wed Apr 25, 2012 10:51 pm Post subject: |
|
|
Well, I'm now able to boot on Gentoo
I re-formated my /sda (320 GB), but my boot partition at the beginning (hd0,0), rerun grub ... and now I'm able to boot. Consequently, I totally removed the Maxtor disk that create nightmare everytime the machine is suffering for power outage.
Now :
- I have to add Ubuntu into HD0 grub ... not an issue.
- Ubuntu's Grub on HD1 is totally messed up and not able to boot on my SCSI drive : same messages about C/H/S. I don't care, as I'll not use it anymore as soon as Ubuntu is added in HD0 one.
- My Ubuntu is still suffering for problem (mount message at boot up), but I don't really care as my main OS is Gentoo.
It seems that Grub really rely on the Bios and my Bios is too old (2000 !) to handle boot partition far in disk space ... |
|
Back to top |
|
|
Dont Panic Guru
Joined: 20 Jun 2007 Posts: 322 Location: SouthEast U.S.A.
|
Posted: Thu Apr 26, 2012 4:40 am Post subject: |
|
|
Awesome! Congratulations!
You may still be able to host a root partition on your SCSI drive, but you would have to boot with a kernel and initramfs on the drive that Grub recognizes. |
|
Back to top |
|
|
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Sat May 05, 2012 9:57 am Post subject: |
|
|
If it can help someone, I've been able also to chain to hd1's Ubuntu grub2 by adding following lines ...
Code: | title Ubuntu
root (hd1)
chainloader +1
boot
|
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|