4 kernelname=vmlinuz-2.6.30-uk-0.2.4.1
5 default_img=unifiedkernel.img
6 fallback_img=unifiedkernel-fallback.img
7 preset_file=unifiedkernel.preset
10 echo "> Updating module dependencies. Please wait ..."
11 echo "> 更新模块依赖关系,请稍候 ..."
13 kernel_version=$(pacman -Ql $pkgname | grep "lib/modules/.*/modules.order" | cut -d "/" -f4)
14 depmod -a ${kernel_version}
17 echo "> Generating boot initramfs, Please wait..."
18 echo "> 创建启动内核镜像,请稍候..."
21 /sbin/mkinitcpio -p ${kver_file%%.preset}
23 rootdevice=$(cat /proc/cmdline | tr " " "\n" | grep "root" | cut -d "=" -f2)
24 bootindex=${rootdevice#/dev/[s|h]d[a-z]}
27 echo "> Generating boot initramfs finished: "
28 echo "> The kernel name is "${kernelname}" "
29 echo "> The boot initramfs is "${default_img}" and "${fallback_img}" "
30 echo "> Pls. add the corresponding boot options to your boot configuration file."
31 echo "> Below lines need to be added to GRUB's menu.lst for reference: "
33 echo "> 内核: "${kernelname}" "
34 echo "> 启动内核镜像: "${default_img}" 和 "${fallback_img}" "
35 echo "> 请将相应启动选项加入到启动配置文件,以下是GRUB的menu.lst相关设置仅供参考:"
37 echo "title Arch Linux $pkgname ${rootdevice} (initrd=/boot/${default_img}) "
38 echo "root (hd0,${bootindex}) "
39 echo "kernel /boot/${kernelname} root=${rootdevice} ro"
40 echo "initrd /boot/${default_img}"
42 echo "title Arch Linux Failsafe $pkgname ${rootdevice} (initrd=/boot/${fallback_img}) "
43 echo "root (hd0,${bootindex}) "
44 echo "kernel /boot/${kernelname} root=${rootdevice} ro nomodeset acpi=off noapic pci=bios"
45 echo "initrd /boot/${fallback_img}"