LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-29-2008, 08:17 PM   #1
arew264
Member
 
Registered: Jul 2005
Distribution: Arch Linux / Debian Etch (soon) / have tried many others
Posts: 94

Rep: Reputation: 15
Using Flash Drive as Root FS at Boot Time Fails


Okay, I'm sure there's something obvious here that I'm missing, but I can't seem to find how this should be done.
I have a flash drive that I want to mount as my root filesystem at boot time. When I'm in linux, I can run `mount /dev/sda1 /mnt`, and the kernel will mount the ext3 FS on the flash drive at /mnt with no problems.
From this I assumed I could boot my system with the kernel option 'root=/dev/sda1', but this doesn't work. My kernel has no initrd, and is booted directly by a bootloader. It has no modules, so I know that's not the issue.
The current setup that works consists of a ramdisk that the bootloader loads into RAM before booting the kernel. The kernel detects this ramdisk and the current kernel root option ('root=/dev/ram') mounts the ramdisk as the root fs with no problems.
I can see where the kernel detects the flash driveat startup, and I can't think of a reason why I couldn't just mount it as root. I can copy/paste startup logs here if necessary.
Any ideas or help would be very appreciated.

Last edited by arew264; 11-29-2008 at 08:18 PM.
 
Old 11-30-2008, 10:39 PM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
The problem with using a USB device as a root filesystem is that the kernel doesn't always detect and initialize it in time to be mounted.

I seem to recall there were some kernel tweaks that could help with the issue, but most people just use an initrd to get a base system up and running (and give the system time to initialize the USB device). From there you could mount the USB device to load additional libraries and binaries, for example by mounting it as /usr/local.
 
Old 11-30-2008, 10:50 PM   #3
arew264
Member
 
Registered: Jul 2005
Distribution: Arch Linux / Debian Etch (soon) / have tried many others
Posts: 94

Original Poster
Rep: Reputation: 15
Thanks, I think I'll try mounting it as /usr.

Just for explanation, I'm running a skeleton kernel on an ARM microprocessor. I have 16 MB of flash memory and 32 MB of RAM, and I'm afraid I'll need more than 16 MB for the system when all the programs I need a present.
 
  


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 Flash drive mount at boot time logeait Linux - Embedded & Single-board computer 4 08-03-2008 02:12 AM
cannot delete drive from root desktop - cannot mount usb flash drive - openSuSE 10.2 bluecog6 Linux - General 6 01-29-2007 03:18 PM
ZFS Root / Boot into ZFS from a usb flash drive Kataku Solaris / OpenSolaris 1 07-15-2006 04:13 AM
[SOLVED] Suse 9.3 fails mounting usb flash drive enrico_dvchp Linux - Newbie 4 07-04-2006 04:34 PM
USB flash drive not ready for a LONG time m_yates Debian 0 09-13-2004 10:27 AM


All times are GMT -5. The time now is 12:01 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration