The reason I am posting is that I had come across this long thread as I was writing a patch to the linuxrc to allow you to use a loop mounted iso without first needing to mount a cloop. Now I'm using the patch I came across here for linuxrc along with a few other files and have even tried out booting from ntfs using the supplied grub. It lets you use bootfrom=/dev/xxx/abc/k*.iso even if the iso is on an ntfs partition and it also lets you use a bootloader (like grub) with just the kernel and minirt copied out off the iso. If you have a boot loader you can setup (e.g. grub which could be simply chained onto your windows (98 to xp anyway) boot loader as desribed in that long thread) and can loopmount the iso images (daemon tools is free as in coke on windows for this) then if the following changes were made to original knoppix releases it would be simple to download an iso, extract a couple of files and then boot entirely from hard disk without burning. Once I had this working with 3.6, I tried 3.7. It boots with the 3.6 kernel and minirt, but I wanted to use the kernel from 3.7 and remake the minirt from 3.7 so I knew I was consistent. So I wrote a script to extract the kernels and rebuild the minirt files for another Knoppix (so far only tested kernel 2.6 with 3.7, suspect it will work fine with remasters aswell though if they only have one kernel it might need adjusting, I will test 2.4 and dsl shortly).
First things first is you need to make a folder which you will be building, lets say /root/build/. Inside this folder you need to make a folder called "other" which should contain the following, all copied from minirt2[46]_ntfs.gz files that comes with grubc (you can cp -a the whole modules and static folders from the minirt and then delete all the extra stuff):
Can someone explain the original sources of the above file so they can be recreated?Code:/root/build/other/: total 8 drwxr-xr-x 4 root root 4096 2004-11-07 12:49 minirt24 drwxr-xr-x 4 root root 4096 2004-11-07 12:59 minirt26 /root/build/other/minirt24: total 8 drwxr-xr-x 2 root root 4096 2004-11-07 12:51 modules drwxr-xr-x 2 root root 4096 2004-11-07 12:48 static /root/build/other/minirt24/modules: total 176 -rwxr-xr-x 1 root root 129868 2003-12-31 05:47 insmod.modutils -rwxr-xr-x 1 root root 41190 2004-04-21 18:31 rmmod /root/build/other/minirt24/static: total 428 -rwxr-xr-x 1 root root 431896 2004-06-01 09:36 busybox lrwxrwxrwx 1 root root 7 2004-11-07 13:29 mkdir -> busybox lrwxrwxrwx 1 root root 7 2004-11-07 13:29 mount -> busybox lrwxrwxrwx 1 root root 7 2004-11-07 13:29 umount -> busybox /root/build/other/minirt26: total 8 drwxr-xr-x 2 root root 4096 2004-11-07 13:00 modules drwxr-xr-x 2 root root 4096 2004-11-07 13:02 static /root/build/other/minirt26/modules: total 72 -rwxr-xr-x 1 root root 24754 2004-01-15 09:32 insmod -rwxr-xr-x 1 root root 41190 2004-04-21 18:31 rmmod /root/build/other/minirt26/static: total 428 -rwxr-xr-x 1 root root 431896 2004-06-01 09:36 busybox lrwxrwxrwx 1 root root 7 2004-11-07 13:29 mkdir -> busybox lrwxrwxrwx 1 root root 7 2004-11-07 13:29 mount -> busybox lrwxrwxrwx 1 root root 7 2004-11-07 13:29 umount -> busybox
You also need to copy the patch for linuxrc (linuxrc26_ntfs.diff) from the root of one of the minirt2x_ntfs.gz files to /root/build.
Also in /root/build (or wherever your are building things) you need to put a blank minirt file named minirt.blank.img which you can make with the following:
Next you need to put the following into a script, say /root/new-minirt.sh and edit it to make sure the paths at the start are right (ISOFILE is the new iso you want the minirt for, BUILDROOT is where you are building everything):Code:dd if=/dev/zero of=/root/build/minirt.blank.img bs=4096 count=1125 mke2fs -L "KNOPPIX miniroot" -b 1024 -N 8192 -O none -F -q -m 0 /root/build/minirt.blank.img || exit 1
WARNING, this script I have given worked fine for me, but it's not meant to be perfect and if it hoses your system I'm sorry but it's really here to document the steps to get it working as much as for others to run it. It is the script I used (though with a different BUILDROOT) under 3.6 to create the files I needed to boot the 3.7 I'm in now so it's not horribly broken I don't think
Note that what it builds will be in a folder in /root/build/, the folder I made is called 200411072234 (meaning it was created at 22:34 on 7 Nov 2004), i.e. it makes a new folder for each run (so you'll want to delete out duds). Inside this folder is a boot/ folder which has the 2 kernels and 2 minirt files.Code:#!/bin/sh ISOFILE="/mnt/hda6/distros/live/knoppix_3.7_PC-Welt.iso" CLOOPFILE="KNOPPIX/KNOPPIX" BUILDROOT="/root/build" # mount the iso echo "Trying to umount iso and cloop from an old run, ignore errors" umount $BUILDROOT/iso umount $BUILDROOT/cloop umount $BUILDROOT/minirt losetup -d /dev/cloop1 echo "Mounting iso" mkdir -p $BUILDROOT/iso||exit mkdir -p $BUILDROOT/cloop||exit mkdir -p $BUILDROOT/minirt||exit mount -o loop,ro $ISOFILE $BUILDROOT/iso||exit # create the temporary build area echo "Make folders" TEMPDIR=$BUILDROOT/`date +%Y%m%d%H%M` || exit mkdir -p $TEMPDIR/common || exit mkdir -p $TEMPDIR/2.4/modules||exit mkdir -p $TEMPDIR/2.6/modules||exit mkdir -p $TEMPDIR/old||exit mkdir -p $TEMPDIR/minirt24.dir||exit mkdir -p $TEMPDIR/minirt26.dir||exit mkdir -p $TEMPDIR/boot||exit # copy the minirts to temp and unzip them echo "Copy and extract minirt" cp -a $BUILDROOT/iso/boot/isolinux/minir*.gz $TEMPDIR/old||exit gunzip $TEMPDIR/old/minir*.gz||exit # copy kernels to boot folder echo "Copy kernels" cp -a $BUILDROOT/iso/boot/isolinux/linux* $TEMPDIR/boot||exit # mount the cloop echo "Setup and mount cloop" losetup /dev/cloop1 $BUILDROOT/iso/$CLOOPFILE||exit mount -o loop,ro /dev/cloop1 $BUILDROOT/cloop||exit # copy the insmod.modutils to common echo "Copying insmod.modutils" cp -a $BUILDROOT/cloop/sbin/insmod.modutils $TEMPDIR/common||exit # Loop through kernels echo "Starting Kernels Loop" for KERNEL in `ls $BUILDROOT/cloop/lib/modules/|grep ^2` ; do case $KERNEL in 2.4.*) KDIR=2.4; RT=minirt24; ;; 2.6.*) KDIR=2.6; RT=minirt26; ;; esac # copy the modules to 2.4 and 2.6 folders echo "Copying modules" for MODULE in fs/ntfs/ntfs drivers/block/loop; do cp -a $BUILDROOT/cloop/lib/modules/$KERNEL/kernel/$MODULE.*o $TEMPDIR/$KDIR/modules||exit done ls $TEMPDIR/$KDIR/modules/*.ko | perl -e 'while(<>){chomp;s/\s*$//;$in=$_;$out=$_;$out=~s/\.ko$/.o/;system("mv $in $out\n");}'||exit # mount the minirt echo "mount minirt" mount -o loop,ro $TEMPDIR/old/$RT $BUILDROOT/minirt||exit # copy the contents of the minirt to a folder echo "Copy minirt contents to folder" cp -a $BUILDROOT/minirt/* $TEMPDIR/$RT.dir||exit # umount the minirt and delete the old copy echo "umount minirt" umount $BUILDROOT/minirt||exit rm $TEMPDIR/old/$RT # copy the insmod.modutils and modules into the folder echo "copy insmod.modutils and modules to minirt folder" cp -a $TEMPDIR/$KDIR/modules/* $TEMPDIR/$RT.dir/modules/||exit cp -a $TEMPDIR/common/insmod.modutils $TEMPDIR/$RT.dir/modules||exit # copy the "other" files into the folder echo "Copying other files into minirt" cp -a $BUILDROOT/other/$RT/* $TEMPDIR/$RT.dir||exit # patch the linuxrc echo "Patch linuxrc" cp -a $BUILDROOT/linuxrc26_ntfs.diff $TEMPDIR/$RT.dir||exit patch $TEMPDIR/$RT.dir/linuxrc < $TEMPDIR/$RT.dir/linuxrc26_ntfs.diff||exit # copy the blank minirt to a new file and loop-mount rw echo "Create new miniroot and mount it" cp -a $BUILDROOT/minirt.blank.img $TEMPDIR/boot/$RT||exit mount -o loop,rw $TEMPDIR/boot/$RT $BUILDROOT/minirt||exit # copy the folder into the minirt echo "copy in content to new minirt" cp -a $TEMPDIR/$RT.dir/* $BUILDROOT/minirt/||exit # umount the minirt echo "Unmount the new minirt" umount $BUILDROOT/minirt||exit # gzip the minirt echo "Gzip up the minirt" gzip $TEMPDIR/boot/$RT||exit # Finished, do we have another kernel to do? echo "Finished loop for $KERNEL" done # umount the cloop and iso echo "Unmounting the cloop" umount $BUILDROOT/cloop||exit losetup -d /dev/cloop1||exit umount $ISOFILE echo "Done"
The only issue left here is that I am not copying across the japanese nls modules (for language support) and I also haven't removed the changes for those modules from the linuxrc patch. I will see if I can copy ALL the nls modules into the linuxrc and load them all (or would they autoload) but that will add about 250k to the minirt (thats an educated guess for 2.6 it could be more) so if this went into the original knoppix people might have to remake the minirt more often, stripping things back out if they wanted to add any extra modules. As it is it works fine for me (windows/ntfs system is in English, in Ireland if that impacts it) with the minirt increased from 773k/782k to 1111k (2.4 and 2.6 are now only 580b different in size) and increase of about 330k but a substantial increase. After booting up it looks like nls_iso8859_1 is supporting the ntfs, what codepages are required elsewhere (I can guess for Japan)? All of them? Would it be reasonable to say your paths have to be intelligible in iso8859-1 and not include all the nls pages?
Finally I'm going to post a mail about this to the developers list as it seems the original author has had no luck getting a response. In the meantime if you are remastering, the above should work to add support for this to your remaster.
A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G
$13.99
HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin
$12.90
A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G
$13.99
HyperX FURY RAM DDR4 16GB 8GB 32GB 4GB 3200 2666 2400 2133 Desktop Memory DIMM
$9.64
Lot of 2 32GB DDR4 2666 PC4-21300 SODIMM RAM Modules Mixed Brand
$60.00
Samsung 16GB 2Rx4 PC4-2400 RDIMM DDR4-19200 ECC REG Registered Server Memory RAM
$20.99
Samsung 128GB (4x 32GB) M86B4G70DM0-CMA3 PC3-14900L 4Rx4 DDR3 ECC Reg Server Mem
$39.99
8GB PC3L-12800S 1600MHz SODIMM DDR3 RAM | Grade A
$12.00
A-Tech 256GB 4x 64GB 4Rx4 PC4-19200 ECC Load Reduced LRDIMM Server Memory RAM
$287.96
A-Tech 128GB 2x 64GB 4Rx4 PC4-19200 ECC Load Reduced LRDIMM Server Memory RAM
$143.98