Gentoo Archives: gentoo-user

From: meino.cramer@×××.de
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] USB Problems
Date: Sun, 12 Jun 2011 20:04:46
Message-Id: 20110612192048.GD3061@solfire
In Reply to: Re: [gentoo-user] USB Problems by john
1 john <jdm@×××××××××××××××××××.uk> [11-06-12 20:52]:
2 > On Sun, 12 Jun 2011 16:45:38 +0200
3 > meino.cramer@×××.de wrote:
4 >
5 > > john <jdm@×××××××××××××××××××.uk> [11-06-12 16:36]:
6 > > > Gents
7 > > >
8 > > > Whenever I insert external USB device my machine locks and I have
9 > > > to do a hard reset (sys req does not even work). I have tried this
10 > > > in a graphical environment and without. Machine boots up fine with
11 > > > USB keyboard and mouse but will not boot up with usb storage
12 > > > (memory stick
13 > > > - tried several)
14 > > >
15 > > > I have recently upgrade kernel to 2.6.38-r6 when this error started
16 > > > (approx). Hav also tried 2.6.38-r7 (which according to bugzilla
17 > > > should fix an issue similar to this) the error still happens.
18 > > >
19 > > > Any suggestions on kernel config options, debugging would be
20 > > > appreciated. And how to trap full error message.
21 > > >
22 > > > Error message alongs these lines
23 > > >
24 > > > Kernel panic not syncing - fatal exception in iterrupt
25 > > > ksoftirqd/1 Not tainted
26 > > >
27 > > >
28 > > >
29 > > >
30 > > > --
31 > > > --------------
32 > > > --------------
33 > > > John D Maunder
34 > > > jdm@×××××××××××××××××××.uk
35 > > >
36 > >
37 > > Hi John,
38 > >
39 > > may be this could help to track th eerror more closely:
40 > > Recompile the kernel with CONFIG_USB_DEBUG set.
41 > > If not already done, enable CONFIG_MAGIC_SYSRQ and
42 > > read about the available commands in the according
43 > > docs under /usr/src/linux/Documentation/.
44 > > This is a overall life saver in many other cases too.
45 > > But it may be a security hole also -- you can disable
46 > > it in /proc/ later.
47 > > If possible change /etc/fstab to mount the partition
48 > > to which logging will go with the "sync" option so
49 > > every log entry will go directly onto the bare metal
50 > > instead of a RAM buffer.
51 > >
52 > > Reboot into console mode (no X).
53 > > cd to the logging directory and
54 > > do a tail -f onto the logfile in question
55 > >
56 > > Insert the "USB stick of death" ;) and
57 > > see, whether you can see anything in the
58 > > tailed log.
59 > >
60 > > If not do the magic sysrq dance to sync hds,
61 > > remount readonly and finally reboot.
62 > >
63 > > Take a closer look into the resulting logs.
64 > >
65 > > Good luck!
66 > >
67 > > Nevertheless have a nice weekend!
68 > > Best regards,
69 > > mcc
70 > >
71 > >
72 > >
73 >
74 > Thanks mmc,
75 > CONFIG_MAGIC_SYSRQ and CONFIG_USB_DEBUG set to y
76 >
77 > When I plug in USB device SYSREQ does not work. I have tested when
78 > system is normal and all ok with SYSREQ so USB device is locking up
79 > system completely.
80 >
81 > I have put sync in mount table but when device is inserted error log
82 > is not being produced (in /var/log/messages, etc). I may end up having
83 > to take a photo of error log(lol). Or there maybe some other way of
84 > catching error which Gentoo gurus may advise.
85 >
86 > I have tried 3 memory sticks and they all lock system up. These work
87 > on another PC using Arch and work on this PC dual booting with Windows.
88 > I have a usb hard drive which works ok so it is a memory stick only
89 > issue!!!!????
90 >
91 > Hmmm.
92 >
93 > --
94 > --------------
95 > --------------
96 > John D Maunder
97 > jdm@×××××××××××××××××××.uk
98 >
99
100 Hi John,
101
102 if sysreq does not work after inserting the usbstick then the kernel
103 stops working completly (the sysreq-code of the kernel is not
104 entered), which seems to be that something happening on very low
105 level (the problem not the sysreq-code of course... ;)
106
107 Just another shot into the dark:
108 Do you have modularized all usb-related stuff? This also may help to
109 let the usb-sticks work correctly.
110
111 Ah! Another thing: Insert the related modules into
112 /etc/conf.d/modules so that they get loaded in a very early
113 phase of the bootprocess.
114
115 With modules loaded and with no usb-sticks as root inspect the
116 according modules with modinfo -p <modulename> to see, whether
117 there a additional parameters you may pass to the modules to get
118 an extra of informations or - better - to fix the issue.
119
120 Modify under "Kernel hacking" in the kernel config the
121 "Default message log level" to see more.
122
123 Furthermore there is a switch "Kernel debugging" with sub-options.
124 May be turning on these may also help to get closer to all evil ;)
125
126 Last thing:
127 If there is nothing valueable stored on the usbsticks:
128 Try to reformat the usbsticks. Instead of putting a FAT32-fs on the
129 bare device, create a regular partition and create a Linux-fs
130 (reiserfs, ext2/3/4 or like that) on that partition.
131
132 This may not be good idea in general, but - if it works - this would
133 give a hint, where to search next.
134
135 Good luck!
136
137 Best regards,
138 mcc

Replies

Subject Author
Re: [gentoo-user] USB Problems Dale <rdalek1967@×××××.com>
Re: [gentoo-user] USB Problems john <jdm@×××××××××××××××××××.uk>