7 ms·
And that's a compressed image... it is even larger in memory. On my machine: $ stat -c %s /boot/vmlinuz-4.9.0-3-amd64 4204320 $ extract-vmlinux /boot/vm
by glandium 9y ago
And that's a compressed image... it is even larger in memory.
On my machine:
$ stat -c %s /boot/vmlinuz-4.9.0-3-amd64
4204320
$ extract-vmlinux /boot/vmlinuz-4.9.0-3-amd64 > vmlinux
$ stat -c %s vmlinux
20110308
The script to uncompress the kernel comes from the kernel source:
https://raw.githubusercontent.com/torvalds/linux/master/scripts/extract-vmlinux https://raw.githubusercontent.com/torvalds/linux/master/scri...
Arguably, not everything in that vmlinux is actually loaded:
$ readelf -Wl vmlinux | awk '$1 == "LOAD" { tot += strtonum($5); } END { print tot }'
13935704
Counting BSS:
$ readelf -Wl vmlinux | awk '$1 == "LOAD" { tot += strtonum($6); } END { print tot }'
14824536
- baobrien 9y agoI wonder how small a minimal bootable kernel, with all the drivers in modules, would be.
- voltagex_ 9y agoDoesn't directly answer your question but https://tiny.wiki.kernel.org/ https://tiny.wiki.kernel.org/
- isostatic 9y agoDoes anyone else remember toms root and boot? Fully functioning Linux machine on a floppy.
- DanBC 9y agoYes, I was surprised Tomsrtbt hadn't been mentioned yet. https://en.wikipedia.org/wiki/Tomsrtbt https://en.wikipedia.org/wiki/Tomsrtbt The website is dead now. Here's the wayback machine link: https://web.archive.org/web/20160120122627/http://www.toms.net/rb https://web.archive.org/web/20160120122627/http://www.toms.n...
- khedoros1 9y agoA friend and I used to compete on kernel size. Research the kernel features we actually used, which would be necessary during boot, etc. This was either late 2.4 kernels or early 2.6 ones. I don't remember for sure, but I think we hit about 800KB, and would've had to start adding more modules into the initrd to get smaller.