Find the answer to your Linux question:
Results 1 to 7 of 7
Hi, I have a custom linux environment with a 2.6 kernel downloaded from kernel.org with a simple busybox shell as init. The system boots off a SATA drive with root=/dev/sda ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Apr 2008
    Posts
    128

    Kernel panic when booting off USB flash drive


    Hi,

    I have a custom linux environment with a 2.6 kernel downloaded from kernel.org with a simple busybox shell as init. The system boots off a SATA drive with root=/dev/sda with lilo, and it works perfectly.

    I recently tried to achieve the same thing on a USB flash drive by simply dd-ing the SATA drive partition contents to the flash drive, but I'm getting the following error when booting up:

    Code:
    VFS: Cannot open root device "801" or unknown-block(8,1)
    Please append a correct "root=" boot option; here are the available partitions:
    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1)
    Pid: 1, comm: swapper not tainted 2.6.35.14 #1
    I only have a single flash drive plugged into the USB port, with no other SATA/IDE drives connected. AFAIK, that makes the flash drive /dev/sda, which translates to 801, so why isn't it booting up correctly?

    Thanks.

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    If you only copied the partition contents to the flash, what are you using to boot that gives you the message as you don't indicate a bootloader in the mbr of the flash?
    You might boot a Live CD when you only have the flash attached to see if it actually is seen as sda.

  3. #3
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Good day, galpogos

    After reading your post, my first thought was no bootloader on the MBR, just as mentioned above by yancek. Did your dd command include a write to the MBR, or did you install lilo to the MBR of the USB drive using a separate command?
    oz

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Apr 2008
    Posts
    128
    Quote Originally Posted by oz View Post
    Good day, galpogos

    After reading your post, my first thought was no bootloader on the MBR, just as mentioned above by yancek. Did your dd command include a write to the MBR, or did you install lilo to the MBR of the USB drive using a separate command?
    Thanks for the replies.

    I dd-ed the entire disk image over, from the 1st sector onwards which should include the MBR. Obviously the flash disk being much smaller than my SATA drive, I didn't dd the irrelevant portions at the end of the disk. The entire disk image is only 64MB, which consists of a few small partitions. However the MBR should nevertheless be there.

    I have previously used the same method to dd the disk image over to several other SATA drives, and they've all booted up perfectly, so I doubt it's a MBR problem, otherwise these SATA drives would exhibit the same behavior wouldn't they?

  6. #5
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Some flash drives have hidden security partitions on them, so maybe such a partition changed the partition numbering on your device. I don't remember at what point the kernel changed partitions from hda to sda, but it could be related to that I suppose since you are dealing with a 2.6 kernel. Just throwing some ideas out there.

    Are you able to plug it into a working system and list the partitions with fdisk? If no, maybe boot a liveCD and look at the partitions using gparted. Don't know if it will help...
    oz

  7. #6
    Linux Newbie
    Join Date
    Apr 2008
    Posts
    128
    The move from hda to sda coincided with the move from IDE to SATA, which was very long ago. I believe it was the very early 2.6 builds. I'm using a kernel that has explicit support for SATA drives and has worked with it, so that can't be the problem.

    Thanks though.

  8. #7
    Just Joined! fenario's Avatar
    Join Date
    Mar 2009
    Location
    Rylstone NSW Australia
    Posts
    36
    hi galapogos

    you may want to try using unetbootin. the one from the synaptic repos doesn't always work but the standalone linux file from the unetbootin site always works fine.

    fen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •