Results 1 to 4 of 4

Thread: minirt2[4|6].gz size

  1. #1
    Junior Member
    Join Date
    Sep 2004
    Posts
    6

    minirt2[4|6].gz size

    I'm doing a remaster with a custom kernel (linux-2.6.8.1).

    It works good, but why does the minirt26.gz file get bigger when I mess around with linuxrc and modules even though the mounted size is smaller than the original knoppix minirt26.gz?

    I've checked out http://debian.tu-bs.de/knoppix/remaster/ but cant find anything that does any magic stuff to shrink the minirt26 file.

    Does anybody know how the original knoppix minirt file can be so small?

  2. #2
    Junior Member
    Join Date
    Sep 2004
    Posts
    6

    Shrinked it

    After some experimenting I found that creating a brand new minirt26 file and copying data from the old one fixes the size.

    Code:
    gunzip minirt26.gz
    mv minirt26 minirt26.old
    mkdir old
    mkdir new
    mount -o loop minirt26.old old/
    dd if=/dev/zero of=minirt26 bs=4096 count=1125
    mke2fs minirt26
    mount -o loop minirt26 new/
    cp -a old/* new/
    umount new/
    umount old/
    gzip --best minirt26
    That created a minirt26.gz with a size of 227Kb.
    The old minirt26.gz, with exactly same contents, is 850Kb...

    I removed all scsi modules. Thats why its smaller than the original.

  3. #3
    Junior Member
    Join Date
    Sep 2004
    Posts
    6

    Working shrink script

    Ignore the previous post. The mke2fs line was wrong.
    Now I use the following script to shrink the minirt2*.gz file after
    modifying linuxrc and other files inside minirt26.gz.

    shrinkminirt.sh
    Code:
    #!/bin/sh
    
    DEST=../master/boot/isolinux/
    MFILE=${DEST}/minirt26
    
    gunzip ${MFILE}.gz || exit 1
    mv $MFILE ${MFILE}.old || exit 1
    dd if=/dev/zero of=$MFILE bs=4096 count=1125 || exit 1
    mke2fs -L "KNOPPIX miniroot" -b 1024 -N 8192 -O none -F -q -m 0 $MFILE || exit 1
    mkdir $DEST/old || exit 1
    mkdir $DEST/new || exit 1
    mount -o loop ${MFILE}.old ${DEST}/old || exit 1
    mount -o loop ${MFILE} ${DEST}/new || exit 1
    cp -a ${DEST}/old/* ${DEST}/new || exit 1
    umount ${DEST}/old || exit 1
    umount ${DEST}/new || exit 1
    rmdir ${DEST}/old || exit 1
    rmdir ${DEST}/new || exit 1
    rm -f ${MFILE}.old || exit 1
    gzip --best ${MFILE}
    Just change DEST to the path to the boot/isolinux dir on your drive.
    Change MFILE to ${DEST}/minirt24 to shrink the minirt24.gz file instead.

  4. #4
    Member registered user
    Join Date
    Sep 2004
    Posts
    70
    Thanks A, this has come in handy today.

    An FYI for others making changes to minirt2*.gz, if you end up with a file larger than you started with, you must rerun lilo if you test your changes with a bootable partition. lilo reserves an Initial Ram Disk exactly the size of minirt. If you put a larger file in the boot directory and try to boot from it, you get nothing; no error message. The screen says Loading kernal but nothing else happens. I expect if you put a smaller minirt file in the boot directory it works fine.

Similar Threads

  1. dd size
    By srbanator in forum Knoppix DVD
    Replies: 0
    Last Post: 08-28-2005, 01:30 PM
  2. ISO Size
    By jesselong in forum Customising & Remastering
    Replies: 5
    Last Post: 05-26-2004, 01:24 PM
  3. Size?
    By AP in forum Customising & Remastering
    Replies: 0
    Last Post: 04-11-2004, 03:36 AM
  4. Screen Size
    By CHINAMAN in forum General Support
    Replies: 2
    Last Post: 09-22-2003, 03:05 PM
  5. Ramdisk (re)size/adjust size
    By hnt in forum General Support
    Replies: 4
    Last Post: 08-19-2003, 09:36 AM

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 PowerEdge FX2s + 8x FC430 Blades 16x E5-2630v4 160 Cores Rails No PSU/RAM picture

Dell PowerEdge FX2s + 8x FC430 Blades 16x E5-2630v4 160 Cores Rails No PSU/RAM

$699.00



Dell PowerEdge FC430 Blade Server 2x Xeon E5-2630v4 20 Cores FX2 FX2s No RAM/HDD picture

Dell PowerEdge FC430 Blade Server 2x Xeon E5-2630v4 20 Cores FX2 FX2s No RAM/HDD

$119.99



Dell PowerEdge M640 Blade Barebone Server Dell P/N: HHB006 Tested Working picture

Dell PowerEdge M640 Blade Barebone Server Dell P/N: HHB006 Tested Working

$149.99



Dell PowerEdge M620 Blade Server 2x Xeon E5-2680v2 2.8ghz 20-Cores | 128GB picture

Dell PowerEdge M620 Blade Server 2x Xeon E5-2680v2 2.8ghz 20-Cores | 128GB

$149.99



NETAPP HCI NAF-1701 SuperMicro Server 4X BLADE H410C 8X GOLD 5120 4 NODE SERVER picture

NETAPP HCI NAF-1701 SuperMicro Server 4X BLADE H410C 8X GOLD 5120 4 NODE SERVER

$1499.97



Dell Poweredge C6400 24x 2.5’’ 2x 2400W 4x C6420 Nodes H330 | 2x SFP | 8x Trays picture

Dell Poweredge C6400 24x 2.5’’ 2x 2400W 4x C6420 Nodes H330 | 2x SFP | 8x Trays

$799.99



LOT (8) Cisco UCS UCSB-B200-M5  2x6248R  24 core 3.0G   24x64g DDR4-2933 ram picture

LOT (8) Cisco UCS UCSB-B200-M5 2x6248R 24 core 3.0G 24x64g DDR4-2933 ram

$112000.00



Cisco B200 M3 2x E5-2670V2 10 Core 8x 16GB-128GB Ram Blade Server VIC1240 14900R picture

Cisco B200 M3 2x E5-2670V2 10 Core 8x 16GB-128GB Ram Blade Server VIC1240 14900R

$399.00



Cisco UCS 5108 Blade Server Chassis Enclosure N20-C6508 4x PSU 8x Fans 2x Fabric picture

Cisco UCS 5108 Blade Server Chassis Enclosure N20-C6508 4x PSU 8x Fans 2x Fabric

$174.99



Dell PowerEdge M630 Blade Server 2x Xeon E5-2680 v4, 2F3MP , 4GDP5 ,R10KJ ,JVFVR picture

Dell PowerEdge M630 Blade Server 2x Xeon E5-2680 v4, 2F3MP , 4GDP5 ,R10KJ ,JVFVR

$96.60