DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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:
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.
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??
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:
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.
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:
/bin: binaries for user-land prog's
/dev: lists disks, partitions, etc
/var: variable data, like logs
/usr: app's from/for users
/sys: system stuff
/etc: various scripts, configuration files, etc
/sbin: binaries for root programs
/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...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.