Re: [opensuse-arm] Raspberry Pi and Raspberry Pi 2 uEFI

2016-10-19 Thread Marcus Schäfer
Hi,

> Ok, that basically means that kiwi doesn't fix up the GPT properly
> if it's installing onto a disk that already has a GPT.
> 
> Marcus, if I dd a "short" OEM image with GPT onto a disk that
> already has a GPT, we now have 3 GPT tables:
> 
> 
>   * beginning of the disk
>   * middle of the disk (from the kiwi image)
>   * end of the disk (from the old system)
> 
> In such a situation I wouldn't be surprised if gdisk behaves
> differently from the typical case where we just find lots of zeros
> at the end of the disk. The errors above are really just a side
> effect of that.

There is code in kiwi which should fix that. The method is
called relocateGPTAtEndOfDisk and should cleanup the mismatch
between new gpt at start and potentially old data at the end

gdisk ist called with

   x e w y

but only if gdisk ist part of the initrd. If not you should
see a log message "Warning, gdisk tool not found"

Could you check that ?

Thanks

Regards,
Marcus
-- 
 Public Key available via: https://keybase.io
 keybase search marcus_schaefer
 ---
 Marcus Schäfer (Res. & Dev.)   SUSE Linux GmbH
 Tel: 0911-740 53 0 Maxfeldstrasse 5
 FAX: 0911-740 53 479   D-90409 Nürnberg
 HRB: 21284 (AG Nürnberg)   Germany
 GF:  Felix Imendörffer, Jane Smithard, Graham Norton
 http://www.suse.de
 ---
--
To unsubscribe, e-mail: opensuse-arm+unsubscr...@opensuse.org
To contact the owner, e-mail: opensuse-arm+ow...@opensuse.org



Re: [opensuse-arm] Raspberry Pi and Raspberry Pi 2 uEFI

2016-10-18 Thread Alexander Graf

On 10/17/2016 08:53 PM, Andreas Färber wrote:

Am 17.10.2016 um 20:00 schrieb Andreas Färber:

Am 17.10.2016 um 19:32 schrieb Andreas Färber:

Am 13.10.2016 um 17:30 schrieb Guillaume Gardet:

Le 13/10/2016 à 17:00, Andreas Färber a écrit :

Am 13.10.2016 um 16:15 schrieb Guillaume Gardet:

[RPi2:]

If I reboot [...], I get a GRUB error: "attempt to read
or write outside partition".

This looks suspicious:

[0.171496] Calling pre-init stage in system image
[  809.514233] systemd-udevd[1545]: starting version 228
[  810.029519] device-mapper: uevent: version 1.0.3
[  810.049938] device-mapper: ioctl: 4.34.0-ioctl (2015-10-28)
initialised: dm-de...@redhat.com
[   23.774995] Creating dracut based initrd
[ 1016.740272] device-mapper: core: cleaned up
skiped writing MBR ID for armv7l
GPT fdisk (gdisk) version 1.0.1

Caution! After loading partitions, the CRC doesn't check out!
Partition table scan:
   MBR: MBR only
   BSD: not present
   APM: not present
   GPT: damaged

Found valid MBR and corrupt GPT. Which do you want to use? (Using the
GPT MAY permit recovery of GPT data.)
  1 - MBR
  2 - GPT
  3 - Create blank GPT

Your answer:
Command (? for help): b back up GPT data to a file
c   change a partition's name
d   delete a partition
i   show detailed information on a partition
l   list known partition types
n   add a new partition
o   create a new empty GUID partition table (GPT)
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   sort partitions
t   change a partition's type code
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Command (? for help): b back up GPT data to a file
c   change a partition's name
d   delete a partition
i   show detailed information on a partition
l   list known partition types
n   add a new partition
o   create a new empty GUID partition table (GPT)
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   sort partitions
t   change a partition's type code
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Command (? for help): b back up GPT data to a file
c   change a partition's name
d   delete a partition
i   show detailed information on a partition
l   list known partition types
n   add a new partition
o   create a new empty GUID partition table (GPT)
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   sort partitions
t   change a partition's type code
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Command (? for help): b back up GPT data to a file
c   change a partition's name
d   delete a partition
i   show detailed information on a partition
l   list known partition types
n   add a new partition
o   create a new empty GUID partition table (GPT)
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   sort partitions
t   change a partition's type code
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Command (? for help): b back up GPT data to a file
c   change a partition's name
d   delete a partition
i   show detailed information on a partition
l   list known partition types
n   add a new partition
o   create a new empty GUID partition table (GPT)
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   sort partitions
t   change a partition's type code
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Command (? for help):
Expert command (? for help):
Recovery/transformation command (? for help):
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
be untouched.

Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence: Place EFI GPT (0xEE) partition
first in MBR (good for GRUB)? (Y/N):
Creating entry for GPT partition #1 (MBR partition #1)
Enter an MBR hex code (default EF): Set the bootable flag? (Y/N):
Creating entry for GPT partition #2 (MBR partition #2)
Enter an MBR hex code (default 83): Set the bootable flag? (Y/N):
Creating entry for GPT partition #3 (MBR partition #3)
Enter an MBR hex code (default 83): Set the bootable flag? (Y/N):
Recovery/transformation command (? for help):
Final checks 

Re: [opensuse-arm] Raspberry Pi and Raspberry Pi 2 uEFI

2016-10-17 Thread Andreas Färber
Am 17.10.2016 um 19:32 schrieb Andreas Färber:
> Am 13.10.2016 um 17:30 schrieb Guillaume Gardet:
>> Le 13/10/2016 à 17:00, Andreas Färber a écrit :
>>> Am 13.10.2016 um 16:15 schrieb Guillaume Gardet:
> [RPi2:]
 If I reboot [...], I get a GRUB error: "attempt to read
 or write outside partition".

This looks suspicious:

[0.171496] Calling pre-init stage in system image
[  809.514233] systemd-udevd[1545]: starting version 228
[  810.029519] device-mapper: uevent: version 1.0.3
[  810.049938] device-mapper: ioctl: 4.34.0-ioctl (2015-10-28)
initialised: dm-de...@redhat.com
[   23.774995] Creating dracut based initrd
[ 1016.740272] device-mapper: core: cleaned up
skiped writing MBR ID for armv7l
GPT fdisk (gdisk) version 1.0.1

Caution! After loading partitions, the CRC doesn't check out!
Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: damaged

Found valid MBR and corrupt GPT. Which do you want to use? (Using the
GPT MAY permit recovery of GPT data.)
 1 - MBR
 2 - GPT
 3 - Create blank GPT

Your answer:
Command (? for help): b back up GPT data to a file
c   change a partition's name
d   delete a partition
i   show detailed information on a partition
l   list known partition types
n   add a new partition
o   create a new empty GUID partition table (GPT)
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   sort partitions
t   change a partition's type code
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Command (? for help): b back up GPT data to a file
c   change a partition's name
d   delete a partition
i   show detailed information on a partition
l   list known partition types
n   add a new partition
o   create a new empty GUID partition table (GPT)
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   sort partitions
t   change a partition's type code
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Command (? for help): b back up GPT data to a file
c   change a partition's name
d   delete a partition
i   show detailed information on a partition
l   list known partition types
n   add a new partition
o   create a new empty GUID partition table (GPT)
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   sort partitions
t   change a partition's type code
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Command (? for help): b back up GPT data to a file
c   change a partition's name
d   delete a partition
i   show detailed information on a partition
l   list known partition types
n   add a new partition
o   create a new empty GUID partition table (GPT)
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   sort partitions
t   change a partition's type code
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Command (? for help): b back up GPT data to a file
c   change a partition's name
d   delete a partition
i   show detailed information on a partition
l   list known partition types
n   add a new partition
o   create a new empty GUID partition table (GPT)
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   sort partitions
t   change a partition's type code
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Command (? for help):
Expert command (? for help):
Recovery/transformation command (? for help):
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
be untouched.

Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence: Place EFI GPT (0xEE) partition
first in MBR (good for GRUB)? (Y/N):
Creating entry for GPT partition #1 (MBR partition #1)
Enter an MBR hex code (default EF): Set the bootable flag? (Y/N):
Creating entry for GPT partition #2 (MBR partition #2)
Enter an MBR hex code (default 83): Set the bootable flag? (Y/N):
Creating entry for GPT partition #3 (MBR partition #3)
Enter an MBR hex code (default 83): Set the bootable flag? (Y/N):
Recovery/transformation command (? for help):
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to 

Re: [opensuse-arm] Raspberry Pi and Raspberry Pi 2 uEFI (was: Raspberry Pi 3 AArch64 DTB)

2016-10-17 Thread Andreas Färber
Am 13.10.2016 um 17:30 schrieb Guillaume Gardet:
> Le 13/10/2016 à 17:00, Andreas Färber a écrit :
>> Am 13.10.2016 um 16:15 schrieb Guillaume Gardet:
[RPi2:]
>>> If I reboot [...], I get a GRUB error: "attempt to read
>>> or write outside partition".

I am able to reproduce this on second boot with serial (clean reboot).
`/sbin/update-bootloader --reinit` did not help.

[RPi1:]
>>> 2nd boot is broken. I get a GRUB error: "attempt to read or write
>>> outside of partition".

I tried some things on the Zero before rebooting: yast bootloader
(disabling the gfx), update-bootloader --reinit and grub2-mkconfig -o
/boot/grub2/grub.cfg

Assuming it would've failed as you report, something I did made the boot
succeed. So with the middle one ruled out, that leaves two things to try
on the rpi2.

I notice that raspberrypi sends output to console=tty1 also for JeOS,
whereas raspberrypi2 and raspberrypi3 armv7l don't even for non-JeOS.
raspberrypi3_aarch64 non-JeOS does to tty. Will clean that up.

Regards,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
-- 
To unsubscribe, e-mail: opensuse-arm+unsubscr...@opensuse.org
To contact the owner, e-mail: opensuse-arm+ow...@opensuse.org