Results 1 to 5 of 5

Thread: Remaster Knoppix without chroot or lengthy test cycle...

  1. #1
    Junior Member
    Join Date
    Dec 2003
    Location
    London England
    Posts
    2

    Remaster Knoppix without chroot or lengthy test cycle...

    Knoppix remaster testing - new approach?.

    I've been experimenting with building a customised Knoppix disk,
    using the Knoppix Remastering Howto as a base.
    Among my objectives was to incorporate captive-ntfs driver support,
    to permit write access to NTFS drives on XP machines.

    The technique described, of building a chroot environment to mimic the
    final environment, and then add-remove packages as required is fine for normal software, but fails when, for example, new usernames are created, as both CHROOT/etc/passwd and the real /etc/password need to be updated.
    In any particular case, it's possible no doubt to get round this, but it set me to wondering if I could set up my environment so that it was closer at design time to the runtime one.

    The idea was that my hard disk should contain:
    a) at top level, two directories, /knx and /KNOPPIX
    b) under /knx, master and source structures as per the howto.
    In particular, there's a directory called source/KNOPPIX which contains a copy of the root filesystem structure desired as the starting point.
    c) symbolic links in /KNOPPIX to source/KNOPPIX/*.
    It would be easier just to make a symbolic link from source/KNOPPIX to / but the linuxrc script on the boot floppy checks for a directory and I didn't want to modify that script if I could avoid it.

    The idea is then that booting from a KNOPPIX floppy with no CD will find the KNOPPIX directory on the hard disk, and use that. After a successful boot, one can then remount /cdrom read-write, customise as required, and test trivially, just by rebooting. No remastering required. When everything is working, the instructions in the HOWTO still work just fine.

    In practice, there were a few minor changes I had to make to the boot floppy to work and a couple of other issues.
    Firstly, /etc/fstab is wrong, although /proc/mounts is right.
    fstab thinks that its still the cdrom mounted on /cdrom whereas actually it's the hard disk.
    mount -w -oremount /dev/hda1 /cdrom
    will still work.

    Secondly, more seriously, the /KNOPPIX directory on the boot filesystem on the floppy image (which is the bootstrap environment for the cd as well) in master/boot.img has some symbolic links missing. Normally that doesn't matter, as the loop mount of KNOPPIX to /KNOPPIX overwrites this directory, but when there's a KNOPPIX directory already
    on the hard disk, nothing happens to that.

    I solved this by adding some symbolic links to the directory to include everything in /KNOPPX on the hd. Thus when the boot occurs, we have a /KNOPPIX with lots of links to /cdrom/KNOPPIX which point in turn to /cdrom/knx/source/KNOPPIX. (remember /cdrom is really the hard disk during the development).

    Redoing the boot image is a little complex for people who haven't done it. It involves mounting the boot.img file with
    mkdir flopdir;mount -o loop boot.img flopdir extracting the zipped filesystem with gunzip <flopdir/miniroot.gz >miniroot
    (Don't try to create the bootimage file inside the floppy directory!)
    mounting that system with
    mkdir bootdir;mount -o loop miniroot bootdir
    adding the links into bootdir;
    ln -s /cdrom/KNOPPIX/dev bootdir/KNOPPIX/dev etc ( a simple loop will work )
    umount bootdir
    gzip –best <miniroot >flopdir/miniroot.gz
    umount flopdir

    It's worth checking the result is still the right size, and copying it to a floppy to test:
    dd if=boot.img of=/dev/floppy bs=18k

    I'd be interested in feedback about this from any Knoppix gurus out there regarding whether this approach breaks anything subtle, as my experience with Knoppix is currently only a weekend's worth ( although I've been using linux since version 0.96 ).
    In particular, I suspect that it might be cleaner to change the linuxrc script slightly. However, I'm happy because my objective succeeded and I can now write my NT partition data.

    Gary Bilkus

  2. #2
    Someone posted a similiar suggestion on the mailing list recently. They used it for remastering an earlier version of Knoppix.

    I would really like to know how you got the write access to NTFS to work?

    Thanks,
    Chaz

  3. #3
    Junior Member
    Join Date
    Dec 2003
    Location
    London England
    Posts
    2
    As far as getting the ntfs write support to work, I used the interesting
    captive-ntfs approach www.jankratochvil.net/project/captive/
    which relies on a sandbox and the availability (legally!) of ntfs.sys and a few other files from a compatible windows installation.

    My post above was inspired by the fact that when I originally tried to install captive-ntfs just by using the script provided in a chroot environment, it failed ( not surprising really ), but mainly because it tries to add a user and group 'captive'

    Please note, I have not used this driver extensively in a production environment so I can't comment on how stable it is, but it basically seems to work, and since my interest in having it on a knoppix disk is to help rescue systems which are already in deep doodoo, this hardly matters.

    Gary

  4. #4
    Junior Member registered user
    Join Date
    Sep 2003
    Location
    Rio de Janeiro / Brazil
    Posts
    27

    Re: Remaster Knoppix without chroot or lengthy test cycle...

    Quote Originally Posted by bilkusg
    c) symbolic links in /KNOPPIX to source/KNOPPIX/*.
    Please, how can we do this ?

    Thanks

  5. #5
    Junior Member registered user
    Join Date
    Sep 2003
    Location
    Rio de Janeiro / Brazil
    Posts
    27
    Quote Originally Posted by chaz
    Someone posted a similiar suggestion on the mailing list recently. They used it for remastering an earlier version of Knoppix.
    Where is it please ?

    Thanks

Similar Threads

  1. Remaster without chroot ?
    By spyhome in forum Customising & Remastering
    Replies: 0
    Last Post: 06-23-2005, 02:12 PM
  2. How to test my customized Knoppix without burning it
    By ioclaudio in forum Hdd Install / Debian / Apt
    Replies: 3
    Last Post: 02-27-2005, 11:24 AM
  3. Can't chroot into my KNOPPIX HD copy
    By alhavs in forum Customising & Remastering
    Replies: 2
    Last Post: 06-29-2004, 12:19 PM
  4. Test memory with Knoppix?
    By Coldfirex in forum Hardware & Booting
    Replies: 1
    Last Post: 05-22-2004, 05:02 PM
  5. how to test the remastered knoppix
    By urpk in forum Customising & Remastering
    Replies: 1
    Last Post: 11-16-2003, 08:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Dell OptiPlex 3060 MICRO DESKTOP PC COMPUTER I5 8TH GEN UP TO 32GB UP TO 2TB M.2 picture

Dell OptiPlex 3060 MICRO DESKTOP PC COMPUTER I5 8TH GEN UP TO 32GB UP TO 2TB M.2

$295.00



Lenovo IdeaCentre 3 07IRB8 Desktop Intel Core i5-13400 16GB 512GB SSD W11H picture

Lenovo IdeaCentre 3 07IRB8 Desktop Intel Core i5-13400 16GB 512GB SSD W11H

$349.99



Dell 15.6

Dell 15.6" NVIDIA Gaming Laptop - Intel Quad Core i7 64GB RAM 2TB SSD Windows 11

$446.00



New HP 24

New HP 24" All In One Desktop Computer 11th Gen i3 Up To 32GB RAM 2TB SSD Win 11

$409.99



Intel Xeon E5-2667 V2 LGA 2011 3.3GHz 8 Core 130W 25MB 8GT/s CPU Processor picture

Intel Xeon E5-2667 V2 LGA 2011 3.3GHz 8 Core 130W 25MB 8GT/s CPU Processor

$14.99



AMD Ryzen 7 5800X3D Processor (3.4GHz, 8 Cores, AM4) - 100-100000651WOF picture

AMD Ryzen 7 5800X3D Processor (3.4GHz, 8 Cores, AM4) - 100-100000651WOF

$259.99



AMD Ryzen 7 7800X3D 8-Core - 16-Thread 4.2 GHz (5.0 GHz Max Boost) Socket A... picture

AMD Ryzen 7 7800X3D 8-Core - 16-Thread 4.2 GHz (5.0 GHz Max Boost) Socket A...

$304.95



Dell Inspiron 142-in-1 Touch Laptop Intel Core 5 Processor 8GB Memory... picture

Dell Inspiron 142-in-1 Touch Laptop Intel Core 5 Processor 8GB Memory...

$549.99



Dell 14

Dell 14" TOUCHSCREEN IntelQuadCore 16GB RAM up to 512GB SSD Fingerprint BT Win11

$210.00



Lenovo IdeaCentre 3 27IAP7 27

Lenovo IdeaCentre 3 27IAP7 27" Touch AIO Intel Core i5-13420H 8GB 512GB SSD W11H

$349.99