-
Problems remastering the ISO
Hi List,
I'm trying to follow the instrux at http://www.knoppix.net/wiki/Knoppix_Remastering_Howto with the KNOPPIX_V6.2.1CD-2010-01-31-EN.iso image. I'm remastering using QEMU where I have a 8GB partition and boot the Knoppix disc as the cdrom.
My goal is to add 4-5 apps to my custom build but not really change anything else. I was able to mount, chroot and apt-get my apps.
AFAICT, the problems begin after I leave chroot and start the mkisofs part. The HowTo has several flavors of this command yet none were working for me. I would end up with a ~/master/KNOPPIX/KNOPPIX compressed file ~8-16MB depending on which variant of the mkisofs command I followed.
My latest build "worked" which gave me a >831MB compressed image and the Live CD ISO build gave me a ~836MB ISO - which would have been fine if it would have booted I got the following errors when I tried to boot the new ISO (again using QEMU on Linux):
Knoppix 6 found at: /dev/sr0
>>> Starting in Live-Mode. <<<
>>> Please do not remove mediom until shutdown! <<<
/init: line 693: /bin/mount: not found
/init: exec: line 742: /sbin/init: not found
Is there an updated Remastering Howto around or can someone please assist. I'm unclear on why the Howto model isn't working when (I think) I'm following the instrux pretty close to the letter.
Help please,
Job
-
Senior Member
registered user
Originally Posted by
job317
Knoppix 6 found at: /dev/sr0
>>> Starting in Live-Mode. <<<
>>> Please do not remove mediom until shutdown! <<<
/init: line 693: /bin/mount: not found
/init: exec: line 742: /sbin/init: not found
This seems to be a very common problem.
Error shows that 'minirt.gz' has problem, likely due to you messed it up in the remaster process.
If you are not changing 'minirt.gz', I recommend you use the original version of 'minirt.gz' from the distribution.
If you are changing 'minirt.gz', you need to do it on a 'proper' file system, ie if you do the 'cpio' thingie on FAT or VFAT, you will mess up the symbolic links on 'minirt.gz'.
-
Re: Problems remastering the ISO
I did not modify minirt.gz. I added a couple of packages with apt-get and removed a few which were unneeded to save space and yet the image size grew larger - even with cleaning up with deborphan and apt-get clean.
I tried a slight modification which was rather than using my QEMU VM to build it in, I tried remastering by booting the system with the KNOPPIX CD and following the intrux even more closely but with the same results -- a larger ISO size and an image that won't boot. The system has 2 GB of memory so I didn't bother with making the swap image.
I am curious about a few of things:
1.) When I build the compressed image, I have unmounted /proc and left chroot, right? After leaving chroot, the source "/dev" folder is still populated. Is this expected?
2.) How sensitive is the location where the mkisofs commands are executed?
3.) I'm using the create_compressed_fs command provided with the Knoppix 6.2.1 disk yet I saw some comments regarding a newer version. Shouldn't the one that came with the disk be sufficient?
4.) What kind of troubleshooting should I try next? e.g. Is there a test script to run on the KNOPPIX image or the final ISO to test integrity?
Thanks,
Job
-
Senior Member
registered user
Originally Posted by
job317
1.) When I build the compressed image, I have unmounted /proc and left chroot, right? After leaving chroot, the source "/dev" folder is still populated. Is this expected?
Yes.
2.) How sensitive is the location where the mkisofs commands are executed?
The first mkisofs which makes the compress image is not sensitive to location, as it uses absolute pathnames.
The second mkisofs which makes the boot image ***IS*** sentive to location, as you notice it has the -b & -c, both of them using relative pathnames.
3.) I'm using the create_compressed_fs command provided with the Knoppix 6.2.1 disk yet I saw some comments regarding a newer version. Shouldn't the one that came with the disk be sufficient?
Should be adequate.
4.) What kind of troubleshooting should I try next? e.g. Is there a test script to run on the KNOPPIX image or the final ISO to test integrity?
I thought using qemu is already a very good tool to test. You can try to add cheatcode 'debug' and see if it will display additional information.
By the way, what kind of file system are you building the remaster image on ? Remember VFAT is bad !
-
Re: Problems remastering the ISO
FWIW, the host system is a 32-bit P4 with Hyperthreading enabled. I went through everything again by booting the system with the original Knoppix 6.2.1 disk and testing the resulting .iso with QEMU.
One thing to note is that there was no .rr_moved file/folder in the source after remastering. The HowTo says to remove it but I didn't have one.
Here is a portion of my log:
Code:
root@Microknoppix:/mnt/sda2/root/KNOPPIX# mkisofs -R -U -V "KNOPPIX.net filesystem" -publisher "KNOPPIX www.knoppix.net"
-hide-rr-moved -cache-inodes -no-bak -pad knx/source/KNOPPIX
| nice -5 /usr/bin/create_compressed_fs - 65536 > knx/master/KNOPPIX/KNOPPIX
Warning: creating filesystem that does not conform to ISO-9660.
2 processor core(s) detected
Warning, number as file string found. Assuming old command syntax and
choosing compatible parameters (-m -B 65536). See the usage info (-h)
for better/correct parameters.
Block size 65536, expected number of blocks: 2147483647
Ignoring file sm.bak
Ignoring file trusted.gpg~
Ignoring file mplayer.conf~
Using bt8xx000 for ./.rr_moved/bt8xx (bt8xx)
<snip>
99.87% done, estimate finish Thu Nov 4 11:45:23 2010
[ 9] Blk# 32500, [ratio/avg. 46%/ 38%], avg.speed: 2909816 b/s, ETA: 131416s
Total translation table size: 0
Total rockridge attributes bytes: 9654685
Total directory bytes: 28191440
Path table size(bytes): 141180
Max brk space used 47f4000
1041322 extents written (2033 MB)
Statistics:
gzip(0): 0 ( 0%)
gzip(1): 0 ( 0%)
gzip(2): 0 ( 0%)
gzip(3): 0 ( 0%)
gzip(4): 0 ( 0%)
gzip(5): 0 ( 0%)
gzip(6): 0 ( 0%)
gzip(7): 0 ( 0%)
gzip(8): 0 ( 0%)
gzip(9): 32542 (1e+02%)
7zip: 0 ( 0%)
Writing index for 32542 block(s)...
Writing compressed data...
root@Microknoppix:/mnt/sda2/root/KNOPPIX# ls -l knx/master/KNOPPIX/KNOPPIX
-rw-r--r-- 1 root root 824974599 Nov 4 11:45 knx/master/KNOPPIX/KNOPPIX
root@Microknoppix:/mnt/sda2/root/KNOPPIX# md5sum /mnt-system/boot/isolinux/minirt.gz /mnt/sda2/root/KNOPPIX/knx/master/boot/isolinux/minirt.gz
8dac243b731c1d32036874b31a2776ac /mnt-system/boot/isolinux/minirt.gz
8dac243b731c1d32036874b31a2776ac /mnt/sda2/root/KNOPPIX/knx/master/boot/isolinux/minirt.gz
root@Microknoppix:/mnt/sda2/root/KNOPPIX/knx# cd knx/master
root@Microknoppix:/mnt/sda2/root/KNOPPIX/knx/master# find -type f -not -name sha1sums -not -name boot.cat -not -name isolinux.bin -exec sha1sum '{}' \; > KNOPPIX/sha1sums
root@Microknoppix:/mnt/sda2/root/KNOPPIX/knx/master# 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/sda2/root/KNOPPIX/knoppix.iso /mnt/sda2/root/KNOPPIX/knx/master
genisoimage 1.1.10 (Linux)
Scanning /mnt/sda2/root/KNOPPIX/knx/master
Scanning /mnt/sda2/root/KNOPPIX/knx/master/KNOPPIX
Scanning /mnt/sda2/root/KNOPPIX/knx/master/KNOPPIX/modules
Scanning /mnt/sda2/root/KNOPPIX/knx/master/boot
Scanning /mnt/sda2/root/KNOPPIX/knx/master/boot/isolinux
Excluded by match: /mnt/sda2/root/KNOPPIX/knx/master/boot/isolinux/boot.cat
Writing: Initial Padblock Start Block 0
Done with: Initial Padblock Block(s) 16
<snip>
99.68% done, estimate finish Thu Nov 4 12:00:33 2010
Total translation table size: 2048
Total rockridge attributes bytes: 3835
Total directory bytes: 10240
Path table size(bytes): 70
Done with: The File(s) Block(s) 406124
Writing: Ending Padblock Start Block 406165
Done with: Ending Padblock Block(s) 150
Max brk space used 1b000
406315 extents written (793 MB)
root@Microknoppix:/mnt/sda2/root/KNOPPIX/knx/master# ls -l /mnt/sda2/root/KNOPPIX/knoppix.iso
-rw-r--r-- 1 root root 832133120 Nov 4 12:00 /mnt/sda2/root/KNOPPIX/knoppix.iso
Booting the new image with QEMU results in a loop of error messages after the
KNOPPIX 6.2 splash screen:
Code:
boot:
Could not find kernel image: knoppix
So the image is larger than I started with and I only added two packages and removed over a dozen.
Thanks,
Job
-
Senior Member
registered user
Originally Posted by
job317
Code:
boot:
Could not find kernel image: knoppix
This error says it could not find the linux kernel file, this file as described by boot/isolinux/isolinux.cfg to have a file name called 'linux' resided also in the same directory ( ie boot/isolinux/linux ). Please check if you have as many files as the original boot/isolinux directory ( isolinux.cfg, linux, minirt.gz and so on ).
-
The only files changed in my master build (after mkisofs) are:
/boot/isolinux/boot.cat
/boot/isolinux/boot.msg
/KNOPPIX/KNOPPIX
/KNOPPIX/sha1sums
I know that the KNOPPIX compressed image is the big one but the other files are intact.
I did a diff between my source folder after modifications I made (e.g. apt-get xxx) and my source is ~100MB larger after my modifications. Looks like some of the packages I removed actually added some stuff.
So, is there a size limit for the KNOPPIX compressed image?
Also, to your earlier question, the filesystem I'm working on is a EXT2/3.
Thanks,
Job
-
Senior Member
registered user
You are not answering to what the errors are pointing you to. You have not even come to the part about your compressed image. You have to understand the booting sequence :-
BIOS--> bootloader ( isolinux) ---> Kernel Image ( linux ) --> minirt.gz ---> Compressed Image ---> ( others ).
Based on the last error, the isolinux could not find the kernel image. You could check if the kernel image is contained in your knoppix.iso by doing a mount :-
# mkdir /tmp/tmp
# mount -o loop /(whatever path )/knoppix.iso /tmp/tmp
# ls /tmp/tmp/boot/isolinux
( make sure isolinux.bin, isolinux.cfg, linux, minirt.gz are there )
There are some files missing, or not copied from the original directory.
Cheers.
-
Senior Member
registered user
BTW, Knoppix has a bug with loop mount, if you trying to loop mount and it complains about no more free loop devices, you can do this to fix the problem :-
# rm -rf /dev/loop
( This has been mentioned many times in the forum )
-
This morning I performed everything from scratch minus modifications to my source files. I simply started in a new folder and copied all the source and master files and generated the new compressed image and ISO - no chroot, etc.
The result was an expected CD-sized .iso (754989056 bytes) that has a boot error when booting with QEMU. But first, here is the post-mkisofs info you requested:
Code:
[root@test /root]# ls -l /knx/knoppix.iso
-rw-r--r-- 1 root root 754989056 2010-11-05 05:42 /knx/knoppix.iso
[root@test /root]# mount -o ro,loop /knx/knoppix.iso /mnt/image
[root@test /root]# cd /mnt/image
[root@test /mnt/image]# ls -la
total 52
dr-xr-xr-x 4 root root 2048 2010-11-05 04:33 .
drwxr-xr-x 10 root root 4096 2009-01-14 15:47 ..
-r-xr-xr-x 1 root root 54 2001-06-17 04:50 autorun.bat
-r-xr-xr-x 1 root root 45 2003-02-22 22:23 autorun.inf
-r-xr-xr-x 1 root root 967 2004-05-01 16:35 autorun.pif
dr-xr-xr-x 3 root root 2048 2009-07-13 06:46 boot
-r-xr-xr-x 1 root root 32606 2006-02-21 18:33 cdrom.ico
-r-xr-xr-x 1 root root 1744 2010-02-07 22:50 index.html
dr-xr-xr-x 3 root root 4096 2010-11-05 05:40 KNOPPIX
[root@test /mnt/image]# md5sum *
f3086b686d99c6681718d1a49faab5bb autorun.bat
5de9c74859eae949e7ce1d8492a1a3cf autorun.inf
0a5d116ce3058adfceb3407577e42d82 autorun.pif
md5sum: boot: Is a directory
9cd1c5812a3d2758585afd6cf9212855 cdrom.ico
2499c99253f14a4723e1435e14322e3a index.html
md5sum: KNOPPIX: Is a directory
[root@test /mnt/image]# ls -l boot/isolinux/
total 6010
-r--r--r-- 1 root root 1474560 2009-02-07 12:53 balder.img
-r--r--r-- 1 root root 2048 2010-11-05 05:41 boot.cat
-r--r--r-- 1 root root 93 2010-02-08 01:48 boot.msg
-r--r--r-- 1 root root 1255 2010-02-08 03:37 f2
-r--r--r-- 1 root root 1324 2010-02-08 03:37 f3
-r--r--r-- 1 root root 256 2008-07-15 05:50 german.kbd
-r--r--r-- 1 root root 12363 2010-11-05 04:53 isolinux.bin
-r--r--r-- 1 root root 1434 2010-02-08 03:37 isolinux.cfg
-r-xr-xr-x 1 root root 3545232 2010-01-28 11:46 linux
-r--r--r-- 1 root root 18050 2009-08-09 20:58 logo.16
-r--r--r-- 1 root root 20052 2009-02-07 12:54 memdisk
-r--r--r-- 1 root root 124648 2009-07-24 19:48 memtest
-r--r--r-- 1 root root 949265 2010-01-28 16:55 minirt.gz
[root@test /mnt/image]# md5sum boot/isolinux/*
4a67138437af105de83685abcf5e66b5 boot/isolinux/balder.img
981895696f200ab735161d58968a7171 boot/isolinux/boot.cat
e7d159a554abb281ff3697f2a43d0aa7 boot/isolinux/boot.msg
6e7a5ddb5bdc0420b97477f42a6611ff boot/isolinux/f2
9d9becdc141ee80d22cdfedcfa5e8d6d boot/isolinux/f3
9b758201ff56879eacca2dc7857af533 boot/isolinux/german.kbd
07c9b578ad1bffcc32cfcb164e056c9d boot/isolinux/isolinux.bin
bc8e7437818da0e2480937ef850fa916 boot/isolinux/isolinux.cfg
838023c9a7c3cc56be1d187cdbef6e9c boot/isolinux/linux
917d9875d67bfb84ea1f5aac3dbf714a boot/isolinux/logo.16
ad9c162faca33d30418760100fbb605c boot/isolinux/memdisk
70e35fe7cf0f286714755c4785f7935b boot/isolinux/memtest
8dac243b731c1d32036874b31a2776ac boot/isolinux/minirt.gz
Still when I boot the .iso I get the KNOPPIX splashscreen and the message:
Code:
boot:
Could not find kernel image: knoppix
Repeat same steps + expect different outcome = insanity?
Job
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
WD 500GB My Passport SSD, Portable External Solid State Drive WDBAGF5000ARD-WESN
$59.99
Dell 800GB SSD U.2 NVMe 2.5" PCIe Gen3 KWH83 MZWLL800HEHP-000D3 PM1725a
$71.99
Dell - 800GB SSD SAS 12G MLC WI 2.5in PX05SM CN3JH
$98.99
WD_BLACK 1TB SN850X NVMe SSD, Internal Gaming Solid State Drive - WDS100T2X0E
$99.99
Samsung MZ7GE480HMHP-000H3 PM853T 480GB 6G SATA 2.5" Solid State Drive SSD
$14.99
Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5" SATA 3 6GB/s Internal SSD PC/MAC Lot
$14.99
Western Digital PC SN730 256GB NVMe SDBQNTY-256G M.2 2280 PCIe Solid State (SSD)
$16.00
Netac 1TB 2TB 512GB Internal SSD 2.5'' SATA III 6Gb/s Solid State Drive lot
$13.99
4 TB SSD SATA III Drive 2.5" Solid State Drive SATAIII 6Gb/s UP to 540MB/s
$149.00
Fanxiang 256GB 512GB 1TB 2TB 4TB Internal SSD 2.5" SATA III 6GB/s for PC/MAC Lot
$197.99