LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-18-2006, 03:11 PM   #16
OmnipotentOscar
Member
 
Registered: Jan 2005
Distribution: Fedora 5, Debian
Posts: 56

Original Poster
Rep: Reputation: 15

Ok.. there is a bootloader which boots into a kernel on NOR flash. Currently the OS is in NAND flash but as this is only 128MB I can't really add any more packages to the installation. It is currently running X Windows etc but I want to put a JIT and Python on it. As a result I want to still boot into the kernel in NOR flash but then boot the rest of the distrobution from USB stick. That way I can expand the size of the distrobution. I think I've just worked out an easy way to do it... I will boot into the OS in NAND flash and then do a chroot onto the mounted USB after mounting... think this will work? See any problems with it?

Thank you,

Adam
 
Old 12-18-2006, 03:34 PM   #17
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: 65
What you are do is a bit over my head but I see where you are going. Your idea of chroot would be the better option. I think maybe why the system does not see the drive partition correctly is something is missing from the kernel itself. Everything needed to boot the device must be built into the kernel and not as modules. It may be a pretty big module but if kept simply that should work. So I would compile a kernel with ext2, generic scsi, the USB controller types ( ehci-hcd, uhci-hcd, and ohci-hcd), and usb-storage. I think that should cover most of it.

Brian

Brian
 
Old 12-18-2006, 06:07 PM   #18
OmnipotentOscar
Member
 
Registered: Jan 2005
Distribution: Fedora 5, Debian
Posts: 56

Original Poster
Rep: Reputation: 15
That seems to have worked. I can successfully copy accross the OS to the USB key, mount it and then do a chroot. The only thing now is that after having done the chroot none of the hardware is mapped to the new root... is there anyway to reinitialise the OS at this point to reinitialise the hardware to the new mount point??

Thank you,

Adam
 
Old 12-18-2006, 06:57 PM   #19
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: 65
I am not going be any help here. Never did what you are doing so I am at a lost to what can be done. But I will give it thought. Maybe something will come to me.

Brian
 
Old 12-18-2006, 07:18 PM   #20
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
If you create a chroot enviroment you'd also have to re-create the various directories and populate them properly. You need /bin, /dev, /var, /usr, /sys, /etc, /sbin and of course /home. Which directory holds what:
  1. /bin: binaries for user-land prog's
  2. /dev: lists disks, partitions, etc
  3. /var: variable data, like logs
  4. /usr: app's from/for users
  5. /sys: system stuff
  6. /etc: various scripts, configuration files, etc
  7. /sbin: binaries for root programs
  8. /home: well, what you'd think?
Actually you'd also need /proc, where kernel info can be found. And /boot, to not give away the fact the user is chrooted in...
 
  


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 key not mounting NNP Linux - Hardware 5 03-30-2006 02:52 PM
How to use a USB Flash Key with out mounting and unmounting it! zparihar Linux - General 5 08-20-2005 11:56 AM
Automatic mounting/ umounting USB key on FC3 kubokubik Fedora 3 12-01-2004 03:16 AM
Help mounting USB key selan Linux - Hardware 5 06-08-2004 05:54 PM
mounting second partition of USB RAM key Armgas Linux - Hardware 0 05-17-2003 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:33 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