Re: accessing efivarfs in debian-installer

2016-07-26 Thread Francesco De Vita
Hi

On 27/5/2016 10:59, Steve McIntyre wrote:
> On Fri, May 27, 2016 at 10:41:39AM +0200, Francesco De Vita wrote:
> >On 25/5/2016 16:31, Cyril Brulebois wrote:
> >> 
> >> I'm pretty sure we can do that from d-i since that's needed to get
> >> UEFI support working AFAICT. Looking at udebs, it seems you want
> >> to
> >> be loading this one, probably manually if you're at an early
> >> stage:
> >> efi-modules-4.5.0-2-amd64-di_4.5.4-1_amd64.udeb
> >> 
> >> It contains:
> >>   ./lib/modules/4.5.0-2-amd64/kernel/drivers/firmware/efi/efivars.
> >>   ko
> >
> >This time I'm using the Stretch Alpha 6 DI. I successfully loaded
> >the efivars module as you suggested, however the efivarfs interface
> >remains inaccessible, it still cannot be mounted.
> >
> >I suppose that the efivarfs module has to be loaded too but there is
> >no trace of efivarfs.ko in the DI and I didn't find any udeb
> >containing it. Should I load it someway from an external source?
> 
> Ah, that's your problem. It looks like we're not including that
> module yet. Most EFI variable users like efibootmgr will fall back
> to the older interfaces, so we've not noticed this yet.
> 
> I'll go and fix that now.

I tested the new Stretch Alpha 7 DI and now it automatically identifies 
the wifi card and it asks for the proper driver. After that, the wifi 
card works.

So far so good but a problem remains. The required firmware is composed 
by two files:
- brcmfmac43241b4-sdio.bin
- brcmfmac43241b4-sdio.txt

The first one is available in a debian package [1] but the second one, 
as I reported here [2], can be retrieved only by accessing the efivarfs 
interface. I repeated the steps discussed in the previous messages (see 
the quote above) but still I was unable do it. Is the efivarfs module 
still not present in the DI or I missed a step?

Of course the latter file can be retrieved using a live distro on usb, 
I simply retrieved it using the Debian that I already installed on the 
pc. But starting with nothing, if the efivarfs interface cannot be 
accessed, one has to use a live distro and do this additional step, or 
take the file from someone else (which in principle should be not 
recommended).

I think that this particular procedure should be easier, right now it 
could be a hassle for less experienced people.

If you answer, please add my e-mail address in CC because I'm not 
subscribed to this list. Thank you very much.

Ciao
Francesco

[1] https://packages.debian.org/stretch/firmware-brcm80211
[2] https://wiki.debian.org/InstallingDebianOn/Asus/T100TA#WiFi



Re: accessing efivarfs in debian-installer

2016-05-27 Thread Hendrik Boom
On Fri, May 27, 2016 at 04:08:55PM +0100, Ben Hutchings wrote:
> On Fri, 2016-05-27 at 09:13 -0400, Hendrik Boom wrote:
> > On Fri, May 27, 2016 at 10:59:35AM +0100, Steve McIntyre wrote:
> > > On Fri, May 27, 2016 at 10:41:39AM +0200, Francesco De Vita wrote:
> > > > Hi
> > > > 
> > > > On 25/5/2016 16:31, Cyril Brulebois wrote:
> > > > > Francesco De Vita  (2016-05-24):
> > > > > > So, is it possible to access the efivarfs interface and retrieve
> > > > > > the required nvram-file inside the DI environment?
> > > > > 
> > > > > I'm pretty sure we can do that from d-i since that's needed to get
> > > > > UEFI support working AFAICT. Looking at udebs, it seems you want to
> > > > > be loading this one, probably manually if you're at an early stage:
> > > > > efi-modules-4.5.0-2-amd64-di_4.5.4-1_amd64.udeb
> > > > > 
> > > > > It contains:
> > > > >   ./lib/modules/4.5.0-2-amd64/kernel/drivers/firmware/efi/efivars.ko
> > > > > 
> > > > > which is likely to make it possible to access efivars, allowing you
> > > > > to mount them on the mount point (which you mentioned, exists
> > > > > already).
> > > > 
> > > > This time I'm using the Stretch Alpha 6 DI. I successfully loaded the 
> > > > efivars module as you suggested, however the efivarfs interface remains 
> > > > inaccessible, it still cannot be mounted.
> > > > 
> > > > I suppose that the efivarfs module has to be loaded too but there is no 
> > > > trace of efivarfs.ko in the DI and I didn't find any udeb containing 
> > > > it. Should I load it someway from an external source?
> > > 
> > > Ah, that's your problem. It looks like we're not including that module
> > > yet. Most EFI variable users like efibootmgr will fall back to the
> > > older interfaces, so we've not noticed this yet.
> > > 
> > > I'll go and fix that now.
> > 
> > Wasn't mounting the efivars as a file system implicated in the complete 
> > bricking of someone's hardware a while ago?  The problem being that it 
> > was too easy to rm those files, which deleted those efi variables, 
> > which included variable that were essential to making booting possible?  
> > Not just that it wouldn't boot the installed system any more; it could 
> > no longer boot anything, not even an operating-system installer?
> 
> Fixed in Linux 4.5-rc5 and in 4.4.4.  Now only variables on a known-
> safe whitelist are allowed to be deleted.
> 
> [...]
> > Juat be very careful with efivars.
> 
> We are.

Excellent.

-- hendrik



Re: accessing efivarfs in debian-installer

2016-05-27 Thread Ben Hutchings
On Fri, 2016-05-27 at 09:13 -0400, Hendrik Boom wrote:
> On Fri, May 27, 2016 at 10:59:35AM +0100, Steve McIntyre wrote:
> > On Fri, May 27, 2016 at 10:41:39AM +0200, Francesco De Vita wrote:
> > > Hi
> > > 
> > > On 25/5/2016 16:31, Cyril Brulebois wrote:
> > > > Francesco De Vita  (2016-05-24):
> > > > > So, is it possible to access the efivarfs interface and retrieve
> > > > > the required nvram-file inside the DI environment?
> > > > 
> > > > I'm pretty sure we can do that from d-i since that's needed to get
> > > > UEFI support working AFAICT. Looking at udebs, it seems you want to
> > > > be loading this one, probably manually if you're at an early stage:
> > > > efi-modules-4.5.0-2-amd64-di_4.5.4-1_amd64.udeb
> > > > 
> > > > It contains:
> > > >   ./lib/modules/4.5.0-2-amd64/kernel/drivers/firmware/efi/efivars.ko
> > > > 
> > > > which is likely to make it possible to access efivars, allowing you
> > > > to mount them on the mount point (which you mentioned, exists
> > > > already).
> > > 
> > > This time I'm using the Stretch Alpha 6 DI. I successfully loaded the 
> > > efivars module as you suggested, however the efivarfs interface remains 
> > > inaccessible, it still cannot be mounted.
> > > 
> > > I suppose that the efivarfs module has to be loaded too but there is no 
> > > trace of efivarfs.ko in the DI and I didn't find any udeb containing 
> > > it. Should I load it someway from an external source?
> > 
> > Ah, that's your problem. It looks like we're not including that module
> > yet. Most EFI variable users like efibootmgr will fall back to the
> > older interfaces, so we've not noticed this yet.
> > 
> > I'll go and fix that now.
> 
> Wasn't mounting the efivars as a file system implicated in the complete 
> bricking of someone's hardware a while ago?  The problem being that it 
> was too easy to rm those files, which deleted those efi variables, 
> which included variable that were essential to making booting possible?  
> Not just that it wouldn't boot the installed system any more; it could 
> no longer boot anything, not even an operating-system installer?

Fixed in Linux 4.5-rc5 and in 4.4.4.  Now only variables on a known-
safe whitelist are allowed to be deleted.

[...]
> Juat be very careful with efivars.

We are.

Ben.

-- 
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
  - Albert
Camus


signature.asc
Description: This is a digitally signed message part


Re: accessing efivarfs in debian-installer

2016-05-27 Thread Hendrik Boom
On Fri, May 27, 2016 at 10:59:35AM +0100, Steve McIntyre wrote:
> On Fri, May 27, 2016 at 10:41:39AM +0200, Francesco De Vita wrote:
> >Hi
> >
> >On 25/5/2016 16:31, Cyril Brulebois wrote:
> >> Francesco De Vita  (2016-05-24):
> >> > So, is it possible to access the efivarfs interface and retrieve
> >> > the required nvram-file inside the DI environment?
> >> 
> >> I'm pretty sure we can do that from d-i since that's needed to get
> >> UEFI support working AFAICT. Looking at udebs, it seems you want to
> >> be loading this one, probably manually if you're at an early stage:
> >> efi-modules-4.5.0-2-amd64-di_4.5.4-1_amd64.udeb
> >> 
> >> It contains:
> >>   ./lib/modules/4.5.0-2-amd64/kernel/drivers/firmware/efi/efivars.ko
> >> 
> >> which is likely to make it possible to access efivars, allowing you
> >> to mount them on the mount point (which you mentioned, exists
> >> already).
> >
> >This time I'm using the Stretch Alpha 6 DI. I successfully loaded the 
> >efivars module as you suggested, however the efivarfs interface remains 
> >inaccessible, it still cannot be mounted.
> >
> >I suppose that the efivarfs module has to be loaded too but there is no 
> >trace of efivarfs.ko in the DI and I didn't find any udeb containing 
> >it. Should I load it someway from an external source?
> 
> Ah, that's your problem. It looks like we're not including that module
> yet. Most EFI variable users like efibootmgr will fall back to the
> older interfaces, so we've not noticed this yet.
> 
> I'll go and fix that now.

Wasn't mounting the efivars as a file system implicated in the complete 
bricking of someone's hardware a while ago?  The problem being that it 
was too easy to rm those files, which deleted those efi variables, 
which included variable that were essential to making booting possible?  
Not just that it wouldn't boot the installed system any more; it could 
no longer boot anything, not even an operating-system installer?

I'd be wary of anything that mounts the efivars.  Especially leaving 
them mounted for more than the absolute minimum necessary to make 
use of them.

Mind you, there was an argument that the hardware was bedly defined, in 
that it had no mechanism to reset the efi vars to a safe staate, the 
the guy who issued the rm -rf * was an idiot, and that systemd had left 
the efivars mounted and vulnerable.

Juat be very careful with efivars.

-- hendrik



Re: accessing efivarfs in debian-installer

2016-05-27 Thread Steve McIntyre
On Fri, May 27, 2016 at 10:41:39AM +0200, Francesco De Vita wrote:
>Hi
>
>On 25/5/2016 16:31, Cyril Brulebois wrote:
>> Francesco De Vita  (2016-05-24):
>> > So, is it possible to access the efivarfs interface and retrieve
>> > the required nvram-file inside the DI environment?
>> 
>> I'm pretty sure we can do that from d-i since that's needed to get
>> UEFI support working AFAICT. Looking at udebs, it seems you want to
>> be loading this one, probably manually if you're at an early stage:
>> efi-modules-4.5.0-2-amd64-di_4.5.4-1_amd64.udeb
>> 
>> It contains:
>>   ./lib/modules/4.5.0-2-amd64/kernel/drivers/firmware/efi/efivars.ko
>> 
>> which is likely to make it possible to access efivars, allowing you
>> to mount them on the mount point (which you mentioned, exists
>> already).
>
>This time I'm using the Stretch Alpha 6 DI. I successfully loaded the 
>efivars module as you suggested, however the efivarfs interface remains 
>inaccessible, it still cannot be mounted.
>
>I suppose that the efivarfs module has to be loaded too but there is no 
>trace of efivarfs.ko in the DI and I didn't find any udeb containing 
>it. Should I load it someway from an external source?

Ah, that's your problem. It looks like we're not including that module
yet. Most EFI variable users like efibootmgr will fall back to the
older interfaces, so we've not noticed this yet.

I'll go and fix that now.

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
Can't keep my eyes from the circling sky,
Tongue-tied & twisted, Just an earth-bound misfit, I...



Re: accessing efivarfs in debian-installer

2016-05-27 Thread Francesco De Vita
Hi

On 25/5/2016 16:31, Cyril Brulebois wrote:
> Francesco De Vita  (2016-05-24):
> > So, is it possible to access the efivarfs interface and retrieve
> > the required nvram-file inside the DI environment?
> 
> I'm pretty sure we can do that from d-i since that's needed to get
> UEFI support working AFAICT. Looking at udebs, it seems you want to
> be loading this one, probably manually if you're at an early stage:
> efi-modules-4.5.0-2-amd64-di_4.5.4-1_amd64.udeb
> 
> It contains:
>   ./lib/modules/4.5.0-2-amd64/kernel/drivers/firmware/efi/efivars.ko
> 
> which is likely to make it possible to access efivars, allowing you
> to mount them on the mount point (which you mentioned, exists
> already).

This time I'm using the Stretch Alpha 6 DI. I successfully loaded the 
efivars module as you suggested, however the efivarfs interface remains 
inaccessible, it still cannot be mounted.

I suppose that the efivarfs module has to be loaded too but there is no 
trace of efivarfs.ko in the DI and I didn't find any udeb containing 
it. Should I load it someway from an external source?

Thanks for your help!

Ciao
Francesco



Re: accessing efivarfs in debian-installer

2016-05-25 Thread Cyril Brulebois
Hi,

Francesco De Vita  (2016-05-24):
> I have an ASUS T100TA [1] and I'm trying to use the wifi device with 
> the Debian Installer for Stretch Alpha 5 .

(There's a Strech Alpha 6 now. ;))

> As explained here [2], the wifi device requires a proprietary firmware 
> and its nvram-file, a UEFI configuration variable from 
> /sys/firmware/efi/efivars. Loading the firmware in the DI is not a 
> problem but I'm unable to access the efivarfs interface. 
> 
> Using a tty console in the DI, I can see that the directory 
> /sys/firmware/efi/efivars is there but it is empty. Mounting the 
> efivarfs in this path [2] fails with the "no such device" message, and 
> lsmod doesn't show the efivars and efivarfs modules, which I suppose 
> are required.
> 
> So, is it possible to access the efivarfs interface and retrieve the 
> required nvram-file inside the DI environment?

I'm pretty sure we can do that from d-i since that's needed to get UEFI
support working AFAICT. Looking at udebs, it seems you want to be
loading this one, probably manually if you're at an early stage:
  efi-modules-4.5.0-2-amd64-di_4.5.4-1_amd64.udeb

It contains:
  ./lib/modules/4.5.0-2-amd64/kernel/drivers/firmware/efi/efivars.ko

which is likely to make it possible to access efivars, allowing you to
mount them on the mount point (which you mentioned, exists already).

> If you answer, please add my e-mail address in CC because I'm not 
> subscribed to this list. Thank you very much.

Done.


KiBi.


signature.asc
Description: Digital signature


Re: accessing efivarfs in debian-installer

2016-05-24 Thread Nicholas D Steeves
Hi Francesco,

On 24 May 2016 at 06:47, Francesco De Vita  wrote:
> As explained here [2], the wifi device requires a proprietary firmware
> and its nvram-file, a UEFI configuration variable from
> /sys/firmware/efi/efivars. Loading the firmware in the DI is not a
> problem but I'm unable to access the efivarfs interface.
>
> Using a tty console in the DI, I can see that the directory
> /sys/firmware/efi/efivars is there but it is empty. Mounting the
> efivarfs in this path [2] fails with the "no such device" message, and
> lsmod doesn't show the efivars and efivarfs modules, which I suppose
> are required.
>
> [1] https://wiki.debian.org/InstallingDebianOn/Asus/T100TA
> [2] https://wiki.debian.org/InstallingDebianOn/Asus/T100TA#WiFi
>

I seem to remember someone else writing about EFI not working poorly
with alpha5...  Could you please try alpha6?  The T100TA wiki states
either i386 or amd64+i386 grub-efi need to be used.  Here are links to
the netinst isos for your convenience.

http://cdimage.debian.org/cdimage/stretch_di_alpha6/i386/iso-cd/debian-stretch-DI-alpha6-i386-netinst.iso
http://cdimage.debian.org/cdimage/stretch_di_alpha6/multi-arch/iso-cd/debian-stretch-DI-alpha6-amd64-i386-netinst.iso

Alternatively, could someone please comment on how the following is
different from the multiarch iso?  Or does the multiarch iso install a
preconfigured amd64+i386 sources.list and packages out of the box,
while using a 64bit grub-efi?  The reason I mention this mac iso is
because I seem to remember that macs are infamous for using mixed-mode
EFI.
http://cdimage.debian.org/cdimage/stretch_di_alpha6/amd64/iso-cd/debian-mac-stretch-DI-alpha6-amd64-netinst.iso

Cheers,
Nicholas



accessing efivarfs in debian-installer

2016-05-24 Thread Francesco De Vita
Hello

I have an ASUS T100TA [1] and I'm trying to use the wifi device with 
the Debian Installer for Stretch Alpha 5 .

As explained here [2], the wifi device requires a proprietary firmware 
and its nvram-file, a UEFI configuration variable from 
/sys/firmware/efi/efivars. Loading the firmware in the DI is not a 
problem but I'm unable to access the efivarfs interface. 

Using a tty console in the DI, I can see that the directory 
/sys/firmware/efi/efivars is there but it is empty. Mounting the 
efivarfs in this path [2] fails with the "no such device" message, and 
lsmod doesn't show the efivars and efivarfs modules, which I suppose 
are required.

So, is it possible to access the efivarfs interface and retrieve the 
required nvram-file inside the DI environment?

If you answer, please add my e-mail address in CC because I'm not 
subscribed to this list. Thank you very much.

Francesco

[1] https://wiki.debian.org/InstallingDebianOn/Asus/T100TA
[2] https://wiki.debian.org/InstallingDebianOn/Asus/T100TA#WiFi