<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi everybody,
    <br>
    I would like to install my Debian ISO built with simple-cdd both
    from Cd and Usb Stick.
    <br>
    I have successfully created the usb stick and preseeded all the
    questions.
    <br>
    What I would like to do now is to execute some post-installation
    scripts that access extra_files that are into simple_cdd folder on
    the ISO.
    <br>
    So I've created a myprofile.postinst file and give it execution
    rights. Running from cd, no problem, I've just mounted the cd rom
    with
    <br>
    mount /dev/cdrom /cdrom
    <br>
    <br>
    What I can't do is to access these files when I'm running on the usb
    stick, and this is what I've tried:
    <br>
    <br>
    <br>
    mount -v /dev/cdrom /cdrom &gt;&gt; $INSTALL_LOG&nbsp;&nbsp;&nbsp; #tries to mount
    cdrom
    <br>
    <br>
    if [ ! -e /cdrom/debian ]; then&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #if it fails try with the usb
    stick
    <br>
    &nbsp;&nbsp;&nbsp; echo "Mount of stick" &gt;&gt; $INSTALL_LOG
    <br>
    &nbsp;&nbsp;&nbsp; mkdir -p /mnt/pendrive
    <br>
    &nbsp;&nbsp;&nbsp; umount /cdrom
    <br>
    &nbsp;&nbsp;&nbsp; # Partitions to test
    <br>
    &nbsp;&nbsp;&nbsp; DEVICES="sda1 sda2 sdb1 sdb2 sdc1 sdc2 sdd1 sdd2 sde1 sde2"
    <br>
    <br>
    &nbsp;&nbsp;&nbsp; for $dev in $DEVICES; do
    <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # tries partition's mount
    <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "try to mount "$dev &gt;&gt; $INSTALL_LOG
    <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mount -v <i class="moz-txt-slash"><span class="moz-txt-tag">/</span>dev<span
        class="moz-txt-tag">/</span></i>$dev /mnt/pendrive &gt;&gt;
    $INSTALL_LOG
    <br>
    <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # if mount is done and iso is present
    <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if [ $? -eq 0 ] &amp;&amp; [ -e /mnt/pendrive/debian.iso ] ;
    then
    <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Mount iso and exit
    <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "Monto la iso" &gt;&gt; $INSTALL_LOG
    <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mount -v -o loop /mnt/pendrive/debian.iso /cdrom
    &gt;&gt; $INSTALL_LOG
    <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break
    <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi
    <br>
    &nbsp;&nbsp;&nbsp; done
    <br>
    fi
    <br>
    #do something with extra_files
    <br>
    <br>
    <br>
    Script execute till echoing "Mount of Stick", then nothing...
    <br>
    Any suggestion?
    <br>
    <br>
    Thanks, Francesco
  </body>
</html>