diff --git a/installer/installer.kmdr b/installer/installer.kmdr index bf0c47d..332ea1c 100755 --- a/installer/installer.kmdr +++ b/installer/installer.kmdr @@ -1478,6 +1478,7 @@ function get_udisks_key() { devices=`udisks --enumerate-device-files | grep -v /dev/disk | sort -n -r` for device in $devices; do + [ "$device:0:2" = "sd" -o "$device:0:2" = "hd" ] || continue native_path=`get_udisks_key $device native-path` [ -e $native_path/partition ] && continue partscheme=`get_udisks_key $device scheme` diff --git a/installer/installer.sh b/installer/installer.sh index 475d06b..79b16dc 100755 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -404,6 +404,16 @@ if [ "$INSTALL_DRIVER" ]; then } || MKINITRAMFS_ADD="" fi +# remove not-running installed kernel +RUNNING_KERNEL=`uname -r | sed "s|[0-9.]*||"` +for i in `ls $MOUNTPOINT/boot/vmlinuz-*`; do + INSTALLED_KERNEL=`echo ${i} | sed "s|.*/vmlinuz-[0-9.]*||"` + [ "$INSTALLED_KERNEL" = "$RUNNING_KERNEL" ] && continue + dcop_write $"Removing ""$INSTALLED_KERNEL kernel..." 74 + echo $"Removing ""$INSTALLED_KERNEL kernel..." + chroot $MOUNTPOINT smart remove -y kernel-$INSTALLED_KERNEL +done + dcop_write $"Creating initramfs..." 75 echo $"Creating initramfs" chroot $MOUNTPOINT \ @@ -607,15 +617,6 @@ echo $"Removing/cleaning unnecessary files and packages" rpm -r $MOUNTPOINT -e livecd-tools [ "$INSTALL_STABLE_UPDATES" = "1" ] && rpm -r $MOUNTPOINT -e openmamba-devel 2>/dev/null -# remove not-running installed kernel -RUNNING_KERNEL=`uname -r` -for i in `ls $MOUNTPOINT/boot/vmlinuz-*`; do - INSTALLED_KERNEL=${i/*-} - [ "$INSTALLED_KERNEL" = "$RUNNING_KERNEL" ] && continue - chroot $MOUNTPOINT smart remove kernel-$INSTALLED_KERNEL - rm -f $MOUNTPOINT/boot/initramfs-$INSTALLED_KERNEL.img* -done - sed -i /eject_cd.sh/d $MOUNTPOINT/etc/rc0.d/K99halt sed -i /eject_cd.sh/d $MOUNTPOINT/etc/rc6.d/K99reboot