Changeset 3479 in MondoRescue
- Timestamp:
- Oct 16, 2015, 12:14:52 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi/mindi
r3476 r3479 1505 1505 # copy boot stuff now generated in PrepareDataDiskImage 1506 1506 if [ "$BOOT_TYPE" = "UEFI" ]; then 1507 FindLdlinuxe64Binary1508 if [ -e $LDLINUXE64 ]; then1509 cp $LDLINUXE64 $MINDI_TMP/iso/ 2>> $LOGFILE || Die "Cannot copy $LDLINUXE64 to mindi tmp ($MINDI_TMP/iso/). Did you run out of disk space?"1510 fi1511 1507 (cd $MINDI_TMP/iso ; tar xfz $MINDI_CACHE/all.tar.gz ./EFI) 1512 1508 tbc="EFI" 1513 1509 else 1514 # Useful for syslinux 5.x1515 FindLdlinux32Binary1516 if [ -e $LDLINUXC32 ]; then1517 cp $LDLINUXC32 $MINDI_TMP/iso/ 2>> $LOGFILE || Die "Cannot copy $LDLINUXC32 to mindi tmp ($MINDI_TMP/iso/). Did you run out of disk space?"1518 fi1519 1510 (cd $MINDI_TMP/iso ; tar xfz $MINDI_CACHE/all.tar.gz ./boot) 1520 1511 tbc="boot" … … 1526 1517 cp $MBOOTC32 $MONDO_ROOT/ 2>> $LOGFILE || Die "Cannot copy $MBOOTC32 to mondo tmp ($MONDO_ROOT/). Did you run out of disk space?" 1527 1518 fi 1528 if [ -e $LDLINUXC32]; then1519 if [ -e "$LDLINUXC32" ]; then 1529 1520 cp $LDLINUXC32 $MONDO_ROOT/ 2>> $LOGFILE || Die "Cannot copy $LDLINUXC32 to $MONDO_ROOT/. Did you run out of disk space?" 1530 fi1531 if [ -e $LDLINUXE64 ]; then1532 cp $LDLINUXE64 $MONDO_ROOT/ 2>> $LOGFILE || Die "Cannot copy $LDLINUXE64 to $MONDO_ROOT/. Did you run out of disk space?"1533 1521 fi 1534 1522 cp $kernelpath $MONDO_ROOT/vmlinuz 2>> $LOGFILE || Die "Cannot copy $kernelpath to mondo root ($MONDO_ROOT/vmlinuz). Did you run out of disk space?" … … 1543 1531 cp -rf $MINDI_TMP/iso/{initrd.img,vmlinuz,isolinux.bin,message.txt,boot*.txt,pxe.txt,$tbc} $MONDO_ROOT 2>> $LOGFILE || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_ROOT). Did you run out of disk space?" 1544 1532 cfgf=`find $MINDI_TMP/iso -name 'isolinux.cfg' | head -1` 1545 if [ -e $cfgf]; then1533 if [ -e "$cfgf" ]; then 1546 1534 cp $cfgf $MONDO_ROOT 2>> $LOGFILE || Die "Cannot copy $cfgf to $MONDO_ROOT. Did you run out of disk space?" 1547 1535 fi … … 1934 1922 mkdir -p $mountpoint 1935 1923 dd if=/dev/zero of=$imagefile bs=1k count=$BOOT_SIZE &> /dev/null || Die "Cannot dd blank file" 1936 LogFile "INFO: Creating vfat filesystem on $imagefile"1937 mkfs.vfat $imagefile >> $LOGFILE 2>> $LOGFILE1938 1924 if [ "$BOOT_TYPE" = "BIOS" ]; then 1939 1925 # syslinux should be run on a local file (doen't work through NFS Cf: #297) 1940 1926 syslinux $imagefile >> $LOGFILE 2>> $LOGFILE 1941 1927 fi 1928 if [ "$BOOT_TYPE" = "UEFI" ]; then 1929 # Should be GPT in that case to allow direct boot 1930 parted -s $imagefile mklabel gpt 1931 fi 1932 LogFile "INFO: Creating vfat filesystem on $imagefile" 1933 mkfs.vfat $imagefile >> $LOGFILE 2>> $LOGFILE 1942 1934 1943 1935 # Only move it now to its final destination and use it now … … 2199 2191 umount /boot/efi 2>&1 > /dev/null 2200 2192 fi 2201 fi 2193 2194 FindLdlinuxe64Binary 2195 if [ -e "$LDLINUXE64" ]; then 2196 LogFile "INFO: Copying $LDLINUXE64 to $efidir" 2197 cp $LDLINUXE64 $efidir 2>> $LOGFILE || Die "Cannot copy $LDLINUXE64 to $efidir). Did you run out of disk space?" 2198 fi 2199 else 2200 # Useful for syslinux 5.x 2201 FindLdlinux32Binary 2202 if [ -e "$LDLINUXC32" ]; then 2203 LogFile "INFO: Copying $LDLINUXC32 to $bootdir" 2204 cp $LDLINUXC32 $bootdir 2>> $LOGFILE || Die "Cannot copy $LDLINUXC32 to $bootdir). Did you run out of disk space?" 2205 fi 2206 fi 2207 2202 2208 MakeBootConfFile $boottype > $bootconf 2203 2209 … … 2564 2570 # recent bash says that -d is true for a link to a dir ! 2565 2571 for f in `sort -u $MINDI_TMP/minimal.lis`; do 2566 if [ -e $f -a ! -d $f] || [ -h $f ]; then2572 if [ -e "$f" -a ! -d "$f" ] || [ -h $f ]; then 2567 2573 # Do not overwrite files already in destination (avoid using option -n of cp not portable) 2568 2574 if [ ! -e "$mountpoint/$f" ]; then … … 2583 2589 2584 2590 # For older distributions expecting /sbin/init provides it 2585 if [ ! -e sbin/init]; then2591 if [ ! -e "sbin/init" ]; then 2586 2592 (cd sbin ; ln -sf ../usr/sbin/init .) 2587 2593 fi … … 2647 2653 # recent bash says that -d is true for a link to a dir ! 2648 2654 for f in `sort -u $MINDI_TMP/udev.lis`; do 2649 if [ -e $f -a ! -d $f ] || [ -h $f]; then2655 if [ -e "$f" -a ! -d "$f" ] || [ -h "$f" ]; then 2650 2656 # Do not overwrite files already in destination (avoid using option -n of cp not portable) 2651 2657 if [ ! -e "$mountpoint/$f" ]; then … … 2761 2767 2762 2768 # Ensure that with mindi-busybox 1.21, the links also exists under /bin for older distro which need it for their scripts 2763 (cd $mountpoint/usr/bin ; for i in `ls`; do if [ ! -e $mountpoint/bin/$i]; then (cd $mountpoint/bin ; ln -sf ../usr/bin/$i .); fi; done)2769 (cd $mountpoint/usr/bin ; for i in `ls`; do if [ ! -e "$mountpoint/bin/$i" ]; then (cd $mountpoint/bin ; ln -sf ../usr/bin/$i .); fi; done) 2764 2770 2765 2771 # Copy an additional ProLiant tool for OBDR support … … 3005 3011 LogFile "-------------" 3006 3012 mount >> $LOGFILE 3007 if [ -e /etc/raidtab]; then3013 if [ -e "/etc/raidtab" ]; then 3008 3014 LogFile "-------------" 3009 3015 LogFile "/etc/raidtab content:" … … 3013 3019 LogFile "No file /etc/raidtab" 3014 3020 fi 3015 if [ -e /etc/mdadm.conf]; then3021 if [ -e "/etc/mdadm.conf" ]; then 3016 3022 LogFile "-------------" 3017 3023 LogFile "/etc/mdadm.conf content:" … … 3031 3037 cat /proc/swaps >> $LOGFILE 3032 3038 LogFile "-------------" 3033 if [ -e /proc/mdstat]; then3039 if [ -e "/proc/mdstat" ]; then 3034 3040 LogFile "cat /proc/mdstat:" 3035 3041 LogFile "-------------"
Note:
See TracChangeset
for help on using the changeset viewer.