Author Topic: grub error on install  (Read 1150 times)

Offline growbag

  • Full Member
  • ***
  • Posts: 90
grub error on install
« on: October 01, 2010, 05:32:02 PM »
I'm guessing someone has already reported this, if so just ignore me.

I installed pclos kde on my new laptop's 2nd hard disk this morning and grub got the hard disk number wrong, resulting in a grub error 17.

I tried twice, and got the same result.

Instead of hd1,1 (2nd hard disk, partition 1), it kept setting it to hd2,1 (3rd? hard disk, first partition).

I had to boot the live distro and change it manually after I realised what was wrong.
desktop - ASUS M4A79XTD Evo, PhenomII X2-550, 4gigs DDR3, nVidia GTX260.

laptop - Alienware m17x, i7, 6gigs DDR3, single MXM type IIIb ATI 4870.

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: grub error on install
« Reply #1 on: October 01, 2010, 05:58:57 PM »
Quote
17 : Cannot mount selected partition
      This error is returned if the partition requested exists, but the
      filesystem type cannot be recognized by GRUB.

Seems the HDD did exist .........  were there any USB connected drives attached ....  HDD, flash, SD etc ?

YOu should ave been able to change the boot line from the Grub boot selection page .......  by pressing Esc and selecting Yes to go to non-graphical Grub mode.
Then highlighting the boot lone and pressing E to edit it.

When edits finished, pressing B will boot the OS using the temporary edits.

uncleV

  • Guest
Re: grub error on install
« Reply #2 on: October 01, 2010, 07:24:59 PM »
growbag,
do you boot with the PCLOS bootloader?

vjeko

  • Guest
Re: grub error on install
« Reply #3 on: October 01, 2010, 08:10:25 PM »
regardless of what was there on the install, the actual physical hdd or sata1 hdd should have been marked as hd1,1

Offline growbag

  • Full Member
  • ***
  • Posts: 90
Re: grub error on install
« Reply #4 on: October 02, 2010, 03:20:14 PM »
I didn't get anything but the error17 message, where it just stopped.  No keys worked at all.  And I did install from a USB stick, although that was seen as sdc I believe, maybe that was the reason.

But I did install to sdb1, so theoretically it should have translated that in the grub bootloader.

Very strange.

I can't re-create the situation either, I've finally got everything working nicely now, so I really don't want to start messing around :D.
desktop - ASUS M4A79XTD Evo, PhenomII X2-550, 4gigs DDR3, nVidia GTX260.

laptop - Alienware m17x, i7, 6gigs DDR3, single MXM type IIIb ATI 4870.

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11572
  • ----IOFLU----
Re: grub error on install
« Reply #5 on: October 02, 2010, 03:34:00 PM »
I'm guessing someone has already reported this, if so just ignore me.

I installed pclos kde on my new laptop's 2nd hard disk this morning and grub got the hard disk number wrong, resulting in a grub error 17.

I tried twice, and got the same result.

Instead of hd1,1 (2nd hard disk, partition 1), it kept setting it to hd2,1 (3rd? hard disk, first partition).

I had to boot the live distro and change it manually after I realised what was wrong.

If you are using the legacy grub from PCLiunxOS as the master grub, the first partition on the second drive would be (hd1,0) if grub is installed on the first hard drive's MBR. If grub were installed in the MBR of the second hard drive, and it was set in BIOS to be the boot drive, then that drive would become (hd0) and the first partition would be (hd0,0).
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

vjeko

  • Guest
Re: grub error on install
« Reply #6 on: October 02, 2010, 05:23:33 PM »
experience detail, thanks.
 for exactly the reason i dont like them missing but the first connected always goes to slot 1

Offline growbag

  • Full Member
  • ***
  • Posts: 90
Re: grub error on install
« Reply #7 on: October 03, 2010, 04:36:12 AM »
Quote
If you are using the legacy grub from PCLiunxOS as the master grub, the first partition on the second drive would be (hd1,0) if grub is installed on the first hard drive's MBR. If grub were installed in the MBR of the second hard drive, and it was set in BIOS to be the boot drive, then that drive would become (hd0) and the first partition would be (hd0,0).

Yes, I installed PCLOS KDE to the first partition of the 2nd hdd (NOT set as the boot drive), and legacy grub was installed to the MBR of the first hdd (set as the boot drive, all standard, no bios fiddling ;)).

Here is my fdisk output to allay any confusion:

Code: [Select]
[root@localhost kev]# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x619b15d1

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1           5       40131   de  Dell Utility
/dev/sda2   *           6        1918    15360000    7  HPFS/NTFS
/dev/sda3            1918       60801   472982301+   7  HPFS/NTFS

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000c0c7e

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        6374    51198131   83  Linux
/dev/sdb2            6375        6494      963900   82  Linux swap / Solaris
/dev/sdb3            6495       60801   436220977+  83  Linux

Disk /dev/dm-0: 446.7 GB, 446689752576 bytes
255 heads, 63 sectors/track, 54306 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

You can ignore the /dev/dm-0 entry, as that is my LUKS encrypted home, and doesn't enter into the equation as PCLOS handled that magnificently :D.

After installing and getting the grub error, (I always select "custom partitioning"  but NO other changes apart from selecting German keyboard and time zone), I booted from my USB stick into PCLOS again and read my menu.lst from /dev/sdb1/boot/grub/ (my supposed new / partition) and it read something like this:

Code: [Select]
[root@localhost kev]# cat /boot/grub/menu.lst
[root@localhost kev]# cat /boot/grub/menu.lst
timeout 3
color black/cyan yellow/cyan
gfxmenu (hd1,0)/boot/gfxmenu
default 3

title linux
kernel (hd2,0)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=102ec532-e513-49a9-8ab3-f9df574f408e  vmalloc=256M splash=silent vga=794
initrd (hd2,0)/boot/initrd.img

title linux-nonfb
kernel (hd2,0)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=102ec532-e513-49a9-8ab3-f9df574f408e  vmalloc=256M
initrd (hd2,0)/boot/initrd.img

title failsafe
kernel (hd1,0)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=102ec532-e513-49a9-8ab3-f9df574f408e  failsafe vmalloc=256M
initrd (hd1,0)/boot/initrd.img

title Games
root (hd0,1)
chainloader +1

That is a recreation of course, but you can see where it said (hd2,0) instead of (hd1,0).  I changed it to show (hd1,0), re-installed grub, and it now works perfectly.

And I just realised I made a mistake in my initial posting!!!!!!   It did say (hd2,0) NOT (hd2,1) as I initially wrote.  Sorry about that!

I really should remove my hard drives. pop 2 new ones in and try it again to be accurate and scientific about the problem I guess, but I really don't have the time to do that :(.

Maybe I just selected the wrong setting or something stupid without realising!  I have been known to do that  :-\.

These grub and hard drive numbers can be VERY confusing  ::)
desktop - ASUS M4A79XTD Evo, PhenomII X2-550, 4gigs DDR3, nVidia GTX260.

laptop - Alienware m17x, i7, 6gigs DDR3, single MXM type IIIb ATI 4870.

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11572
  • ----IOFLU----
Re: grub error on install
« Reply #8 on: October 03, 2010, 08:47:15 AM »
growbag:

First, when you made the changes to your menu.lst, there was no need to reinstall grub. As installed originally, grub would have handled any changes to menu.lst just fine.

The problem with grub as you have it installed is that it's a two part system. With the two parts on separate drives should you remove either drive, the other will not boot. Had you installed grub to the Linux drive, and made it the boot drive, it would still have offered to boot Windows in it's boot menu, but the Windows drive would have remained untouched with it's own boot code it it's MBR. Removing either drive would still leave the remaining drive bootable without any modification.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline growbag

  • Full Member
  • ***
  • Posts: 90
Re: grub error on install
« Reply #9 on: October 03, 2010, 10:38:21 PM »
Hmm, yes, that sounds like a better solution all-round, I might change it :).
desktop - ASUS M4A79XTD Evo, PhenomII X2-550, 4gigs DDR3, nVidia GTX260.

laptop - Alienware m17x, i7, 6gigs DDR3, single MXM type IIIb ATI 4870.

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11572
  • ----IOFLU----
Re: grub error on install
« Reply #10 on: October 03, 2010, 10:54:33 PM »
Hmm, yes, that sounds like a better solution all-round, I might change it :).

If you do, remember all the Linux (hd1,0) references need to be changed to (hd0,0) in your menu.lst.

Windows would then be on (hd1,1) and the Windows stanza would be;

title Windows
rootnoverify (hd1,1)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1


The map lines are to have BIOS tell Windows it is on (hd0) when it's not.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

uncleV

  • Guest
Re: grub error on install
« Reply #11 on: October 04, 2010, 01:43:43 AM »
Here's my Windows stanca. I did Redo MBR after PCLOS install not from the LiveCD but from normal session. The bootloader works.

title windows
root (hd2,0)
map (0x82) (0x80)
map (0x80) (0x82)
makeactive
chainloader +1

old-polack, do you know why it is (0x80) instead of (hd2,0)?

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11572
  • ----IOFLU----
Re: grub error on install
« Reply #12 on: October 04, 2010, 02:16:09 AM »
Here's my Windows stanca. I did Redo MBR after PCLOS install not from the LiveCD but from normal session. The bootloader works.

title windows
root (hd2,0)
map (0x82) (0x80)
map (0x80) (0x82)
makeactive
chainloader +1

old-polack, do you know why it is (0x80) instead of (hd2,0)?

Because it's in hex. The 0x8 indicates it's a hard drive so (0x82) is the same as (hd2) and (0x80) is the same as (hd0).
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

uncleV

  • Guest
Re: grub error on install
« Reply #13 on: October 04, 2010, 02:40:57 AM »
Thank you. :)