[arch-projects] [mkinitcpio][PATCH 1/4] /run/initramfs: keep a copy of the initramfs
This is useful for the future shutdown hook, and might make debugging easier,
as well as potentially opening up for other usecases (that I cannot yet imagine ;-) ).
For the time being we exclude the kernel modules, this decision could be revisited in
the future.
Signed-off-by: Tom Gundersen
Now we fail silently if the file exists, which means there is no easy way to overwrite binaries.
I think it makes the most sense to do the following:
1) add all the busybox stuff as a basic system;
2) overwrite some of the links with any binaries we add to base hook;
3) allow users to write their own hooks to overwrite even more stuff.
This can now be done by this hook.
v2: make sure we are able to overwrite a symlink pointing to a directory
Signed-off-by: Tom Gundersen
Add compat symlinks from /bin, /sbin and /usr/sbin, so nothing is lost.
This will make sure that it is not possibly to install two different
versions of the same binary in PATH.
The main usecase of this is that we want to be able to override any
symlink provided by busybox by adding a binary by the same name. With
this patch we don't have to worry in case the busybox symlink and the
binary we add are in different directories; the last binary to be added
always takes precedence.
Signed-off-by: Tom Gundersen
This means that no "setup" of the initramfs is requried on boot,
and this should make testing a lot eaiser by just chrooting into
the ramfs to check if it works.
Signed-off-by: Tom Gundersen
On 11/26/2011 08:17 AM, Tom Gundersen wrote:
This means that no "setup" of the initramfs is requried on boot, and this should make testing a lot eaiser by just chrooting into the ramfs to check if it works.
Signed-off-by: Tom Gundersen
--- init | 2 -- install/base | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/init b/init index 4c07f9d..51b2969 100644 --- a/init +++ b/init @@ -1,8 +1,6 @@ #!/usr/bin/ash PATH=/usr/bin
-/bin/busybox --install -s - . /init_functions
mount -t proc proc /proc -o nosuid,noexec,nodev diff --git a/install/base b/install/base index c0c19d2..59c3629 100644 --- a/install/base +++ b/install/base @@ -10,6 +10,11 @@ build() { add_symlink /usr/sbin bin
add_binary /lib/initcpio/busybox /bin/busybox + + for applet in `/lib/initcpio/busybox --list`; do + add_symlink "/usr/bin/$applet" busybox + done + add_binary /sbin/modprobe add_binary /sbin/blkid add_binary /bin/mount you can use $() instead of `` ;)
-- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
On Sat, Nov 26, 2011 at 1:03 PM, Gerardo Exequiel Pozzi
On 11/26/2011 08:17 AM, Tom Gundersen wrote:
This means that no "setup" of the initramfs is requried on boot, and this should make testing a lot eaiser by just chrooting into the ramfs to check if it works.
Signed-off-by: Tom Gundersen
--- init | 2 -- install/base | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/init b/init index 4c07f9d..51b2969 100644 --- a/init +++ b/init @@ -1,8 +1,6 @@ #!/usr/bin/ash PATH=/usr/bin
-/bin/busybox --install -s - . /init_functions
mount -t proc proc /proc -o nosuid,noexec,nodev diff --git a/install/base b/install/base index c0c19d2..59c3629 100644 --- a/install/base +++ b/install/base @@ -10,6 +10,11 @@ build() { add_symlink /usr/sbin bin
add_binary /lib/initcpio/busybox /bin/busybox + + for applet in `/lib/initcpio/busybox --list`; do + add_symlink "/usr/bin/$applet" busybox + done + add_binary /sbin/modprobe add_binary /sbin/blkid add_binary /bin/mount
you can use $() instead of `` ;)
Good point. I fixed that up on my public tree (in case you want to pull from there Dave): https://github.com/teg/mkinitcpio/tree/work. -t
participants (2)
-
Gerardo Exequiel Pozzi
-
Tom Gundersen