Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > The Linux Kernel > Launch a LFS on a USB Stick

Forgot Password?
 The Linux Kernel   Compiling, theory, programming or other discussion about the linux kernel

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 04-27-2005   #1 (permalink)
Just Joined!
 
Join Date: Apr 2005
Posts: 1
Launch a LFS on a USB Stick

Hello,

I have build a lfs today, it was long, not really difficult, but very long ...
I have striped it, removed all useless documentation ( :o ) and it finally occup ed less than 200mb.

So I have decided to move files on my usb stick of 256mb who is divided in two partition. The first of 9mb ( /dev/sda1 ) correspond to /boot and the next and last, to the root / .

I have also installed grub on the stick and I have finally compiled a 2.6.11.7 kernel.

But when I tried to boot on my Via Epia M10000 system ( who support booting on usb ), grub load fine, the kernel load too but after a few second, it stop working and screen a kernel panic:
"unable to mount rootfs /dev/sda2" ...

I know why it do that, that's he can't reconize the usb stick since he haven 't load necessary module like usb-storage, sd_mod ...

So I have tried to reconfigure my kernel, at the beggining, all this stuff was compiled in module, so without initrd, it's normal that it doesn't worked but I have recompiled them in hard: usbcore, etc ... and also initrd support, but it still do a kernel panic ... But after the kernel panic, the usb stick seems to be reconized :/ In fact, something like that appears:

SCSI device sda: 507901 512-byte hdwr sectors (260MB)

What I should do to make my system run properly ? I have tried to recompiled all this stuff in module ( exect initrd ) and to make an initrd with ... mkinitrd but I don't really know how to do on lfs, I have find an hint but I don't know how to make it run :/
It said:

Code:
#./mkinitrd kernel_version=2.6.11.7 +module=sd_mod +module=usb-storage initrdfs=ext2
...
Setting up Loopback Device...
All of your loopback devices are in use!
And the script stopped ...
I have checked in the script the part who make this message
It do a loop with this command:
Code:
"if losetup /dev/loop$device_number $IMAGE 2>/dev/null
with device_number 0 -> 8
The problem is that they have no /dev/loop or anything who start by loop* in my /dev directory, ...

So sorry for this book ... it's long and not certainly easy to read, i'm not really fluent in english :'(

I hope you can help me because I have no idea of what I should do now :/

Thanks for your help, or at a loss for your time
Aimless is offline  


Reply With Quote
Old 05-05-2005   #2 (permalink)
Linux Newbie
 
Join Date: Apr 2005
Location: Charlottesville, VA
Posts: 175
Send a message via AIM to sxeraverx Send a message via MSN to sxeraverx
You should try to compile all of the usb options directly into the kernel, instead of as modules. Also, make sure you have loopback device support enabled and also probably built in instead of modularized.
__________________
---sxeraverx---
Linux without a C Compiler is like eating Spaghetti with your mouth sewn shut. It just doesn't make sense.
sxeraverx is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 02:34 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2