RE: mount/umount causes panic

"Brian Sullivan" <[email protected]> Mon, 13 Jan 2003 10:34:59 -0500
Newsgroups gmane.linux.redhat.axp.kernel
Message-ID <[email protected]>
Interesting theory. I gave it a shot and it appeared to work. I then
realized I ran the new script as the user "root". For the heck of it I then
ran my original script (the one that crashes the kernel) and it too worked.
I was very puzzled by this. I logged out of root and logged back in as a
normal user and once again my original script caused the kernel panic. So it
appears that as root the panic does not occur. This is very odd. If there
was some sort of permission problem I would expect the mount to fail and
just state a permission failure, not some sort of kernel panic. I appreciate
your thoughts. You have any other suggestions based on the new details?

-----Original Message-----
From: Oliver Pitzeier [mailto:[email protected]]
Sent: Monday, January 13, 2003 3:35 AM
To: [email protected]
Cc: [email protected]
Subject: RE: mount/umount causes panic


Brian Sullivan:
> [ ... ] When I run the script however the
> kernel panics after 30 to 50 ISOs (never crashes on the same
> ISO twice, seems random). The kernel panic is hollering about
> "Attempted to kill init".
[ ... ]

Well, I'm not really sure why this problem could happen, but I believe it's
not
AXP-kernel specific...

However... I guess moving the ISO back and forward on your harddisk may be
the
problem...

> SLOTLIST=`ls slot*`
> for SLOT in $SLOTLIST
> do
>     echo "Moving $SLOT to reader..."
>     mv $SLOT reader01
>
>     echo "Mounting..."
>     mount reader01
>
>     ls /mnt/cdsim1/D*
>     #sleep 50
>
>     echo "Un-Mounting..."
>     umount -d reader01
>
>     echo "Moving $SLOT back..."
>     mv reader01 $SLOT
>
> done

Try it this way:

# modprobe loop
for SLOT in slot*; do
  echo "Mounting..."
  mount -o loop=/dev/loop0 $SLOT /mnt/cdsim1

  ls /mnt/cdsim1/D*

  echo "Unmounting..."
  umount /mnt/cdsim1
done

This is shorter, and easier to read. I guess it's also faster. :o)
(Well I also let the "-d" at the umount line go away. I'm not sure if you
really
need it...)
(The modprobe line cannot be bad at all in such a script...)

Best regards,
 Oliver