PINE64
Flashing gone wrong - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: General Discussion on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=127)
+--- Thread: Flashing gone wrong (/showthread.php?tid=16709)



Flashing gone wrong - erg - 05-24-2022

I broke stuff.
Booted from JumpDrive, saw what looked like two partitions (I guess they're actually separate emmc drives?) exposed (apart from the SD card), in frenzy formatted the first one to vfat, flashed system to the second partition with dd.
Pinephone doesn't start. I guess the first partition is a boot partition and I broke it. I can't find files that should go onto the first partition in order to fix it.
What should I do? Confused


RE: Flashing gone wrong - wibble - 05-24-2022

You don't say which image you were trying to flash or which instructions you tried to follow. You should still be able to boot JumpDrive from the SD then reflash. If you look at the instructions carefully you'll see that they almost always say to dd to the raw device, not to a partition on it.


RE: Flashing gone wrong - erg - 05-24-2022

(05-24-2022, 07:49 AM)wibble Wrote: You don't say which image you were trying to flash or which instructions you tried to follow. You should still be able to boot JumpDrive from the SD then reflash. If you look at the instructions carefully you'll see that they almost always say to dd to the raw device, not to a partition on it.

I flashed JumpDrive to the SD. Booted the phone, plugged into the laptop. I see two disks: /dev/sdd (sd card) and /dev/sdc with partitions /dev/sdc1 and /dev/sdc2
Now, if I try and do:
Code:
dd if=image.img of=/dev/sdc
I get: No space left on the device.
I try and peek with fdisk:
Code:
fdisk /dev/sdc
and there is one partition, size 10M, I also see this suspicious message:
Code:
GPT PMBR size mismatch (10854399 != 20479) will be corrected by write.
It doesn't get corrected by a write though. If I delete the partition within, save and exit and open it again, warning is still there.


Code:
fdisk /dev/sdc1
shows me two partitions:
Code:
Device       Start      End  Sectors  Size Type
/dev/sdc2p1  16384   266239   249856  122M EFI System
/dev/sdc2p2 266240 10852351 10586112    5G Linux filesystem
That's why I tried:
Code:
dd if=image.img of=/dev/sdc2
, because it looks like a separate drive to me. I guess I'm wrong?

I'm flashing it with arch with plasma


RE: Flashing gone wrong - fxc - 05-24-2022

(05-24-2022, 07:15 AM)erg Wrote: I broke stuff.
Booted from JumpDrive, saw what looked like two partitions (I guess they're actually separate emmc drives?) exposed (apart from the SD card), in frenzy formatted the first one to vfat, flashed system to the second partition with dd.
Pinephone doesn't start. I guess the first partition is a boot partition and I broke it. I can't find files that should go onto the first partition in order to fix it.
What should I do? Confused

Jumpdrive exposes the eMMC and the microSD card directly, which is probably what you saw in the "lsblk" output. Please don't format the drives manually, as that doesn't make sense and will just cause you issues: formatting a drive does not remove U-Boot from the partition so the phone will still load U-Boot and don't find a valid system (= the phone's screen stays black). I guess that is also where your other issues also originate from. When flashing an image it will contain everything you need, including the whole partition structure. Make sure you're flashing the partition to the whole disk, not to partition 1. The whole disk will typically be called ""sda", "sdb" or "sdc", not "sda1". The "1" next to "sda" means it is the first partition.


RE: Flashing gone wrong - erg - 05-24-2022

(05-24-2022, 01:54 PM)fxc Wrote:
(05-24-2022, 07:15 AM)erg Wrote: I broke stuff.
Booted from JumpDrive, saw what looked like two partitions (I guess they're actually separate emmc drives?) exposed (apart from the SD card), in frenzy formatted the first one to vfat, flashed system to the second partition with dd.
Pinephone doesn't start. I guess the first partition is a boot partition and I broke it. I can't find files that should go onto the first partition in order to fix it.
What should I do? Confused

Jumpdrive exposes the eMMC and the microSD card directly, which is probably what you saw in the "lsblk" output. Please don't format the drives manually, as that doesn't make sense and will just cause you issues: formatting a drive does not remove U-Boot from the partition so the phone will still load U-Boot and don't find a valid system (= the phone's screen stays black). I guess that is also where your other issues also originate from. When flashing an image it will contain everything you need, including the whole partition structure. Make sure you're flashing the partition to the whole disk, not to partition 1. The whole disk will typically be called ""sda", "sdb" or "sdc", not "sda1". The "1" next to "sda" means it is the first partition.

I did try that at first, flashing to /dev/sdc, only it failed with: No space left on the device. That's when I tried other options.


RE: Flashing gone wrong - fxc - 05-26-2022

(05-24-2022, 02:53 PM)erg Wrote:
(05-24-2022, 01:54 PM)fxc Wrote:
(05-24-2022, 07:15 AM)erg Wrote: I broke stuff.
Booted from JumpDrive, saw what looked like two partitions (I guess they're actually separate emmc drives?) exposed (apart from the SD card), in frenzy formatted the first one to vfat, flashed system to the second partition with dd.
Pinephone doesn't start. I guess the first partition is a boot partition and I broke it. I can't find files that should go onto the first partition in order to fix it.
What should I do? Confused

Jumpdrive exposes the eMMC and the microSD card directly, which is probably what you saw in the "lsblk" output. Please don't format the drives manually, as that doesn't make sense and will just cause you issues: formatting a drive does not remove U-Boot from the partition so the phone will still load U-Boot and don't find a valid system (= the phone's screen stays black). I guess that is also where your other issues also originate from. When flashing an image it will contain everything you need, including the whole partition structure. Make sure you're flashing the partition to the whole disk, not to partition 1. The whole disk will typically be called ""sda", "sdb" or "sdc", not "sda1". The "1" next to "sda" means it is the first partition.

I did try that at first, flashing to /dev/sdc, only it failed with: No space left on the device. That's when I tried other options.

Was the issue solved or is there still an issue writing to the eMMC? If the latter I would suggest you to post the full "lsblk" output here.


RE: Flashing gone wrong - erg - 05-26-2022

(05-26-2022, 05:30 AM)fxc Wrote:
(05-24-2022, 02:53 PM)erg Wrote:
(05-24-2022, 01:54 PM)fxc Wrote:
(05-24-2022, 07:15 AM)erg Wrote: I broke stuff.
Booted from JumpDrive, saw what looked like two partitions (I guess they're actually separate emmc drives?) exposed (apart from the SD card), in frenzy formatted the first one to vfat, flashed system to the second partition with dd.
Pinephone doesn't start. I guess the first partition is a boot partition and I broke it. I can't find files that should go onto the first partition in order to fix it.
What should I do? Confused

Jumpdrive exposes the eMMC and the microSD card directly, which is probably what you saw in the "lsblk" output. Please don't format the drives manually, as that doesn't make sense and will just cause you issues: formatting a drive does not remove U-Boot from the partition so the phone will still load U-Boot and don't find a valid system (= the phone's screen stays black). I guess that is also where your other issues also originate from. When flashing an image it will contain everything you need, including the whole partition structure. Make sure you're flashing the partition to the whole disk, not to partition 1. The whole disk will typically be called ""sda", "sdb" or "sdc", not "sda1". The "1" next to "sda" means it is the first partition.

I did try that at first, flashing to /dev/sdc, only it failed with: No space left on the device. That's when I tried other options.

Was the issue solved or is there still an issue writing to the eMMC? If the latter I would suggest you to post the full "lsblk" output here.

Issue is still here.
Code:
sdc              8:32   1  14.7G  0 disk 
├─sdc1           8:33   1 213.6M  0 part 
└─sdc2           8:34   1  14.4G  0 part 
sdd              8:48   1  29.7G  0 disk 
└─sdd1           8:49   1    49M  0 part



RE: Flashing gone wrong - mikehenson - 05-26-2022

This is a guide, DO NOT just copy and paste these commands

Code:
#download the img
https://github.com/dreemurrs-embedded/Jumpdrive
https://github.com/dreemurrs-embedded/Pine64-Arch/releases
cd ~/Downloads/
#unzip the image
unxz ./pine64-pinephone.img.xz
#(Plug in the SD or Phone card)
lsblk
#make sure it is un mounted
sudo umount /run/media/user/1FAE-0542/
#Copy over. This will take time
sudo dd if=~/Downloads/pine64-pinephone.img of=/dev/sdd status=progress
sudo sync



RE: Flashing gone wrong - erg - 05-26-2022

(05-26-2022, 07:06 AM)mikehenson Wrote: This is a guide, DO NOT just copy and paste these commands

Code:
#download the img
https://github.com/dreemurrs-embedded/Jumpdrive
https://github.com/dreemurrs-embedded/Pine64-Arch/releases
cd ~/Downloads/
#unzip the image
unxz ./pine64-pinephone.img.xz
#(Plug in the SD or Phone card)
lsblk
#make sure it is un mounted
sudo umount /run/media/user/1FAE-0542/
#Copy over. This will take time
sudo dd if=~/Downloads/pine64-pinephone.img of=/dev/sdd status=progress
sudo sync

Thanks for your advice. As I understand it, that's for flashing Jumpdrive to the SD card? I do have that base covered. I can boot the phone from the SD card with JumpDrive on it, I can telnet to it. I can also boot the phone with the OS image on the SD card no problem.

What I am not managing to do is to flash the actual operating system image onto the eMMc storage using JumpDrive.

Flashing to /dev/sdc fails saying there's not space.
Flashing to dev/sdc1 fails saying there's not space.
Flashing to /dev/sdc2 succeeds but phone does not boot.


RE: Flashing gone wrong - fxc - 05-28-2022

(05-26-2022, 07:18 AM)erg Wrote:
(05-26-2022, 07:06 AM)mikehenson Wrote: This is a guide, DO NOT just copy and paste these commands

Code:
#download the img
https://github.com/dreemurrs-embedded/Jumpdrive
https://github.com/dreemurrs-embedded/Pine64-Arch/releases
cd ~/Downloads/
#unzip the image
unxz ./pine64-pinephone.img.xz
#(Plug in the SD or Phone card)
lsblk
#make sure it is un mounted
sudo umount /run/media/user/1FAE-0542/
#Copy over. This will take time
sudo dd if=~/Downloads/pine64-pinephone.img of=/dev/sdd status=progress
sudo sync

Thanks for your advice. As I understand it, that's for flashing Jumpdrive to the SD card? I do have that base covered. I can boot the phone from the SD card with JumpDrive on it, I can telnet to it. I can also boot the phone with the OS image on the SD card no problem.

What I am not managing to do is to flash the actual operating system image onto the eMMc storage using JumpDrive.

Flashing to /dev/sdc fails saying there's not space.
Flashing to dev/sdc1 fails saying there's not space.
Flashing to /dev/sdc2 succeeds but phone does not boot.

I would suggest you to not flash via Jumpdrive and instead boot an OS from the microSD card and write to the eMMC from there directly (using dd). Don't write to sdc1 and sdc2, as those are partitions.