Re: EFI approach and patches

2012-09-05 Thread Steve McIntyre
On Mon, Sep 03, 2012 at 12:16:37AM +0300, Mika wrote:
>
>The debian entry that was made during install broke eighter on
>windows install or Asus boot menu just wouldn't get it running. I
>wasn't sure could I use efi recovery boot selection to install grub
>again automatically? Does it work so or is it just for manual
>recovery with the system loaded as efi and using console to setup
>grub again?

It'll let you into your normal system so you can fix things, either
from a shell (if you know what you're doing) or there's an option to
re-install grub directly from the rescue mode menu.

>Anyhow I got it working now all together. Grub2-efi is loading at first and
>then I can chainload win7 bootloader. The installer and grub probe didn't
>find the win7 automatically though.
>
>Now efibootmgrs got the debian entry that was generated at install as 2 but
>it didn't work after windows install. I got it working after making a new
>entry  for Uefi and installing grub again with these instructions.
>
>http://forums.debian.net/viewtopic.php?f=16&t=81120
>
>The output now:
>BootCurrent: 
>Timeout: 3 seconds
>BootOrder: ,0002,0003,0005,0001
>Boot* Debian GNU/Linux
>Boot0001  Hard Drive
>Boot0002* debian
>Boot0003* Windows Boot Manager
>Boot0005* CD/DVD Drive
>
>I also read somewhere that I might run into trouble again when Win7 updates
>itself. So I think I will keep your efi install cd near and use it for
>recovering again if I run into trouble. :)

OK. :-)

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
Into the distance, a ribbon of black
Stretched to the point of no turning back


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120905150557.gc25...@einval.com



Re: EFI approach and patches

2012-09-02 Thread Mika
Dough of course the verbose output is nicer.

/home# efibootmgr -v
BootCurrent: 
Timeout: 3 seconds
BootOrder: ,0002,0003,0005,0001
Boot* Debian GNU/Linux
HD(3,613a4800,f4000,ea481e18-9503-404e-84ed-088f005a3ee1)File(\EFI\debian\grubx64.efi)
Boot0001  Hard DriveBIOS(2,0,00)P0: WDC WD15EARX-00PASB0  .
Boot0002* debian
HD(3,613a4800,f4000,ea481e18-9503-404e-84ed-088f005a3ee1)File(\EFI\debian\grubx64.efi)
Boot0003* Windows Boot Manager
HD(3,613a4800,f4000,ea481e18-9503-404e-84ed-088f005a3ee1)File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...o....
Boot0005* CD/DVD DriveBIOS(3,0,00)P1: ASUSDRW-24B5ST.
/home#

So I see the entry has been right all along, as it is the same as the one I
created by hand. Somehow fiddling with win7 broke the ESD then.

-- Mika

On Mon, Sep 3, 2012 at 12:16 AM, Mika  wrote:

> The debian entry that was made during install broke eighter on windows
> install or Asus boot menu just wouldn't get it running. I wasn't sure could
> I use efi recovery boot selection to install grub again automatically? Does
> it work so or is it just for manual recovery with the system loaded as efi
> and using console to setup grub again?
>
> Anyhow I got it working now all together. Grub2-efi is loading at first
> and then I can chainload win7 bootloader. The installer and grub probe
> didn't find the win7 automatically though.
>
> Now efibootmgrs got the debian entry that was generated at install as 2
> but it didn't work after windows install. I got it working after making a
> new entry  for Uefi and installing grub again with these instructions.
>
> http://forums.debian.net/viewtopic.php?f=16&t=81120
>
> The output now:
> BootCurrent: 
> Timeout: 3 seconds
> BootOrder: ,0002,0003,0005,0001
> Boot* Debian GNU/Linux
> Boot0001  Hard Drive
> Boot0002* debian
> Boot0003* Windows Boot Manager
> Boot0005* CD/DVD Drive
>
> I also read somewhere that I might run into trouble again when Win7
> updates itself. So I think I will keep your efi install cd near and use it
> for recovering again if I run into trouble. :)
>
> -- Mika
>
>
> On Sun, Sep 2, 2012 at 7:05 PM, Steve McIntyre  wrote:
>
>> Mika Rastas wrote:
>> >Nice work Steve,
>>
>> *grin* Thanks!
>>
>> >And just in time for me. I bought a UEFI system second hand and got it
>> >from mail on Friday. Its got a ASUS Sabertooth 990FX board with the
>> >newest bios.
>> >
>> >I installed with your third version of the installer and it worked.
>>
>> Awesome.
>>
>> >Though still having trouble with double booting to win7 and Asus
>> >bootmgr. It boots win7 loader, but doesn't find the grub one. I can get
>> >it to load grub from my debian install when I efi-boot with your cd and
>> >load the config file to that grub from hd. Well getting off topic so
>> >finishing.
>>
>> What does efibootmgr say once you've got your system booted into
>> Debian?
>>
>> --
>> Steve McIntyre, Cambridge, UK.
>> st...@einval.com
>> Google-bait:   http://www.debian.org/CD/free-linux-cd
>>   Debian does NOT ship free CDs. Please do NOT contact the mailing
>>   lists asking us to send them to you.
>>
>
>


Re: EFI approach and patches

2012-09-02 Thread Mika
The debian entry that was made during install broke eighter on windows
install or Asus boot menu just wouldn't get it running. I wasn't sure could
I use efi recovery boot selection to install grub again automatically? Does
it work so or is it just for manual recovery with the system loaded as efi
and using console to setup grub again?

Anyhow I got it working now all together. Grub2-efi is loading at first and
then I can chainload win7 bootloader. The installer and grub probe didn't
find the win7 automatically though.

Now efibootmgrs got the debian entry that was generated at install as 2 but
it didn't work after windows install. I got it working after making a new
entry  for Uefi and installing grub again with these instructions.

http://forums.debian.net/viewtopic.php?f=16&t=81120

The output now:
BootCurrent: 
Timeout: 3 seconds
BootOrder: ,0002,0003,0005,0001
Boot* Debian GNU/Linux
Boot0001  Hard Drive
Boot0002* debian
Boot0003* Windows Boot Manager
Boot0005* CD/DVD Drive

I also read somewhere that I might run into trouble again when Win7 updates
itself. So I think I will keep your efi install cd near and use it for
recovering again if I run into trouble. :)

-- Mika

On Sun, Sep 2, 2012 at 7:05 PM, Steve McIntyre  wrote:

> Mika Rastas wrote:
> >Nice work Steve,
>
> *grin* Thanks!
>
> >And just in time for me. I bought a UEFI system second hand and got it
> >from mail on Friday. Its got a ASUS Sabertooth 990FX board with the
> >newest bios.
> >
> >I installed with your third version of the installer and it worked.
>
> Awesome.
>
> >Though still having trouble with double booting to win7 and Asus
> >bootmgr. It boots win7 loader, but doesn't find the grub one. I can get
> >it to load grub from my debian install when I efi-boot with your cd and
> >load the config file to that grub from hd. Well getting off topic so
> >finishing.
>
> What does efibootmgr say once you've got your system booted into
> Debian?
>
> --
> Steve McIntyre, Cambridge, UK.
> st...@einval.com
> Google-bait:   http://www.debian.org/CD/free-linux-cd
>   Debian does NOT ship free CDs. Please do NOT contact the mailing
>   lists asking us to send them to you.
>


Re: EFI approach and patches

2012-09-02 Thread Steve McIntyre
Mika Rastas wrote:
>Nice work Steve,

*grin* Thanks!

>And just in time for me. I bought a UEFI system second hand and got it
>from mail on Friday. Its got a ASUS Sabertooth 990FX board with the
>newest bios.
>
>I installed with your third version of the installer and it worked.

Awesome.

>Though still having trouble with double booting to win7 and Asus
>bootmgr. It boots win7 loader, but doesn't find the grub one. I can get
>it to load grub from my debian install when I efi-boot with your cd and
>load the config file to that grub from hd. Well getting off topic so
>finishing.

What does efibootmgr say once you've got your system booted into
Debian?

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
Google-bait:   http://www.debian.org/CD/free-linux-cd
  Debian does NOT ship free CDs. Please do NOT contact the mailing
  lists asking us to send them to you.


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1t8cg8-0007lx...@mail.einval.com



Re: EFI approach and patches

2012-09-02 Thread Mika Rastas
Nice work Steve,

And just in time for me. I bought a UEFI system second hand and got it
from mail on Friday. Its got a ASUS Sabertooth 990FX board with the
newest bios.

I installed with your third version of the installer and it worked.

Though still having trouble with double booting to win7 and Asus
bootmgr. It boots win7 loader, but doesn't find the grub one. I can get
it to load grub from my debian install when I efi-boot with your cd and
load the config file to that grub from hd. Well getting off topic so
finishing.


PS of to find more info on repairing the grub efi boot


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1346588085.5891.9.ca...@birdfarm0.kicks-ass.net



Re: EFI approach and patches

2012-08-13 Thread Steve McIntyre
wa...@debian.org wrote:
>On Mon, Aug 13, 2012 at 01:10:31AM +0100, Steve McIntyre wrote:
>> 1. Add a new subarch of "efi" for i386 and amd64 in
>>libdebian-installer, worked out (as usual for EFI) from whether
>>/sys/firmware/efi is accessible. This filters through readily to
>>archdetect, used all over the place elsewhere in d-i.
>
>This needs efivars loaded AFAIK. I'm not yet familiar with the EFI part
>of the Linux kernel.

Yes, it does. It's automatically loaded by the point when it's needed
here.

>> 2. Build efi-reader for amd64 as well as ia64. Not sure if this
>>provides anything important, but it doesn't hurt. :-)
>
>This is needed for what?

On ia64, it provides access to EFI variables for things like language
preference. As far as I can see, they're also present on amd64. Not
critical, but there's no point to not use the package if it's already
available.

>> 3. Build elilo-installer for amd64 too, and mark it as installable for
>>i386/efi|amd64/efi.
>
>Does elilo provide 32 and 64-bit efi binaries? All the current machines
>need 64-bit binaries.

Yes, it already includes ia32, ia64 and x86_64 code and was already
building for all 3 architectures.

>> 4. Mark grub-installer as not installable for i386/efi|amd64/efi
>
>No.

Not in the long term, agreed. I've just turned it off for now as I was
having problems getting grub-efi to install. Should be fixed shortly,
I hope.

>> 5. Mark lilo-installer as not installable for i386/efi|amd64/efi
>
>Okay.
>
>> 6. Several tweaks to partman-auto:
>>   * Switch from fat16 to fat32 in ia64 recipes
>
>Why?

For consistency with partman-efi. AFAICS it can only support one
filesystem without significant changes (or maybe a split into
partman-efi and partman-uefi). AFAIK UEFI explicitly wants fat32, so
I've switched over to that consistently.

>>   The first of these needs testing - is EFI on ia64 *definitely* ok
>>   with fat32, or must it have fat16? I've also upped the size of the
>>   EFI partition to 512MB, a more sensible minimum in case of multiple
>>   OS installs. I cloned tha ia64 recipes, then the diff shows the
>>   changes since. Not 100% sure of the best approach for partman-auto,
>>   I'll admit here. Thoughts?
>
>It works fine with FAT16, however grub needs the partition properly
>alligned.

Alignment seems fine for me:

tack:~/debian/efi$ gdisk -l efi-hard-disk.img 
GPT fdisk (gdisk) version 0.8.5

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk efi-hard-disk.img: 16777216 sectors, 8.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 4F312FA0-5643-4775-9AB8-01BF3F207487
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 16777182
Partitions will be aligned on 2048-sector boundaries
Total free space is 4029 sectors (2.0 MiB)

Number  Start (sector)End (sector)  Size   Code  Name
   12048  999423   487.0 MiB   EF00  
   2  99942415994879   7.2 GiB 0700  
   31599488016775167   381.0 MiB   8200  

>> 8. partman-partitioning: for amd64/efi and i386/efi, use gpt instead
>>of msdos
>
>Nope. EFI works fine with msdos.

But not reliably on all disks. We'd need to switch to GPT for large
disks (> 2TB), which people are going to want with new UEFI
installations anyway. Looking at the code, I think it's much easier to
just use GPT with UEFI than to bugger with the rest of the partman
code to switch partition style depending on disk size.

>> +/* Are we on an EFI system? Check to see if /sys/firmware/efi
>> + * exists */
>> +static int is_efi(void)
>> +{
>> +   int ret = access("/sys/firmware/efi", R_OK);
>> +if (ret == 0)
>> +   return 1;
>> +else
>> +   return 0;
>> +}
>
>Whitespace damage.

ACK, easily fixed.

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
Google-bait:   http://www.debian.org/CD/free-linux-cd
  Debian does NOT ship free CDs. Please do NOT contact the mailing
  lists asking us to send them to you.


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1t0ti4-0002b3...@mail.einval.com



Re: EFI approach and patches

2012-08-13 Thread Bastian Blank
On Mon, Aug 13, 2012 at 01:10:31AM +0100, Steve McIntyre wrote:
> 1. Add a new subarch of "efi" for i386 and amd64 in
>libdebian-installer, worked out (as usual for EFI) from whether
>/sys/firmware/efi is accessible. This filters through readily to
>archdetect, used all over the place elsewhere in d-i.

This needs efivars loaded AFAIK. I'm not yet familiar with the EFI part
of the Linux kernel.

> 2. Build efi-reader for amd64 as well as ia64. Not sure if this
>provides anything important, but it doesn't hurt. :-)

This is needed for what?

> 3. Build elilo-installer for amd64 too, and mark it as installable for
>i386/efi|amd64/efi.

Does elilo provide 32 and 64-bit efi binaries? All the current machines
need 64-bit binaries.

> 4. Mark grub-installer as not installable for i386/efi|amd64/efi

No.

> 5. Mark lilo-installer as not installable for i386/efi|amd64/efi

Okay.

> 6. Several tweaks to partman-auto:
>   * Switch from fat16 to fat32 in ia64 recipes

Why?

>   The first of these needs testing - is EFI on ia64 *definitely* ok
>   with fat32, or must it have fat16? I've also upped the size of the
>   EFI partition to 512MB, a more sensible minimum in case of multiple
>   OS installs. I cloned tha ia64 recipes, then the diff shows the
>   changes since. Not 100% sure of the best approach for partman-auto,
>   I'll admit here. Thoughts?

It works fine with FAT16, however grub needs the partition properly
alligned.

> 8. partman-partitioning: for amd64/efi and i386/efi, use gpt instead
>of msdos

Nope. EFI works fine with msdos.

> +/* Are we on an EFI system? Check to see if /sys/firmware/efi
> + * exists */
> +static int is_efi(void)
> +{
> +   int ret = access("/sys/firmware/efi", R_OK);
> +if (ret == 0)
> +   return 1;
> +else
> +   return 0;
> +}

Whitespace damage.

Bastian


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120813101547.ga18...@wavehammer.waldi.eu.org