--- trunk/mkinitrd-magellan/livecd/linuxrc.sh 2007/11/10 19:56:21 605 +++ trunk/mkinitrd-magellan/livecd/linuxrc.sh 2008/01/14 19:32:52 663 @@ -1,5 +1,5 @@ #!/bin/sh -# $Header: /home/cvsd/magellan-cvs/magellan-src/mkinitrd-magellan/livecd/linuxrc.sh,v 1.2 2007-11-10 19:56:21 niro Exp $ +# $Header: /home/cvsd/magellan-cvs/magellan-src/mkinitrd-magellan/livecd/linuxrc.sh,v 1.3 2008-01-14 19:32:52 niro Exp $ # loads given kernel modules load_kernel_modules() @@ -45,7 +45,7 @@ then echo -e "Magellan boot device found." BOOT_DEVICE="${dev}" - FSTYPE=${fs} + FSTYPE="${fs}" break fi fi @@ -56,7 +56,9 @@ DOSCSI=no DOUSB=no DOSATA=no +DOFB=no NOPATA=no +FORCED_ROOTFS="" ## starts here ## @@ -80,9 +82,16 @@ dosata) DOSATA=yes ;; + dofb) + DOFB=yes + ;; nopata) NOPATA=yes ;; + rootfs=*) + shift + FORCED_ROOTFS="${1#*=}" + ;; esac done @@ -92,6 +101,7 @@ [ "${DOSCSI}" = "yes" ] && load_kernel_modules "scsi" [ "${DOUSB}" = "yes" ] && load_kernel_modules "usb" [ "${DOSATA}" = "yes" ] && load_kernel_modules "sata" +[ "${DOFB}" = "yes" ] && load_kernel_modules "framebuffer" # create newroot mount point mkdir -p /sysroot @@ -117,19 +127,25 @@ # searching usbstick if [ "${DOUSB}" = "yes" ]; then - check_drives "/dev/sd*" "vfat" - check_drives "/dev/sg*" "vfat" + ROOTFS="vfat" + [[ -n ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}" + check_drives "/dev/sd*" "${ROOTFS}" + check_drives "/dev/sg*" "${ROOTFS}" fi # for cdrom_device in $CDROM_LIST (ide) -check_drives "/dev/cdroms/*" iso9660 -check_drives "/dev/hd*" iso9660 +ROOTFS="iso9660" +[[ -n ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}" +check_drives "/dev/cdroms/*" "${ROOTFS}" +check_drives "/dev/hd*" "${ROOTFS}" # scsi cdroms if [ "${DOSCSI}" = "yes" ] || [ "${DOSATA}" = "yes" ]; then - check_drives "/dev/sr*" iso9660 - check_drives "/dev/sg*" iso9660 - check_drives "/dev/scd*" iso9660 + ROOTFS="iso9660" + [[ -n ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}" + check_drives "/dev/sr*" "${ROOTFS}" + check_drives "/dev/sg*" "${ROOTFS}" + check_drives "/dev/scd*" "${ROOTFS}" fi # mount our rootfs from cdrom