@@ -6,6 +6,10 @@ I use this for my Raspberry Pi, but it should work on any Debian or derivative.
66The root file system on the sd-card is mounted read-only on /overlay/lower, and / is a
77read-write copy on write overlay.
88
9+ There are two sets of instructions below: [ Raspbian] ( #raspbian ) and [ Ubuntu for ARM] ( #ubuntu-for-arm ) .
10+
11+ ## Raspbian
12+
913It uses initramfs. Stock Raspbian doesn't use one so step one would be to get initramfs working.
1014Something like:
1115
@@ -39,6 +43,33 @@ then rerun
3943``` bash
4044sudo mkinitramfs -o /boot/init.gz
4145```
46+ Now skip down to [ all distributions] ( #all-distributions ) to finish the installation.
47+
48+ ## Ubuntu for ARM
49+
50+ Add the following line to /etc/initramfs-tools/modules
51+ ```
52+ overlay
53+ ```
54+
55+ Copy the following files
56+ - hooks-overlay to /etc/initramfs-tools/hooks/
57+ - init-bottom-overlay to /etc/initramfs-tools/scripts/init-bottom/
58+
59+ install busybox-static
60+ ``` bash
61+ sudo apt-get install busybox-static
62+ ```
63+
64+ then run
65+
66+ ``` bash
67+ sudo update-initramfs -k $( uname -r) -u
68+ ```
69+
70+ Now continue to [ all distributions] ( #all-distributions ) to finish the installation.
71+
72+ ## all distributions
4273
4374add to .bashrc
4475
@@ -72,12 +103,18 @@ It's probably a good idea to reboot now for 2 reasons:
72103- leaving /overlay/lower read-write could cause file corruption on power loss.
73104- to test it still boots ok after the changes you've just made.
74105
75- Whenever the kernel is updated you need to rerun
106+ Whenever the kernel is updated, for Raspbian you need to rerun
76107
77108``` bash
78109sudo mkinitramfs -o /boot/init.gz
79110```
80111
112+ and for Ubuntu for ARM
113+
114+ ``` bash
115+ sudo update-initramfs -k $( uname -r) -u
116+ ```
117+
81118TODO: see if there's a hook to automatically run ` sudo mkinitramfs -o /boot/init.gz `
82119on kernel install
83120
0 commit comments