Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Does current grub legacy from portage support GPT?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
fargred
n00b
n00b


Joined: 19 Oct 2010
Posts: 66

PostPosted: Fri Feb 07, 2014 5:03 am    Post subject: [SOLVED] Does current grub legacy from portage support GPT? Reply with quote

0.97-r12 or ~0.97-r13?

Last edited by fargred on Wed Feb 19, 2014 7:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1733
Location: St. Wendel

PostPosted: Fri Feb 07, 2014 12:37 pm    Post subject: Reply with quote

Yes, just create a BIOS Boot Partition.
Back to top
View user's profile Send private message
fargred
n00b
n00b


Joined: 19 Oct 2010
Posts: 66

PostPosted: Fri Feb 07, 2014 5:20 pm    Post subject: Reply with quote

py-ro wrote:
Yes, just create a BIOS Boot Partition.
Thanks.
Back to top
View user's profile Send private message
fargred
n00b
n00b


Joined: 19 Oct 2010
Posts: 66

PostPosted: Wed Feb 19, 2014 5:21 pm    Post subject: Reply with quote

py-ro wrote:
Yes, just create a BIOS Boot Partition.

I’m sorry, but I’ve returned to that thing only today and see it doesn’t working.

I have the following partition table:
Code:
Disk /dev/sdb: 2.7 TiB, 3000592982016 bytes, 5860533168 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: gpt
Disk identifier: 0A7BCCE4-2816-43E8-A3B3-C8E90517CB11

Device           Start          End   Size Type
/dev/sdb1         2048         4095     1M BIOS boot partition
/dev/sdb2         4096        86015    40M Linux filesystem
/dev/sdb3        86016     83972095    40G Linux filesystem
/dev/sdb4     83972096   5860533134   2.7T Linux filesystem


So I am supposed to specify the second partition as root for the grub, since there would reside files for /boot/ and setup to… where? sdb1? just sdb?

Code:
grub> root (hd1,
 Possible partitions are:
   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
   Partition num: 3,  Filesystem type is ext2fs, partition type 0x83

grub> root (hd1,1)
 Filesystem type is ext2fs, partition type 0x83

grub> setup (hd1,0)
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... no

Error 15: File not found

grub> setup (hd1)
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... no

Error 15: File not found

grub> setup (hd1,1)
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... no

Error 15: File not found

grub>
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1733
Location: St. Wendel

PostPosted: Wed Feb 19, 2014 5:28 pm    Post subject: Reply with quote

You need the "BIOS Boot" partition + "/boot", the grub command should point to /boot.
Back to top
View user's profile Send private message
fargred
n00b
n00b


Joined: 19 Oct 2010
Posts: 66

PostPosted: Wed Feb 19, 2014 5:39 pm    Post subject: Reply with quote

py-ro wrote:
You need the "BIOS Boot" partition

Isn’t this one the BIOS boot partition?
Code:
/dev/sdb1         2048         4095     1M BIOS boot partition

py-ro wrote:
+ "/boot"

If you mean separated partition for /boot, this is what sdb2 (hd1,1) is supposed to be.
py-ro wrote:
the grub command should point to /boot.

‘the grub command’? I am in usual grub shell which doesn’t seem to react to --boot-drive or --install-partition — it just opens the grub shell as usual.
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1733
Location: St. Wendel

PostPosted: Wed Feb 19, 2014 6:00 pm    Post subject: Reply with quote

The correct sequence would be

Code:
root (hd1,1)
setup (hd1)


But you got several Problems

Code:
Partition num: 0,  Filesystem type is ext2fs, partition type 0x83


It is the wrong Partition ID, it should be 0xEF02 and it should be empty, not formated. Try wipe2fs to get rid of the ext headers.

Code:
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... no


If this is your Partition containing /boot, this Files should be there.

Bye
Py
Back to top
View user's profile Send private message
fargred
n00b
n00b


Joined: 19 Oct 2010
Posts: 66

PostPosted: Wed Feb 19, 2014 7:38 pm    Post subject: Reply with quote

I’ve found that for some reason grub didn’t copy the files from /lib/grub/i386-pc/ so I had to do this myself. Grub shell complained about something, but said it was not fatal and reported overall success. Boot works fine, I’ve just checked. The mistake for partition type still existed after wipe2fs and reboot, I also checked all my other drives — none of them had first partition of the necessary type. sdb was definitely hd1, I can say because other drives had swap partition which filesystem type grub shell couldn’t define. Thanks for the reply anyway!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43213
Location: 56N 3W

PostPosted: Wed Feb 19, 2014 8:43 pm    Post subject: Reply with quote

fargred,

grub1 and GPT work together but there a few gotchas to be aware of.
The GPT starts at LBA1 so grub1 cannot embed its stage1.5 in the space before the first partition - the GPT is there.
This was the "... this is not fatal" message. Instead, stage1 loads stage2 using a block list.
That works but its fragile. Every time you update grub, you must reinstall in to the MBR so the block list is updated.

When you make a GPT partition table, you get a 'protective' MSDOS partition for free. Its type ee, from memory.

Brain dead BIOSes that want the bootable flag set only look for an MSDOS partition table, so you need to set the bootable flag here not on your boot partition in the GPT. The BIOS can't see that.


Personally, I use grub-static on /no-multilib/ systems with 32 bit support off in the kernel, so there is no danger of grub being updated.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Thu Feb 20, 2014 1:21 am    Post subject: Reply with quote

Some of the replies in this thread relate to GRUB 2, but the thread's title specifies GRUB Legacy. In particular, the BIOS Boot Partition is (AFAIK) used only by GRUB 2, not by GRUB Legacy. Also, the "stock" GRUB Legacy does not support GPT. There are patched versions floating around that do include that support, but I don't know offhand if Gentoo's version of GRUB Legacy includes these GPT patches.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Thu Feb 20, 2014 3:33 am    Post subject: Reply with quote

srs5694 wrote:
There are patched versions floating around that do include that support, but I don't know offhand if Gentoo's version of GRUB Legacy includes these GPT patches.

It does ... from the Changelog ...

Quote:
25 Feb 2008; Robin H. Johnson <robbat2@gentoo.org> grub-0.97-r4.ebuild:
Bug #178586, include support for booting from a GPT-style disk.

best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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