This guide is broken up into main recovery steps, and two separate guides for fixing your partition size and setting up GPS(not even needed in bookworm) referred to as steps in the main install guide, I am live editing it for a bit to add links and clean it up. Most of this is copy/paste fixes over ssh and file transfers over USB, pretty easy way to get a better than fresh system in under an hour.
This is a kludgy guide I made after needing to wipe and restart at an auspicious time right before the serious system breaking Mobian Bookworm issues of August 2022.
*******!!!Use towboot to mount your / over your USB cable to rescue your /home we will use it later!!!**********
Get tow-boot and set it up on a SD card if you haven't already, we need it for install and salvaging your old /home and it's recovery, you can easily install it on a broken system
https://wiki.mobian-project.org/doku.php?id=tow-boot
this should be an easy copypasta fixit toolbox to get a working everyday driver pinephone in under an hour, jsut hold on updates until Mobian is fixed soon.
this works for me, edit what you want for install packages, I am sure the mobian issues could be hand fixed but this is the fast fix I have right now.
This fix works for me in a repeatable way, let me know ways to improve it!
_____________________________________________________________
Use towboot mount(boot with volume up button pressed you get a blue LED) to easily copy /home or at least copy a backup of phone contacts from ~/.local/share/evolution/addressbook/system/contacts.db to your computer
******remove your SD card or at least unsocket it!!!****** (if you forget to remove SD how-to de-booting the SD card at end of main guide)
reinstall Mobian over towboot/USB an image I used https://images.mobian-project.org/pineph...814.img.gz
ssh in through cable or wifi
do partition fix below(be sure to pick the correct partition mine is for emmc)!!!!!!
***FIX PARTITION SIZES FIRST OR YOU WILL NOT BE ABLE TO INSTALL ANY SOFTWARE(unless the partition size in your image is already fixed in the future)***
------------------------------
ROOT PARTITION FIX (NOT OPTIONAL UNTIL MOBIAN FIXES ISSUE)
Emmc/SD card not being expanded on the Pinephone
On specific Pinephone installer images the storage medium Mobian is installed to does not get expanded to the full disk size. This can cause storage issues but can be fixed on the Pinephone in the terminal.
Assuming a ext4 setup.
First install parted by running
Next, use parted on the correct drive put mmcblk2 if its on a emmc. mmcblk0 for sd card
****OR***
verify the correct partition with
To further verify run
Resize the second partition
Verify it has changed with
ctrl-C out of parted to finish
If you have FDE(Full Disk Encryption) setup run this to resize the encrypted device. If not using disk encryption skip this command.
Next, resize the ext4 filesystem.
check the result with
This should fix the issue with file expansion on a fresh install.
____________________________________________________________________________
start installing additional software. if you like to be speedy fix GPS while flatpak installs your app list but check occasionally as some installs will ask options and flatpak requires y/n for all installs before it runs
do this first so you can have a second window open and setup navigation while apt and flatpak are running, check back on the installation though as sometimes there is dialog needing answers
now you can do navigation fixes in one window while you run the installs below
***I recommend going into the software update app NOW and turning OFF automatic updates, at least as long as the current update is considered a problem.
(You HAVE to add flathub or you can't search software)
Install stuff edit as you like
do the bonus GPS fix below if you like, check for needing disc expansion below
Remember the backup copy we made of of /home? After setup is complete shutdown and use tow-boot(hold the volume up key and boot up) and transfer over USB now to replace with old /home if reloading (my restore overwrite took 15min for my 4gb) (edit)in hindsight I did only .kodi .local/share/evolution/ and .mozilla on my second try as something in home messed up the settings app and it couldn't open afterward
Insert you SD card if you haven't yet
If you accidently installed onto your SD card it will triy to block boot, easy to fix just run this on the SD from your computer or on the PP
Autoscale ALL apps
---(or run it again as false if this gets annoying) ***for auto scaling***
-------------------------------------------------------------------
GPS SETUP
(do the apt installs only if you didn't in the main guide)
scale the gui
Edit gpsd for the pinephone's modem/GPS connection in DEVICES="your modem"
------- add /dev/ttyUSB1 to devices---
restart and daemons
Setup geoclue
---- add in the “[Service]” section---
restart daemons
***Remember to turn ON navigation in the Settings app, under Privacy > Location Services***
Turning on Location services will get a mobile telephone network assist for AGPS as long as you have Internet too, if you are a privacy person you do not need to enable the Mozilla location service for AGPS to work as I show above.
I have found that puremaps seems to work best at triggering the GPS to take a fix and paired with OSM scout server so I can have my maps ready and offline, be sure to setup your maps before you travel
__________________________________________________________________
**as always use your mobian wiki and PLEASE contribute verified fixes to the wiki, we notn need to reinvent the wheel as individuals!!!***
https://wiki.mobian-project.org/doku.php?id=location
https://wiki.mobian.org/doku.php?id=trou...-pinephone
https://wiki.mobian-project.org/doku.php?id=tweaks
This is a kludgy guide I made after needing to wipe and restart at an auspicious time right before the serious system breaking Mobian Bookworm issues of August 2022.
*******!!!Use towboot to mount your / over your USB cable to rescue your /home we will use it later!!!**********
Get tow-boot and set it up on a SD card if you haven't already, we need it for install and salvaging your old /home and it's recovery, you can easily install it on a broken system
https://wiki.mobian-project.org/doku.php?id=tow-boot
this should be an easy copypasta fixit toolbox to get a working everyday driver pinephone in under an hour, jsut hold on updates until Mobian is fixed soon.
this works for me, edit what you want for install packages, I am sure the mobian issues could be hand fixed but this is the fast fix I have right now.
This fix works for me in a repeatable way, let me know ways to improve it!
_____________________________________________________________
Use towboot mount(boot with volume up button pressed you get a blue LED) to easily copy /home or at least copy a backup of phone contacts from ~/.local/share/evolution/addressbook/system/contacts.db to your computer
******remove your SD card or at least unsocket it!!!****** (if you forget to remove SD how-to de-booting the SD card at end of main guide)
reinstall Mobian over towboot/USB an image I used https://images.mobian-project.org/pineph...814.img.gz
Code:
sudo apt install ssh
ssh in through cable or wifi
do partition fix below(be sure to pick the correct partition mine is for emmc)!!!!!!
***FIX PARTITION SIZES FIRST OR YOU WILL NOT BE ABLE TO INSTALL ANY SOFTWARE(unless the partition size in your image is already fixed in the future)***
------------------------------
ROOT PARTITION FIX (NOT OPTIONAL UNTIL MOBIAN FIXES ISSUE)
Emmc/SD card not being expanded on the Pinephone
On specific Pinephone installer images the storage medium Mobian is installed to does not get expanded to the full disk size. This can cause storage issues but can be fixed on the Pinephone in the terminal.
Assuming a ext4 setup.
First install parted by running
Code:
sudo apt install parted
Next, use parted on the correct drive put mmcblk2 if its on a emmc. mmcblk0 for sd card
Code:
sudo parted /dev/mmcblk2
Code:
sudo parted /dev/mmcblk2
verify the correct partition with
Code:
lsblk
To further verify run
Code:
print
Resize the second partition
Code:
resizepart 2 100%
Verify it has changed with
Code:
print
If you have FDE(Full Disk Encryption) setup run this to resize the encrypted device. If not using disk encryption skip this command.
Code:
sudo cryptsetup resize calamares_crypt
Next, resize the ext4 filesystem.
Code:
sudo resize2fs /dev/mapper/calamares_crypt
check the result with
Code:
df -h
This should fix the issue with file expansion on a fresh install.
____________________________________________________________________________
start installing additional software. if you like to be speedy fix GPS while flatpak installs your app list but check occasionally as some installs will ask options and flatpak requires y/n for all installs before it runs
do this first so you can have a second window open and setup navigation while apt and flatpak are running, check back on the installation though as sometimes there is dialog needing answers
Code:
sudo apt install gpsd gpsd-clients
now you can do navigation fixes in one window while you run the installs below
Code:
sudo apt install flatpak kodi tor screen links traceroute
***I recommend going into the software update app NOW and turning OFF automatic updates, at least as long as the current update is considered a problem.
(You HAVE to add flathub or you can't search software)
Code:
flatpak remote-add flathub https://flathub.org/repo/flathub.flatpakrepo
Code:
sudo flatpak install authenticator clapper cozy enroute foliate fragments komikku puremaps shortwave teleport amberol osmscoutserver
do the bonus GPS fix below if you like, check for needing disc expansion below
Remember the backup copy we made of of /home? After setup is complete shutdown and use tow-boot(hold the volume up key and boot up) and transfer over USB now to replace with old /home if reloading (my restore overwrite took 15min for my 4gb) (edit)in hindsight I did only .kodi .local/share/evolution/ and .mozilla on my second try as something in home messed up the settings app and it couldn't open afterward
Insert you SD card if you haven't yet
If you accidently installed onto your SD card it will triy to block boot, easy to fix just run this on the SD from your computer or on the PP
Code:
sudo dd if=/dev/zero of=/dev/mmcblk0(or whatever device it is) bs=512 seek=16 count=1
Autoscale ALL apps
Code:
gsettings set sm.puri.phoc scale-to-fit true
-------------------------------------------------------------------
GPS SETUP
Code:
sudo mmcli -m any --location-enable-gps-nmea --location-enable-gps-raw
(do the apt installs only if you didn't in the main guide)
Code:
sudo apt install gpsd gpsd-clients
scale the gui
Code:
scale-to-fit xgps on
scale-to-fit xgpsspeed on
Edit gpsd for the pinephone's modem/GPS connection in DEVICES="your modem"
Code:
sudo vi /etc/default/gpsd
Code:
DEVICES="/dev/ttyUSB1"
Code:
sudo systemctl start gpsd.service
sudo systemctl status gpsd.service
Setup geoclue
Code:
sudo vi /usr/lib/systemd/system/geoclue.service
Code:
Environment="G_MESSAGES_DEBUG=Geoclue"
restart daemons
Code:
sudo systemctl daemon-reload
sudo systemctl restart geoclue.service
***Remember to turn ON navigation in the Settings app, under Privacy > Location Services***
Turning on Location services will get a mobile telephone network assist for AGPS as long as you have Internet too, if you are a privacy person you do not need to enable the Mozilla location service for AGPS to work as I show above.
I have found that puremaps seems to work best at triggering the GPS to take a fix and paired with OSM scout server so I can have my maps ready and offline, be sure to setup your maps before you travel
__________________________________________________________________
**as always use your mobian wiki and PLEASE contribute verified fixes to the wiki, we notn need to reinvent the wheel as individuals!!!***
https://wiki.mobian-project.org/doku.php?id=location
https://wiki.mobian.org/doku.php?id=trou...-pinephone
https://wiki.mobian-project.org/doku.php?id=tweaks