Booting with files NOT in root dir - HELPForum: USB booting Topic: Booting with files NOT in root dir - HELP started by: choekstr Posted by choekstr on April 13 2005,01:29
Ok, so I don't like all the files in the root of my device (CD, USB, etc) and so I have moved everything to a /dsl directory. I also have a directories for other images/installs.I think I have determined that since I am moving the files into a directory and then booting, it can't find the knoppix image file. (DUH, it says "Can't find KNOPPIX filesystem, sorry. Dropping you to a (very limited) shell.") I know, say using the CD method (same for USB), it gets mounted properly as going into /mnt shows /dsl and other directories, and within the /dsl directory there is a knoppix directory. I tried passing a root=/dsl and a BOOT_IMAGE=/dsl/knoppix on the boot options (append line for isolinux, kernel line for grub) but that didn't seem to help. What do I need to do to have the "compartmentalized" directories and still be able to fool dsl into booting from the correct image? Thanks in advance, Chris Hoekstra Posted by mikshaw on April 13 2005,02:14
I thought i had an answer for you, but on closer look i can't find any way to do it. You need to specify a device from which to boot rather than a directory.I don't really know why you care so much about booting this way (have never seen it done in anything but a virtual machine), but i'd be interested to know how to do it as well...might be fun to mess around with. Posted by choekstr on April 13 2005,03:08
I want to install 2 versions of dsl, 1 version of knoppix, one version of slax and be able to boot from them all. I could partition the media, usb/cd but then that doesn't help much as I can't get to any of the other files.Also, I want to be able to add tools for when I am booted in windows. For instance, a directory structure of: / would have /dsl (install of damnsmalllinux) /knoppix (full install of knoppix) /slax (medium sized knoppix install) /Tools (various tools like service packs, winzip, etc) This would afford a bootable device that does more than just ONE thing: boot dsl. I ran across the bootfrom option, but I don't think that is what I want. I need to either: 1.) tell the distro to mount /dsl as / 2.) or tell scripts that knoppix/knoppix is one dir deeper Thoughts? Posted by mikshaw on April 13 2005,03:30
What makes you think you couldn't get to the other files? If you made 4 partitions on your device you could put one system on each, and mount the others. For example, in DSL, create /knoppix /slax and /Tools. When you boot dsl, mount the other partitions to those directories. Do the same with the other systems, but change the one directory (in knoppix, for example, you'd create /dsl instead of /knoppix). Your root directory is always going to contain the standards, like /bin and /usr, but this will give you the other systems in your root directory. Although the linux filesystem standard recommends that you put mounts in /mnt or /media, it should still work. Just make sure the Tools partition is formatted as fat32 so windows can access it.
Posted by choekstr on April 13 2005,18:25
Cause then I can't format a drive, install a boot loader, and just copy files over from within windows. If I formatted them all fat, I would get 4 drive letters under windows. If I did ext2 then I wouldn't see the other partitions and that might help, but why do I have to?I shouldn't have to partition my drive because dsl needs to be in the root partition or else it just won't work. I can accept that restriction if it is there, but I don't want to start exploring alternatives until there is a reason to. Ideally I would like to have one partition, with several distros as well as some tools, all accessible from within windows (have to copy new versions of dsl over afterall!) and all from within dsl if need be. Chris Posted by Caspar_s on April 13 2005,19:35
Is it just dsl? Or do slax and knoppix have the same problem?(just thinking that because it is based on knoppix and is looking for knoppix/knoppix) If it is just dsl, try and see how knoppix is getting around it. Posted by choekstr on April 13 2005,20:01
It seems to be both slax and dsl, but I am not thinking they are both from different issues. I haven't tried full knoppix yet to find *that* pattern.I think the dsl issue is a finding of the knoppix filesystem and the slax is a hardware detection (running under vmware while ironing out bugs for the quick reboot aspect). I am really really limited in my "limited" shell as I don't even have ls! I have mount, but I can't see directories to know where I can mount to, can't mkdir, can't see what devices I have or it found, the only think I have of any help is lsmod (might be a good todo to give us some decent diagnostic tools in this limited shell) lsmod shows I these modules loaded: usb-storage usb-uhci usbcore ataraid ide-scsi The last messages I see: Welcome to the KNOPPIX live Linux-on-CD! Scanning for USB/Firewire devices... Done. Enabling DMA acceleration for: hdc [VMware Virtual IDE CDROM Drive] Can't Find KNOPPIX file system, sorry. Dropping you to a (very limited) shell. Press reset button to quit." Ugh. Posted by choekstr on May 03 2005,23:32
I have figured out how to solve this dilemna.If anyone cares or needs to know, just ask and I can explain how I got there. Chris Posted by KnightFire on May 08 2005,04:02
Well... explain... don't leave us lerkers hanging.
Posted by MikeHunt79 on May 08 2005,12:21
I would also be interested in how you managed this... It might help solve some of my booting issues.
Posted by choekstr on May 10 2005,14:17
Ok, so basically the linuxrc script, that runs after loading the ramdisk, tells where to find the knoppix directory and file. I just changed the variable for the directory and then it continued on after finding it. So a quick step by step with the extreme details left out: Copy the kernel (linux24) from one of the dsl packages to your directory on your media (cdrom, usb drive, etc) Copy the /KNOPPIX/KNOPPIX file to that same directory copy over minirt24.gz to linux system gzip -d minirt24.gz mount -o loop minirt24 /mnt cd /mnt vi linuxrc Change: KNOPPIX_DIR="KNOPPIX" KNOPPIX_NAME="KNOPPIX" to: KNOPPIX_DIR="<wherever>" #<wherever> is /boot/dsl for me (relative to media root) KNOPPIX_NAME="KNOPPIX" save, unmount, gzip -9, copy minirt24 back to media directory ###ADVANCED SECTION - ONLY NECESSARY IF YOU WANT EXTENSIONS#### There is a problem with the .dsl packages which requires modifying the dsl_config startup script in /etc/init.d (IIRC). You need to change it from /cdrom to /cdrom/<wherever> (in my case /cdrom/boot/dsl) and then those load properly. This is a bit harder than it looks because the knoppix file is in a cramfs/cloop format. You have to either mount this file using the cloop package (insmod, mount module, etc) or you have to re-master the knoppix file with the changed dsl-config file in it using create_compressed_fs. Hope this helps, Chris Hoekstra |