public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] setting boot flag on sda1
@ 2014-09-05 16:14 Joseph
  2014-09-05 17:12 ` Todd Goodman
  2014-09-05 19:32 ` [gentoo-user] " Neil Bothwick
  0 siblings, 2 replies; 15+ messages in thread
From: Joseph @ 2014-09-05 16:14 UTC (permalink / raw
  To: gentoo-user

How to set a boot flag on sda1.
I'm using fdisk from util-linux 2.24.1 and in order to set it I need version  2.22 or earlier

-- 
Joseph


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] setting boot flag on sda1
  2014-09-05 16:14 [gentoo-user] setting boot flag on sda1 Joseph
@ 2014-09-05 17:12 ` Todd Goodman
  2014-09-05 17:37   ` Joseph
  2014-09-05 19:32 ` [gentoo-user] " Neil Bothwick
  1 sibling, 1 reply; 15+ messages in thread
From: Todd Goodman @ 2014-09-05 17:12 UTC (permalink / raw
  To: gentoo-user

* Joseph <syscon780@gmail.com> [140905 12:14]:
> How to set a boot flag on sda1.
> I'm using fdisk from util-linux 2.24.1 and in order to set it I need version  2.22 or earlier
> 
> -- 
> Joseph

If you're using GPT partitions then you should really be using gdisk or
recent parted (gparted.)

You'll see strange results if you use fdisk to look at GPT partitions (for
some definition of strange and depending upon if a hybrid configuration
is used.)

Todd


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] setting boot flag on sda1
  2014-09-05 17:12 ` Todd Goodman
@ 2014-09-05 17:37   ` Joseph
  2014-09-05 18:08     ` Todd Goodman
  0 siblings, 1 reply; 15+ messages in thread
From: Joseph @ 2014-09-05 17:37 UTC (permalink / raw
  To: gentoo-user

On 09/05/14 13:12, Todd Goodman wrote:
>* Joseph <syscon780@gmail.com> [140905 12:14]:
>> How to set a boot flag on sda1.
>> I'm using fdisk from util-linux 2.24.1 and in order to set it I need version  2.22 or earlier
>>
>> --
>> Joseph
>
>If you're using GPT partitions then you should really be using gdisk or
>recent parted (gparted.)
>
>You'll see strange results if you use fdisk to look at GPT partitions (for
>some definition of strange and depending upon if a hybrid configuration
>is used.)
>
>Todd

Yes, it make more sense. 

Will old BIOS boot GTP partition disk.  
My system does not recognize boot sector.  It thinks there is no disk.  
I can boot current disk with Systemrescue CD but BIOS does not see my boot sector or the way it is installed.	


-- 
Joseph


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] setting boot flag on sda1
  2014-09-05 17:37   ` Joseph
@ 2014-09-05 18:08     ` Todd Goodman
  2014-09-05 19:57       ` [gentoo-user] " James
  0 siblings, 1 reply; 15+ messages in thread
From: Todd Goodman @ 2014-09-05 18:08 UTC (permalink / raw
  To: gentoo-user

* Joseph <syscon780@gmail.com> [140905 13:37]:
> On 09/05/14 13:12, Todd Goodman wrote:
> >* Joseph <syscon780@gmail.com> [140905 12:14]:
> >> How to set a boot flag on sda1.
> >> I'm using fdisk from util-linux 2.24.1 and in order to set it I need version  2.22 or earlier
> >>
> >> --
> >> Joseph
> >
> >If you're using GPT partitions then you should really be using gdisk or
> >recent parted (gparted.)
> >
> >You'll see strange results if you use fdisk to look at GPT partitions (for
> >some definition of strange and depending upon if a hybrid configuration
> >is used.)
> >
> >Todd
> 
> Yes, it make more sense. 
> 
> Will old BIOS boot GTP partition disk.  
> My system does not recognize boot sector.  It thinks there is no disk.  
> I can boot current disk with Systemrescue CD but BIOS does not see my boot sector or the way it is installed.	
> 
> 
> -- 
> Joseph

What does 'gdisk -l /dev/sda' say about GPT and MBR (it usually says
whether you have a valid GPT and/or MBR before printing information
about the partitions.)

As others have mentioned, you need that BIOS boot partition for GRUB2 to
embed its core.img into since there's no post-MBR gap for it to use with
GPT.  This is different than the partition you mount as /boot.

Your BIOS should be able to boot GPT drives but it can be flaky
depending upon motherboard in my experience.

If using GPT drives to boot with BIOS you want a protective MBR which
encompasses the entire drive (or first 2.2TB if the drive is larger than
that as that's as big as MBR can handle.)  It has type 0xee.

You can create that gdisk (by going into the eXpert menu) or you can use
fdisk to create it.

With some motherboards you have to flag the protective MBR as bootable.
You can do this in fdisk with the 'a' command or in gdisk with the 'a'
command on the eXpert menu.

grub2 should have installed the correct target by default (i386-pc) but
you can force that with the --target command line option to
grub2-install ('grub2-install --target=i386-pc /dev/sda' for example)

So barring a really strange BIOS implementation you should be able to
boot a GPT partitioned drive on a BIOS-based computer but I have to ask
why you want to go through all the head-banging?

Since your BIOS isn't cooperating the only reason I could see is if your
drive is larger than 2.2TB (quite possible but I don't remember from
earlier in the thread.)

Todd


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] setting boot flag on sda1
  2014-09-05 16:14 [gentoo-user] setting boot flag on sda1 Joseph
  2014-09-05 17:12 ` Todd Goodman
@ 2014-09-05 19:32 ` Neil Bothwick
  2014-09-05 20:29   ` [gentoo-user] " James
  1 sibling, 1 reply; 15+ messages in thread
From: Neil Bothwick @ 2014-09-05 19:32 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 340 bytes --]

On Fri, 5 Sep 2014 10:14:13 -0600, Joseph wrote:

> How to set a boot flag on sda1.
> I'm using fdisk from util-linux 2.24.1 and in order to set it I need
> version  2.22 or earlier

You don't need to, that's only needed by the Windows bootloader.


-- 
Neil Bothwick

Irritable? Who the bloody hell are you calling irritable?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [gentoo-user] Re: setting boot flag on sda1
  2014-09-05 18:08     ` Todd Goodman
@ 2014-09-05 19:57       ` James
  2014-09-05 20:11         ` Joseph
                           ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: James @ 2014-09-05 19:57 UTC (permalink / raw
  To: gentoo-user

Todd Goodman <tsg <at> bonedaddy.net> writes:

> What does 'gdisk -l /dev/sda' say about GPT and MBR (it usually says
> whether you have a valid GPT and/or MBR before printing information
> about the partitions.)

gfisk does not seem to be in the tree. That's the old name for the
"gptfdisk" now in the portage tree. The name is now consistent
with upstream.  (/sys-apps/gptfdisk)



> As others have mentioned, you need that BIOS boot partition for GRUB2 to
> embed its core.img into since there's no post-MBR gap for it to use with
> GPT.  This is different than the partition you mount as /boot.

> Your BIOS should be able to boot GPT drives but it can be flaky
> depending upon motherboard in my experience.

> If using GPT drives to boot with BIOS you want a protective MBR which
> encompasses the entire drive (or first 2.2TB if the drive is larger than
> that as that's as big as MBR can handle.)  It has type 0xee.

> You can create that gdisk (by going into the eXpert menu) or you can use
> fdisk to create it.

Maybe gdisk is on the installation iso? It's not in the portage tree, but
it use to be:

http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/gdisk/?hideattic=0

gdisk and gptfdisk are the use the be the same software..


hth,
JKames







^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Re: setting boot flag on sda1
  2014-09-05 19:57       ` [gentoo-user] " James
@ 2014-09-05 20:11         ` Joseph
  2014-09-05 20:38           ` Alec Ten Harmsel
  2014-09-05 20:50           ` James
  2014-09-05 20:41         ` Todd Goodman
  2014-09-05 21:08         ` Neil Bothwick
  2 siblings, 2 replies; 15+ messages in thread
From: Joseph @ 2014-09-05 20:11 UTC (permalink / raw
  To: gentoo-user

On 09/05/14 19:57, James wrote:
>Todd Goodman <tsg <at> bonedaddy.net> writes:
>
>> What does 'gdisk -l /dev/sda' say about GPT and MBR (it usually says
>> whether you have a valid GPT and/or MBR before printing information
>> about the partitions.)
>
>gfisk does not seem to be in the tree. That's the old name for the
>"gptfdisk" now in the portage tree. The name is now consistent
>with upstream.  (/sys-apps/gptfdisk)
>
>
>
>> As others have mentioned, you need that BIOS boot partition for GRUB2 to
>> embed its core.img into since there's no post-MBR gap for it to use with
>> GPT.  This is different than the partition you mount as /boot.
>
>> Your BIOS should be able to boot GPT drives but it can be flaky
>> depending upon motherboard in my experience.
>
>> If using GPT drives to boot with BIOS you want a protective MBR which
>> encompasses the entire drive (or first 2.2TB if the drive is larger than
>> that as that's as big as MBR can handle.)  It has type 0xee.
>
>> You can create that gdisk (by going into the eXpert menu) or you can use
>> fdisk to create it.
>
>Maybe gdisk is on the installation iso? It's not in the portage tree, but
>it use to be:
>
>http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/gdisk/?hideattic=0
>
>gdisk and gptfdisk are the use the be the same software..

With a GPT partition and old BIOS 2008 system, I need to set the bootable flag on the protective MSDOS partition. Thats all the BIOS can see.

I need to use an older fdisk and ignore the dire warning about a GPT partition table being detected.

But where to find older fdisk and in stall it from chroot environment.

-- 
Joseph


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [gentoo-user] Re: setting boot flag on sda1
  2014-09-05 19:32 ` [gentoo-user] " Neil Bothwick
@ 2014-09-05 20:29   ` James
  0 siblings, 0 replies; 15+ messages in thread
From: James @ 2014-09-05 20:29 UTC (permalink / raw
  To: gentoo-user

Neil Bothwick <neil <at> digimed.co.uk> writes:


> > How to set a boot flag on sda1.
> > I'm using fdisk from util-linux 2.24.1 and in order to set it I need
> > version  2.22 or earlier

> You don't need to, that's only needed by the Windows bootloader.


When search for GUID partition table, I find (2) useful documents that
may help with some background.

[1] http://wiki.gentoo.org/wiki/Partition

[2] https://wiki.archlinux.org/index.php/GUID_Partition_Table#GPT_fdisk

Reading both of these may help you understand your options better....


hth,
James







^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Re: setting boot flag on sda1
  2014-09-05 20:11         ` Joseph
@ 2014-09-05 20:38           ` Alec Ten Harmsel
  2014-09-05 20:50           ` James
  1 sibling, 0 replies; 15+ messages in thread
From: Alec Ten Harmsel @ 2014-09-05 20:38 UTC (permalink / raw
  To: gentoo-user


On 09/05/2014 04:11 PM, Joseph wrote:
>
> With a GPT partition and old BIOS 2008 system, I need to set the
> bootable flag on the protective MSDOS partition. Thats all the BIOS
> can see.
>
> I need to use an older fdisk and ignore the dire warning about a GPT
> partition table being detected.
>
> But where to find older fdisk and in stall it from chroot environment.
>

IIRC, fdisk will warn about GPT, but when you use 'o' to generate a new
partition table, it generates an MBR. If you're going to repartition and
reinstall, fdisk will create an MBR partition table. No matter how old
or recent it is, by default it should create MBR. Just did it a week ago
on my laptop, so unless the behavior has changed in a week, you should
be good with fdisk.

Alec


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Re: setting boot flag on sda1
  2014-09-05 19:57       ` [gentoo-user] " James
  2014-09-05 20:11         ` Joseph
@ 2014-09-05 20:41         ` Todd Goodman
  2014-09-05 21:08         ` Neil Bothwick
  2 siblings, 0 replies; 15+ messages in thread
From: Todd Goodman @ 2014-09-05 20:41 UTC (permalink / raw
  To: gentoo-user

* James <wireless@tampabay.rr.com> [140905 15:58]:
> Todd Goodman <tsg <at> bonedaddy.net> writes:
> 
> > What does 'gdisk -l /dev/sda' say about GPT and MBR (it usually says
> > whether you have a valid GPT and/or MBR before printing information
> > about the partitions.)
> 
> gfisk does not seem to be in the tree. That's the old name for the
> "gptfdisk" now in the portage tree. The name is now consistent
> with upstream.  (/sys-apps/gptfdisk)

Yes, that's the package that provides /usr/sbin/gdisk



^ permalink raw reply	[flat|nested] 15+ messages in thread

* [gentoo-user] Re: setting boot flag on sda1
  2014-09-05 20:11         ` Joseph
  2014-09-05 20:38           ` Alec Ten Harmsel
@ 2014-09-05 20:50           ` James
  2014-09-05 21:43             ` Joseph
  1 sibling, 1 reply; 15+ messages in thread
From: James @ 2014-09-05 20:50 UTC (permalink / raw
  To: gentoo-user

Joseph <syscon780 <at> gmail.com> writes:


> But where to find older fdisk and in stall it from chroot environment.

Long answer. You are setting me up for another round of flame_arrows.
YOU should follow the advise you are given on how to solve your problem.

You are "hard headed"...... You'll do well with Gentoo.

caveat emptor!


So "equery belongs fdisk" shows me:

sys-apps/util-linux-2.24.1-r3 (/usr/share/bash-completion/fdisk)
sys-apps/util-linux-2.24.1-r3 (/sbin/fdisk)

"eix util-linux"

Should do the trick I'm assuming you know how to emerge a specific
version of a package)?

Or you can always look here?

http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/

more specifically:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/util-linux/


hth,
James





^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Re: setting boot flag on sda1
  2014-09-05 19:57       ` [gentoo-user] " James
  2014-09-05 20:11         ` Joseph
  2014-09-05 20:41         ` Todd Goodman
@ 2014-09-05 21:08         ` Neil Bothwick
  2 siblings, 0 replies; 15+ messages in thread
From: Neil Bothwick @ 2014-09-05 21:08 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 633 bytes --]

On Fri, 5 Sep 2014 19:57:48 +0000 (UTC), James wrote:

> > What does 'gdisk -l /dev/sda' say about GPT and MBR (it usually says
> > whether you have a valid GPT and/or MBR before printing information
> > about the partitions.)  
> 
> gfisk does not seem to be in the tree. That's the old name for the
> "gptfdisk" now in the portage tree. The name is now consistent
> with upstream.  (/sys-apps/gptfdisk)

gdisk is the program, gptfdisk is the package that installs it.

% qfile `sudo which gdisk`
sys-apps/gptfdisk (/usr/sbin/gdisk)


-- 
Neil Bothwick

What you don't know can hurt you, only you won't know it.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Re: setting boot flag on sda1
  2014-09-05 20:50           ` James
@ 2014-09-05 21:43             ` Joseph
  2014-09-05 22:06               ` James
  0 siblings, 1 reply; 15+ messages in thread
From: Joseph @ 2014-09-05 21:43 UTC (permalink / raw
  To: gentoo-user

On 09/05/14 20:50, James wrote:
>Joseph <syscon780 <at> gmail.com> writes:
>
>
>> But where to find older fdisk and in stall it from chroot environment.
>
>Long answer. You are setting me up for another round of flame_arrows.
>YOU should follow the advise you are given on how to solve your problem.
>
>You are "hard headed"...... You'll do well with Gentoo.
>
>caveat emptor!
>
>
>So "equery belongs fdisk" shows me:
>
>sys-apps/util-linux-2.24.1-r3 (/usr/share/bash-completion/fdisk)
>sys-apps/util-linux-2.24.1-r3 (/sbin/fdisk)
>
>"eix util-linux"
>
>Should do the trick I'm assuming you know how to emerge a specific
>version of a package)?
>
>Or you can always look here?
>
>http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/
>
>more specifically:
>http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/util-linux/
>
>
>hth,
>James

Hi James,

I don't want to cause any problems :-/ I'm just trying to boot this piece of crap of mine so I can proceed with installation.
But I'm out of luck. It could be due to my old BIOS not recognizing correctly GPT.

I think my only options would be to scrap that GPT and go with MBR, as Alex suggested.

Yes, I know how to install specific version.

I have tried to use gdisk "expert mode"
gdisk /dev/sda
x - expert mode
a 
1

and I set flags: "0" - system partition and "2" legacy BIOS bootable

I try to reboot and still no luck; so I'm getting into conclusion that scraping the I have to scrap that GPT.
I was trying to avoid as it take some time to do it from scratch ;-(

-- 
Joseph


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [gentoo-user] Re: setting boot flag on sda1
  2014-09-05 21:43             ` Joseph
@ 2014-09-05 22:06               ` James
  2014-09-05 23:34                 ` Neil Bothwick
  0 siblings, 1 reply; 15+ messages in thread
From: James @ 2014-09-05 22:06 UTC (permalink / raw
  To: gentoo-user

Joseph <syscon780 <at> gmail.com> writes:



> Hi James,
> 
> I don't want to cause any problems :-/ I'm just trying to boot this piece 
> of crap of mine so I can proceed with installation.
> But I'm out of luck. It could be due to my old BIOS not recognizing   
> correctly GPT.
> 
> I think my only options would be to scrap that GPT and go with MBR, 
> as Alex suggested.

Yep, good choice. Many old bios are, well a challenge. Sometimes
vendors have differnt bios and bios versions on the same/similar family
of motherboards. Maybe you can find a bios upgrade for your
old mobo? Sometimes that helps, but you may have to go through
windows and a floppy, or some other archane mechanism to upgrade
the bios. Googling for options on your specific mobo, may be worth
the time?

Here is one example for an "Asus" modbo:
http://www.tomshardware.com/forum/321172-30-bios-update-motherboard

Your call on that. It may not help your problem with GPT so you have
to research that or go with a MBR setup.


> I try to reboot and still no luck; so I'm getting into conclusion 
> that scraping the I have to scrap that GPT.
> I was trying to avoid as it take some time to do it from scratch ;-(

Gentoo is wonderful as a distro; but often one pursues  things that
enlighten the brain, but conclude in futility. All the power of the
Gentoo distro and the devs and user community cannot prevent that,
IMHO.....

good hunting!

James






^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Re: setting boot flag on sda1
  2014-09-05 22:06               ` James
@ 2014-09-05 23:34                 ` Neil Bothwick
  0 siblings, 0 replies; 15+ messages in thread
From: Neil Bothwick @ 2014-09-05 23:34 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 609 bytes --]

On Fri, 5 Sep 2014 22:06:43 +0000 (UTC), James wrote:

> Yep, good choice. Many old bios are, well a challenge. Sometimes
> vendors have differnt bios and bios versions on the same/similar family
> of motherboards. Maybe you can find a bios upgrade for your
> old mobo? Sometimes that helps, but you may have to go through
> windows and a floppy, or some other archane mechanism to upgrade
> the bios. Googling for options on your specific mobo, may be worth
> the time?

http://www.ultimatebootcd.com/


-- 
Neil Bothwick

Eat shit - 50 million flies can't be wrong
Use Microsoft . . . . .

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-09-05 23:34 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-05 16:14 [gentoo-user] setting boot flag on sda1 Joseph
2014-09-05 17:12 ` Todd Goodman
2014-09-05 17:37   ` Joseph
2014-09-05 18:08     ` Todd Goodman
2014-09-05 19:57       ` [gentoo-user] " James
2014-09-05 20:11         ` Joseph
2014-09-05 20:38           ` Alec Ten Harmsel
2014-09-05 20:50           ` James
2014-09-05 21:43             ` Joseph
2014-09-05 22:06               ` James
2014-09-05 23:34                 ` Neil Bothwick
2014-09-05 20:41         ` Todd Goodman
2014-09-05 21:08         ` Neil Bothwick
2014-09-05 19:32 ` [gentoo-user] " Neil Bothwick
2014-09-05 20:29   ` [gentoo-user] " James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox