Mailing List Archive

(no subject)
Hello All;

I have a linux system on a CD that I use to teach
a graduate course on Unix. I use isolinux to boot
the kernel then simply mount the CD ro and set
up some symbolic links pointing to /tmpfs for the stuff
that needs be writable. (mainly /var and /tmp). Something like
gcc is a little bit slow the first time you use it but
then it gets cached and after that it is all right.
Isolinux works just fine. No problems. What I would like
to do is somehow automatically determine what drive the cd
is on so I can mount it with out a command line prompt.
This would be quite useful since I would like the students
to be able walk up to any WindToad(TM) system in the University,
and boot Linux. The problem is that it is not known before
hand which IDE channel the CD is residing on.

Bruce
(no subject) [ In reply to ]
On Sun, 27 Jan 2002 19:21:03 GMT, Bruce M Beach <brucemartinbeach@21cn.com>
wrote:

> to do is somehow automatically determine what drive the cd
> is on so I can mount it with out a command line prompt.
> This would be quite useful since I would like the students
> to be able walk up to any WindToad(TM) system in the University,

assuming kernel >= 2.2
set up fstab to use /dev/cdrom as device, then

cddev=
for i in hda hdb hdc hdd
do
if [ -f /proc/ide/$i/media ]; then
media=`cat /proc/ide/$i/media`
if [ "$media" = "cdrom" ]; then
cddev=/dev/$i
break
fi
fi
done

if [ -n "$cddev" ]; then
ln -s -f $cddev /dev/cdrom
fi


--
giulioo@pobox.com
(no subject) [ In reply to ]
On Sun, Jan 27, 2002 at 12:35:35PM +0100, Giulio Orsero wrote:
> On Sun, 27 Jan 2002 19:21:03 GMT, Bruce M Beach <brucemartinbeach@21cn.com>
> wrote:
>
> > to do is somehow automatically determine what drive the cd
> > is on so I can mount it with out a command line prompt.
> > This would be quite useful since I would like the students
> > to be able walk up to any WindToad(TM) system in the University,
>
> assuming kernel >= 2.2
> set up fstab to use /dev/cdrom as device, then

[snip script]

you can also use the scsi-ide stuff. It will put all cdroms on /dev/scdN, where
N = the number of the cd player.

grtz, Tijn

--
3:05PM up 2 days, 1:50, 4 users, load averages: 0.70, 0.27, 0.18
(no subject) [ In reply to ]
| assuming kernel >= 2.2
| set up fstab to use /dev/cdrom as device, then
|
| cddev=
| for i in hda hdb hdc hdd

It's common for people (like me) to have an additional card in the machine
for extra drives - this would miss my CD which is on hdf. I would suggest:

for i in hda hbb hdc hdd hde hdf hdg hdh

| do
| if [ -f /proc/ide/$i/media ]; then
| media=`cat /proc/ide/$i/media`
| if [ "$media" = "cdrom" ]; then
| cddev=/dev/$i
| break
| fi
| fi
| done
|
| if [ -n "$cddev" ]; then
| ln -s -f $cddev /dev/cdrom
| fi

Scott
(no subject) [ In reply to ]
This is a multi-part message in MIME format.
--------------060604090702000405020208
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Bruce M Beach wrote:

> Hello All;
>
> I have a linux system on a CD that I use to teach
> a graduate course on Unix. I use isolinux to boot
> the kernel then simply mount the CD ro and set
> up some symbolic links pointing to /tmpfs for the stuff
> that needs be writable. (mainly /var and /tmp). Something like
> gcc is a little bit slow the first time you use it but
> then it gets cached and after that it is all right.
> Isolinux works just fine. No problems. What I would like
> to do is somehow automatically determine what drive the cd
> is on so I can mount it with out a command line prompt.
> This would be quite useful since I would like the students
> to be able walk up to any WindToad(TM) system in the University,
> and boot Linux. The problem is that it is not known before
> hand which IDE channel the CD is residing on.
>


Here is a copy of the find-cd script used on the SuperRescue CD. It
works for SCSI, USB and IDE (i.e. all modern CD-ROMs):

-hpa


--------------060604090702000405020208
Content-Type: text/plain;
name="find-cd"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="find-cd"

#!/bin/sh -
#
# Try to find the rescue CD-ROM
#

tmpdir=/tmp/mnt.$$

try-mount () {
echo -n "Looking for CD-ROM at $1... "
mount -r -t iso9660 $1 $tmpdir > /dev/null 1>&2
if [ $? -ne 0 ]; then
echo "not found"
return 1
fi
if [ ! -f $tmpdir/SuperRescue-2 ]; then
umount $tmpdir
echo "not found"
return 1
fi
umount $tmpdir
ln -sf $1 /dev/cdrom
echo "found!"
return 0
}

# Create temporary directory
mkdir -p $tmpdir

# First, try IDE CD-ROMs
cd /proc/ide
for ide in *; do
# Actual drive names are links
if [ -L "$ide" ]; then
media=`cat $ide/media`
if [ "$media" = 'cdrom' ]; then
if try-mount /dev/$ide; then
rmdir $tmpdir
exit 0 # Found!
fi
fi
fi
done
cd /

# Second, try SCSI CD-ROMs
(
scdn=0
while read title type rest ; do
if [. "$title" = 'Type:' -a \( "$type" = 'CD-ROM' -o "$type" = 'WORM' \) ]; then
if try-mount /dev/scd$scdn; then
rmdir $tmpdir
exit 0 # Found
fi
scdn=`expr $scdn + 1`
fi
done
exit 1 # Not found
) < /proc/scsi/scsi

if [ $? -eq 0 ]; then
exit 0 # Found it
fi

rmdir $tmpdir
exit 1 # Now what?

--------------060604090702000405020208--
(no subject) [ In reply to ]
Hello all;

Thanks for the various scripts. I will use them if I have
to but the problem is that I am avoiding the use of an
initrd if I can. What I do is have isolinux boot the
kernel with the following config line

APPEND root=/dev/scd0 ro

Hmmmm..... Now that I think of it there is no problem.

Well let me go on anyway. Maybe this is what Martijn Bakker
was saying. Okay consider the case where I don't use scsi-emulation
So I use in the config file

APPEND root=/dev/hdd (say)

Isolinux passes control to the kernel which mounts the CD
It then executes init from the CD which does its thing, in
particular on my setup executes /etc/rc.d/rc.S which
near the begining has a line

mount -n -t tmpfs /dev/shm /tmpfs

which gives me a ramdisk. I set up a handful of symbolic links
i.e. tmp->/tmpfs/tmp etc.
and I'm done. gcc, xwindows and anything else runs fine.

Now of course I can't execute any of the suggested scripts in
the above setup because to find the scripts the CD has to be
mounted first and in general it could be anywhere C:, D: etc.
Now it seems to me that in the case of the scsi emulation
it will simply mount the first CD that it finds and for me
that is satisfactory since is likely to be the case 99% of
time. In the case of an IDE type CD setup, what interested me
was the fact that isolinux actually already knows the drive
number and if it could be persuaded to pass the information
to the kernel for mounting that would be a fairly simple and
useful solution.

Bruce
(no subject) [ In reply to ]
Bruce M Beach wrote:
>

> In the case of an IDE type CD setup, what interested me
> was the fact that isolinux actually already knows the drive
> number and if it could be persuaded to pass the information
> to the kernel for mounting that would be a fairly simple and
> useful solution.
>


No, it doesn't.

-hpa
Re: (no subject) [ In reply to ]
On Wed, Oct 29, 2003 at 12:41:29AM -0500, Tom Diehl wrote:
> On Tue, 28 Oct 2003, Petro wrote:
> > On Tue, Oct 28, 2003 at 03:53:56PM -0800, H. Peter Anvin wrote:
> > > Petro wrote:
> > > > Is this the right place to ask questions about PXE and booting linux via
> > > > PXE?
> > > At least as long as you're using PXELINUX to do it...
> > Hmmm...
> > Well, it's the default c... that comes with Redhat 9, and syslinux
> > 2.00 is installed.
> > I'm running /usr/sbin/pxe and the (apparently unsupported) mtftpd
> > server (why does Redhat do this silly sh**?).
> They no longer do this. Even in redhat 9 you do not need the pxe package if you
> setup a dhcp server and tftp server.

Hmm... Actually, I was more reffering to using stuff like mtftp as
opposed to more "common" stuff.

But yeah, I've got the dhcp server and the tftp server running.

> > I suspect my problem is before I even get to that point though. When
> > I'm trying to get a machine to boot I get this in my logs:
> > PXE[2723]: PxeService: WinSock error 0x58 on UDP recvfrom() on Port 67
> > Any ideas? Or do I need to rip out all this Redhat stuff and start
> > over with the right software?
> Ditch the pxe package and setup a dhcp server, tftp server, and use syslinux.
> Simple to setup and simple to use. See the syslinux home page for details.
> Once you have read the docs if you still have questions you can ask here.

Ok.

Thanks.

--
Petro@corp.vendio.com ccpetro at vtext.com [sms]
Unix Administrator 2766480 at skytel.com [pager]
Vendio Service Inc. (650) 793-1650 [cell]
Re: (no subject) [ In reply to ]
> I have set up a pxelinux tftp boot server. It works great and
> is rock solid. I boot all management tools and OS installs
> from it. I have run in to a problem with Microsoft though...
> As corporations are slowly starting to adopt Vista, there are
> more limited ways available to deploy the OS. It is now
> necessary to install it from PE. I have found no way to
> successfully boot PE over PXE using pxelinux. Is there anyone
> out there that has got that to work?

Yes. If you are using Windows AIK, open the Users' Guide and search for
"Walkthrough: Deploy an Image by using PXE" (you'll have to adapt it to
PXELINUX).

Or check this thread out: http://www.itproffs.se/forumv2/tm.aspx?m=82540
(it's in swedish, but all commands are there).

/Daniel


_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.