--- alx-src/trunk/alxinstall-ng/bin/alxinstall-ng.sh 2008/06/27 23:31:48 525 +++ alx-src/trunk/alxinstall-ng/bin/alxinstall-ng.sh 2008/06/28 00:37:45 531 @@ -1,6 +1,6 @@ #!/bin/sh # -# $Header: /home/cvsd/alx-cvs/alx-src/alxinstall-ng/bin/alxinstall-ng.sh,v 1.11 2008-06-27 23:31:48 niro Exp $ +# $Header: /home/cvsd/alx-cvs/alx-src/alxinstall-ng/bin/alxinstall-ng.sh,v 1.15 2008-06-28 00:37:45 niro Exp $ # # AutoSta_LX Installation Script # @@ -21,7 +21,7 @@ ######################################## ### System/Config Version -VERSION="0.3" +VERSION="0.3.1" TITLE="alxinstall-ng - ${VERSION}" CDPATH="/mnt/cdrom" @@ -418,14 +418,31 @@ setup (hd0) quit EOF -echo "MODULES=\"ext3 amd74xx piix sis5513 via82cxxx\" > /etc/conf.d/mkinitrd -mkinitrd -f /boot/$(readlink /boot/initrd) $(readlink /boot/vmlinuz | sed "s:kernel-::g") exit 0 CHROOTEOF ## enters chroot mount -t proc proc ${INSTALLPATH}/proc - mount -t sysfs sysfs ${INSTALLPATH}/sysfs + mount -t sysfs sysfs ${INSTALLPATH}/sys + mount -o bind /dev ${INSTALLPATH}/dev + chroot ${INSTALLPATH} /bin/bash --rcfile /root/.bashrc -i + umount ${INSTALLPATH}/proc + umount ${INSTALLPATH}/sys + umount ${INSTALLPATH}/dev + rm ${INSTALLPATH}/root/.bashrc +} + +install_mkinitrd_chroot() +{ + cat > ${INSTALLPATH}/root/.bashrc << CHROOTEOF +echo "MODULES=\"ext3 amd74xx piix sis5513 via82cxxx\"" > /etc/conf.d/mkinitrd +mkinitrd -f /boot/$(readlink /boot/initrd) $(readlink /boot/vmlinuz | sed "s:kernel-::g") > /dev/null +exit 0 +CHROOTEOF + + ## enters chroot + 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 umount ${INSTALLPATH}/proc @@ -442,6 +459,9 @@ echo -e "${SWAPHDD}\tswap\tswap\tpri=1\t0 0" >> ${INSTALLPATH}/etc/fstab || die echo -e "proc\t/proc\tproc\tdefaults\t0 0" >> ${INSTALLPATH}/etc/fstab || die echo -e "shm\t/dev/shm\ttmpfs\tdefaults\t0 0" >> ${INSTALLPATH}/etc/fstab || die + + # install network config skeleton + install -m0644 ${INSTALLPATH}/etc/alxconfig-ng/skel/net/net.eth0 ${INSTALLPATH}/etc/conf.d/ || die } install_system_settings_flash() @@ -491,6 +511,7 @@ dialog_install_settings sleep 1 install_system_settings + install_mkinitrd_chroot install_umount_rootfs dialog_install_successful } @@ -511,6 +532,7 @@ dialog_install_settings sleep 1 install_system_settings_flash + install_mkinitrd_chroot install_umount_rootfs_flash dialog_install_successful }