Re: Debian Installer on Pine64+ (no serial console)

2019-05-07 Thread peter green

On 07/05/19 07:06, Andrei POPESCU wrote:

On Ma, 07 mai 19, 00:33:19, peter green wrote:

On 04/05/19 18:49, Andrei POPESCU wrote:

https://wiki.debian.org/InstallingDebianOn/PINE64/PINEA64

This prompted me to reinstall my pine64 which has been sitting idle
for a while, since the old install (based on a vendor image) on it
stopped booting. Your instructions worked fine and after installation
the system sucessfully rebooted to a login prompt.

Great :)
  

At that point I got distracted, when I came back a day or so later I
found that the Ethernet interface had stopped working. It appeared to
be up and had an IP address (meaning it must have passed some packets
since the reboot), but no traffic was getting through. Downing and
re-upping the interface brought it back to life. I also rebooted the
system and found the network interface had come up successfully after
the reboot.

Then I ran into another problem. I have a SATA hard disk connected by
a startech USB to SATA/IDE adapter (I belive its
https://www.startech.com/uk/HDD/Adapters/USB-20-to-IDE-or-SATA-Adapter-Cable~USB2SATAIDE
though I'm not using the PSU that came with it). When I tried to rsync
a large file (an image of the pre-reinstall SD card contents) to said
drive it dropped out. I unmounted and re-mounted the drive (which had
renamed itself from sda to sdb after the dropout) and tried again, but
the same happened again.

As usual with this kind of devices, do make sure you have a good power
source (for the PINE A64 ideally via the Euler bus instead of the
micro-USB connector).

Right now i'm using a 5V 4A brick from stontronics. The output from this is 
split to feed the pine (currently via micro usb) and the HDD. One of the 
reasons I chose the particular USB to SATA adapter I did is because it is only 
a data adapter, allowing me to do the power the way I want it.

I have just tried a different USB to SATA adapter, this one unfortunately uses 
a combined data and power connection to the drive, but it has a second USB plug 
for power, so I chopped up a USB extension and used it to connect said second 
USB plug direct to the power supply. I figured the pine64 would probably 
tolerate (and may even benefit from) any backfeeding of it's USB device ports 
this caused.

After the swap I was able to complete the rsync successfully. So it seems that 
some issue with the USB to SATA adapter I was using (either with the adapter in 
general or a compatibility issue between the adapter and the pine) was to blame.






Connecting external drives without own power or via a powered USB hub is
just asking for trouble :)

Kind regards,
Andrei





Re: Debian Installer on Pine64+ (no serial console)

2019-05-07 Thread Andrei POPESCU
On Ma, 07 mai 19, 00:33:19, peter green wrote:
> On 04/05/19 18:49, Andrei POPESCU wrote:
> > https://wiki.debian.org/InstallingDebianOn/PINE64/PINEA64
> This prompted me to reinstall my pine64 which has been sitting idle 
> for a while, since the old install (based on a vendor image) on it 
> stopped booting. Your instructions worked fine and after installation 
> the system sucessfully rebooted to a login prompt.

Great :)
 
> At that point I got distracted, when I came back a day or so later I 
> found that the Ethernet interface had stopped working. It appeared to 
> be up and had an IP address (meaning it must have passed some packets 
> since the reboot), but no traffic was getting through. Downing and 
> re-upping the interface brought it back to life. I also rebooted the 
> system and found the network interface had come up successfully after 
> the reboot.
> 
> Then I ran into another problem. I have a SATA hard disk connected by 
> a startech USB to SATA/IDE adapter (I belive its 
> https://www.startech.com/uk/HDD/Adapters/USB-20-to-IDE-or-SATA-Adapter-Cable~USB2SATAIDE
>  
> though I'm not using the PSU that came with it). When I tried to rsync 
> a large file (an image of the pre-reinstall SD card contents) to said 
> drive it dropped out. I unmounted and re-mounted the drive (which had 
> renamed itself from sda to sdb after the dropout) and tried again, but 
> the same happened again. 

As usual with this kind of devices, do make sure you have a good power 
source (for the PINE A64 ideally via the Euler bus instead of the 
micro-USB connector).

Connecting external drives without own power or via a powered USB hub is 
just asking for trouble :)

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: Debian Installer on Pine64+ (no serial console)

2019-05-06 Thread peter green

On 04/05/19 18:49, Andrei POPESCU wrote:

On Sb, 04 mai 19, 06:57:43, Andrei POPESCU wrote:

I'm ready to start a second try where I will be using manual
partitioning (without GPT), hoping I will get a bootable system.

This worked, see
https://wiki.debian.org/InstallingDebianOn/PINE64/PINEA64

This prompted me to reinstall my pine64 which has been sitting idle for a 
while, since the old install (based on a vendor image) on it stopped booting. 
Your instructions worked fine and after installation the system sucessfully 
rebooted to a login prompt.

At that point I got distracted, when I came back a day or so later I found that 
the Ethernet interface had stopped working. It appeared to be up and had an IP 
address (meaning it must have passed some packets since the reboot), but no 
traffic was getting through. Downing and re-upping the interface brought it 
back to life. I also rebooted the system and found the network interface had 
come up successfully after the reboot.

Then I ran into another problem. I have a SATA hard disk connected by a 
startech USB to SATA/IDE adapter (I belive its 
https://www.startech.com/uk/HDD/Adapters/USB-20-to-IDE-or-SATA-Adapter-Cable~USB2SATAIDE
 though I'm not using the PSU that came with it). When I tried to rsync a large 
file (an image of the pre-reinstall SD card contents) to said drive it dropped 
out. I unmounted and re-mounted the drive (which had renamed itself from sda to 
sdb after the dropout) and tried again, but the same happened again. I have a 
dmesg log from the second dropout at the bottom of the mail. The running kernel 
at the time was

Linux pine64 4.19.0-4-arm64 #1 SMP Debian 4.19.28-2 (2019-03-15) aarch64 
GNU/Linux

I then decided to upgrade to linux-image-5.0.0-trunk-arm64_5.0.2-1~exp1, 
unfortunately that didn't seem to improve things much, rather than the usb SATA 
dropping out and rsync returning an error, rsync just seemed to hang in 
uninterruptable sleep with no disk or network IO.




[  987.717823] sd 1:0:0:0: [sdb] tag#0 CDB: Write(10) 2a 00 01 44 e3 c0 00 00 
f0 00
[  987.717830] print_req_error: 256 callbacks suppressed
[  987.717836] print_req_error: I/O error, dev sdb, sector 21291968
[  988.062499] usb 1-1: USB disconnect, device number 3
[  988.077085] print_req_error: I/O error, dev sdb, sector 21292208
[  988.083176] print_req_error: I/O error, dev sdb, sector 21292448
[  988.089258] print_req_error: I/O error, dev sdb, sector 495192064
[  988.095381] Buffer I/O error on dev sdb2, logical block 59277312, lost sync 
page write
[  988.103338] JBD2: Error -5 detected when updating journal superblock for 
sdb2-8.
[  988.103347] print_req_error: I/O error, dev sdb, sector 21292688
[  988.110743] Aborting journal on device sdb2-8.
[  988.121233] print_req_error: I/O error, dev sdb, sector 21292928
[  988.127268] EXT4-fs warning (device sdb2): ext4_end_bio:323: I/O error 10 
writing to inode 13 (offset 16777216 size 5246976 starting block 2661632)
[  988.127276] buffer_io_error: 7414 callbacks suppressed
[  988.127285] Buffer I/O error on device sdb2, logical block 39680
[  988.133319] Buffer I/O error on device sdb2, logical block 39681
[  988.139341] Buffer I/O error on device sdb2, logical block 39682
[  988.145368] Buffer I/O error on device sdb2, logical block 39683
[  988.151390] Buffer I/O error on device sdb2, logical block 39684
[  988.157416] Buffer I/O error on device sdb2, logical block 39685
[  988.163438] Buffer I/O error on device sdb2, logical block 39686
[  988.169467] Buffer I/O error on device sdb2, logical block 39687
[  988.175489] Buffer I/O error on device sdb2, logical block 39688
[  988.181516] Buffer I/O error on device sdb2, logical block 39689
[  988.188059] print_req_error: I/O error, dev sdb, sector 495192064
[  988.194161] Buffer I/O error on dev sdb2, logical block 59277312, lost sync 
page write
[  988.202106] JBD2: Error -5 detected when updating journal superblock for 
sdb2-8.
[  988.202120] print_req_error: I/O error, dev sdb, sector 21293056
[  988.215542] print_req_error: I/O error, dev sdb, sector 21293296
[  988.221578] print_req_error: I/O error, dev sdb, sector 21293536
[  988.228521] EXT4-fs warning (device sdb2): ext4_end_bio:323: I/O error 10 
writing to inode 13 (offset 16777216 size 6295552 starting block 2661888)
[  988.230033] EXT4-fs warning (device sdb2): ext4_end_bio:323: I/O error 10 
writing to inode 13 (offset 16777216 size 7344128 starting block 2662144)
[  988.231395] EXT4-fs error (device sdb2) in ext4_do_update_inode:5331: 
Journal has aborted
[  988.239701] EXT4-fs warning (device sdb2): ext4_end_bio:323: I/O error 10 
writing to inode 13 (offset 16777216 size 8388608 starting block 2662400)
[  988.240263] Buffer I/O error on dev sdb2, logical block 0, lost sync page 
write
[  988.247618] EXT4-fs (sdb2): I/O error while writing superblock
[  988.253478] EXT4-fs error (device sdb2): mpage_map_and_submit_extent:2568: 
comm kworker/u8:1: Failed to mark inode 13 dirty
[  

Re: Debian Installer on Pine64+ (no serial console)

2019-05-05 Thread Andrei POPESCU
On Du, 05 mai 19, 00:40:29, Vagrant Cascadian wrote:
> On 2019-05-05, Andrei POPESCU wrote:
> > On Sb, 04 mai 19, 12:29:30, Vagrant Cascadian wrote:
> >> 
> >> The really important A64 timer issue fix finally went in 4.19.28-1,
> >> without which the clock would occasionally leap 90+ extra years into the
> >> future and find yourself experiencing all sorts of stability problems:
> >
> > Hmm, apparently erratum 843419 is not sufficient.
> > https://lore.kernel.org/patchwork/patch/1031565/
> >
> > Any chance to get this in fix in buster?
> 
> My bad, I looked into backporting the full workaround, only to find it
> was already committed upstream in 4.19.31... The next 4.19.x upload will
> contain the workaround, though, which should be soon.

Great! \o/

I just filed #928457 to keep track of it.

Thanks,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: Debian Installer on Pine64+ (no serial console)

2019-05-05 Thread Vagrant Cascadian
On 2019-05-05, Andrei POPESCU wrote:
> On Sb, 04 mai 19, 12:29:30, Vagrant Cascadian wrote:
>> 
>> The really important A64 timer issue fix finally went in 4.19.28-1,
>> without which the clock would occasionally leap 90+ extra years into the
>> future and find yourself experiencing all sorts of stability problems:
>
> Hmm, apparently erratum 843419 is not sufficient.
> https://lore.kernel.org/patchwork/patch/1031565/
>
> Any chance to get this in fix in buster?

My bad, I looked into backporting the full workaround, only to find it
was already committed upstream in 4.19.31... The next 4.19.x upload will
contain the workaround, though, which should be soon.


live well,
  vagrant


signature.asc
Description: PGP signature


Re: Debian Installer on Pine64+ (no serial console)

2019-05-05 Thread Andrei POPESCU
On Sb, 04 mai 19, 12:29:30, Vagrant Cascadian wrote:
> 
> The really important A64 timer issue fix finally went in 4.19.28-1,
> without which the clock would occasionally leap 90+ extra years into the
> future and find yourself experiencing all sorts of stability problems:

Hmm, apparently erratum 843419 is not sufficient.
https://lore.kernel.org/patchwork/patch/1031565/

Any chance to get this in fix in buster?

Thanks,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: Debian Installer on Pine64+ (no serial console)

2019-05-04 Thread Andrei POPESCU
On Sb, 04 mai 19, 20:43:49, Steve McIntyre wrote:
> 
> Andrei - how was your SD card formatted when you started? Inside d-i,
> partman should not be creating a new partition table if there's one
> already there.

I 'cp'ed the file pine64_plus.img to the SD card, which (from memory) 
creates/contains a msdos partition table and a FAT32 partition (but not 
the filesystem).

Using Guided partitioning on the entire SD card I ended up without 
u-boot and u-boot-install-sunxi64 refusing to reinstall it because of 
the GPT partition table.

On my second try I went to expert mode and manually specified a msdos 
partition table, but u-boot was still nuked.

Manual (or in advance) partitioning without touching the partition table 
itself is so far the only working option I found to end up with a 
bootable SD card.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: Debian Installer on Pine64+ (no serial console)

2019-05-04 Thread Andrei POPESCU
On Sb, 04 mai 19, 12:29:30, Vagrant Cascadian wrote:
> 
> It's definitely frustrating that sunxi64 installs the bootloader and
> boot firmware at an offset incompatible with GPT partitioning... I've
> heard there might hacks to set up a compatible GPT partition table, but
> the defaults are definitely incompatible. :/

[...]
 
> I've been meaning to create SD images for arm64 in debian-installer like
> you do in the wiki page, but haven't had a chance to do so and it's
> arguably a bit late in the release cycle for buster... but maybe not too
> bad; much of the code from the armhf SD images could probably be
> re-used.

Are you aware of
https://fosdem.org/2019/schedule/event/one_image_to_rule_them_all/
?
 
> I did backport some device-tree patches to 4.19.x to get framebuffer
> video for pinebook, but never tested HDMI on the pine64. Glad to hear
> it's working ok! I should test it myself sometime... I'm running two
> early-generation pine64+ boards in the reproducible builds test
> framework as headless machines, and have another I boot occasionally to
> test.
 
That was a real lifesaver for me when I migrated to pristine Debian as I 
don't have a serial adapter.
 
> The sound modules should be included in the next linux 5.x upload:
> 
>   
> https://salsa.debian.org/kernel-team/linux/commit/0e9aed9c58417946afb74607dfa3da2ed20699a3

Please don't forget about CONFIG_SND_SUN4I_SPDIF (and corresponding DT 
changes?). See #921019, msg 15.

> The really important A64 timer issue fix finally went in 4.19.28-1,
> without which the clock would occasionally leap 90+ extra years into the
> future and find yourself experiencing all sorts of stability problems:
> 
>   https://en.wikipedia.org/wiki/Year_2038_problem

Is this the errata workaround merged in 5.1? Kudos for backporting :)

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: Debian Installer on Pine64+ (no serial console)

2019-05-04 Thread Steve McIntyre
On Sat, May 04, 2019 at 12:29:30PM -0700, Vagrant Cascadian wrote:
>On 2019-05-04, Andrei POPESCU wrote:
>> On Sb, 04 mai 19, 06:57:43, Andrei POPESCU wrote:
>>> 
>>> I'm ready to start a second try where I will be using manual 
>>> partitioning (without GPT), hoping I will get a bootable system.
>>
>> This worked, see 
>> https://wiki.debian.org/InstallingDebianOn/PINE64/PINEA64
>
>Thanks for the wiki page!
>
>It's definitely frustrating that sunxi64 installs the bootloader and
>boot firmware at an offset incompatible with GPT partitioning... I've
>heard there might hacks to set up a compatible GPT partition table, but
>the defaults are definitely incompatible. :/

Nod. partman needs updates to make things happier here. As the moment,
we're defaulting to GPT for arm64 machines and that's not ideal for
all users.

Andrei - how was your SD card formatted when you started? Inside d-i,
partman should not be creating a new partition table if there's one
already there.

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
We don't need no education.
We don't need no thought control.



Re: Debian Installer on Pine64+ (no serial console)

2019-05-04 Thread Vagrant Cascadian
On 2019-05-04, Andrei POPESCU wrote:
> On Sb, 04 mai 19, 06:57:43, Andrei POPESCU wrote:
>> 
>> I'm ready to start a second try where I will be using manual 
>> partitioning (without GPT), hoping I will get a bootable system.
>
> This worked, see 
> https://wiki.debian.org/InstallingDebianOn/PINE64/PINEA64

Thanks for the wiki page!

It's definitely frustrating that sunxi64 installs the bootloader and
boot firmware at an offset incompatible with GPT partitioning... I've
heard there might hacks to set up a compatible GPT partition table, but
the defaults are definitely incompatible. :/

The device-tree included with u-boot is what's used by the
debian-installer images in conjunction with the EFI .iso, but I usually
find things more reliable to use the .dtb included with the
kernel. Occasionally the inverse is true; it really depends on your
u-boot version + kernel combination... which is unfortunate.

I've been meaning to create SD images for arm64 in debian-installer like
you do in the wiki page, but haven't had a chance to do so and it's
arguably a bit late in the release cycle for buster... but maybe not too
bad; much of the code from the armhf SD images could probably be
re-used.


I did backport some device-tree patches to 4.19.x to get framebuffer
video for pinebook, but never tested HDMI on the pine64. Glad to hear
it's working ok! I should test it myself sometime... I'm running two
early-generation pine64+ boards in the reproducible builds test
framework as headless machines, and have another I boot occasionally to
test.


The sound modules should be included in the next linux 5.x upload:

  
https://salsa.debian.org/kernel-team/linux/commit/0e9aed9c58417946afb74607dfa3da2ed20699a3


The really important A64 timer issue fix finally went in 4.19.28-1,
without which the clock would occasionally leap 90+ extra years into the
future and find yourself experiencing all sorts of stability problems:

  https://en.wikipedia.org/wiki/Year_2038_problem


live well,
  vagrant


signature.asc
Description: PGP signature


Re: Debian Installer on Pine64+ (no serial console)

2019-05-04 Thread Andrei POPESCU
On Sb, 04 mai 19, 06:57:43, Andrei POPESCU wrote:
> 
> I'm ready to start a second try where I will be using manual 
> partitioning (without GPT), hoping I will get a bootable system.

This worked, see 
https://wiki.debian.org/InstallingDebianOn/PINE64/PINEA64

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: Debian Installer on Pine64+ (no serial console)

2019-05-03 Thread Andrei POPESCU
On Vi, 03 mai 19, 14:48:02, Rick Thomas wrote:
> Hi Andrei,

Hi Rick,

> Did you get any answer on this?  I’m thinking of replacing my armel 
> hardware (a couple of OpenRD boxes and a SheevaPlug) with something 
> more modern, and the Pine64+ looks like a good candidate, but I’ll 
> need to be able to install Debian.
 
In the meantime I was able to make significant progres on my own (yay!)

Basically I used the Pine64+ u-boot image and added files to it based on 
the section 4.4.3 Manually copying files to the USB stick 
- the flexible way" in the *amd64* version of the Installation Guide.[1]

I was able to complete the install, but the system wouldn't boot, 
probably because the guided partitioning messed up u-boot. When I tried 
to fix it from my working system u-boot-install-sunxi64 complained about 
the GPT partition table.

I'm ready to start a second try where I will be using manual 
partitioning (without GPT), hoping I will get a bootable system.

> More general question —  What is the status of support for the ARM64 
> at this point in time?  Is there an on-going project that I can help 
> test?

In my opinion support in buster is partial, but already quite usable 
(headless system or framebuffer only).

It makes sense to upgrade the kernel though (from experimental and 
hopefully backports after buster is released) as there are significant 
developments relevant for the Pine64+.

See http://linux-sunxi.org/Linux_mainlining_effort for more details.

[1] The arm64 version of that section is missing and I intend to provide 
a patch based on my experience.

Hope this helps,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: Debian Installer on Pine64+ (no serial console)

2019-05-03 Thread Rick Thomas
Hi Andrei,

Did you get any answer on this?  I’m thinking of replacing my armel hardware (a 
couple of OpenRD boxes and a SheevaPlug) with something more modern, and the 
Pine64+ looks like a good candidate, but I’ll need to be able to install Debian.

More general question —  What is the status of support for the ARM64 at this 
point in time?  Is there an on-going project that I can help test?

Thanks!
Rick

> On May 1, 2019, at 9:27 AM, Andrei POPESCU  wrote:
> 
> [I seem to recall a previous discussion about this but can't find it 
> anymore]
> 
> Hi,
> 
> I've been trying to install Debian on the Pine64+ using the Debian 
> Installer (Buster RC1).
> 
> This is mostly for educational/backup purposes as I already have a 
> working buster installed with debootstrap.
> 
> To make things more interesting, I don't have serial console, only a 
> HDMI screen (TV), USB keyboard and internet access.
> 
> Steps
> 
> 1. Write pine64_plus.img.gz to an SD card
> 2. Write an .iso to a USB stick (I used the netinst)
> 3. Boot from the SD card with the USB stick inserted
> 
> The system boots, successfully probes the USB stick and displays the 
> GRUB menu on the HDMI output (with some strange characters instead of 
> bars, but still readable).
> 
> At this point I'm stuck because the USB keyboard is not active 
> (something missing in GRUB?) and GRUB has no timeout.
> 
> As the filesystem on the stick is ISO9660 I also don't know of an easy 
> method to edit /boot/grub/grub.cfg to add a timeout (I'm assuming the 
> USB keyboard will work as soon as the D-I kernel is booted).
> 
> In theory it should also be possible (and nicer) to just create some 
> filesystem on the SD card (writing the image already creates a 
> partition) and copy the necessary files to start D-I there (which 
> ones?).
> 
> Suggestions?
> 
> Kind regards,
> Andrei
> -- 
> http://wiki.debian.org/FAQsFromDebianUser



Debian Installer on Pine64+ (no serial console)

2019-05-01 Thread Andrei POPESCU
[I seem to recall a previous discussion about this but can't find it 
anymore]

Hi,

I've been trying to install Debian on the Pine64+ using the Debian 
Installer (Buster RC1).

This is mostly for educational/backup purposes as I already have a 
working buster installed with debootstrap.

To make things more interesting, I don't have serial console, only a 
HDMI screen (TV), USB keyboard and internet access.

Steps

1. Write pine64_plus.img.gz to an SD card
2. Write an .iso to a USB stick (I used the netinst)
3. Boot from the SD card with the USB stick inserted

The system boots, successfully probes the USB stick and displays the 
GRUB menu on the HDMI output (with some strange characters instead of 
bars, but still readable).

At this point I'm stuck because the USB keyboard is not active 
(something missing in GRUB?) and GRUB has no timeout.

As the filesystem on the stick is ISO9660 I also don't know of an easy 
method to edit /boot/grub/grub.cfg to add a timeout (I'm assuming the 
USB keyboard will work as soon as the D-I kernel is booted).

In theory it should also be possible (and nicer) to just create some 
filesystem on the SD card (writing the image already creates a 
partition) and copy the necessary files to start D-I there (which 
ones?).

Suggestions?

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature