Bug#468112: Initramfs generation reliability fixes.
On Wed, 27 Feb 2008, Luke Yelavich wrote:
> Attached is a patch to improve the way update-initramfs handles the
> generating of new or updated initramfs images for kernels. It puts in
> place a few measures to ensure that if there is not enough disk space on
> /boot, a previous initramfs is still in tact, to allow the booting of
> that kernel. The patch applies against current git head. See the Ubuntu
> specification found at the following URL for more information:
> https://wiki.ubuntu.com/HardyInitramfsErrorHandling
okay,
i still don't understands belows patch.
> diff -urN initramfs-tools/update-initramfs initramfs-tools.new/update-initramfs
> --- initramfs-tools/update-initramfs 2008-02-26 11:04:36.943676705 +1100
> +++ initramfs-tools.new/update-initramfs 2008-02-26 11:01:00.555676705 +1100
> @@ -87,7 +87,7 @@
> [ ! -r "${initramfs}" ] && return 0
> initramfs_bak="${initramfs}.dpkg-bak"
> [ -r "${initramfs_bak}" ] && rm -f "${initramfs_bak}"
> - ln -f "${initramfs}" "${initramfs_bak}"
> + mv -f "${initramfs}" "${initramfs_bak}"
why does a mv instead of an hardlinkg ensure better reliabiality!?
with aboves hardlink you are assured to have a backup initramfs.
do you need support /boot that have no hardlink support?
sorry need more explanations for above to be satisfied.
> - rm -f "${initramfs_bak}"
> + mv -f "${initramfs_bak}" "${initramfs}"
how is that better again?
only a result of aboves first choice of not using hardlinks.
> fi
> - if mkinitramfs ${OPTS} "${initramfs}.new" "${version}"; then
> - mv -f "${initramfs}.new" "${initramfs}"
> + if mkinitramfs ${OPTS} "${initramfs}" "${version}"; then
this hook got inversed but that doesn't matter right now,
need more info anyway.
thanks
--
maks
Reply to: