LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-12-2006, 01:31 AM   #1
greeklegend
Member
 
Registered: Feb 2006
Location: At a computer
Distribution: Ubuntu 7.04, LFS 6.3 rc1 (living dangerously ;), Windows XP
Posts: 75

Rep: Reputation: 15
USB device as root filesystem


I'm making a couple of small modifications to a uClibC/busybox toolchain to make an OS to boot of a USB. I've installed GRUB onto it, and normally...
GRUB boots fine of the usb disk;
I run...
root (hd0,0)
kernel /boot/kernel root=/dev/sda1
boot
It boots the kernel, and gets as far as mounting the root file system, which fails.
This has happened to me many times before (I use LFS lol) and it's always been because of a missing fs driver, disk driver, etc. but i've checked twice and made sure that all the right drivers are compiled in.
I have a feeling that the trouble could be because my box has an inbuilt 4-in-1 card reader and these all show up as seperate usb devices.
Do i need something like an initrd to fix this up?
 
Old 12-12-2006, 06:47 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
Is the file /etc/fstab pointing to the correct /dev/sd** and not a /dev/hd**?
4in1 card reader can be the issue unless the slot you are using is the on that will be designated as /dev/sda*. When normally booted up what /dev/sd** is the slot you are trying to use?

Brian
 
Old 12-13-2006, 09:11 PM   #3
greeklegend
Member
 
Registered: Feb 2006
Location: At a computer
Distribution: Ubuntu 7.04, LFS 6.3 rc1 (living dangerously ;), Windows XP
Posts: 75

Original Poster
Rep: Reputation: 15
When i boot ubuntu (and LFS for that matter) it's /dev/sde
Im pretty sure it can't be /etc/fstab because that is on the root partition, which cant be mounted and therefore cannot be read.
I've tried all manner of root=/dev/sd* and none of them can be read. If i mount another root filesystem on /dev/hda* i can mount the usb as /dev/sde1 so im pretty sure all the drivers must be there...none of them are modules, what am i mising?
 
Old 12-14-2006, 04:44 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
I am confused as to what is going. To make things simply I would get a reader that is just for a single type of media and plug that into the USB port to see how it behaves.

Brian
 
Old 12-15-2006, 12:43 PM   #5
louisnells
LQ Newbie
 
Registered: Nov 2006
Distribution: FreeBSD 6.1, Debian Sarge 3.1r2
Posts: 5

Rep: Reputation: 0
I had this same issue when I was trying to make a USB rescue disk. But some time back I fixed that problem.

I don't remeber what exactly the problem was but these are something that I have with the working copy.
1) Either compile SCSI & USB support statically or load it from InitRD (I don't need InitRD for everything else)
2) Figure out which bios drive GRUB is using for the USB drive (if the BIOS correctly loads the kernel from the USB drive thats may not be a problem. But may careful about root=/dev/xxxx).
3) May be you have to wait for some time (in the InitRD) until the '/dev/sdaxxxx' stuff comes up (after loading the SCSI & USB modules)

Right now I am using BusyBox & UDev with the USB Rescue disk.
Note: I am using a Debian Sarge stable & don't need InitRD for usual disk booting.

Last edited by louisnells; 12-15-2006 at 12:47 PM.
 
Old 12-17-2006, 01:50 AM   #6
greeklegend
Member
 
Registered: Feb 2006
Location: At a computer
Distribution: Ubuntu 7.04, LFS 6.3 rc1 (living dangerously ;), Windows XP
Posts: 75

Original Poster
Rep: Reputation: 15
Actually unplugging the unused devices and using root=/dev/sda1 did the trick. I'm not using an initrd, compiling the usb/scsi drivers statically. Root filesystem now mounts.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
USB drive not working properly, read only device? (USB key storage device) Arodef Linux - Hardware 14 01-01-2010 07:32 AM
Mounting root filesystem from an external USB hard drive? ChrisHart Linux - Laptop and Netbook 6 04-02-2005 10:49 PM
Encrypted Root Filesystem HOWTO and /dev filesystem tmillard Linux From Scratch 0 10-18-2004 03:58 PM
Read and write USB device with non-root access halfzware_shag Linux - Hardware 3 10-11-2004 04:26 AM
usb root filesystem and devfs sam cadby Linux From Scratch 1 10-14-2003 04:21 PM


All times are GMT -5. The time now is 07:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration