Magellan Linux

Diff of /trunk/mkinitrd-magellan/livecd/linuxrc.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 662 by niro, Sat Nov 10 19:56:21 2007 UTC revision 663 by niro, Mon Jan 14 19:32:52 2008 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2  # $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 $
3    
4  # loads given kernel modules  # loads given kernel modules
5  load_kernel_modules()  load_kernel_modules()
# Line 45  check_drives() Line 45  check_drives()
45   then   then
46   echo -e "Magellan boot device found."   echo -e "Magellan boot device found."
47   BOOT_DEVICE="${dev}"   BOOT_DEVICE="${dev}"
48   FSTYPE=${fs}   FSTYPE="${fs}"
49   break   break
50   fi   fi
51   fi   fi
# Line 56  check_drives() Line 56  check_drives()
56  DOSCSI=no  DOSCSI=no
57  DOUSB=no  DOUSB=no
58  DOSATA=no  DOSATA=no
59    DOFB=no
60  NOPATA=no  NOPATA=no
61    FORCED_ROOTFS=""
62    
63  ## starts here ##  ## starts here ##
64    
# Line 80  do Line 82  do
82   dosata)   dosata)
83   DOSATA=yes   DOSATA=yes
84   ;;   ;;
85     dofb)
86     DOFB=yes
87     ;;
88   nopata)   nopata)
89   NOPATA=yes   NOPATA=yes
90   ;;   ;;
91     rootfs=*)
92     shift
93     FORCED_ROOTFS="${1#*=}"
94     ;;
95   esac   esac
96  done  done
97    
# Line 92  load_kernel_modules "generic" Line 101  load_kernel_modules "generic"
101  [ "${DOSCSI}" = "yes" ] && load_kernel_modules "scsi"  [ "${DOSCSI}" = "yes" ] && load_kernel_modules "scsi"
102  [ "${DOUSB}" = "yes" ] && load_kernel_modules "usb"  [ "${DOUSB}" = "yes" ] && load_kernel_modules "usb"
103  [ "${DOSATA}" = "yes" ] && load_kernel_modules "sata"  [ "${DOSATA}" = "yes" ] && load_kernel_modules "sata"
104    [ "${DOFB}" = "yes" ] && load_kernel_modules "framebuffer"
105    
106  # create newroot mount point  # create newroot mount point
107  mkdir -p /sysroot  mkdir -p /sysroot
# Line 117  echo "Searching for a boot device ..." Line 127  echo "Searching for a boot device ..."
127    
128  # searching usbstick  # searching usbstick
129  if [ "${DOUSB}" = "yes" ]; then  if [ "${DOUSB}" = "yes" ]; then
130   check_drives "/dev/sd*" "vfat"   ROOTFS="vfat"
131   check_drives "/dev/sg*" "vfat"   [[ -n ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}"
132     check_drives "/dev/sd*" "${ROOTFS}"
133     check_drives "/dev/sg*" "${ROOTFS}"
134  fi  fi
135    
136  # for cdrom_device in $CDROM_LIST (ide)  # for cdrom_device in $CDROM_LIST (ide)
137  check_drives "/dev/cdroms/*" iso9660  ROOTFS="iso9660"
138  check_drives "/dev/hd*" iso9660  [[ -n ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}"
139    check_drives "/dev/cdroms/*" "${ROOTFS}"
140    check_drives "/dev/hd*" "${ROOTFS}"
141    
142  # scsi cdroms  # scsi cdroms
143  if [ "${DOSCSI}" = "yes" ] || [ "${DOSATA}" = "yes" ]; then  if [ "${DOSCSI}" = "yes" ] || [ "${DOSATA}" = "yes" ]; then
144   check_drives "/dev/sr*" iso9660   ROOTFS="iso9660"
145   check_drives "/dev/sg*" iso9660   [[ -n ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}"
146   check_drives "/dev/scd*" iso9660   check_drives "/dev/sr*" "${ROOTFS}"
147     check_drives "/dev/sg*" "${ROOTFS}"
148     check_drives "/dev/scd*" "${ROOTFS}"
149  fi  fi
150    
151  # mount our rootfs from cdrom  # mount our rootfs from cdrom

Legend:
Removed from v.662  
changed lines
  Added in v.663