Changeset 2390 in MondoRescue
- Timestamp:
- Sep 11, 2009, 3:05:20 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi/mindi
r2380 r2390 660 660 local lcMagicCramfs="<3>cramfs: wrong magic" 661 661 local lcMagicExt2fs="EXT2-fs: blocksize too small for device." 662 local lcMagicExt3fs="<3>EXT3-fs: blocksize too small for journal device." 662 663 local lcMagicInitfs="<6>checking if image is initramfs...|<6>Unpacking initramfs...|<6>Trying to unpack rootfs image as 663 664 initramfs" … … 677 678 file $lvKernelImage 2>&1 | grep -q gzip 678 679 if [ $? -eq 0 ]; then 679 lvScanRes=`gzip -cd $lvKernelImage | strings | grep -E "$lcMagicCramfs|$lcMagicExt2fs|$lcMagic Initfs"`680 lvScanRes=`gzip -cd $lvKernelImage | strings | grep -E "$lcMagicCramfs|$lcMagicExt2fs|$lcMagicExt3fs|$lcMagicInitfs"` 680 681 else 681 682 # get offet of gzip magic "1f8b0800" in file … … 686 687 687 688 # scan kernel image for initrd filessystem support 688 lvScanRes=`dd ibs=1 skip=$lvOffset if=$lvKernelImage obs=1M 2>/dev/null | gunzip -c 2> /dev/null | strings | grep -E "$lcMagicCramfs|$lcMagicExt2fs|$lcMagic Initfs"`689 lvScanRes=`dd ibs=1 skip=$lvOffset if=$lvKernelImage obs=1M 2>/dev/null | gunzip -c 2> /dev/null | strings | grep -E "$lcMagicCramfs|$lcMagicExt2fs|$lcMagicExt3fs|$lcMagicInitfs"` 689 690 fi 690 691 … … 692 693 if [ `echo $lvScanRes | grep -Ec "$lcMagicExt2fs"` -eq 1 ]; then 693 694 lvUseFilesystem="ext2fs" 695 elif [ `echo $lvScanRes | grep -Ec "$lcMagicExt3fs"` -eq 1 ]; then 696 lvUseFilesystem="ext3fs" 694 697 elif [ `echo $lvScanRes | grep -Ec "$lcMagicInitfs"` -eq 1 ]; then 695 698 lvUseFilesystem="initramfs" … … 2403 2406 gvFileSystem=`GetInitrdFilesystemToUse ${kernelpath}` 2404 2407 [ -z gvFileSystem ] && Die "GetFilesystemToUse() failed. Terminating." 2405 case "$gvFileSystem" in 2406 "ext2fs") 2408 if [ "$gvFileSystem" = "ext2fs" ] || [ "$gvFileSystem" = "ext3fs" ]; then 2407 2409 # say what will be used 2408 echo "Creating an ext2initrd image..." >> $LOGFILE2410 echo "Creating an $gvFileSystem initrd image..." >> $LOGFILE 2409 2411 # kernel expects linuxrc in ext2 filesystem 2410 2412 ( cd $mountpoint && ln -sf sbin/init linuxrc ) … … 2418 2420 # log that we are done 2419 2421 echo "...done." >> $LOGFILE 2420 ;; 2421 "initramfs") 2422 elif [ "$gvFileSystem" = "initramfs" ]; then 2422 2423 # say what will be used 2423 2424 echo "Creating a gzip'ed cpio (AKA initramfs) initrd image..." >> $LOGFILE … … 2434 2435 # log that we are done 2435 2436 echo "...done." >> $LOGFILE 2436 ;; 2437 *) 2437 else 2438 2438 Die "Filesystem $gvFileSystem not supported for initrd image. Terminating." 2439 ;;2440 esac 2439 fi 2440 2441 2441 if [ "$res" -eq "0" ] ; then 2442 2442 echo -en "..."
Note:
See TracChangeset
for help on using the changeset viewer.