[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: SV: loop: can't get info on device

On Thu, Feb 20, 2003 at 08:47:25AM +0100, Emile van Bergen wrote:
> Hi,
> On Thu, Feb 20, 2003 at 08:25:20AM +0100, Åke Wivänge wrote:
> > > That device is normally on the root.bin filesystem. Maybe
> > > it got deleted or hidden somehow? You should see many devices
> > > in /dev, including loop0-7.
> > 
> > It's already there, and "makedeving" it again has no effect.
> I noticed that you can also get this message if the device node is
> there, and loop support has been compiled in the kernel, but you happen
> to call losetup /dev/loop0 without further arguments (and /dev/loop0
> isn't already set up).
> If that's the case, it would seem a script on the boot image you're
> using is broken. How do you boot? Directly from CD or from floppy?
> How did you obtain/create the floppies?

Good clue. I found a spot in boot-floppies where this could happen,
and added a check. I think this will have to wait for r3 though.  Do
you see any possible workarounds in the find_unused_loop_device() code
in losetup.c?

Index: extract_kernel.c
RCS file: /cvs/debian-boot/boot-floppies/utilities/dbootstrap/extract_kernel.c,v
retrieving revision 1.61
diff -u -r1.61 extract_kernel.c
--- extract_kernel.c	12 Aug 2002 15:32:30 -0000	1.61
+++ extract_kernel.c	21 Feb 2003 02:25:06 -0000
@@ -62,6 +62,10 @@
   else {
     int ro = 1;
     device = find_unused_loop_device();
+    if (device == NULL) {
+      ERRMSG("set_loop couldn't find an unused loop device for %s", prtbuf);
+      return NULL;
+    }
     if (set_loop(device, diskimage, 0, &ro)) {
       ERRMSG("set_loop couldn't create a loop device for %s", prtbuf);
       return NULL;

"The way the Romans made sure their bridges worked is what 
we should do with software engineers. They put the designer 
under the bridge, and then they marched over it." 
-- Lawrence Bernstein, Discover, Feb 2003

Reply to: