Manjaro ARM on raspberry pi 4 cannot boot after pacman -Syu

It got stuck while downloading updrade(not sure).
After inputing ctrl-c for times not responding I disconnected the power.
Now the situation is that after I connect the power, I can only see a small white square blinking up left after I connect the power, then screen goes black. it seems that the boot procedure not working.
I did repair archlinux with live system. Is there one “live system” for manjaro arm on raspberry pi for me to reinstall the grub or something?

Hi, welcome to the forum :slight_smile:

I only know the arm images for the phone, so I can’t help you much.
If you had a Grub menu prior to the upgrade and now it does not appear, you probably need to take the SD-card out the pi to check it via a laptop (fixing it gets difficult, unless you have an ARM laptop). Yet, the first thing I would try in your case is to check if you can log in via ssh to the pi. If you can ssh, you can troubleshoot what went wrong.

For a lot of related info, see: https://forum.manjaro.org/t/cannot-successfully-ssh-to-raspberry-pi-4/114956/2?u=ion

Raspberry Pi doesn’t use grub and usually run of the sdcard or an USB attached storage device.

Therefore there is no such thing as a live iso to rescue the system.

The eaisest method will be to flash the latest release onto the sdcard.

Another option is to mount the latest image - then manually copying the new files to sdcard using a computer with a cardreader.

Therefore there is no such thing as a live iso to rescue the system.

So there is no any other method to rescue the system?

I’ve deployed a lot of services on it. Reinstalling the system is annoying.

Just put the SD-Card into the reader you used to write the image with. If it’s Linux, It probably automount it and allow you to backup what you deem useful (/etc, /home, etc.).

You didn’t provide other info than - now it doesn’t boot …

You can access the sdcard using a cardreader on your computer

Then

You can rescue data after mounting the card in your computer.

Then unmount and run fsck - remount and copy the files from the latest image - but there’s no guarantee and as such it is only a suggestion - not a recommendation…

Then you should regularly create a backup of the system.

  • Using clonezilla (temporarily stop services) you can store output on attached USB or network.
  • Shutdown system and make 1-1 copy of your sd-card

If I’m doing this … do you have idea how to deal with sym link and hard links?

What do you mean?

I would certainly retrieve the relevant configurations and other relevant files from /etc and /var before I issued such copy.

Links already present on the release image will be overwritten - but any custom setup will likel persist - yet I cannot predict the outcome - you will have to ensure the result yourself.

I use several arm devices - my dns service has run of the same sdcard for years - I only keep a backup of my dns setup - if any problems occur I will simply flast a new image, install the services and copy the configs back - done and done.

If you have another sdcard and a sdcard reader after fsck you can chroot your faulty sdcard and try to repair and reinstall even the kernel and bootloader.

I ran into an error that caused by links when I copy files from latest image to my sdcard. Now I realize it might be the Windows OS.

Anyway, I gave up the idea above and decided to flash a new OS.

Then I ran into another difficulty – I cannot partition my sdcard. After I delete the remaining partitions on the sdcard, nothing happens and no errors, but the partitions are still there. I tried with cfdisk and DiskGenius(Windows).

It confuses me a lot. Maybe the reason is the sdcard is corrupted ?

And I’m not a pro on Linux stuff. Sometimes I’m not very confident about what I’m doing. I’ve configure the home assistant, print stuff and I probably will take hours to reconfigure them.

I apologize for not running fsck on the device. I didn’t know that before … it says bad magic number.

sudo fsck /dev/sdb

fsck from util-linux 2.38.1
e2fsck 1.46.5 (30-Dec-2021)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdb

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

/dev/sdb contains `DOS/MBR boot sector; partition 1 : ID=0xc, start-CHS (0x7a,140,1), end-CHS (0x3ff,254,2), startsector 62500, 937501 sectors; partition 2 : ID=0x83, start-CHS (0x3ff,3,16), end-CHS (0x3ff,3,16), startsector 1000001, 248737215 sectors' data

I don’t understand that very much. is magic number a special number for OS to detect the type of the partition? I have run both of the suggestions.

sudo e2fsck -b 32768 /dev/sdb

but it shows the same text.

I don’t use Windows to do Linux stuff - so I have no idea - I remember cygwin was invaluable to clean up the horrible trees created by bower and npm - but I wouldn’t use it to run a filesystem check.

looks like I’m using fsck the wrong way …

Why fsck before reinstalling just format. And I m not sure you check the right disk do a lsblk before

I just can’t format. Nothing changes after format.

And I had run lsblk and sure about it’s sdb

Then probably a corrupted sdcard. If you have windows i don’t know but you can use a repair CD with gparted inside if you want the Linux side

➜ ~ pacman -Ss gparted
extra/gparted 1.4.0-1
A Partition Magic clone, frontend to GNU Parted
Is this one ok? I don’t know why using a cd. I have another computer with Windows and Archlinux in it.

Because it was not obvious you are talking about windows.
Yes for gparted

I delete the two partitions on sdb and create a new ext4, it shows “can’t have overlapped partitions.”
if I click ignore


if I click ignore
Screenshot_20221121_002958
then error

logs:


Device:	/dev/sdb
Model:	Generic MassStorageClass
Serial:	
Sector size:	512
Total sectors:	249737216
 
Heads:	255
Sectors/track:	2
Cylinders:	489680
 
Partition table:	msdos
 
Partition	Type	Start	End	Flags	Partition Name	File System	Label	Mount Point
/dev/sdb1	Primary	62500	1000000	lba		fat16	BOOT_MNJRO	
/dev/sdb2	Primary	1000001	249737215			ext4	ROOT_MNJRO	
========================================

Delete /dev/sdb1 (fat16, 457.76 MiB) from /dev/sdb  00:00:01    ( SUCCESS )
    	
calibrate /dev/sdb1  00:00:00    ( SUCCESS )
    	
path: /dev/sdb1 (partition)
start: 62500
end: 1000000
size: 937501 (457.76 MiB)
delete partition  00:00:01    ( SUCCESS )
========================================

Delete /dev/sdb2 (ext4, 118.61 GiB) from /dev/sdb  00:00:00    ( SUCCESS )
    	
calibrate /dev/sdb2  00:00:00    ( SUCCESS )
    	
path: /dev/sdb2 (partition)
start: 1000001
end: 249737215
size: 248737215 (118.61 GiB)
delete partition  00:00:00    ( SUCCESS )
========================================

Create Primary Partition #1 (ext4, 119.08 GiB) on /dev/sdb  00:03:52    ( ERROR )
    	
create empty partition  00:02:51    ( SUCCESS )
    	
path: /dev/sdb3 (partition)
start: 2048
end: 249737215
size: 249735168 (119.08 GiB)
libparted messages    ( INFO )
    	
Can't have overlapping partitions.
Partition(s) 3 on /dev/sdb have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.
clear old file system signatures in /dev/sdb3  00:01:01    ( ERROR )
    	
write 512.00 KiB of zeros at byte offset 0  00:00:00    ( SUCCESS )
write 4.00 KiB of zeros at byte offset 67108864  00:00:00    ( SUCCESS )
write 512.00 KiB of zeros at byte offset 127863881728  00:01:01    ( ERROR )
    	
libparted messages    ( ERROR )
    	
Invalid argument during seek for write on /dev/sdb
Invalid argument during seek for write on /dev/sdb
Invalid argument during seek for write on /dev/sdb
Invalid argument during seek for write on /dev/sdb
Invalid argument during seek for write on /dev/sdb
Invalid argument during seek for write on /dev/sdb
Invalid argument during seek for write on /dev/sdb
Invalid argument during seek for write on /dev/sdb
Invalid argument during seek for write on /dev/sdb
Invalid argument during seek for write on /dev/sdb

Can you see anything wrong?

Have you unmounted the disk before ? what is the /dev/sdb3 ?
For a sdcard use fat32. format, execute , you can use create table partition too before creating a new global partition. Don’t try to create your partition but use after rpi-imager to reinstall.

Yes unmounted.

➜  ~ df -h
Filesystem      Size  Used Avail Use% Mounted on
dev             7.6G     0  7.6G   0% /dev
run             7.6G  1.9M  7.6G   1% /run
/dev/nvme0n1p5   79G   32G   43G  43% /
tmpfs           7.6G   51M  7.5G   1% /dev/shm
tmpfs           7.6G   96K  7.6G   1% /tmp
/dev/nvme0n1p1  596M   99M  497M  17% /boot
tmpfs           1.6G  112K  1.6G   1% /run/user/1000

Create a new partition table success. But nothing changes after refreshing.

I don’t know what is sdb3, it’s not shown in /dev.

I know I should create partition with rpi-imager but a normal sdcard can do that, right? And if I don’t create a partition there is still no error like cfdisk. the “overlap” error shows that the previous partitions are not deleted correctly I think