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

dboostrap segfault with no CDROM drive



Hi,

Sorry, I haven't found dbootstrap in the BTS, and it's late.
I try to install debian 3.0 on a non standard mipsel target (IDT r4k based).
There's net and IDE support, no floppy. My custom kernel is already working 
fine.
Actually, I've downloaded the bf-pre3.0.20cvs20020217 root.bin,
dd'ed to a temporary partition, and booted with "root=/dev/hdc2".

Well, the problem is with dbootstrap. It segs fault if there's no cdrom
drive attached to the IDE chain. Following is a strace of dbootstrap
illustrating the problem. The bug seems to lie with the content of
/proc/sys/dev/cdrom/info.


open("/proc/sys/kernel/osrelease", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x2aac4000
read(3, "2.4.17-mips\n", 1024)          = 12
close(3)                                = 0
munmap(0x2aac4000, 4096)                = 0
open("/proc/cpuinfo", O_RDONLY)         = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x2aac4000
read(3, "system type\t\t: IDT Homelink\nproc"..., 1024) = 249
close(3)                                = 0
munmap(0x2aac4000, 4096)                = 0
open("/proc/sys/dev/cdrom/info", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x2aac4000
read(3, "CD-ROM information, Id: cdrom.c "..., 1024) = 343
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
# cat /proc/sys/dev/cdrom/info
CD-ROM information, Id: cdrom.c 3.12 2000/10/18

drive name:
drive speed:
drive # of slots:
Can close tray:
Can open tray:
Can lock tray:
Can change speed:
Can select disk:
Can read multisession:
Can read MCN:
Reports media changed:
Can play audio:
Can write CD-R:
Can write CD-RW:
Can read DVD:
Can write DVD-R:
Can write DVD-RAM:


# 

Now, if I plug an old crappy CDROM drive along to my hdc HD,
dbootstrap works fine. Here's the content of the troublesome proc file,
in the event it helps in fixing dbootstrap source code.


# cat /proc/sys/dev/cdrom/info
CD-ROM information, Id: cdrom.c 3.12 2000/10/18
 
 drive name:             hdd
 drive speed:            9
 drive # of slots:       1
 Can close tray:         0
 Can open tray:          1
 Can lock tray:          1
 Can change speed:       1
 Can select disk:        0
 Can read multisession:  1
 Can read MCN:           1
 Reports media changed:  1
 Can play audio:         1
 Can write CD-R:         0
 Can write CD-RW:        0
 Can read DVD:           0
 Can write DVD-R:        0
 Can write DVD-RAM:      0
  
   
# uname -a
Linux 10.0.0.4 2.4.17-mips #156 mar fiv 19 13:15:35 CET 2002 mips unknown




Cheers,
 Stephane

PS: I'm not subscribed to the list.



Reply to: