quarkscript / linux-armv7-xe303c12-only

Linux kernel for old google-snow chromebook
GNU General Public License v2.0
18 stars 2 forks source link

Update causes the system not to boot #16

Open pcvgxx opened 2 years ago

pcvgxx commented 2 years ago

I am incredibly exhausted, I am a beginner but I think I did exceptionally well for a noob, but this is so hard for me right now. Please help me, I'll list all the things that happened here: a. Used 3 of your test images (1 archlinuxarm, 1 kali and 1 void). The Kali Linux one performed incredibly amazing in comparison with your archlinuxarm and void linux. Somehow, when I use your test image for archlinuxarm, the arrow cursor keeps blinking (which I have not experienced with your build of Kali Linux). I am unaware at first of what would happen of certain actions; I tried installing chromium (and performed apt update if I remembered correctly). After a reboot, there was only a beep.

Anyway, I did anything that I could do: Since I don't have a laptop or pc (I only have my chromebook), I have no idea how to flash your image once again. Did a few searches and I stumbled upon chroot. (Important since I can't extract the zst package using chromeos, or maybe I just don't know how)

So using chroot (and bind mount), and mv command, I finally have the extracted img. With little knowledge from my past experience with linux, I used fdisk /dev/sda and deleted all partitions, made a new one, created a gpt partition table, and formatted using mkfs.vfat (or mkfs.ext4)

I flashed it once again, this time, blocked linux kernel from updating (yet somehow, after trying to install chromium, after a reboot, I still got a beep)

So I scoured through the internet and found out about the kernel issue. Using chroot once again, I tried everything that I can possibly think of but still failed. Frustrated, I tried to use archbk (hey, it's an easy easy script that automates everything) I used dd once again to flash, all is well not until I tried to boot from it, there is a beep once again!!! Possibly furious, I searched the net for a mirror of old versions of archarm for chromebook (found one in 2020)). I used it, dd-ed to drive, it worked!! Although, after populating the keyring and performing pacman -Syu, after a reboot it did not work once again LMAO i'm so mad at this point, but anyway I had no choice, need it to work for my studies (Chrome from official chromeos no longer works with googlemeet and other important websites)

After everything, I found out that the reason why it does not boot is because of the kernel being larger than 8m?? So of course, I tried dd-ing the old archarm image to drive, and performed "pacman -S uboot-tools vboot-utils dtc" in preparation with the solution I found on an archarm thread. And since I can't access archarm once again, I opted to use chroot only to find out that it returns this error:

sudo mount /dev/sda2 /mnt

mount: /mnt: wrong fs type, bad partition, bad superblock on /dev/sda2, missing codepage or helper program, or other error

Not trying to give up, I flashed the old archarm on another drive and now after trying to chroot, I received this error:

mount: /mnt: unknown filesystem type 'btrfs'

This is truly depressing. I give up, only you can help me. If you can, please update the kali testimage please, one where I can just install chromium. If not, help me how to deal with this issue. I had several sleepless nights (and bandwidth lost because I used mobile data) just to figure out how to breath new life in my device. My exams are next week, and the chromebook's my best option for studying.

pcvgxx commented 2 years ago

found a way to finally use google meet lol (just used apt install firefox-esr, gotta admit, I miss chromium but firefox-esr does its job)

anyway, this is not a fix, because the purpose of this issue thread is to finally solve being unable to boot ctrl+u when updating

quarkscript commented 2 years ago

Hi. I didn't expect it causes so much trouble. As I know Chrome OS doesn't support the btrfs file system that I use in my disk images (due to built-in file compression support), chrooting to it probably doesn't work for Chrome OS; zstd is also may not supported. I made another Kali-linux disk image with ext4 rootfs and compressed it with gzip which should be handled by Chrome OS. https://drive.google.com/u/0/uc?id=1hWoAyJUZY_WY4f_cdS0vUKJbJC-8SNWU&export=download (1.5Gb) Screenshot_2022-10-26_11-04-12

The Chrome OS bootloader requires a specific partition table that can be created using cgpt. uboot also requires a signed kernel to boot successfully. If after reboot it beeps and won't boot, it means the flashed kernel or partition table does not fit uboot expectations, or maybe the "boot flags" have been reset. In any case, updating or installing additional packages should not cause this. Since my disk images use an unofficial kernel, the kernel should not be installed from the distro repository when upgrading.

Disk images were created more for kernel testing / linux recovery than for everyday use. For daily use, it should at least be scaled up to the size of the media in use and manually adjusted to suit your needs. You can use the edim script (didn't test it on Chrome OS) or cgpt to fit the disk image. Example on cgpt use could be found on archlinuxarm installation instructions https://archlinuxarm.org/platforms/armv7/samsung/samsung-chromebook

Actually you can run almost any armv7 (armhf) linux. This requires a couple actions: create a Chrome OS partition table, format the rootfs, put the kernel and firmware there, flash the kernel to the kernel partition and extract the selected armv7-rootfs linux tarbal to root.

As for the chromium web browser, once i tried to run it on archlinuxarm, but it wouldn't run because it needs GPU acceleration, which isn't available. Even with patched mesa, chromium didn't work for me. So i gave up on chromium and haven't tried it on other linux distros at xe303c12.

For debian-based Linux (like Kali), I suggest using aptitude for install / upgrade packages.

pcvgxx commented 2 years ago

Hi, I did not expect that you will respond so promptly, but anyway, I've tried this new kali linux build. Unfortunately, it is a lot slower than the test build that have 5.13 as kernel, maybe because it is bigger? or maybe because btrfs performs better?

Anyway, tried your test build of alpine linux and im so surprised on how smooth it is. Unfortunately, i never had experience with alpine, and im surprised there is no gparted (i use gparted to upscale the teskimage like the one from linux so I have no idea on how to do the same thing with alpine) Anyway, I'm glad you made an alpine linux build because I was desperate, this clearly is the fastest among all os that have been installed in my machine.

However, there still are problems: a. No audio? Notice that most of the packages in multimedia is not working except for mpv media player b. Bluetooth? I'm thinking if I can't use built in speaker, maybe bluetooth ones will work c. Gparted (maybe another way to upscale the testimage to the max capacity of my flash drive)

pcvgxx commented 2 years ago

edit: I just found out about apk (as a noob, I can say it's like apt or pacman) apk update, apk upgrade then installed apk add gparted

i tried launching gparted "start menu" lol windows guy, it's not launching so i tried sudo gparted and it worked, and finally, extended the image once again.

Kudos, despite being extremely light, this os does not look too dated (or bad), and it's xfce. I can just apply themes I suppose

quarkscript commented 2 years ago

It was occasion. I haven't had much opportunity to develop this project lately.

It's a surprise to me that gparted didn't make it unbootable. Thank you for feedback!

Files compression may gave benefints when decompressing runs faster than reading from media. Its probably not only btrfs itself but fast compression algorithm (zstd). You may turn ext4 to btrfs with compression like here https://youtu.be/ALJR2doOipc but it needs be done from any OS with btrfs and zstd support or from booted disk image. Also CPU frequency down scalling may noticable slowdown the system. In practically i did not notice any extension of runtime from battery, so i suggest to turn it off. If I remember it correctly there is a system service.

Alpine linux itself one of the fastest, its a system-D free and uses reduced alternative of c-library (musl) and busy-box. I am not much familliar with it, but it was curious to run it.

As for audio, it should work. https://wiki.alpinelinux.org/wiki/ALSA and https://github.com/quarkscript/linux-armv7-xe303c12-only/issues/15

As for bluetooth i gues it should be something like that https://wiki.alpinelinux.org/wiki/Raspberry_Pi_3_-_Setting_Up_Bluetooth At least btmarvel is present in kernel modules dir