Raspberry Pi bootloader 20171020-1 does not boot

Problems with packages? Post here, using [tags] of the package name.

Raspberry Pi bootloader 20171020-1 does not boot

Postby aroberts » Sat Oct 21, 2017 3:24 am

I've just updated three headless raspberry pi 3B's (armv7) to the latest bootloader and kernel.
None of the devices now boot.
They hang on the multicoloured boot splash screen no attempt to start linux at all.

1) How do you recover from this?

2) Why do updates which do not even boot keep getting pushed?
aroberts
 
Posts: 42
Joined: Tue Mar 15, 2016 4:32 am

Re: Raspberry Pi bootloader 20171020-1 does not boot

Postby aroberts » Sat Oct 21, 2017 4:55 am

To answer my own question this is how I recovered:
1) removed sd card and mounted on an ODROID-XU4 using a USB to sd card reader
2) downloaded old kernel and bootloader packages from: http://tardis.tiny-vps.com/aarm/packages/
3) mounted /dev/sda1 and /dev/sda2
Code: Select all
mkdir /mnt/root /mnt/boot
mount /dev/sda1 /mnt/boot
mount /dev/sda2 /mnt/root

for each of the 3 packages:
Code: Select all
linux-raspberrypi-4.9.56-1-armv7h.pkg.tar.xz
raspberrypi-bootloader-20171015-1-any.pkg.tar.xz
raspberrypi-bootloader-x-20171015-1-any.pkg.tar.xz

bsdtar -xvpf ./package.pkg.tar.xz -C /mnt/root --exclude .PKGINFO --exclude .INSTALL

cd /mnt/root/boot
cp -R * /mnt/boot

I then has to rebuild initramfs for downgraded kernel
Code: Select all
cd /mnt/root
mount -t proc proc proc/
mount --rbind /sys sys/
mount --rbind /dev dev/
chroot /mnt/root /bin/bash
mkinitcpio -g /boot/initramfs-linux.img
exit
mv /mnt/root/boot/initramfs-linux.img /mnt/boot/initramfs-linux.img


I never figured out how to properly restore proc fs etc, so just rebooted ODROID, and removed USB SDcard reader, and booted
RPI with the card.

This works, but pacman database thinks its running the newer kernel/bootloader. Not a bad thing as I don't want to upgrade them
until a new version is out.
aroberts
 
Posts: 42
Joined: Tue Mar 15, 2016 4:32 am

Re: Raspberry Pi bootloader 20171020-1 does not boot

Postby aroberts » Sat Oct 21, 2017 5:16 am

I've just edited the above to include copy of boot files from /mnt/root/boot to /mnt/boot
aroberts
 
Posts: 42
Joined: Tue Mar 15, 2016 4:32 am

Re: Raspberry Pi bootloader 20171020-1 does not boot

Postby aroberts » Sat Oct 21, 2017 6:35 am

After this allowed me to boot, I then installed, the new kernel (4.9.57-1), removed the modules for the old kernel manually
rm -rf /lib/modules/4.9.56-1-ARCH
then properly downgraded to the old kernel
pacman -U ./linux-raspberrypi-4.9.56-1-armv7h.pkg.tar.xz
I also properly downgraded the bootloaders
pacman -U ./raspberrypi-bootloader-20171015-1-any.pkg.tar.xz
and
pacman -U ./raspberrypi-bootloader-x-20171015-1-any.pkg.tar.xz

This left one issue, I had trashed my /boot/config.txt file which I had to reapply my changes to (turn on SPI).

Hope this helps.
aroberts
 
Posts: 42
Joined: Tue Mar 15, 2016 4:32 am

Re: Raspberry Pi bootloader 20171020-1 does not boot

Postby graysky » Sat Oct 21, 2017 10:57 am

aroberts wrote:I've just updated three headless raspberry pi 3B's (armv7) to the latest bootloader and kernel.
None of the devices now boot.
They hang on the multicoloured boot splash screen no attempt to start linux at all.

1) How do you recover from this?


There is a more elegant solution: plug your USB card reader into another RPi2/3 running armv7h. If you don't have another RPi2/3 (you mentioned that you do but others reading this might not) you will require another SD card that is bootable. Use the same RPi2/3 with the bootable card and put the unbootable card into the card reader.

Mount the partitions (both root and boot), from the card reader (/dev/sdb on my system) then use arch-chroot from the arch-install-scripts package and then downgrade. That script will setup all needed bind mounts, etc. for the successful chroot for you. Very convenient.

Code: Select all
mount /dev/sdb2 /mnt
mount /dev/sdb1 /mnt/boot
arch-chroot /mnt
pacman -U /var/cache/pacman/pkg/foo.pkg.tar.xz
graysky
 
Posts: 356
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Raspberry Pi bootloader 20171020-1 does not boot

Postby lucsansag » Sat Oct 21, 2017 2:36 pm

How can I solve this if I don't have another board running Arch?
lucsansag
 
Posts: 3
Joined: Wed Aug 09, 2017 7:13 pm

Re: Raspberry Pi bootloader 20171020-1 does not boot

Postby haraldwithtwoehs » Sat Oct 21, 2017 2:54 pm

How can I solve this if I don't have another board running Arch?


I solved it by downloading fresh copies of the installer images. You can install onto a new SD card, boot up, and follow the instructions above for arch-chroot.

I was able to recover mine slightly differently; I downloaded the installers and then copied all of the files in /boot and /usr/lib/modules from the install image to my SD card (in the appropriate partitions, of course). This is obviously more complicated, but it did create bootable, networked RPIs that I could then finish fixing via SSH.
haraldwithtwoehs
 
Posts: 6
Joined: Sat Oct 21, 2017 2:49 pm

Re: Raspberry Pi bootloader 20171020-1 does not boot

Postby sinatosk » Sat Oct 21, 2017 3:04 pm

lucsansag wrote:How can I solve this if I don't have another board running Arch?


*** DO THE FOLLOWING USING SUDO OR ROOT ***

I have a laptop with arch linux on it with an sdcard reader on it so I put my sdcard in that

my sdcard dev file is "/dev/mmcblk0", so I'm assuming you'll have that

- make a directory "rpi" at "/mnt"
- make a directory "tmprpi" at "/tmp"
- mount the second partition ( in my case ) "/dev/mmcblk0p2" to "/mnt/rpi"
- mount the first partition ( in my case ) "/dev/mmcblk0p1" to "/mnt/rpi/boot"
- change directory to "/mnt/rpi/var/cache/pacman/pkg"
- ( assuming you can extract xz files ) extract the contents of the files "linux-raspberrypi-4.9.56-1-armv7h.pkg.tar.xz", "raspberrypi-bootloader-20171015-1-any.pkg.tar.xz" and "raspberrypi-bootloader-x-20171015-1-any.pkg.tar.xz" to "/tmp/tmprpi" using the command "tar xvfJ <file.tar.xz> -C /tmp/tmprpi" ( ignore warnings about unknown headers )
- change directory to "/tmp/tmprpi"
- remove the files ".BUILDINFO", ".INSTALL", ".MTREE" and ".PKGINFO"
- ( assuming you have the "rsync" command installed ) run the command "rsync -ahP /tmp/tmprpi/ /mnt/rpi/" AND NOT "rsync -ahP /tmp/tmprpi /mnt/rpi/"... IT MUST BE "rsync -ahP /tmp/tmprpi/ /mnt/rpi/"
- run command "sync"
- unmount "/mnt/rpi/boot" and "/mnt/rpi" using "umount /mnt/rpi/boot" and "umount /mnt/rpi"
- remove the directory "rpi" from "/mnt" if you like
- take your sdcard out and plop it back into rpi and power it up
*** on to the rpi from now on ***
- login as root
- change directory to "/var/cache/pacman/pkg"
- run command "pacman -U --force linux-raspberrypi-4.9.56-1-armv7h.pkg.tar.xz raspberrypi-bootloader-20171015-1-any.pkg.tar.xz raspberrypi-bootloader-x-20171015-1-any.pkg.tar.xz"
- run command "sync" and that's it your done
- reboot just incase

don't feel like doing any of this?, you can try previous post suggestion

edit 1: the additional thing I did in my mine so I can update other packages but not linux itself is edit "/etc/pacman.conf" and uncomment the line "#IgnorePkg =" and replace it with "IgnorePkg = linux-raspberrypi raspberrypi-bootloader raspberrypi-bootloader-x raspberrypi-firmware"

and what this does in the future I have to explicitly type out "sudo pacman -S linux-raspberrypi raspberrypi-bootloader raspberrypi-bootloader-x raspberrypi-firmware" at most if any of those are new ( which it tells you ) and I'm comfortable with it
Last edited by sinatosk on Sat Oct 21, 2017 3:40 pm, edited 5 times in total.
sinatosk
 
Posts: 3
Joined: Wed Jun 07, 2017 4:14 pm

Re: Raspberry Pi bootloader 20171020-1 does not boot

Postby graysky » Sat Oct 21, 2017 3:13 pm

sinatosk wrote:*** DO THE FOLLOWING AS ROOT ***

I have a laptop with arch linux on it with an sdcard reader on it so I put my sdcard in that
..


That is frankly poor advice... IMO, the recommended method is the one I posted since it uses native tools (ie pacman) which handles everything as the devs intended.
graysky
 
Posts: 356
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Raspberry Pi bootloader 20171020-1 does not boot

Postby sinatosk » Sat Oct 21, 2017 3:14 pm

graysky wrote:
sinatosk wrote:*** DO THE FOLLOWING AS ROOT ***

I have a laptop with arch linux on it with an sdcard reader on it so I put my sdcard in that
..


That is frankly poor advice... IMO, the recommended method is the one I posted since it uses native tools (ie pacman) which handles everything as the devs intended.


he said he doesn't have a spare board and I do it as root for file permission reasons although can be done with sudo
sinatosk
 
Posts: 3
Joined: Wed Jun 07, 2017 4:14 pm

Next

Return to Packages

Who is online

Users browsing this forum: No registered users and 1 guest