Initramfs

From Lolly's Wiki
Revision as of 09:35, 6 October 2022 by Lollypop (talk | contribs) (Created page with "=Adding binaries to the initial ram disk in ubuntu= == Adding vi to initramfs == <SyntaxHighlight lang=bash> $ sudo cat >/etc/initramfs-tools/hooks/vi <<EOH #!/bin/sh PREREQ="" prereqs() { echo "$PREREQ" } case $1 in prereqs) prereqs exit 0 ;; esac . /usr/share/initramfs-tools/hook-functions # Begin real processing below this line copy_exec /usr/bin/vim.basic /bin exit 0 EOH $ sudo update-initramfs -k $(uname -r) -u </SyntaxHighlight>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Adding binaries to the initial ram disk in ubuntu

Adding vi to initramfs

$ sudo cat >/etc/initramfs-tools/hooks/vi <<EOH
#!/bin/sh

PREREQ=""
prereqs()
{
     echo "$PREREQ"
}

case $1 in
prereqs)
     prereqs
     exit 0
     ;;
esac

. /usr/share/initramfs-tools/hook-functions
# Begin real processing below this line

copy_exec /usr/bin/vim.basic /bin

exit 0
EOH
$ sudo update-initramfs -k $(uname -r) -u