SPECS (LINUX_2_6_8): kernel.spec - mount /boot in %pre

Paweł Sakowski saq at pld-linux.org
Sat Dec 18 15:38:01 CET 2004


On Sat, 2004-12-18 at 00:14 +0000, glen wrote:
> +%pre
> +# on target system the /boot might not be mounted (it's not required
> for system
> +# to run properly), it could be also mounted ro
> +# we will not do any fancy fstab parsing, because it does no harm if
> the boot
> +# is not separate part or is already mounted properly.
> +mount /boot >/dev/null 2>&1
> +mount /boot -o remount,rw >/dev/null 2>&1

I'm not sure if that's the right approach. If somebody mounts /boot ro,
they usually do it for a reason and might not want it silently
overridden by rpm scripts. Besides, if you change the disks mounted in
%pre, you should roll it back in %post -- honour admin's decision of not
having /boot mounted permanently.

You need /boot mounted rw to install FHS, kernel and grub. You need /usr
mounted rw to install virtually any package. An admin should know this.

-- 
Paweł Sakowski <saq at pld-linux.org>
PLD Linux Distribution





More information about the pld-devel-en mailing list