bootcd (next step)

Stephane Boireau <[email protected]> Sat, 6 Mar 2004 11:49:57 +0100
Newsgroups gmane.linux.tomsrtbt
Message-ID <[email protected]>
Hi,

I succeeded in something;o):

I added a few lines to rc.custom (the one placed in initrd.bz2):
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
...
route add -net 127.0.0.0 lo

#Beginning of what is added
mkdir -p /mnt/cdrom
mount -t iso9660 /dev/hdb /mnt/cdrom||mount -t iso9660 /dev/hdc=20
/mnt/cdrom||mount -t iso9660 /dev/hdd /mnt/cdrom
echo "sh /mnt/cdrom/toms_addons/index.sh" > /bin/cd.sh
chmod +x /bin/cd.sh
#End of what is added

FM=3D`sh -c 'shift 2;echo $8' \`dd if=3D/proc/meminfo 2>/dev/null\` `
...
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

It works.
Cd is mounted and I can run cd.sh to launch /mnt/cdrom/toms_addons/index.=
sh

It is easy to create and modify an index.sh script on cdrom.
The way I do it, the only thing needed are mount point name, way to scrip=
t and=20
name of script:
/mnt/cdrom/toms_addons/index.sh

'hope it can help!



I wanted to be able to mount or not cd.
I added a few lines more to rc.custom (the one placed in initrd.bz2):
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
...
route add -net 127.0.0.0 lo
#Beginning of what is added
echo P>P
sh<<'X'&

echo "Mount cd?"
read -p "
Do you want to mount CD/DVD drive (5sec)? (y/n) [n] " J</dev/tty1>/dev/tt=
y1
[ "$J" ]&&if [ "$J" =3D "y" ]; then
mkdir -p /mnt/cdrom
mount -t iso9660 /dev/hdb /mnt/cdrom||mount -t iso9660 /dev/hdc=20
/mnt/cdrom||mount -t iso9660 /dev/hdd /mnt/cdrom
echo "sh /mnt/cdrom/toms_addons/index.sh" > /bin/cd.sh
chmod +x /bin/cd.sh
fi

rm P
X
(sleep 5;kill $!;rm P)2>$NU&
#End of what is added

FM=3D`sh -c 'shift 2;echo $8' \`dd if=3D/proc/meminfo 2>/dev/null\` `
...
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

And it doesn't work.
No choose.

I would like to give choice of mounting (or not) cd drive (and add the sc=
ript=20
to launch index.sh script from cd).

Thank you very much for any suggestion...

Thank you very much for Tomsrtbt.
--=20
Stephane Boireau
Personne Ressource TICE du Coll=E8ge Le Hameau =E0 Bernay (27)