by richtr8 » Fri Aug 23, 2024 1:05 pm
i have the fresh booted "rescue" image booted from sd. i connected the old sd via a USB reader, managed to mount it & chroot to it. it doesn't seem like i have linux-odroid-xu3 4.14.180-3 on the old sd, so i tried to download it viamake_clickable_callback(MAGIC_URL_FULL, ' ', 'https://archlinuxarm.org/packages/armv7h/linux-odroid-xu3', '', ' class="postlink"') but it seems like the link to "view changes" is down, & i can't seem to guess the direct URL to use wget or similar at present, but i'll keep trying with it.
EDIT: i just found the packages atmake_clickable_callback(MAGIC_URL_FULL, ' ', 'https://alaa.ad24.cz/packages/l/linux-odroid-xu3/', '', ' class="postlink"') - i'm gonna give it a try & update as i go
EDIT 2: it seems like trying to directly use pacman from the chrooted environment complains about some filesystem differences - perhaps this is because i'm interfacing with the filesystem on a USB reader in a chroot?
----
[root@alarm pkg]# sudo pacman -U linux-odroid-xu3-4.14.180-3-armv7h.pkg.tar.xz
loading packages...
warning: downgrading package linux-odroid-xu3 (6.6.44-3 => 4.14.180-3)
resolving dependencies...
looking for conflicting packages...
Packages (1) linux-odroid-xu3-4.14.180-3
Total Installed Size: 58.32 MiB
Net Upgrade Size: 25.84 MiB
:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring [###########################] 100%
(1/1) checking package integrity [###########################] 100%
(1/1) loading package files [###########################] 100%
(1/1) checking for file conflicts [###########################] 100%
error: could not open file: /etc/mtab: No such file or directory
error: could not determine filesystem mount points
error: not enough free disk space
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.
----
i get similar stuff when i try to get info about the filesystem:
[root@alarm pkg]# df -h
df: cannot read table of mounted file systems: No such file or directory
[root@alarm pkg]# lsblk
lsblk: failed to access sysfs directory: /sys/dev/block: No such file or directory
outside of the chroot it looks fine/there is disk space:
[root@alarm alarm]# df -h
Filesystem Size Used Avail Use% Mounted on
dev 929M 0 929M 0% /dev
run 997M 2.1M 995M 1% /run
/dev/mmcblk1p1 29G 1.1G 27G 4% /
tmpfs 997M 0 997M 0% /dev/shm
tmpfs 997M 0 997M 0% /tmp
tmpfs 200M 0 200M 0% /run/user/1000
/dev/sda1 117G 91G 21G 82% /mnt/chroot
but within the chroot, /proc, /sys & /dev are totally empty. from what i understand this is due to not using arch-chroot as one would when installing arch from the live USB. i found that arch-chroot is actually script that exists in the arch-install-scripts package, which was also on the archive. i installed it to the "rescue" environment by using wget from inside the chroot, & now it seems i am able to use pacman to update the headers & the kernel package. pacman complained a lot about the kernel update, so i caught the output in a file here:make_clickable_callback(MAGIC_URL_FULL, ' ', 'https://pastebin.com/XxxE3bAF', '', ' class="postlink"') - going to reboot on the old sd now & see if this does the trick...
it now boots, doesn't complain about the ethernet controller anymore, but we still don't get to a login prompt. i will keep messing with it via chroot & see what i come back with.
EDIT 3: success, it now gets to a login screen after some time. in the chroot, i noticed the following line stuck out to me when downgrading the package:
warning: /etc/mkinitcpio.d/linux-odroid-xu3.preset installed as /etc/mkinitcpio.d/linux-odroid-xu3.preset.pacnew
i made a backup of /etc/mkinitcpio.d/linux-odroid-xu3.preset, had a look at them with diff & then overwrote the old one with the .pacnew file, then ran the pacman -U command again to reinstall the packages. this seemed to get me to a login screen. i was even able to run it on the new kernel, so i'll mark this one as resolved. the next issue i have to solve is why it now takes 50 or so seconds to boot (used to be instant), but i think that's my config to blame. i was messing around with network bridges & stuff to try to use it as a VPN bastion host when i had to reboot it, so i'm not sure if it was the chicken or egg here, but either way it's working now & i know how to fix it in future. thanks for your help!