Linux – Booting native Arch Linux on an Android device

androidarch linux

I have a Galaxy Note 10.1 (n8010) and I want to make it boot Arch Linux natively. I mean boot Arch Linux instead of android. All that I need is to alter the initramfs, which I can't find anywhere in the world. My questions:

  • Do I need to alter only the initramfs, or I have to cope with other things too? (such as the kernel itself)
  • [DONE] Where an I get the CyanogenMod 10.1's official initramfs (github maybe)? Or I have to self-compile the CyanogenMod's kernel and extract it from the zImage?
  • [PROBABLY] Can I have the Arch linux root inside the android data partition? (e.g. /data/linux) Or I have to buy an SD card?
  • What else do I need to know/do?

Edit: I found how to alter the initramfs 🙂

  1. unzip rom (CM10.1 for n8013 used)
  2. wget http://whiteboard.ping.se/uploads/Android/unmkbootimg.gz
  3. gunzip unmkbootimg.gz
  4. ./unmkbootimg boot.img (save the command given with mkbootimg!)
  5. mkdir initramfs && cd initramfs
  6. gzip -cd initramfs.cpio.gz | cpio -i
  7. Alter the init scripts <- testing that right now, I'll post the correct once done
  8. find . | cpio -o -H newc | gzip > ../initramfs.cpio.gz (not sure if the command is right…)
  9. cd .. && clean the directory so that only initramfs.cpio.gz and zImage is left…
  10. execute the mkbootimg command you saved before…
  11. flash the new boot.img 🙂

Edit 2:
The initramfs is fairly easy to build
You just need to mount the root filesystem (either a the partition or the linux image) and point to its init through a symlink inside initramfs

The problem is that you need kernel 4.x to boot Arch's new systemd

In order to get the kernel working you need a serial console to see the errors and stuff. When I build the kernel I'll post the needed config settings.

For those that don't have mkbootimg (you get that by compiling a kernel) I found a precompiled one

Links:

Best Answer

Not sure if this helps buts it's a howto for Arch Linux http://forum.xda-developers.com/showthread.php?t=2195778

Related Question