Changeset 3360 in MondoRescue


Ignore:
Timestamp:
Mar 7, 2015, 2:41:11 PM (9 years ago)
Author:
Bruno Cornec
Message:

Backports from 3.2 (rev 3336-3359):

  • Improve kernel 3.14+ detection for initramfs
  • Fix installation of parted2fdisk under rootfs by removing useless -s option of install
  • Remove usage of internal function basename in parted2fdisk use File::Basename instead
Location:
branches/3.0/mindi
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mindi/install.sh

    r3319 r3360  
    112112# Managing parted2fdisk
    113113if [ "$ARCH" = "ia64" ] ; then
    114     (cd $SBINDIR && ln -sf parted2fdisk.pl parted2fdisk)
    115     install -s -m 755 $SBINDIR/parted2fdisk.pl $locallib/mindi/rootfs/sbin/parted2fdisk
     114    (cd $SBINDIR && ln -sf parted2fdisk.pl parted2fdisk && install -m 755 $SBINDIR/parted2fdisk.pl $locallib/mindi/rootfs/sbin/parted2fdisk
    116115else
    117116    # FHS requires fdisk under /sbin
  • branches/3.0/mindi/mindi

    r3347 r3360  
    733733    local lcMagicExt2fs="EXT2-fs: blocksize too small for device."
    734734    local lcMagicExt3fs="<3>EXT3-fs: blocksize too small for journal device."
    735     local lcMagicInitfs="<6>checking if image is initramfs...|[<]*6[>]*Unpacking initramfs...|<6>Trying to unpack rootfs image as initramfs"
     735    local lcMagicInitfs="<6>checking if image is initramfs...|[<]*6[>]*Unpacking initramfs...|[<]*6[>]*Trying to unpack rootfs image as initramfs"
    736736
    737737    # local variables
     
    25542554
    25552555TurnTgzIntoRdz() {
    2556     local tgz_dir_fname rdz_fname tempfile mountpoint old_pwd nodes kernelsize maxsize res currsize not_copied j k s w needed_modules_path
     2556    local tgz_dir_fname rdz_fname tempfile mountpoint old_pwd nodes kernelsize maxsize res currsize not_copied j k s w needed_modules_path d thelink
    25572557
    25582558    tgz_dir_fname=$1
     
    25912591        fi
    25922592    done
     2593
    25932594    LogFile "INFO: what is now in $mountpoint"
    25942595    ls -alR $mountpoint >> $LOGFILE
    25952596   
    25962597    # Check files before copying to discover configuration issues or McAfee preventing mindi reading these files
     2598    # copy from rootfs into mountpoint
    25972599    for f in $tgz_dir_fname/*; do
    25982600        if [ ! -r $f ]; then
     
    26022604        fi
    26032605    done
     2606    (cd etc ; ln -sf bashrc profile ; ln -sf bashrc shrc ; ln -sf ../proc/mounts mtab ; ln -sf ../sbin/init linuxrc)
     2607    ln -sf sbin/init linuxrc
    26042608    tar -zxf symlinks.tgz || Die "Cannot untar symlinks.tgz"
    26052609
     
    26192623   
    26202624    # Copy of files mandatory for ssh to automate mount if sshfs is used
    2621     mkdir $mountpoint/.ssh
     2625    mkdir -p $mountpoint/.ssh $mountpoint/tmp
    26222626    cp -a ~root/.ssh/* $mountpoint/.ssh 2> /dev/null
    26232627    cat > $mountpoint/tmp/myssh << EOF
  • branches/3.0/mindi/parted2fdisk.pl

    r3336 r3360  
    44#
    55# parted2fdisk: fdisk like interface for parted
    6 # [developped for mindi/mondo http://www.mondorescue.org]
     6# [developed for mindi/mondo http://www.mondorescue.org]
    77#
    88# Aims to be architecture independant (i386/ia64)
    99# Tested on ia64 with RHAS 2.1 - Mandrake 9.0 - RHEL 3.0 - SLES 10
    1010#
    11 # Copyright B. Cornec 2000-2013
     11# Copyright B. Cornec 2000-2015
    1212# Provided under the GPL v2
    1313
    1414use strict;
     15use File::Basename;
    1516
    1617
     
    1920=head1 NAME
    2021
    21 parted2fdisk is a fdisk lie command using parted internally.
     22parted2fdisk is a fdisk like command using parted internally.
    2223
    2324=head1 DESCRIPTION
    2425
    25 parted2fdisk behaves like a fdisk command, but dialog internally with parted in order to manipulate partiion tables, which allow it to support GPT partition format as well as MBR, contrary to fdisk. It aimed at providing compatible external interface wti fdisk. Developed initialy for ia64 Linux, but is also useful now on x86 systems using GPT partition format (for large HDDs).
     26parted2fdisk behaves like the fdisk command, but dialog internally with parted in order to manipulate partition tables, which allow it to support GPT partition format as well as MBR, contrary to fdisk. It aims at providing compatible external interface with fdisk. Developed initialy for ia64 Linux, it is also useful now on x86 systems using GPT partition format (for large HDDs).
    2627
    2728=head1 SYNOPSIS
     
    9697
    9798my $fdisk = "/sbin/fdisk";
     99$fdisk = "/usr/sbin/fdisk" if (not -x "/sbin/fdisk");
    98100my $parted = "/sbin/parted";
     101$parted = "/usr/sbin/parted" if (not -x "/sbin/parted");
    99102
    100103my $i;
     
    156159        "linux-swap" => "82",
    157160        "lvm" => "8e",
     161        "raid" => "fd",
    158162        "" => "",
    159163    );
     
    435439        "linux-swap" => "Linux swap",
    436440        "lvm" => "Linux LVM",
     441        "raid" => "RAID Linux auto",
    437442        "fat16" => "fat16",
    438443        "fat32" => "fat32",
     
    479484
    480485# This will return MB
    481 get_parted ($device,$start,$end,\%type);
     486get_parted($device,$start,$end,\%type);
    482487
    483488while (($n,$d) = each %type) {
     
    675680}
    676681
    677 
    678 # Based on Version 2.4  27-Sep-1996  Charles Bailey  bailey@genetics.upenn.edu
    679 # in Basename.pm
    680 
    681 sub basename {
    682 
    683 my($fullname) = shift;
    684 
    685 my($dirpath,$basename);
    686 
    687 ($dirpath,$basename) = ($fullname =~ m#^(.*/)?(.*)#s);
    688 
    689 return($basename);
    690 }
    691 
    692682sub myexit {
    693683
  • branches/3.0/mindi/rootfs/sbin/find-and-mount-cdrom

    r2878 r3360  
    11#!/bin/sh
    2 
     2#
     3# $Id$
     4#
    35
    46TryToFindCDROM() {
Note: See TracChangeset for help on using the changeset viewer.