LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 06-20-2003, 12:29 AM   #1
Rathar
LQ Newbie
 
Registered: Jun 2003
Location: Vegas
Posts: 4

Rep: Reputation: 0
USB root


Okay here's the idea - I have a tablet - it has a 2.0 usb port. It knows how to boot a hard drive off USB. I have a USB drive which linux is quite happy to recognize and use, partition, and have installed my favored distribution on it. However, due to some issues with USB, the usb devices are not recognized by the kernel until after init runs - there's some lock. (the 2.5.72 kernel I'm playing with doesn't have the same problem... but there's other issues)...

As I understand it I can (and do) have a small partition on the main drive installed in the computer. Hereupon is a kernel with all drivers compiled in, no worry about modules. I have an initrd with busybox and a couple other tools... (for some reason the 2.5 kernel scsi driver doesn't recognize the partitions on the usb drive until I issue a sfdisk -R /devices/discs/disc1/disc )

So - linuxrc looks something like this...

#!/bin/ash
mount -t devfs none /devices
mount -t proc none /proc
sfdisk -R /devices/dsics/disc1/disc
mount /devices/discs/disc1/part2 /root
mount -t devfs none /root/devices
mount -t proc none /root/proc
mount /devices/discs/disc0/part5 /root/boot # the boot part this is running from
ash # pause a moment and check out the system...
cd root
/bin/pivot_root . initrd
umount initrd/devices
umount initrd/proc
exec chroot . /sbin/init a


I've tried various other options to init... but it seems to demand an A - I get a timeout for it accessing /dev/initctl - at the pause of ash in the middle I see that when I get to the exec point the current process will be like pid 11... I was reading another thread here about a similar problem dealing with scsi raid booting...

so that exec of init fails.. .and the system continues to load, and without some root option passed through grub - decides ot use /dev/hda6 - where I have a minimal redhat 9 installed (had to install that in order to install sorcerer on the usb drive....)

There was some small hint that the above type init wouldn't work under linux 2.5... so maybe I should try the same with the 2.4.19 kernel

(pause while I tinker a bit more)


Okay I'm not sure I understand why the chroot is needed after the pivot_root... why can't I just then fall out of the linuxrc script and have the normal /sbin/init run as would be normal? seems after I exit the linuxrc though the system proceeds to attempt to mount the root=(device) and then run init...

( long pause - 2.4.19 kernel isn't running the initrd correctly )

Ahh well - anyhow this is my project - I'll post the solution(s) if I find them and if anyone else has tinkered with this usb boot thing ....
 
Old 06-20-2003, 12:41 AM   #2
Rathar
LQ Newbie
 
Registered: Jun 2003
Location: Vegas
Posts: 4

Original Poster
Rep: Reputation: 0
Okay - next approach - hack init to have an option - ignore PID... there's no way that I can get it to be 1, and have the kernel processes running enough to use the USB... please - someone stop me before I hack again!
 
Old 06-20-2003, 01:51 AM   #3
Rathar
LQ Newbie
 
Registered: Jun 2003
Location: Vegas
Posts: 4

Original Poster
Rep: Reputation: 0
Ahha okay solution.... the final line(s) in the initrd is....

export PATH=/initrd/bin:$PATH
exec chroot . linuxrc

(linuxrc being the busybox tool - which rehaves like init, and parses inittab (with a more minimalist approach).

So at least PID 1 is not required for the init program. Thank you for your time.
 
Old 06-20-2003, 02:40 AM   #4
Rathar
LQ Newbie
 
Registered: Jun 2003
Location: Vegas
Posts: 4

Original Poster
Rep: Reputation: 0
Now that the system works(?) I have to say - USB support is badly broken when applied to running a system from it. New tasks/uncached accesses can timeout and take forever... the system is still responsive (can switch virtual termainals)... but it seems that all disc activity is halted... still haven't gotten the 2.4.19 kernel to use the initial ramdisk...

Do not try this at home. These are trained idiots.
 
  


Reply



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 HD Needs Root Privileges rrrssssss Linux - Hardware 3 11-13-2005 04:08 PM
usb drives only seen as root Mchipser SUSE / openSUSE 7 09-13-2005 07:57 AM
RHEL3 Mounting USB after reboot and between reboots: root and non-root users Luis Nunes Linux - Hardware 0 07-20-2005 08:32 AM
Mounting USB Thumbdrive as non-root? ernestteo Linux - Hardware 6 12-24-2004 09:49 AM
talking to USB 2.0 without root?? deebuv Linux - Hardware 0 06-23-2004 09:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:53 AM.

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
Open Source Consulting | Domain Registration