helena, random freezes during boot from external harddisk

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help

helena, random freezes during boot from external harddisk

Postby conf on Tue Feb 02, 2010 8:53 pm

minty greetings!
since i could not find help in #mint-help i am asking here on the forum and i'd appreciate any hint i can get.

I have installed my helena on an external harddisk (sata) because my internal IDE harddisk (winXP) has no free space and no more slots are available.
The external harddisk is a brand new Samsung Spinpoint F3 connected via USB, so i do not consider a hardware malfunction as a cause.
The disk layout is:
Code: Select all
/dev/sdc2: UUID="825cbca9-4e84-4dbc-a49a-a6223dc2195c" TYPE="ext2"    mountpoint: /boot    size: 64mb
/dev/sdc5: UUID="58A149C4788E4024" LABEL="executor" TYPE="ntfs"     partition created before mint installation for dumping data and exchanging
/dev/sdc6: UUID="e148aa9c-874d-4c22-9dfc-d9ee936a62d0" TYPE="swap"     size: 2g
/dev/sdc7: UUID="96da2c80-1fdb-4bbc-bf62-debc4a9c4df9" TYPE="ext3"     mountpoint: /    size: 20g
/dev/sdc8: UUID="444f24aa-96af-4361-8c24-5af3db3ed4e9" TYPE="ext3"     mountpoint: /home    size: 230g
/dev/sdc9: UUID="1628523AFC366EF1" LABEL="spacehog" TYPE="ntfs"     partition created before mint installation for dumping data and exchanging

The bootloader is installed on this disk, and the bios boot sequence is configured to try usb before the internal hd0.

As the topic already suggests, sometimes helena boots and comes up without troubles, the system works fine as far as i can tell.
However sometimes it "freezes" just before the login screen should show up. "freezes" in quoutes, because the mouse still works, the lights on the keyboard can be toggeld, but no matter what you press or click, there is no reaction and even if you wait for hours the login screen wont show up. ctrl+alt+del and ctrl+alt+backspace have no effect, ctrl+F... keys brings up a black screen but no login prompt. The only thing i can do is a hardware-reset.
After a hardware reset the next boot usually does some filesystem checks and reboots on completion, though most of the time this reboot also ends up in a freeze, until this game is played 3-5 times.
In serious cases the disk seems to get so messed up during the freeze/hardware-reset, that bios will not load grub at the next boot attempt. In such a situation i can turn the harddisk off and on again, to continue the game until i can finally boot.

To give you an idea: this is what a "freeze" looks like. Sometimes the grey box (that should show a list of users) appears on a black screen and it takes 1-2 seconds until the mint background appears behind the grey box. In other variations of the freeze i see only the black screen and the spinning cursor without any grey box appearing at all.
I consider this fact interesting as it could help pinpointing what exactly is freezing the boot progress.

One thing that successful and frozen boots have in common, is that they are all extremely slow. After the selection of the grub menu entry i still see the the grub menu for about half a minute. A successful boot takes more than 2 minutes. Of course booting from an external drive will be slower than usual, but i don't think it should be *that* much.

Here is a logfile of /var/log/messages of ~4 attempts to boot, with the final one being successful.
As you can see in the timestamps it took me 20 minutes to get it up. Most of the output looks ok to me, however it seems that on a frozen attempt, the last thing you can see in the logs is something like this line:
Code: Select all
Feb  2 21:53:27 confusedLm kernel: [   23.549289] [drm] writeback test succeeded in 1 usecs

and a successful boot usually has suspicious lines like:
Code: Select all
Feb  2 22:09:59 confusedLm kernel: [   37.928046] usb 1-5: reset high speed USB device using ehci_hcd and address 5


researching on this USB device reset message i could find people claiming a kernel module bug, and other people getting this message with potential defect hardware, related to copying large files and having data loss. As i said, if the boot was successful i don't have any further issues with the disk, everything seems to work fine.
unfortunately i don't know much about the kernel; why does it sometimes help itself at booting by resetting the device it is booting from (sounds weird to me :roll: ).

Code: Select all
confused@confusedLm ~ $ lsusb
Bus 002 Device 002: ID 046d:c01e Logitech, Inc. MX518 Optical Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0db0:6982 Micro Star International Flash XL Card Reader
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 005: ID 152d:2329 JMicron Technology Corp. / JMicron USA Technology Corp.
Bus 001 Device 003: ID 067b:2507 Prolific Technology, Inc. PL2507 Hi-speed USB to IDE bridge controller
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Are there any other log files that could contain clues on what is going on here ? In which direction should i steer my investigations, am i doing something obviously wrong, digging in the wrong grave ?
What could cause the seemingly random working/not working behaviour ?
Any thoughts on this issue are highly appreciated!
conf
Level 1
Level 1
 
Posts: 4
Joined: Tue Feb 02, 2010 5:34 pm

Linux Mint is funded by ads and donations.
 

Re: helena, random freezes during boot from external harddisk

Postby Husse on Sun Feb 07, 2010 6:43 am

Now, this is confusing
I see both
Bus 001 Device 005: ID 152d:2329 JMicron Technology Corp. / JMicron USA Technology Corp.
and
Bus 001 Device 003: ID 067b:2507 Prolific Technology, Inc. PL2507 Hi-speed USB to IDE bridge controller
Jmicron is known to cause bugs and that should be how your disk is connected so the question is what the 067b:2507 is
There is a nasty bug with the Jmicron controller
You could try
Code: Select all
gksudo gedit /lib/udev/rules.d/95-devkit-disks.rules

Then in the section
# Check if a disk is ATA SMART capable
comment out (put a # in the beginning of the line) all three lines in that section that is not a comment already (beginning with KERNEL and contains devkit-disks-probe-ata-smart)
Nothing else!!
devkit-disks-probe-ata-smart is probably what causes your problems at least if the hdd is connected to the Jmicron controller
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: helena, random freezes during boot from external harddisk

Postby conf on Mon Feb 08, 2010 10:14 pm

Hi Husse !
Thank you very much for looking into this. The link of the nasty bug is very interesting and informative, i am willing to believe that this might be the source of my problem.
067b:2507 should be my other external disk, its just an old 200G data-dumpster.
I made the changes you suggested concerning the SMART capability check, unfortunately the freezing still occurs. This is /var/log/messages of the reboot after the changes.
So is the nasty bug in the hard/frim ware of the controller that resides in the external disk case or is it within libatasmart ?
If i interpret the posts in the nasty bug discussion correctly then the controller is buggy and libatasmart - 0.15-3 avoids to trigger the bug by blacklisting Jmicron. Looks like i have 0.16-1 and still suffer from this or some related bug.
Hence my options are waiting until libatasmart is updated with another workaround, or i could get rid of my troubles by getting myself a new controller/case, preferably not produced by Jmicron ?

The thing that remains weird to me is that the nasty bug discussion points out that the smart checks could cause resets with Jmicron but the reset itself does not seem to be the problem, as i only see the reset messages on successful boots, not on frozen ones. But maybe it sometimes just freezes on the first reset and the freeze prevents the reset from getting logged. I still wonder why it's always at the same time, just as the login screen is appearing.

I will investigate more on the Jmicron story, and try to borrow some other external usb-sata case and see if it changes anything.

Thanks again for your help, it really got me on track again.
conf
Level 1
Level 1
 
Posts: 4
Joined: Tue Feb 02, 2010 5:34 pm

Re: helena, random freezes during boot from external harddisk

Postby Husse on Tue Feb 09, 2010 7:44 am

OK - I hope to hear from you again
Jmicron is simply no good - I have seen so many reports about problems and back when I had my computer business I think we got our handful of problems in Windows with Jmicron
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden


Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 9 guests