Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-17-2014, 12:29 AM
|
#1
|
Member
Registered: Jul 2009
Posts: 106
Rep:
|
Kernel panic when booting off external USB hard drive
I have read a lot of threads about this, but have not been able to solve this problem.
This is Slackware 14.1 (64-bit). I can boot off the installation DVD using a USB-connected DVD drive. Then I installed the system on another USB external hard drive (Toshiba 1TB V73600-C /dev/sda). The boot was installed to MBR with lilo on /dev/sda. The root partition is /dev/sda1. I have done this dozens of time on internal drives and never had any problems. But with this USB drive, it hangs during boot with the infamous "kernel panic - unable to sync". I can't cut and paste the exact error message, but it seems to come right after "switching to clock source tsc".
However, I am able to boot off the install DVD and then mount the USB hard drive. That works. If I poke around dmesg, I see that the USB drive is being recognized only towards the end of the boot process, well after the root device has been mounted. That could be part of the problem, but I am not sure how I can re-sequence the items in the boot process.
This is the only drive in the system. There is another internal drive as well, but I have disabled it in BIOS just to be safe. So my USB drive is being correctly recognized as /dev/sda during the DVD boot.
I am also using Slackware's huge kernel so missing drivers should not be an issue. I have also tried "rootdelay" parameter but that didn't make any difference.
Any help would be appreciated.
|
|
|
07-17-2014, 05:33 PM
|
#2
|
Moderator
Registered: Mar 2008
Posts: 22,177
|
You can't easily disable internal drives by bios. Sometimes linux bypasses it. Remove power or data cable instead.
You can generally change the boot order of hard drives and that allows correct sdx assignment.
Try it again by removing ac to internal drive. Boot to bios and be sure the external drive shows up correctly as a hard drive choice. NOT a usb choice a hard drive choice.
|
|
|
07-18-2014, 09:27 AM
|
#3
|
Member
Registered: Jul 2009
Posts: 106
Original Poster
Rep:
|
When I disabled the internal drive in BIOS, the external was picked up as /dev/sda. When the internal drive was enabled, the external drive was picked up as /dev/sdb. So I think that part is working as expected. Just for sanity check, I unplugged the internal drive and tried it again, and the results were the same.
As I mentioned, when I boot off the DVD, the usb drive is being recognized only towards the end of the boot, after the root has been mounted. I suspect this is the cause of the problem, but I am not sure how to sequence these items during boot.
Quote:
Originally Posted by jefro
You can't easily disable internal drives by bios. Sometimes linux bypasses it. Remove power or data cable instead.
You can generally change the boot order of hard drives and that allows correct sdx assignment.
Try it again by removing ac to internal drive. Boot to bios and be sure the external drive shows up correctly as a hard drive choice. NOT a usb choice a hard drive choice.
|
|
|
|
07-23-2014, 10:33 PM
|
#4
|
Senior Member
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323
Rep:
|
Hard one, are you getting grub form the MBR? Have you checked your kernel arguments? Some research yielded different distros with a similar issue and adding
fixed it, maybe it isn't full mounted yet for read
Also it might be a pain, but a photo of the screen or manually transcribing the kernel panic message and surrounding info might better assist us in helping you.
|
|
|
08-28-2014, 11:56 PM
|
#5
|
Member
Registered: Jul 2009
Posts: 106
Original Poster
Rep:
|
Still no success with this install. I suspect it may be the kernel. I just noticed that the default "huge" kernel that comes with Slackware has USB Mass Storage compiled in as a module. That could be the problem. However, if I can't boot with the existing kernel, I can't compile a new one. Anyway I can get a precompiled kernel with built-in USB support? This is 3.10.17.
Quote:
Originally Posted by scheidel21
Hard one, are you getting grub form the MBR? Have you checked your kernel arguments? Some research yielded different distros with a similar issue and adding
fixed it, maybe it isn't full mounted yet for read
Also it might be a pain, but a photo of the screen or manually transcribing the kernel panic message and surrounding info might better assist us in helping you.
|
|
|
|
08-29-2014, 04:55 PM
|
#6
|
Moderator
Registered: Mar 2008
Posts: 22,177
|
All distro's should read and mount usb drives or be able to read and mount at end of boot process. Some actually add in extra time to allow usb to settle down.
For the most part a usb external will end up being a normal hard drive to the OS. This assumes a few things. One is that you have correct support and power to the external and the usb hub/chipset to begin with. Two is the support for the speed of the drive. Generally only the newer distro's will support install to usb 3. Three is a bios and board the is properly made to run usb as a bootable media.
|
|
|
08-30-2014, 10:06 AM
|
#7
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,961
|
Member Response
Hi,
What happens when you boot using the Install DVD and passing the boot perimeters to the kernel? Follow instruction on the boot screen;
Code:
Boot: Huge.s root=/dev/Your_Device initrd=ro
If you used a different kernel then use that in the boot line.
Hope this helps.
Have fun & enjoy!
|
|
|
08-30-2014, 11:50 PM
|
#8
|
Member
Registered: Jul 2009
Posts: 106
Original Poster
Rep:
|
Quote:
Originally Posted by onebuck
Hi,
What happens when you boot using the Install DVD and passing the boot perimeters to the kernel? Follow instruction on the boot screen;
Code:
Boot: Huge.s root=/dev/Your_Device initrd=ro
If you used a different kernel then use that in the boot line.
Hope this helps.
Have fun & enjoy!
|
That didn't work either. But what worked in the end is as follows. May be not all these steps are not necessary, but that is what I did to get it to work. This is on a Slackware distribution.
1. Boot from the installation DVD and install linux on the USB drive. Put this aside for now since it will not boot.
2. Boot from the installation DVD again and install the same linux on an internal drive. This is temporary and can be deleted later.
3. Boot from the internal drive. Then plug in the USB drive and mount as /mnt
4. Run lsmod and identify all modules that might be related to the external USB drive. In my case, I picked everything that had the word USB on it. Recompile the kernel with these modules compiled in rather than as modules (select <*> instead of <M>).
5. Copy the new kernel and System.map from the linux source directory to /mnt/boot/
6. Run chroot /mnt
6. Edit /etc/lilo.conf and add the USB partition and the path to this new kernel. In my case I edited the following entries:
boot = /dev/sdb
image = /boot/bzImage
root = /dev/sdb1
append = "rootdelay=30"
label = Slack32
read-only
Note the rootdelay entry which is not in the default lilo.conf. Then run lilo.
7. Reboot and edit the BIOS to boot to the USB drive. This should now boot to the USB drive. In my case, I noticed a very long list of hex numbers displayed, and the boot took significantly longer than usual (probably 1 minute instead of 15 seconds). dmesg does not show anything meaningful because I think this long list of numbers overwrote the boot messages.
8. The linux installation on the internal drive can now be deleted.
|
|
|
08-31-2014, 10:00 AM
|
#9
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,961
|
Member Response
Hi,
I think your method does indicate that a 'initrd' would have solved the issue for the original install since you did compile in the necessary drivers.
Glad to see you were able to get a work around for getting up. That's what Slackers do!
|
|
|
08-31-2014, 10:40 PM
|
#10
|
Moderator
Registered: Mar 2008
Posts: 22,177
|
Wow!
|
|
|
10-02-2014, 07:04 PM
|
#11
|
Member
Registered: Nov 2010
Location: Toronto, Ontario
Distribution: Slackware + FreeBSD
Posts: 165
Rep:
|
I think this is a good reason to necro this thread.
I found asarangan's post http://www.linuxquestions.org/questi...4/#post5230019, quite helpful and I would like to add:
1. all this (kernel building) can be done in a chroot of your "external" slackware installation, from the install media and no internal temporary install is needed.
2. Instead of playing with bios and boot orders. From the chroot env you can simply install lilo to a temp block. copy it to a file (dd the first 512 bytes to somewhere on your internal disk) and have your existing boot loader (be it the windows one or any other) chainload it.
Last edited by maciuszek; 10-02-2014 at 08:04 PM.
|
|
|
All times are GMT -5. The time now is 08:53 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|