Permalink
Browse files

add support for initramfs

  • Loading branch information...
1 parent b2f6657 commit c925f5e11ad889b0c2a85b283522570a5d572848 @hollow hollow committed Apr 13, 2012
Showing with 10 additions and 6 deletions.
  1. +8 −5 modules/bootloader_x86.sh
  2. +2 −1 modules/install_steps.sh
View
@@ -15,7 +15,8 @@ configure_bootloader_syslinux() {
DEFAULT linux
LABEL linux
KERNEL /boot/kernel
- APPEND root=${root}
+ INITRD /boot/initramfs
+ APPEND root=${root} ro quiet dolvm
EOB
if ! spawn_chroot "extlinux -i /boot/syslinux"; then
@@ -34,20 +35,22 @@ configure_bootloader_grub() {
# Clear out any existing device.map for a "clean" start
rm ${chroot_dir}/boot/grub/device.map &>/dev/null
- echo -e "default 0\ntimeout 10\n" > ${chroot_dir}/boot/grub/grub.conf
+ echo -e "default 0" > ${chroot_dir}/boot/grub/grub.conf
+ echo -e "timeout 10" >> ${chroot_dir}/boot/grub/grub.conf
for boot in ${bootloader_install_device}; do
local boot_device="$(get_device_and_partition_from_devnode ${boot} | cut -d '|' -f1)"
local boot_minor="$(get_device_and_partition_from_devnode ${boot} | cut -d '|' -f2)"
- echo "title Gentoo Linux on ${boot_device}" >> ${chroot_dir}/boot/grub/grub.conf
+ echo -e "\ntitle Gentoo Linux on ${boot_device}" >> ${chroot_dir}/boot/grub/grub.conf
local grub_device="$(map_device_to_grub_device ${boot_device})"
if [ -z "${grub_device}" ]; then
error "could not map boot device ${boot_device} to grub device"
return 1
fi
- echo -en "root (${grub_device},$(expr ${boot_minor} - 1))\nkernel /boot/kernel " >> ${chroot_dir}/boot/grub/grub.conf
- echo -e "root=${root}\n" >> ${chroot_dir}/boot/grub/grub.conf
+ echo -e "root (${grub_device},$(expr ${boot_minor} - 1))" >> ${chroot_dir}/boot/grub/grub.conf
+ echo -e "kernel /boot/kernel root=${root} ro quiet dolvm\n" >> ${chroot_dir}/boot/grub/grub.conf
+ echo -e "initrd /boot/initramfs\n" >> ${chroot_dir}/boot/grub/grub.conf
done
for boot in ${bootloader_install_device}; do
View
@@ -216,7 +216,8 @@ build_kernel() {
spawn_chroot "emerge -n genkernel" || die "could not emerge genkernel"
if [ -n "${kernel_config_uri}" ]; then
fetch "${kernel_config_uri}" "${chroot_dir}/tmp/kconfig" || die "could not fetch kernel config"
- spawn_chroot "genkernel --kernel-config=/tmp/kconfig --symlink ${genkernel_opts} kernel" || die "could not build custom kernel"
+ local opts="--no-ramdisk-modules --no-splash --no-keymap --lvm --mdadm ${genkernel_opts}"
+ spawn_chroot "genkernel --kernel-config=/tmp/kconfig --install --symlink ${opts} all" || die "could not build custom kernel"
else
debug build_kernel "no kernel_config_uri ...skipping kernel build"
fi

0 comments on commit c925f5e

Please sign in to comment.