SVN: livecd/mklive/templates/initrd/init

2011-07-23 Thread qwiat
Author: qwiat
Date: Sat Jul 23 08:34:43 2011
New Revision: 12269

Modified:
   livecd/mklive/templates/initrd/init
Log:
- added support for pendrive


Modified: livecd/mklive/templates/initrd/init
==
--- livecd/mklive/templates/initrd/init (original)
+++ livecd/mklive/templates/initrd/init Sat Jul 23 08:34:43 2011
@@ -53,13 +53,13 @@
 kernel_rel=$(uname -r)
 echo Kernel: $kernel_rel
 echo Loading basic modules...
-load_module crc16 crc-t10dif loop isofs squashfs aufs
+load_module crc16 crc-t10dif loop isofs squashfs aufs vfat nls_iso8859-1 
nls_cp437
 echo Loading hardware modules...
-load_module cdrom scsi_mod sg sr_mod scsi_wait_scan usbhid hid usbcore 
usb-storage ehci-hcd ohci-hcd uhci-hcd xhci-hcd
+load_module cdrom scsi_mod sg sr_mod sd_mod scsi_wait_scan usbhid hid usbcore 
usb-storage ehci-hcd ohci-hcd uhci-hcd xhci-hcd usb-libusual
 rmmod scsi_wait_scan
 is_module_loaded aufs  echo AUFS enabled || load_module unionfs
 
-# Loading hostadapter modules
+# Loading hostadapterl modules
 if [ -z $loadAllModules ] 
 then 
echo Detecting host adapter device...
@@ -90,22 +90,21 @@
 cdrom_mnt=/mnt/cdrom
 live_root=/mnt/liveroot
 union_dir=/mnt/newroot
-mount tmpfs $tmpfs_dir -t tmpfs -o noatime
+mount tmpfs $tmpfs_dir -t tmpfs -o noatime,nodiratime
 
-# Mounting CD-ROM
-cdrom_devices=$(echo /dev/sr*)
-[ -z $cdrom_devices ]  echo Error: Not found any usable CD-ROM block 
device  run_debug_shell
-echo Detected CD-ROM devices: $cdrom_devices
-for cdrom_dev in $cdrom_devices
-do
-   mount -t iso9660 $cdrom_dev $cdrom_mnt  echo Mounted device: 
$cdrom_dev  break
-done
+# Mounting device
+sleep 1
+echo Available block devices:
+blkid
+read MNTLABEL  /DEV_LABEL || echo Did you used most recent verions of mklive 
script?
+echo Mounting device with label: $MNTLABEL
+mount LABEL=$MNTLABEL $cdrom_mnt  debug Device with label $MNTLABEL 
mounted to $cdrom_mnt
 mount | grep -q \ $cdrom_mnt\ 
 [ $? -ne 0 ]  echo Fatal: CD-ROM device not mounted  run_debug_shell
 
 # Mounting squashfs
 echo Mounting Live.th rootfs
-mount $cdrom_mnt/live_rootfs.sqsh $live_root -o loop \
+mount $cdrom_mnt/live_rootfs.sqsh $live_root -o loop,noatime,nodiratime \
|| ( echo Mounting live rootfs to $live_root failed  
run_debug_shell )
 
 # Mounting Union FileSystem
___
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit


SVN: livecd/mklive/templates: initrd/init isolinux/help.msg

2011-05-07 Thread qwiat
Author: qwiat
Date: Sat May  7 10:03:47 2011
New Revision: 12239

Modified:
   livecd/mklive/templates/initrd/init
   livecd/mklive/templates/isolinux/help.msg
Log:
- added new arg that allow loading all hardware modules


Modified: livecd/mklive/templates/initrd/init
==
--- livecd/mklive/templates/initrd/init (original)
+++ livecd/mklive/templates/initrd/init Sat May  7 10:03:47 2011
@@ -15,6 +15,16 @@
 {
lsmod | grep -q ^$1\ 
 }
+load_all_drv_modules()
+{
+   find /lib/modules/$kernel_rel/kernel/drivers/ -name \*.ko \
+   | while read module_path
+   do
+   modprobe $module_path \
+debug loaded module: $module_path \
+   || echo Error: module $module_path not loaded!
+   done
+}
 run_debug_shell()
 {
echo Processing initrd interrupted, dropping to shell.
@@ -32,29 +42,43 @@
 for arg in $@
 do
[ $arg = 'debuginitrd' ]  debugmode=1
+   [ $arg = 'allmodules' ]  loadAllModules=1
 done
 
 mount -t proc  none /proc
 mount -t sysfs none /sys
 echo 0 /proc/sys/kernel/printk # shut up!
 
-# Loading kernel modules
+# Loading basic kernel modules
 kernel_rel=$(uname -r)
 echo Kernel: $kernel_rel
 echo Loading basic modules...
-load_module crc16 crc-t10dif loop isofs squashfs
+load_module crc16 crc-t10dif loop isofs squashfs aufs
 echo Loading hardware modules...
 load_module cdrom scsi_mod sg sr_mod scsi_wait_scan usbhid hid usbcore 
usb-storage ehci-hcd ohci-hcd uhci-hcd xhci-hcd
 rmmod scsi_wait_scan
 is_module_loaded aufs  echo AUFS enabled || load_module unionfs
 
-echo Detecting host adapter device...
-pci_modules=$(/bin/pcimodules)
-[ -z $pci_modules ]  echo Error: No host adapter modules found
-for module in $pci_modules
-do
-   load_module $module
-done
+# Loading hostadapter modules
+if [ -z $loadAllModules ] 
+then 
+   echo Detecting host adapter device...
+   pci_modules=$(/bin/pcimodules)
+   if [ ! -z $pci_modules ]
+   then
+   for module in $pci_modules
+   do
+   load_module $module
+   done
+   else
+   echo Error: No host adapter modules detected
+   echo Loading all modules...
+   load_all_drv_modules
+   fi
+else
+   echo Loading all modules...
+   load_all_drv_modules
+fi
 
 echo 'Starting udev daemon'
 /bin/udevd --daemon

Modified: livecd/mklive/templates/isolinux/help.msg
==
--- livecd/mklive/templates/isolinux/help.msg   (original)
+++ livecd/mklive/templates/isolinux/help.msg   Sat May  7 10:03:47 2011
@@ -7,6 +7,6 @@
  noapicDisable the Advanced Programmable Interrupt Controller
  noacpiThis parameter disables the whole ACPI system
  debuginitrd   Run debug shell after initrd process
-
+ allmodulesDon't use autodetection, load all hardware modules instead.
 
 press any key to return to menu
___
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit