View previous topic :: View next topic |
Author |
Message |
overlord.gaurav n00b
Joined: 17 Oct 2015 Posts: 6
|
Posted: Sat Oct 17, 2015 2:19 pm Post subject: Unable to get to GRUB after kernel compilation |
|
|
Hi all,
This was my first attempt at compiling a kernel. I followed the the Handbook (https://wiki.gentoo.org/wiki/Handbook:AMD64) to compile the kernel.
On reboot I couldn't get to the GRUB and I'm getting the message "Operating System not found"
Here is what my partition table looks lile: http://pastebin.com/tasZjm62
Here is what my /etc/fstab looks like: http://pastebin.com/mvDDcDc3
Here is what my /boot/grub/grub.cfg looks like: http://pastebin.com/b58ZXzgQ
Hoping to get back to Gentoo after I had used it back in 2006 with the Graphical installer.
Thanks and regards. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
|
Back to top |
|
|
overlord.gaurav n00b
Joined: 17 Oct 2015 Posts: 6
|
Posted: Sat Oct 17, 2015 3:24 pm Post subject: Re: Unable to get to GRUB after kernel compilation |
|
|
Yes..it is actually supposed to be etx4. Just updating the fstab doesn't seem to fix it.. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Sat Oct 17, 2015 3:51 pm Post subject: Re: Unable to get to GRUB after kernel compilation |
|
|
overlord.gaurav wrote: | Yes..it is actually supposed to be etx4. Just updating the fstab doesn't seem to fix it.. |
You'd better reformat /dev/sda2 for ext2 and re-install grub on it and again # grub2-mkconfig -o /boot/grub.grub.cfg while having /boot mounted. See also https://wiki.gentoo.org/wiki/Kernel/Rebuild |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sat Oct 17, 2015 4:19 pm Post subject: |
|
|
overlord.gaurav,
"Operating System not found" is a message from your BIOS.
Its checking the bootable flag on the MSDOS partition table and finding that its not set correctly.
If you have installed using GPT, you still have a MSDOS partition table and your BIOS still checks it.
fdisk -t dos /dev/...
will let you set the bootable flag - do not do anything else there. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
overlord.gaurav n00b
Joined: 17 Oct 2015 Posts: 6
|
Posted: Sat Oct 17, 2015 6:56 pm Post subject: Re: Unable to get to GRUB after kernel compilation |
|
|
charles17 wrote: | overlord.gaurav wrote: | Yes..it is actually supposed to be etx4. Just updating the fstab doesn't seem to fix it.. |
You'd better reformat /dev/sda2 for ext2 and re-install grub on it and again # grub2-mkconfig -o /boot/grub.grub.cfg while having /boot mounted. See also https://wiki.gentoo.org/wiki/Kernel/Rebuild |
That didn't fix the issue either..
NeddySeagoon wrote: |
overlord.gaurav,
"Operating System not found" is a message from your BIOS.
Its checking the bootable flag on the MSDOS partition table and finding that its not set correctly.
If you have installed using GPT, you still have a MSDOS partition table and your BIOS still checks it.
fdisk -t dos /dev/...
will let you set the bootable flag - do not do anything else there.
|
I don't exactly know how to set the bootable flag. The output of 'print' after your command is this: http://pastebin.com/jwYYZqmE
While speaking on the IRC channel I was suggested that I set the bootable flag because of the protective MBR state or something.
So, my current partition table appears like this (http://pastebin.com/8vM2n0Le) on parted. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sat Oct 17, 2015 7:12 pm Post subject: |
|
|
overlord.gaurav,
This is the protective MSDOS partition table.
Code: | Device Boot Start End Blocks Id System
/dev/sda1 * 1 976773167 488386583+ ee GPT |
It shows that the bootable flag is set. As long as you saved your change, you are good.
Has your error message changed any? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
overlord.gaurav n00b
Joined: 17 Oct 2015 Posts: 6
|
Posted: Sat Oct 17, 2015 7:23 pm Post subject: |
|
|
NeddySeagoon wrote: | overlord.gaurav,
This is the protective MSDOS partition table.
Code: | Device Boot Start End Blocks Id System
/dev/sda1 * 1 976773167 488386583+ ee GPT |
It shows that the bootable flag is set. As long as you saved your change, you are good.
Has your error message changed any? |
Nope. Still no luck |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sat Oct 17, 2015 7:30 pm Post subject: |
|
|
overlord.gaurav
How many HDD do you nave connected?
Count USB sticks too.
I suspect the BIOS is not set to boot from /dev/sda. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
overlord.gaurav n00b
Joined: 17 Oct 2015 Posts: 6
|
Posted: Sat Oct 17, 2015 7:36 pm Post subject: |
|
|
NeddySeagoon wrote: | overlord.gaurav
How many HDD do you nave connected?
Count USB sticks too.
I suspect the BIOS is not set to boot from /dev/sda. |
2 HDDs - One internal hard disk at /dev/sda
And the other one is a USB stick from which I boot up the live session of Gentoo.
I remove the USB stick while trying to get the GRUB |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sat Oct 17, 2015 7:45 pm Post subject: |
|
|
overlord.gaurav,
Post your Code: | fdisk -l -t dos /dev/sda | again.
Thats a lower case L for list, not a numeral 1.
Ping me in #gentoo if you want _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
overlord.gaurav n00b
Joined: 17 Oct 2015 Posts: 6
|
Posted: Sat Oct 17, 2015 8:49 pm Post subject: |
|
|
NeddySeagoon wrote: | overlord.gaurav,
Post your Code: | fdisk -l -t dos /dev/sda | again.
Thats a lower case L for list, not a numeral 1.
Ping me in #gentoo if you want |
UPDATE
As per my conversation with NeddySeagoon on #Gentoo,
Here's how I got past the "No OS found" error and got the BIOS to detect the GRUB and get an error message like:
Code: | GRUB loading. Welcome to grub error: no such partition |
I am running on a Dell Inspiron 14R-N4110. The system seems to check the partition type for booting.
fdisk -l -t msdos
Code: |
gentoo@livecd ~ $ sudo fdisk -l -t dos
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Partition 1 does not start on physical sector boundary.
Device Boot Start End Blocks Id System
/dev/sda1 * 1 976773167 488386583+ ee GPT
Disk /dev/sdb: 7.5 GiB, 8004304896 bytes, 15633408 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x133381df
Device Boot Start End Blocks Id System
/dev/sdb1 * 0 5783399 2891700 0 Empty
/dev/sdb2 304 16687 8192 ef EFI (FAT-12/16/32)
/dev/sdb3 16688 82222 32767+ 0 Empty
Disk /dev/sdb1: 2.8 GiB, 2961100800 bytes, 5783400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x133381df
Device Boot Start End Blocks Id System
/dev/sdb1p1 * 0 5783399 2891700 0 Empty
/dev/sdb1p2 304 16687 8192 ef EFI (FAT-12/16/32)
/dev/sdb1p3 16688 82222 32767+ 0 Empty
|
So, we changed the partition type of /dev/sda from ee to 7, ie. from GPT to HPFS/NTFS/exFAT |
|
Back to top |
|
|
|