📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

SquashFS: modifying rootsquash file

Options
2»

Comments

  • Nah, you don't need to patch the kernel to build and run squashfs utils. Well, I'd be *very* surprised - it's just a user-mode program that manipulates a big file.

    Are you sure the patches aren't just to allow you to *use* the resultant squashfs ?
  • esuhl wrote: »
    I've downloaded the source and have been trying to wrap my head round creating a PKGBUILD file (for Arch's package manager).

    You probably don't need to bother - you can build and run programs without having to package them. Just copy binary to /usr/local/bin or ~/bin, or whereever suits you.

    Just cd into the squashfs-utils dir and invoke make. Hmm, well, that ought to work, but trying it here, I get a compilation error (and lots of warnings). I guess gcc has got stricter since it was originally written.

    lines 432 and 489 in mksquashfs.c - either split into two assignments, or add brackets to the second assignment, so the cast is outside - and then a link error because read_from_file wasn't exported - just remove the inline directive from around line 696
  • debitcardmayhem
    debitcardmayhem Posts: 12,754 Forumite
    Part of the Furniture 10,000 Posts Name Dropper Photogenic
    edited 29 August 2018 at 1:38PM
    Lightbulb moment .....
    try this

    cd to the unsquashed squashfs-root
    then enter
     sudo sbin/mksquashfs . ../rootsquash  -b 32768 -noappend -le
    
    put that new rootsquash back on the ISO and VOILA


    e.g.
    cd squashfs-root
    
    sudo sbin/mksquashfs . ../rootsquash  -b 32768 -noappend -le
    [sudo] password for rob: 
    Creating little endian filesystem on ../rootsquash, block size 32768.
    
    Little endian filesystem, data block size 32768, compressed data, compressed metadata
    Filesystem size 114350.62 Kbytes (111.67 Mbytes)
        39.65% of uncompressed filesystem size (288364.65 Kbytes)
    Inode table size 163887 bytes (160.05 Kbytes)
        58.68% of uncompressed inode table size (279295 bytes)
    Directory table size 135820 bytes (132.64 Kbytes)
        50.74% of uncompressed directory table size (267669 bytes)
    Number of duplicate files found 864
    Number of inodes 19083
    Number of files 11526
    Number of symbolic links  815
    Number of device nodes 4969
    Number of fifo nodes 3
    Number of socket nodes 0
    Number of directories 1770
    Number of uids 2
        root (0)
        unknown (1001)
    Number of gids 10
        unknown (43)
        unknown (2000)
        gdm (42)
        tty (5)
        dip (40)
        ftp (50)
        disk (6)
        unknown (44)
        man (15)
        adm (4)
    
    and below (using my normal unsquashfs
    sudo unsquashfs -s ../rootsquash
    Found a valid little endian SQUASHFS 1:0 superblock on ../rootsquash.
    Creation or last append time Wed Aug 29 13:33:21 2018
    Filesystem size 114350.62 Kbytes (111.67 Mbytes)
    Block size 32768
    Filesystem is not exportable via NFS
    Inodes are compressed
    Data is compressed
    Check data is not present in the filesystem
    Duplicates are removed
    Number of inodes 19083
    Number of uids 2
    Number of gids 10
    
    4.8kWp 12x400W Longhi 9.6 kWh battery Giv-hy 5.0 Inverter, WSW facing Essex . Aint no sunshine ☀️ Octopus gas fixed dec 24 @ 5.74 tracker again+ Octopus Intelligent Flux leccy
  • esuhl
    esuhl Posts: 9,409 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    Lightbulb moment .....
    try this

    cd to the unsquashed squashfs-root
    then enter
     sudo sbin/mksquashfs . ../rootsquash  -b 32768 -noappend -le
    
    put that new rootsquash back on the ISO and VOILA

    Aha! Very clever!

    My first attempt booted further than previously, but froze before booting into X/GXMAME.

    So I tried only adding the new files without the -noappend option, and... IT WORKED!!!

    :j :T :beer: :money: :):D :j

    Thank you both so much! Yay!
  • esuhl wrote: »
    Aha! Very clever!

    My first attempt booted further than previously, but froze before booting into X/GXMAME.

    So I tried only adding the new files without the -noappend option, and... IT WORKED!!!

    :j :T :beer: :money: :):D :j

    Thank you both so much! Yay!
    Glad to have helped, now for the next question.....:cool:
    4.8kWp 12x400W Longhi 9.6 kWh battery Giv-hy 5.0 Inverter, WSW facing Essex . Aint no sunshine ☀️ Octopus gas fixed dec 24 @ 5.74 tracker again+ Octopus Intelligent Flux leccy
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 351.1K Banking & Borrowing
  • 253.1K Reduce Debt & Boost Income
  • 453.6K Spending & Discounts
  • 244.1K Work, Benefits & Business
  • 599K Mortgages, Homes & Bills
  • 177K Life & Family
  • 257.4K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.