Hi,

Le Dimanche 7 Mars 2004 15:32, Tom Oehser a �crit :
> > Could you explain me why the way I copied a part of rc.custom to ask if I
> > want to mount cdrom doesn't work?
>
> Not sure, I can add researching it to my to-do list, or perhaps someone
> else reading this will see right away what the problem is.

Sure, you've got better things to do;o).

> > Can you explain me why errors occur when I try to add a file to
> > initrd.bz2? =========================
> > init started: Busybox v0.61.pre...
> > Bummer, could not run '/etc/rc.S': Exec format ettor
> > Bummer, could not run '/etc/rc.S': Exec format ettor
> > _setutent: Can't open utmp file: No such file or directory
> > _setutent: Can't open utmp file: No such file or directory
> > _setutent: Can't open utmp file: No such file or directory
> > =========================
>
> Hmmmm... are you re-running unpack.s/buildit.s?  

No I didn't.
I just did what I wrote (copy/paste from Mdk9.2 terminal to kwrite (only 
simplifying my shell prompt;o)).

===========================
# mount -o loop toms2.img /mnt/disk/
# cp /mnt/disk/initrd.bz2 ./
# bzip2 -d initrd.bz2
# mount -o loop initrd /mnt/initrd
# vi /mnt/initrd/settings.s
# cp /mnt/initrd/rc.custom.gz ./
# gzip -d rc.custom.gz
# vi rc.custom
# gzip rc.custom
# cp rc.custom.gz /mnt/initrd/

I copied my scripts to /mnt/initrd/bin/ at this time.

# umount /mnt/initrd
# cat initrd | bzip2 -9 > initrd.bz2
# cp -f initrd.bz2 /mnt/disk/
# umount /mnt/disk/
===========================

> It is hard to say without 
> playing with what you modified more directly.  I have never tried to make
> changes to the generated stuff, I only modify it in the unpacked form, and
> then always recreate it using the scripts...  Note, the eltorito version of
> tomsrtbt is a side effect of the floppy version, the well-tested path for
> modifying it is the floppy one.  Certainly, all I do with the cdrom version
> is run the eltorito.s script after I create the floppy, I've never tried to
> change it in place.

Didn't you tell me that to modify eltorito-cd this way I should have same 
config as yours,...
I didn't succeed when I tried a few month ago.

Can I modify Tomsrtbt-floppy with unpack,... and then run eltorito.s to do a 
cd version of this floppy?



Some tests later:
I succeeded in something better:
I create cd.sh script from rc.custom and it ask which drive should be used:
================================
...
route add -net 127.0.0.0 lo

echo 'if mount | grep /mnt/cdrom > /dev/null; then' > /bin/cd.sh
echo '    echo ""' >> /bin/cd.sh
echo 'else' >> /bin/cd.sh
echo '    BLUE="\033[1;34m"' >> /bin/cd.sh
echo '    GREY="\033[0;37m"' >> /bin/cd.sh
echo '    WHITE="\033[1;37m"' >> /bin/cd.sh
echo '    GREEN="\033[1;32m"' >> /bin/cd.sh
echo '    RED="\033[1;31m"' >> /bin/cd.sh
echo '    echo -e "${BLUE}*****************"' >> /bin/cd.sh
echo '    echo "* Scripts on CD *"' >> /bin/cd.sh
echo '    echo "*****************"' >> /bin/cd.sh
echo '    echo -e "${GREY}CD-drives found:${WHITE}"' >> /bin/cd.sh
echo '    dmesg | grep hd | grep ROM | grep Cache' >> /bin/cd.sh
echo '    dmesg | grep sd | grep ROM | grep Cache' >> /bin/cd.sh
echo '    echo -e "${GREY}"' >> /bin/cd.sh
echo '    echo -e "Which cd-drive do you want to mount? ${GREEN}\c"' >> 
/bin/cd.sh
echo '    read CD' >> /bin/cd.sh
echo '    if [ "$CD" != "" ]; then' >> /bin/cd.sh
echo '        echo -e "${WHITE}"' >> /bin/cd.sh
echo '        mkdir -p /mnt/cdrom' >> /bin/cd.sh
echo '        mount -t iso9660 /dev/$CD /mnt/cdrom||exit' >> /bin/cd.sh
echo '        echo -e "${GREY}"' >> /bin/cd.sh
echo '    else' >> /bin/cd.sh
echo '        echo -e "${RED}ERROR!\nDevice name can not be empty${GREY}"' >> 
/bin/cd.sh
echo '        exit' >> /bin/cd.sh
echo '    fi' >> /bin/cd.sh
echo 'fi' >> /bin/cd.sh
echo "sh /mnt/cdrom/toms_addons/index.sh" >> /bin/cd.sh
chmod +x /bin/cd.sh

FM=`sh -c 'shift 2;echo $8' \`dd if=/proc/meminfo 2>/dev/null\` `
...
================================
It can probably be improved but it works;o).

'hope it can be usefull... (I'll use it)

Thank you very much!
-- 
Stephane Boireau
Personne Ressource TICE du Coll�ge Le Hameau � Bernay (27)


Reply via email to