Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Haswell? UEFI? Gentoo? WTF?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1711
Location: Mannheim, Germany

PostPosted: Tue Jun 25, 2013 7:53 pm    Post subject: Haswell? UEFI? Gentoo? WTF? Reply with quote

Hi guys.
So I bought this shiny new box, with an intel 4770k and asus z87c MB.
I heard that uefi bioses can make huge trouble with linux... So how do I get my gentoo on this beast?
I prefer using grub-legacy over grub2 if that's possible. Any hints where I should start? Caveats?
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6254
Location: Goose Creek SC

PostPosted: Tue Jun 25, 2013 8:28 pm    Post subject: Reply with quote

does the machine have windows preinstalled? If so, preinstalled in uefi mode?
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1711
Location: Mannheim, Germany

PostPosted: Tue Jun 25, 2013 8:30 pm    Post subject: Reply with quote

nope, i assembled it myself. i just installed win7 to have an os at least. but of course i need to get gentoo back running ;) already curious how quickly the 4770k will compile my system...
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6254
Location: Goose Creek SC

PostPosted: Tue Jun 25, 2013 8:36 pm    Post subject: Reply with quote

is the win 7 installed uefi or legacy bios?
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1711
Location: Mannheim, Germany

PostPosted: Tue Jun 25, 2013 8:41 pm    Post subject: Reply with quote

Uhm, good question. How do I tell? It didn't say anything during the setup...
I saw in the bios that uefi stuff seems to be enabled by default.
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6254
Location: Goose Creek SC

PostPosted: Tue Jun 25, 2013 8:53 pm    Post subject: Reply with quote

if a linux cd is handy boot it and run gparted if in GUI, parted -l in CLI, or fdisk -l as last resort
if the win7 went on in uefi mode parted will show something like:
Number Start End Size File system Name Flags
1 1049kB 316MB 315MB ntfs Basic data partition hidden, diag
2 316MB 420MB 105MB fat32 EFI system partition boot
3 420MB 555MB 134MB Microsoft reserved partition msftres
4 555MB 193GB 192GB ntfs Basic data partition
where EFI system partition is definitive of the uefi mode installation. gparted will show graphic eqivalent
fdisk -l will only tell that the disk is formatted gpt
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1711
Location: Mannheim, Germany

PostPosted: Tue Jun 25, 2013 8:55 pm    Post subject: Reply with quote

Ok. Thanks. Will try tomorrow and tell the results here.
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6254
Location: Goose Creek SC

PostPosted: Tue Jun 25, 2013 9:01 pm    Post subject: Reply with quote

in windows 7
Type "disk management" in the search window
Select "Create and format hard disk partitions" from the top of the list
look for the partition structure

system rescue cd will boot in uefi mode or legacy bios mode; gentoo minimal install will not
most hybid uefi bios will show the windows or sysresc cd twice in the boot choice menu -one choice noted as uefi -- the other not marked uefi --- left to default the legacy mode will boot
_________________
Defund the FCC.


Last edited by DONAHUE on Tue Jun 25, 2013 9:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
creaker
Guru
Guru


Joined: 14 Jul 2012
Posts: 480

PostPosted: Tue Jun 25, 2013 9:04 pm    Post subject: Reply with quote

You can install both Win7 and Gentoo in legacy mode:
1. Disable Secure Boot in BIOS (it will give you ability to switch from UEFI to legacy BIOS mode)
2. Switch BIOS from UEFI mode to legacy BIOS mode (now you can select any boot option that was disabled in UEFI mode)
3. Install Win7 and Gentoo.

Additionally you can install grub-legacy (no need grub2 and uefi-related crap)
_________________
Intel Core i3-2120 / 4Gb RAM / 250Gb HDD / NVidia GeForce-550Ti
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Wed Jun 26, 2013 5:00 pm    Post subject: Reply with quote

booting with UEFI is the fastest and simplest way. Practically 0 configuration needed.
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1711
Location: Mannheim, Germany

PostPosted: Wed Jun 26, 2013 5:38 pm    Post subject: Reply with quote

Efi is nowhere mentioned in the patition layout. That means I can just install Gentoo as usual (copy over my old system)? :)
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6254
Location: Goose Creek SC

PostPosted: Wed Jun 26, 2013 6:19 pm    Post subject: Reply with quote

You should be able to install as usual.
Quote:
copy over my old system
If that means taking a copy of the system on a different computer and placing it on the new one -- never done that -- suspect adjusting to a new home would be interesting.
legacy grub can now be used with a gpt labeled hard drive.
you have lots of choices; if you have more than one hard drive even more.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1711
Location: Mannheim, Germany

PostPosted: Wed Jun 26, 2013 7:46 pm    Post subject: Reply with quote

Yes, that's possible if the systems are the same architecture. In my case from a 2nd gen i7 to a 4th gen. Basically it's reasonable to expect my new machine to "just boot" with the old configuration copied over. Of course not everything will work, kernel needs to be recompiled. Then a "emerge -e world", voila :)
I will wait some days though, because I still have issues finding a stable setting for the RAM. It should work with 1866er speed but doesn't. 1600 max. But that's another problem (costing me nerves right now).
@_______0:
What would be the prerequisites to do so? Any advantages over the "legacy" method?
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
srs5694
Guru
Guru


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

PostPosted: Thu Jun 27, 2013 7:50 pm    Post subject: Reply with quote

At the moment, the advantages of booting in EFI mode over BIOS mode are either slim or rare. Things that spring to mind include:


  • Use of GPT -- This is really only an advantage if you're dual-booting with Windows, since you can boot Linux from a GPT disk on a BIOS-based computer, with the caveat that some BIOSes have GPT-specific bugs that must be overcome. Still, if you are dual-booting, GPT has its own set of advantages, so this can be an important factor.
  • Theoretically simpler boot loader configuration -- EFI stores boot loaders as files on a filesystem, vs. plastering boot loader code in bizarre "unallocated" sections of the hard disk, as is done under BIOS. This makes EFI boot loader maintenance simpler, at least in theory. In practice, EFI bugs and poor OS implementations of EFI support have largely countered this advantage to date, or even turned it around. Still, if you know what you're doing and if your EFI is average or above-average in quality, it's easier to manage EFI boot loaders than to manage BIOS boot loaders. Those are both big "ifs," though; EFI expertise is still pretty rare, and EFI implementations are often bug-laden.
  • Different boot loader options -- Common Linux boot loaders under BIOS are GRUB 2, GRUB Legacy, LILO, and SYSLINUX. Under EFI, the choices include GRUB 2, Fedora's patched GRUB Legacy, ELILO, and the kernel's EFI stub loader. I hear an EFI version of SYSLINUX is also available in early form. Three boot managers for EFI (gummiboot, rEFIt, and rEFInd) are also available; they provide menus for boot loaders, and especially for the EFI stub loader. You might be perfectly happy with a BIOS-mode boot loader, but as the major BIOS-mode boot loaders are all either available in EFI form or have close EFI equivalents, the extra options for EFI make for a slight advantage to EFI, should you want to investigate these options. This is especially true if you want a user-friendly user interface; rEFIt and rEFInd are both much less intimidating to newbies than GRUB, much less LILO or ELILO.
  • A more flexible pre-boot environment -- EFI is similar in many ways to DOS, and you can run programs like editors and partitioning programs in EFI. Eventually, you may be able to run Web browsers, games, spreadsheets, and more under EFI, although the more sophisticated the program the less point there would be to running it under EFI. Still, even given the limited tools available today, the ability to use an EFI shell and related tools to manage boot loaders or perform other low-level tasks can be advantageous.
  • Firmware interfaces in the OS -- EFI provides more flexible interface tools to the OS. At the moment, this means you can use tools like "efibootmgr" in Linux to help manage boot loaders. It's also possible for the kernel to store debugging information in the firmware in the event of a system crash, which can help with debugging efforts. In the future there will probably be more user-level tools that will provide benefits.
  • Hardware optimization -- I've seen claims that some EFI-based computers disable some of the more advanced disk access modes when booting in BIOS mode. If true, this is a big advantage of EFI mode (or a disadvantage of BIOS/CSM/legacy mode, really). I've not investigated this claim, though, and even if it's true, it's probably not true of all EFI-based computers.
  • Secure Boot -- Many people consider Secure Boot to be a pain, or even bring forth paranoid conspiracy theories about it. This feature does have a real advantage, though, in that it can help protect computers against boot kits. The trouble is that setting it up properly still requires significant effort, particularly for a distribution like Gentoo that doesn't explicitly support it. See my Web page on the topic for general information, or my rEFInd Secure Boot documentation for more specifics about using rEFInd with Secure Boot.


These EFI advantages must be balanced against the big disadvantage that EFI support in Linux is still imperfect, and indeed most EFIs available today are extremely buggy. Some of the tools are still very crude, and bugs are being discovered and ironed out as we speak. BIOS tools are much more mature and so are less likely to jump up and bite you.

Overall, I'd say that if you have a choice of boot modes, it's probably best to go with EFI, with the caveat that the learning curve is significant, and if you run into problems, falling back on a BIOS-mode boot is a reasonable option. Note that in Linux, the boot mode can be changed by installing a different boot loader. In fact, these boot loaders can coexist, so you can switch boot modes on a boot-by-boot basis if you like.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2424
Location: Germany

PostPosted: Thu Jun 27, 2013 10:57 pm    Post subject: Re: Haswell? UEFI? Gentoo? WTF? Reply with quote

Martux wrote:
So I bought this shiny new box, with an intel 4770k and asus z87c MB.


Sweet. I'm waiting for 4770R myself, if it doesn't turn out to be a hoax...

Martux wrote:
I heard that uefi bioses can make huge trouble with linux...


I've had zero issues so far. EFI/GPT, Grub2 (with a custom config it's very nice - the auto generated stuff is utterly horrible). All you have to do is create a bios_grub partition...
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1711
Location: Mannheim, Germany

PostPosted: Fri Jun 28, 2013 4:24 pm    Post subject: Reply with quote

Guys! Thanks for all the detailed explanations, really helpful. From what I've read so far, I don't see any use in switching over to UEFI boot. Actually the machine is in the repair shop now, I am having huge issues with the RAM, making the monster crash all the time. Lost a week already and I am not really in the mood anymore for anything too experimental. I will let you know how the transition went, when I have the machine back. Thanks @all!
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
srs5694
Guru
Guru


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

PostPosted: Fri Jun 28, 2013 4:30 pm    Post subject: Re: Haswell? UEFI? Gentoo? WTF? Reply with quote

frostschutz wrote:
Martux wrote:
I heard that uefi bioses can make huge trouble with linux...


I've had zero issues so far. EFI/GPT, Grub2 (with a custom config it's very nice - the auto generated stuff is utterly horrible). All you have to do is create a bios_grub partition...


If your configuration depends on a BIOS Boot Partition (what parted-based tools identify as having a "bios_grub" flag), then you're not booting in EFI mode, you're booting in BIOS mode.

Some background and elaboration:

First, an EFI is not a BIOS, so the term "UEFI BIOS" is meaningless; it's like saying you have a "Chevy Ford" or a "banana apple." Both EFI and BIOS are examples of firmware, just as Chevy and Ford are makes of cars, and bananas and apples are both fruits. Unfortunately, the manufacturers are abusing the language by applying the acronym "BIOS" to their EFIs, probably because most users would be confused by the use of the acronym "EFI" (or "UEFI," which is just EFI version 2.x).

That said, most EFIs include a feature known as the Compatibility Support Module (CSM), which enables them to run BIOS-mode boot loaders. The CSM is to the EFI something like WINE is to Linux. The end result is that most EFI-based computers can boot either in native EFI mode or using the CSM (aka "BIOS mode" or "legacy mode"). One problem with this is that the firmware settings to control this mode vary greatly from one computer to another -- some have extensive and explicit options controlling CSM mode, whereas others provide minimal or no options. Some computers rely partially or exclusively on clues on the hard disk to determine the boot mode, such as booting in BIOS mode only if the firmware detects an MBR partition table with a partition marked with its boot/active flag.

In any event, it's often hard for people with minimal experience with these systems to understand how they're booting. In Linux, you can check for the presence of a directory called /sys/firmware/efi. If that directory is present, you've booted in EFI mode. If that directory is not present, you've probably booted in BIOS/CSM/legacy mode, although you might have booted in EFI mode without key support active. (Loading the efivars kernel module should install that support and bring up /sys/firmware/efi if you've booted in EFI mode, though -- but even then there are ways for this to fail.)

Fortunately, it's relatively easy in Linux to switch boot modes: You just need to install a suitable boot loader (EFI or BIOS) and get your firmware to boot it. See my EFI Boot Loaders for Linux page for pointers on several boot loaders and descriptions of how to install them. If you're booting in BIOS mode via GRUB 2, I recommend you use another boot loader for EFI-mode experimentation; BIOS-mode and EFI-mode GRUBs can require slightly different configurations, so getting them to coexist can be tricky.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2424
Location: Germany

PostPosted: Fri Jun 28, 2013 5:16 pm    Post subject: Re: Haswell? UEFI? Gentoo? WTF? Reply with quote

srs5694 wrote:
If your configuration depends on a BIOS Boot Partition (what parted-based tools identify as having a "bios_grub" flag), then you're not booting in EFI mode, you're booting in BIOS mode.


I am? Okay. :lol: I don't care, really - the boot is instantanious; with a traditional MSDOS partition (and without bios_grub partition gpt), and selecting "boot dos stuff", it's a lot slower for some reason...

If that's BIOS mode, I'm completely fine with it. Worked everywhere so far.

Thanks for the correction & sorry for the confusion.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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