1

I have an old Knoppix CD V4.0.2 Kernel 2.6 dated 2005-09-23. It is too old to boot on any machine I have (I think because it does not have SATA support). It says

Can't find knoppix filesystem, sorry.

I would like to find a way to access the files in the CD without booting it. I assume this is some sort of mount of a file on the CD. I can access the files on the CD from linux (Ubuntu) with no problem. There is a large (600MB) file called KNOPPIX, and I have tried things like:

mount -t auto -o loop KNOPPIX /media/tmp

but it does not work. Is there a way to see the files that would be present on the filesystem after KNOPPIX boots and mounts its drives?

planetmaker
  • 461
  • 3
  • 13
dan grunberg
  • 143
  • 4
  • Yes, sorry. Accepted your edit. – dan grunberg Dec 04 '19 at 13:52
  • How do you see a file and know the size without the media mounted? Could you specify? Assuming you can see the file on the CD, what does `file /path/to/KNOPPIX` return? – FelixJN Dec 04 '19 at 17:01
  • I can mount the CD (actually it happens automatically when inserted) and see all the files on it. I was assuming that this is not the same as the files you see when the Knoppix boots because I don't see any of the files that are supposed to be there (this is a CD-ROM of code that came with a book from 2007), but I suppose I could be wrong. Maybe there is some script that runs when knoppix boots that decodes/expands files and is not part of a standard knoppix boot. – dan grunberg Dec 04 '19 at 17:40
  • file KNOPPIX returns: 'KNOPPIX: POSIX shell script executable (binary data)'. P.S. It doesn't run, I tried it. Perhaps risky. Says could not load module cloop.o – dan grunberg Dec 04 '19 at 17:40
  • 1
    The `KNOPPIX` file contains one line shell script `modprobe cloop file=$0 && mount -r -t iso9660 /dev/cloop $1` and binary content. Googling `cloop` (compressed loopback block device) led me to [github.com/KlausKnopper/cloop](https://github.com/KlausKnopper/cloop), a [Debian package](https://packages.debian.org/search?keywords=cloop) and the [knoppix wiki](http://knoppix.net/wiki3/index.php?title=Cloop). You have to build the kernel module yourself and create `/dev/cloop` (see installation and usage) and you should hopefully be able to mount this file (haven't tried). – Freddy Dec 04 '19 at 18:01
  • 1
    Can you read it? It might just be mixed clear text/binary. With a bit of luck the top is just the commands to extract the rest. – FelixJN Dec 04 '19 at 18:01
  • 1
    My [knoppix ISO](https://sourceforge.net/projects/knoppix-mirror/files/knoppix/KNOPPIX_V4.0.2CD-2005-09-23-EN.iso/download) boots without problems in VirtualBox. Have you tried? – Freddy Dec 04 '19 at 18:26
  • @Freddy - Virutalbox does work, thanks. Getting the shared files to work with Vritualbox and Knoppix was beyond my abilities, but I did verify that the files were on the CD. Your previous comment lead to the perfect solution: I installed cloop-utils on Ubuntu, which installs the executable extract_compressed_fs. Using this to extract the file KNOPPIX on the CD-ROM into x.iso, I then mounted this file easily with 'sudo mount -t auto x.iso /media/tmp' and can now see the same files as the booted KNOPPIX. No modprobe or compiles needed. If you write this as an answer I will accept. – dan grunberg Dec 04 '19 at 22:03
  • 1
    @dangrunberg Nice, you solved it! Please convert your comment into an answer and I'll upvote :) – Freddy Dec 04 '19 at 22:12

1 Answers1

1

(With help from @Freddy)

  1. Mount the Knoppix CD-ROM, this will usually happen automatically under your windowing environment.
  2. Locate the file KNOPPIX under your CD/DVD media. On my CD-ROM, it was at /media/.../KNOPPIX/KNOPPIX and was 602MB in size.
  3. Install cloop-utils: sudo apt install cloop-utils on ubuntu. You should have installed an executable extract_compressed_fs
  4. Expand the KNOPPIX file: extract_compressed_fs /path/to/KNOPPIX tmp.iso Make sure you have enough room for the iso file, it was 5x the KNOPPIX file size for me. Don't extract in the mounted subdir as that will be readonly.
  5. Make sure you have a mount point directory, e.g. /media/tmp. Then mount the Knoppix filesystem: sudo mount -t auto /path/to/tmp.iso /media/tmp and you should see all your files at /media/tmp as if Knoppix was running.
dan grunberg
  • 143
  • 4