PDA

View Full Version : Manually mounting the /KNOPPIX/KNOPPIX glob ???



BillS
01-03-2004, 03:10 PM
I am trying to learn the remastering using the O'Reilly article. The resulting disks start to boot (discovery down to "Welcome to Knoppix..."), but then fails after finding the system. It can't locate an "ld.cache" and then "rm", "awk", .... It makes it through 10-15 lines of "not founds" and drops into a shell awaiting reboot.

I want to compare the the /KNOPPIX/KNOPPIX file I built with the one from the distribution. I thought to do that by mounting it with a loop somehow. But the 'testDidtribution.sh' pipes the iso through "create_compressed_fs". and then stores it.

What commandline commands would give me the equivelant of how the disk is mounted (accessed) during live CD access? Hopefully with the same on-the-fly decompression during acces as is happening during the live CD boot.

My remastering problem is that I have completed Part#1, cobbled the equivelant to Part#2. This part is a bit vague and seems to have been done with a different set of directory structures. In Part#3 I made no changes and simply remastered (using the scripts) what I had just extracted. I must have made a mistake somewhere in Part #2. (I have requested some clarifications from the author, which I am still awaiting).

Any help will be appreciated.

BillS

windos_no_thanks
01-03-2004, 03:28 PM
This document describes, among other things, how to mount the cloop file
when running from hard disk:

http://www.stirnimann.com/mystuff/doc/knoppix.txt

BillS
01-04-2004, 04:39 AM
windos;
Thanks for the link, and the example.
I also found the problem I mentioned in my post. The O'Reilly article has a typo (IMHO)(or at least missing characters).

Part #2 Step #3
---
bash-2.05# cp -pR /KNOPPIX/ /mnt/hdc1/KNOPPIX_original
bash-2.05# cp -pR /mnt/hdc1/KNOPPIX_original /mnt/hdc1/KNOPPIX_remastered
---
the cp commands are missing "/*" each (IMHO) after the source directories
---
bash-2.05# cp -pR /KNOPPIX/* /mnt/hdc1/KNOPPIX_original
bash-2.05# cp -pR /mnt/hdc1/KNOPPIX_original/* /mnt/hdc1/KNOPPIX_remastered
---
That way the testDistribution.sh produces a bootable file

BillS

BillS
01-04-2004, 07:44 PM
Ok; I tried the "insmod cloop file=..." command from the document referenced above and it failed.


root@knop33:/tmp#insmod cloop file=/home/vapor/CYA/KNOPPIX-dir-from-hda10-original/KNOPPIX/KNOPPIX
Using /lib/modules/2.4.22-xfs/kernel/drivers/block/cloop.o
/lib/modules/2.4.22-xfs/kernel/drivers/block/cloop.o: init_module: Cannot allocate memory

That is probably because cloop in already loaded. So I tried the following

insert KNOPPIX Live CD in drive


root@knop33:/tmp# mount /cdrom
root@knop33:/tmp# ls /cdrom
Demos KNOPPIX Talks autorun.bat autorun.inf cdrom.ico index.html
root@knop33:/tmp# losetup /dev/loop4 /cdrom/KNOPPIX/KNOPPIX
root@knop33:/tmp# losetup -a
/dev/loop3: [0309]:373250 (/home/vapor/CYA/KNOPPIX-dir-from-hda10-original/KNOPPIX/KNOPPIX) offset 0, no encryption
/dev/loop4: [0b00]:67584 (/cdrom/KNOPPIX/KNOPPIX) offset 0, no encryption
root@knop33:/tmp# mount -t iso9660 /dev/loop4 /mnt/test
mount: block device /dev/loop4 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/loop4,
or too many mounted file systems
root@knop33:/tmp#

The stickler seems to be the -t argument. What is the type? In the document windos references, a simple:
mount -o ro /dec/cloop /compressed/
command was specified.

??What Next??

BillS

windos_no_thanks
01-04-2004, 09:16 PM
Ok; I tried the "insmod cloop file=..." command from the document referenced above and it failed.


root@knop33:/tmp#insmod cloop file=/home/vapor/CYA/KNOPPIX-dir-from-hda10-original/KNOPPIX/KNOPPIX
Using /lib/modules/2.4.22-xfs/kernel/drivers/block/cloop.o
/lib/modules/2.4.22-xfs/kernel/drivers/block/cloop.o: init_module: Cannot allocate memory

That is probably because cloop in already loaded. So I tried the following

When you have booted from HD it should NOT be loaded automatically.
Which version of cloop are you using ?
Version 2 is incompatible with the earlier verions so you need to use the one that came with the tools used to create the compressed image you are trying to mount.

BillS
01-04-2004, 10:25 PM
Alright, The version I boot from the HD is 3.3 dated 9-24-03. I just rebooted (after attempting a remastered boot) and got this:


root@knop33:~# modprobe -l |grep cloop
/lib/modules/2.4.22-xfs/kernel/drivers/block/cloop.o
root@knop33:~#

It looks like it is being loaded at boot
I found this line in the messages file:


Jan 4 13:10:26 knop33 kernel: cloop: Initializing cloop v1.02
Jan 4 13:10:26 knop33 kernel: cloop: /home/vapor/CYA/original/KNOPPIX/KNOPPIX: 29973 blocks, 65536 bytes/block, largest
block is 0 bytes.

The one I am trying to remaster is 3.3 dated 11-19-03.
<shrug>

BillS

windos_no_thanks
01-05-2004, 07:28 AM
Right, so you are using the wrong version of cloop. To mount 11-19-03 you need version 2.00 ! Get it here: http://developer.linuxtag.net/knoppix/sources/cloop_2.00-1.tar.gz , open it, read the instuctions, compile & install. :-) (if my menory serves me right you need the sources for the kernel too)

BillS
01-05-2004, 05:44 PM
Thanks;
I tried that last night and it worked. I was just browsing through other questions and saw the part about the 'head -4' on the file giving the version. So I checked and found that the 9-24-03 is 1.2 .
It seems strange to have such a critical change happen without any real change in the versioning of the OS. Dis the install and the remasters now boot!!

Anyway, this morning I have slowly working into the changes I want.

Thanks for the time and the help....

BillS

Floppydisk
01-24-2004, 07:09 PM
Aarrgh...
Thankyou BillS. You rescued me from a multi-hour misery.
Now for that email to the O'Reillys...

F



...the cp commands are missing "/*" each (IMHO) after the source directories...