Author Topic: Multiboot is broken (at least for some devices)  (Read 4555 times)

flotsam

  • Newbie
  • *
  • Posts: 18
    • View Profile
Multiboot is broken (at least for some devices)
« on: May 31, 2019, 05:56:00 am »
I have been struggling, without success, to get dual-boot Sailfish/Android working. This is using the new partition tool and firmware, doing a full flash ("firmware upgrade").

What I do is:
  • Flash the device
  • Boot into Sailfish. Everything works fine. Can reboot (to sailfish) without problems.
  • Boot into Android. All goes well.
  • Boot back to sailfish. Device is now broken.
The symptoms of the problem are:
  • The wireless interface gets a new pseudo-random MAC address. This happens on every reboot, with both Android and Sailfish.
  • The wifi scanning in sailfish returns a bogus network named "NVRAM Warning: Err=0x10". While harmless enough, this seems to indicate some error.
  • Sailfish fails to recall any WiFi networks that I have connected to before. So it is necessary to reenter passwords, etc. This makes the device pretty much worthless.
The only fix that I have found is to do a full reflash of the device. I have tried various combinations (including some unsupported ones) of Android+Sailfish. I have not tried other OS combinations, so I don't know if any of them also have issues.

So is it just my device, or has someone else encountered this issue? Even better would be if someone has found a fix.

[Edited to add]: See also this thread. It appears that I'm not the only one with the problem, and that it is not specific to sailfish. Does someone from Planet Computers want to help?

[Edited to change topic title]
« Last Edit: May 31, 2019, 11:27:15 am by flotsam »

flotsam

  • Newbie
  • *
  • Posts: 18
    • View Profile
Multiboot is broken (at least for some devices)
« Reply #1 on: May 31, 2019, 11:31:00 am »
Really should have asked this too: does anyone have multi-boot working, with the new firmware and the new partitioning tool? By working, I mean that it doesn't have this problem (random mac address assigned to wifi).

flotsam

  • Newbie
  • *
  • Posts: 18
    • View Profile
Multiboot is broken (at least for some devices)
« Reply #2 on: June 02, 2019, 11:26:16 pm »
I found a rather kludgey workaround.

Before booting android, get a root shell in sailfish, and execute the command:

 
Code: [Select]
chattr +i /nvdata/APCFG/APRDEB/WIFI
Apparently android wants to munge this file and change the MAC address. This prevents that from happening.

Android will still (annoyingly) assign a random (00:08:22:XX:XX:XX) address to the interface, but this will no longer affect sailfish.

cam1965

  • Sr. Member
  • ****
  • Posts: 418
    • View Profile
    • http://
Multiboot is broken (at least for some devices)
« Reply #3 on: June 03, 2019, 07:43:45 am »
Quote from: flotsam
I found a rather kludgey workaround.

Before booting android, get a root shell in sailfish, and execute the command:

 
Code: [Select]
chattr +i /nvdata/APCFG/APRDEB/WIFI
Apparently android wants to munge this file and change the MAC address. This prevents that from happening.

Android will still (annoyingly) assign a random (00:08:22:XX:XX:XX) address to the interface, but this will no longer affect sailfish.

Thank you so much for the tip.
My problem was solved after your tip. My mac address is the same  in android and in debian. (and not changed anymore ).
First I've installed from planet images a fresh install ( firmware upgrade ).
Then booted in debian and set the internet ( SSID and password ).
Did a backup of the contents of nvdata.
So, I've removed the contents of nvdata. ( never remove this contents if you already booted first in android , because your sim card will not be detected : see my previous post here).
Then booted again in debian. The network is saved. ( mac address is like 00:09:34:XX:XX:XX )
After this I've booted the first time in android. Checked the mac address . It is  the same of debian.
But when I boot again in debian it has changed the mac address. ( 00:08:22:XX:XX:XX )
Copied the contents of the backup I did  ( nvdata ) to the correct location of nvdata.
Booted again in debian. Network was saved with the same mac address.( 00:09:34:XX:XX:XX ).
Did what you said : chattr +i /nvdata/APCFG/APRDEB/WIFI
Booted again in debian : everything is fine.
Booted in android : everything is fine.
Booted in debian : everything is fine.

Both mac address in android and in debian are the same -- 00:09:34:XX:XX:XX.

Interesting is that mac address 00:09:34 and 00:08:22 are from different manufaturers.

well, that is it.

gabs5807

  • Newbie
  • *
  • Posts: 44
    • View Profile
Multiboot is broken (at least for some devices)
« Reply #4 on: August 21, 2019, 04:42:26 pm »
Quote from: flotsam
I have been struggling, without success, to get dual-boot Sailfish/Android working. This is using the new partition tool and firmware, doing a full flash ("firmware upgrade").

What I do is:
  • Flash the device
  • Boot into Sailfish. Everything works fine. Can reboot (to sailfish) without problems.
  • Boot into Android. All goes well.
  • Boot back to sailfish. Device is now broken.
The symptoms of the problem are:
  • The wireless interface gets a new pseudo-random MAC address. This happens on every reboot, with both Android and Sailfish.
  • The wifi scanning in sailfish returns a bogus network named "NVRAM Warning: Err=0x10". While harmless enough, this seems to indicate some error.
  • Sailfish fails to recall any WiFi networks that I have connected to before. So it is necessary to reenter passwords, etc. This makes the device pretty much worthless.
The only fix that I have found is to do a full reflash of the device. I have tried various combinations (including some unsupported ones) of Android+Sailfish. I have not tried other OS combinations, so I don't know if any of them also have issues.

So is it just my device, or has someone else encountered this issue? Even better would be if someone has found a fix.

[Edited to add]: See also this thread. It appears that I'm not the only one with the problem, and that it is not specific to sailfish. Does someone from Planet Computers want to help?

[Edited to change topic title]
The problem also occurs on single boot (no Android - only SailfishOS).
I installed SailfishOS from Jolla version 3.1.0.11 from scratch and the Problem is still here :-(.
But there is no '/nvdata/APCFG/APRDEB/WIFI'. The /nv* directory(s) only contains:

# ls -l /nv*
/nvcfg:
total 0

/nvdata:
total 12
drwxrwx--- 2 root  system 4096 Jul 13 12:32 md
drwxrwx--- 2 root  system 4096 Jul 13 12:32 md3
drwxrwx--x 2 media audio  4096 Jul 13 12:32 media


No WIFI file on any subdirectory :-(.

Edit: 2019-08-23:
When installing SailfishX Version 3.0.3.10 first and upgrade to 3.1.0.11 the problem did not occur.
Seems a configuration (or database) problem.
« Last Edit: August 22, 2019, 06:20:48 pm by gabs5807 »
Amongst many other Computers and Phones i'm using a Gemini PDA WIFI+G4 and a Cosmo Communicator both with German keyboard, all with SailfishOS and Debian ;-)