Link to home
Start Free TrialLog in
Avatar of Mario Zio
Mario ZioFlag for Italy

asked on

Knoppix 6.2.1 remastering failed several times

Hello to everybody,I tried to make the remastering of Knoppix 6.2.1 several times,but right now I've not been able to do it succesfully. Here are the steps I do,please can you check if there is something wrong ? Thanks.

knoppix 2 lang=it (I boot Knoppix 6.2.1 with these parameters)

fdisk -l (these are the partitions of my hard disks)

/dev/sda1 : NTFS (this is the hidden partition did by Windows 7)
/dev/sda2 : NTFS (this is the real partition where is installed win 7)
/dev/sda3 : Linux swap
/dev/sda4 : Linux (I use this partition to make the remastering)
/dev/sdb1 : this is the usb key

These are the commands I give :

mkdir /mnt/sda4/knx

mkdir -p /mnt/sda4/knx/master/KNOPPIX

mkdir -p /mnt/sda4/knx/source/KNOPPIX

cp -Rp /KNOPPIX/* /mnt/sda4/knx/source/KNOPPIX

cp -ar /mnt-system/boot /mnt/sda4/knx/master/boot

cp -ar /mnt-system/KNOPPIX/modules /mnt/sda4/knx/master/KNOPPIX/.

cp /mnt-system/index.html /mnt/sda4/knx/master/

cd /mnt-system && find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/sda4/knx/master/ \;

mount --bind /dev /mnt/sda4/knx/source/KNOPPIX/dev

mount --bind /proc /mnt/sda4/knx/source/KNOPPIX/proc

mount --bind /sys /mnt/sda4/knx/source/KNOPPIX/sys

chroot /mnt/sda4/knx/source/KNOPPIX

mkdir /mnt/sdb1
mount -t auto /dev/sdb1 /mnt/sdb1
cd /mnt/sdb1

cp script /usr/sbin (I need to copy a script inside the squash image file of knoppix)

umount /mnt/sdb1
rm -r sdb1
umount /proc
exit

rm -rf /mnt/sda4/knx/source/KNOPPIX/.rr_moved

mkisofs -R -U -V "K" -publisher "K" -hide-rr-moved -cache-inodes -no-bak -pad /mnt/sda4/knx/source/KNOPPIX | nice -5 /usr/bin/create_compressed_fs - 65536 > /mnt/sda4/knx/master/KNOPPIX/KNOPPIX

cd /mnt/sda4/knx/master

find -type f -not -name sha1sums -not -name boot.cat -not -name isolinux.bin \-exec sha1sum '{}' \; > KNOPPIX/sha1sums

mkisofs -pad -l -r -J -v -V "KNOPPIX" -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o /mnt/sda4/knx/knoppix.iso /mnt/sda4/knx/master

At that point I reboot the computer and then I restart the knoppix remastered image with these parameters : knoppix 2 toram lang=it. It tries to load itself inside the memory and then this error occurr :

/init: line 693: /bin/mount : not found
/init: exec: line 742: /sbin/init: not found

I don't understand why. Please help me thanks.
Avatar of Duncan Roe
Duncan Roe
Flag of Australia image

You will get "not found" from an ELF executable if the run-time loader that it was built to use does not exist. This could be what's happening. Check what is the loader used by /bin/mount on your Knoppix image. Examplke below - run-time (dynamic) loader is /lib/ld_linux.so.2
Verify the loader used by the Knoppix /bin/mount is on the Knoppix CD.
20:36:56$ cat -A /bin/mount|head -1
^?ELF^A^A^A^@^@^@^@^@^@^@^@^@^B^@^C^@^A^@^@^@M-pM-^]^D^H4^@^@^@lM-]^@^@^@^@^@^@4^@ ^@^G^@(^@^Z^@^Y^@^F^@^@^@4^@^@^@4M-^@^D^H4M-^@^D^HM-`^@^@^@M-`^@^@^@^E^@^@^@^D^@^@^@^C^@^@^@^T^A^@^@^TM-^A^D^H^TM-^A^D^H^S^@^@^@^S^@^@^@^D^@^@^@^A^@^@^@^A^@^@^@^@^@^@^@^@M-^@^D^H^@M-^@^D^HM-^DM-V^@^@M-^DM-V^@^@^E^@^@^@^@^P^@^@^A^@^@^@M-^DM-V^@^@M-^Df^E^HM-^Df^E^HM-^P^E^@^@M-l^V^@^@^F^@^@^@^@^P^@^@^B^@^@^@M-^XM-V^@^@M-^Xf^E^HM-^Xf^E^HM-X^@^@^@M-X^@^@^@^F^@^@^@^D^@^@^@^D^@^@^@(^A^@^@(M-^A^D^H(M-^A^D^H ^@^@^@ ^@^@^@^D^@^@^@^D^@^@^@QM-etd^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@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@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@$

Open in new window

Avatar of Mario Zio

ASKER

root@MicroKnoppix:/# cat -A /bin/mount|head -1

^?ELF^A^A^A^@^@^@...../lib/ld-linux.so.2....etc
That's your mount. What about the one on the mastered CD?
cd into the source tree: cd /mnt/sda4/knx/source/KNOPPIX; cat -A mount|head -1. Make sure the indicated loader is in the tree
Before to give your command should I give these commands ?

mount --bind /dev /mnt/sda4/knx/source/KNOPPIX/dev

mount --bind /proc /mnt/sda4/knx/source/KNOPPIX/proc

mount --bind /sys /mnt/sda4/knx/source/KNOPPIX/sys

chroot /mnt/sda4/knx/source/KNOPPIX

if I don't,this is the output :

root@Microknoppix:/# cd /mnt/sda4/knx/source/KNOPPIX; cat -A mount|head -1
cat: mount: no such file or directory
I have the same result if I give the commands I told to you.
and then what it means ? How Can I fix this error ?
ASKER CERTIFIED SOLUTION
Avatar of Duncan Roe
Duncan Roe
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What I need from Knoppix is that it can be loaded totally in RAM and I can eject the CDROM. Do you know any other kind of linux distro that has the feature I need ?
I thought most live CD distributions worked that way - or do you find Knoppix doesn't? Can't you eject it? Otherwise you might want to look at building up from a bare VM to whatever you want, rather than cutting down a very full distribution.
Have you resolved your problem with the remastering process? I would advise to concentrate on that.
Most live CD distribution don't leave you eject the cdrom. You can do it anyway,by giving these commands :

$sudo umount -l /cdrom
$sudo eject /mnt/cdrom

but then they stop to working correctly. I'm trying to do a remastering very carefully from the beginning using VMWare doing the checks you said.
Sounds good. I read somewhere that if you give root a password, you can use the account and stop having to mess with sudo all the time - hope that's a help.
Here is how I tried to make the remastering of Knoppix 6.2.1 on VMWARE :

fdisk -l

disk /dev/sda = 8.5 GB

/dev/sda1 6.3 GB Linux
/dev/sda2 2.2 GB Linux

mkdir /mnt/sda1/knx

mkdir -p /mnt/sda1/knx/master/KNOPPIX

mkdir -p /mnt/sda1/knx/source/KNOPPIX

cp -Rp /KNOPPIX/* /mnt/sda1/knx/source/KNOPPIX

cp -ar /mnt-system/boot /mnt/sda1/knx/master/boot

cp -ar /mnt-system/KNOPPIX/modules /mnt/sda1/knx/master/KNOPPIX/.

cp /mnt-system/index.html /mnt/sda1/knx/master/

cd /mnt-system && find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/sda1/knx/master/ \;

mount --bind /dev /mnt/sda1/knx/source/KNOPPIX/dev

mount --bind /proc /mnt/sda1/knx/source/KNOPPIX/proc

mount --bind /sys /mnt/sda1/knx/source/KNOPPIX/sys

chroot /mnt/sda1/knx/source/KNOPPIX

nano /etc/resolv.conf

nameserver 208.67.222.222
nameserver 208.67.220.220

cd /mnt
mkdir usbkey
mount -t auto /dev/sdc1 /mnt/usbkey
cd /mnt/usbkey
cp script /usr/sbin
 
umount /mnt/usbkey
rm -r usbkey
umount /proc
exit

rm -rf /mnt/sda1/knx/source/KNOPPIX/.rr_moved

mkisofs -R -U -V "Knoppix" -publisher "Knoppix" -hide-rr-moved -cache-inodes -no-bak -pad /mnt/sda1/knx/source/KNOPPIX | nice -5 /usr/bin/create_compressed_fs - 65536 > /mnt/sda1/knx/master/KNOPPIX/KNOPPIX

genisoimage : File '/mnt/sda1/knx/source/KNOPPIX/sys/devices/platform/i8042/serio0/input/input2/id/bustype' did shrink. Files must not be changed while genisoimage runs!

cd /mnt/sda1/knx/source/KNOPPIX/ umount sys

done again the previous step,this time without errors

total translation table size: 0
total rockridge attributes bytes : 9816967
total directory bytes : 28773184
path table size (bytes) : 144346
max brk space used : 4c2f000
969150 extends written (1892 MB)

and then :

cd /mnt/sda1/knx/master
find -type f -not -name sha1sums -not -name boot.cat -not -name isolinux.bin \-exec sha1sum '{}' \; > KNOPPIX/sha1sums

mkisofs -pad -l -r -J -v -V "KNOPPIX" -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o /mnt/sda1/knx/knoppix.iso  /mnt/sda1/knx/master

total translation table size : 2048
total rockridge attributes bytes : 3835
total directory bytes : 11356
path table size (bytes) : 70
done with : the files              blocks 368367
writing : ending padblock          start block : 368408
done with : ending padblock        blocks 150
max brk space used 1a000
368558 extends written (719 MB)

booted Knoppix.iso image with VMWare using these parameters :

knoppix 2 toram lang=it ;

error :

insmod : can't open '/mnt-system/KNOPPIX/modules/cloop.ko' : no such file or directory.
Looks to me like a failure in the script obeyed in he initrd. Can you check that?
Is the toram argument standard or your addition?
Looks to me like a failure in the script obeyed in he initrd,can you check that ? yes,how ?
the toram argument is a standard cheat code. Without it,it boots correctly,I've checked right now.
I am downloading Knoppix 6.2 so I can investigate this further.
I can't find cloop in any of my Linux sources - bit of a mystery that.
In the meantime, does toram work with Knoppix as received?
I found what's the problem : media corrupted. Sometimes Knoppix is not able to read correctly the content of a media and it returns with strange error messages. This is because I've used rewritables cd/rom and after a lot of rewrites they become corrupted. Anyway Knoppix seems to have a very sensible mechanism of hardware detection.
We have worked so hard to find the solution and the problem was the media easily corruptible,what a mockery !