--- alx-src/trunk/alxinstall-ng/bin/alxinstall-ng.sh.in 2011/07/04 18:24:30 2557 +++ alx-src/trunk/alxinstall-ng/bin/alxinstall-ng.sh.in 2011/07/04 21:24:46 2573 @@ -532,7 +532,7 @@ { local my_roothdd local grubconf=${INSTALLPATH}/boot/grub/grub.conf - local grub2conf=${INSTALLPATH}/boot/grub/grub.cfg + local grub2conf=/boot/grub/grub.cfg # check for grub2 if [[ -f ${INSTALLPATH}/sbin/grub-mkconfig ]] @@ -540,19 +540,20 @@ # needed by grub-mkconfig on the first run if [[ ! -f ${INSTALLPATH}/boot/grub/video.lst ]] then - install -m0644 ${INSTALLPATH}/lib/grub/*/video.lst /boot/grub/video.lst || die + install -m0644 ${INSTALLPATH}/lib/grub/*/video.lst ${INSTALLPATH}/boot/grub/video.lst || die fi # set kernelopts if [[ -f ${INSTALLPATH}/etc/conf.d/grub ]] then - sed -i "s:^\(export GRUB_CMDLINE_LINUX_DEFAULT\)=.*:\1\"${KERNELOPTS}\":" ${INSTALLPATH}/etc/conf.d/grub || die + sed -i "s:^\(export GRUB_CMDLINE_LINUX_DEFAULT=\).*:\1\"${KERNELOPTS}\":" ${INSTALLPATH}/etc/conf.d/grub || die else echo "export GRUB_CMDLINE_LINUX_DEFAULT=\"${KERNELOPTS}\"" > ${INSTALLPATH}/etc/conf.d/grub || die fi - echo 'grub-mkdevicemap' > ${INSTALLPATH}/root/.bashrc || die - echo "LC_ALL=C grub-mkconfig -o ${grub2conf}" >> ${INSTALLPATH}/root/.bashrc || die - echo "grub-install --no-floppy ${HDD}" >> ${INSTALLPATH}/root/.bashrc || die + echo 'grub-mkdevicemap' > ${INSTALLPATH}/root/.installrc || die + echo "LC_ALL=C grub-mkconfig -o ${grub2conf} &> /dev/null" >> ${INSTALLPATH}/root/.installrc || die + echo "grub-install --no-floppy ${HDD} &> /dev/null" >> ${INSTALLPATH}/root/.installrc || die + echo "exit 0" >> ${INSTALLPATH}/root/.installrc || die # grub-legacy else @@ -618,7 +619,7 @@ fi # bootsector schreiben chrooted schreiben (lfs/magellan) - cat > ${INSTALLPATH}/root/.bashrc << CHROOTEOF + cat > ${INSTALLPATH}/root/.installrc << CHROOTEOF /usr/sbin/grub --no-floppy --batch << "EOF" 1> /dev/null 2> /dev/null root (hd0,0) setup (hd0) @@ -632,11 +633,11 @@ mount -t proc proc ${INSTALLPATH}/proc mount -t sysfs sysfs ${INSTALLPATH}/sys mount -o bind /dev ${INSTALLPATH}/dev - chroot ${INSTALLPATH} /bin/bash --rcfile /root/.bashrc -i + chroot ${INSTALLPATH} /bin/bash --rcfile /root/.installrc -i umount ${INSTALLPATH}/proc umount ${INSTALLPATH}/sys umount ${INSTALLPATH}/dev - rm ${INSTALLPATH}/root/.bashrc + rm ${INSTALLPATH}/root/.installrc } is_initrd_supported() @@ -651,8 +652,19 @@ # only generate initrds if the cmd exists is_initrd_supported || return 0 - cat > ${INSTALLPATH}/root/.bashrc << CHROOTEOF -echo "MODULES=\"${FORMAT_FILESYSTEM} amd74xx piix sis5513 via82cxxx sd_mod ata_piix pata_amd pata_mpiix pata_oldpiix pata_sis pata_via sata_via sata_sis sata_nv\"" > /etc/conf.d/mkinitrd + DISKMODS="sd_mod" + OLDPATAMODS="amd74xx piix sis5513 via82cxxx" + PATAMODS="ata_piix pata_amd pata_mpiix pata_oldpiix pata_sis pata_via" + SATAMODS="sata_via sata_sis sata_nv" + DRMMODS="i915 mga nouveau r128 radeon savage sis tdfx ttm via" + FBMODS="uvesafb" + + # install an appropriate uvesafb.conf + install -d ${INSTALLPATH}/etc/modprobe.d || die + echo "options uvesafb mode_option=1024x768-32@60 scroll=ywrap" > ${INSTALLPATH}/etc/modprobe.d/uvesafb.conf || die + + cat > ${INSTALLPATH}/root/.installrc << CHROOTEOF +echo "MODULES=\"${FORMAT_FILESYSTEM} ${DISKMODS} ${OLDATAMODS} ${PATAMODS} ${SATAMODS} ${DRMMODS} ${FBMODS}\"" > /etc/conf.d/mkinitrd mkinitrd -f /boot/$(readlink /boot/initrd) $(readlink /boot/vmlinuz | sed "s:kernel-::g") > /dev/null exit 0 CHROOTEOF @@ -661,11 +673,11 @@ mount -t proc proc ${INSTALLPATH}/proc mount -t sysfs sysfs ${INSTALLPATH}/sys mount -o bind /dev ${INSTALLPATH}/dev - chroot ${INSTALLPATH} /bin/bash --rcfile /root/.bashrc -i + chroot ${INSTALLPATH} /bin/bash --rcfile /root/.installrc -i umount ${INSTALLPATH}/proc umount ${INSTALLPATH}/sys umount ${INSTALLPATH}/dev - rm ${INSTALLPATH}/root/.bashrc + rm ${INSTALLPATH}/root/.installrc } is_uuid_supported()