Magellan Linux

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

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

revision 663 by niro, Mon Jan 14 19:32:52 2008 UTC revision 757 by niro, Thu Jun 26 23:04: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.3 2008-01-14 19:32:52 niro Exp $  # $Header: /home/cvsd/magellan-cvs/magellan-src/mkinitrd-magellan/livecd/linuxrc.sh,v 1.9 2008-06-26 23:04:52 niro Exp $
3    
4  # loads given kernel modules  # loads given kernel modules
5  load_kernel_modules()  load_kernel_modules()
# Line 57  DOSCSI=no Line 57  DOSCSI=no
57  DOUSB=no  DOUSB=no
58  DOSATA=no  DOSATA=no
59  DOFB=no  DOFB=no
60  NOPATA=no  DOPATA=no
61  FORCED_ROOTFS=""  FORCED_ROOTFS=""
62    
63  ## starts here ##  ## starts here ##
# Line 85  do Line 85  do
85   dofb)   dofb)
86   DOFB=yes   DOFB=yes
87   ;;   ;;
88   nopata)   dopata)
89   NOPATA=yes   DOPATA=yes
90   ;;   ;;
91   rootfs=*)   rootfs=*)
92   shift   FORCED_ROOTFS="${i#*=}"
  FORCED_ROOTFS="${1#*=}"  
93   ;;   ;;
94   esac   esac
95  done  done
96    
97  # now load all needed modules  # now load all needed modules
98    [ "${DOFB}" = "yes" ] && load_kernel_modules "framebuffer"
99  load_kernel_modules "generic"  load_kernel_modules "generic"
100  [ "${NOPATA}" != "yes" ] && load_kernel_modules "pata"  [ "${DOPATA}" = "yes" ] && load_kernel_modules "pata"
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"
 [ "${DOFB}" = "yes" ] && load_kernel_modules "framebuffer"  
104    
105  # create newroot mount point  # create newroot mount point
106  mkdir -p /sysroot  mkdir -p /sysroot
# Line 128  echo "Searching for a boot device ..." Line 127  echo "Searching for a boot device ..."
127  # searching usbstick  # searching usbstick
128  if [ "${DOUSB}" = "yes" ]; then  if [ "${DOUSB}" = "yes" ]; then
129   ROOTFS="vfat"   ROOTFS="vfat"
130   [[ -n ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}"   [[ ! -z ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}"
131   check_drives "/dev/sd*" "${ROOTFS}"   check_drives "/dev/sd*" "${ROOTFS}"
132   check_drives "/dev/sg*" "${ROOTFS}"   check_drives "/dev/sg*" "${ROOTFS}"
133  fi  fi
134    
135  # for cdrom_device in $CDROM_LIST (ide)  # for cdrom_device in $CDROM_LIST (ide)
136  ROOTFS="iso9660"  ROOTFS="iso9660"
137  [[ -n ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}"  [[ ! -z ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}"
138  check_drives "/dev/cdroms/*" "${ROOTFS}"  check_drives "/dev/cdroms/*" "${ROOTFS}"
139  check_drives "/dev/hd*" "${ROOTFS}"  check_drives "/dev/hd*" "${ROOTFS}"
140    
141  # scsi cdroms  # scsi cdroms
142  if [ "${DOSCSI}" = "yes" ] || [ "${DOSATA}" = "yes" ]; then  if [ "${DOSCSI}" = "yes" ] || [ "${DOSATA}" = "yes" ]; then
143   ROOTFS="iso9660"   ROOTFS="iso9660"
144   [[ -n ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}"   [[ ! -z ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}"
145   check_drives "/dev/sr*" "${ROOTFS}"   check_drives "/dev/sr*" "${ROOTFS}"
146   check_drives "/dev/sg*" "${ROOTFS}"   check_drives "/dev/sg*" "${ROOTFS}"
147   check_drives "/dev/scd*" "${ROOTFS}"   check_drives "/dev/scd*" "${ROOTFS}"
# Line 180  else Line 179  else
179   # make /sysroot/dev/console & /mnt/dev/null   # make /sysroot/dev/console & /mnt/dev/null
180   [ ! -e /sysroot/dev/console ] && mknod -m 600 /sysroot/dev/console c 5 1   [ ! -e /sysroot/dev/console ] && mknod -m 600 /sysroot/dev/console c 5 1
181   [ ! -e /sysroot/dev/null ] && mknod -m 666 /sysroot/dev/null c 1 3   [ ! -e /sysroot/dev/null ] && mknod -m 666 /sysroot/dev/null c 1 3
182     # only to be safe and to have a log channel
183     [ ! -e /sysroot/dev/tty ] && mknod /sysroot/dev/tty c 5 0
184     # busybox needs this one
185     [ ! -e /sysroot/dev/tty5 ] && mknod /sysroot/dev/tty5 c 4 5
186    
187   (cd /sysroot/mnt/cloop; cp -a etc root home var /sysroot)   (cd /sysroot/mnt/cloop; cp -a etc root home var /sysroot)
188    

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