[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: net install CD



Hi,

Tim MCCONNEL wrote:
> I got the image from: cdimage.debian.org/Debian-cd/current/amd64/iso-cd

Downloading 
  http://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-13.1.0-amd64-netinst.iso
yields a downloaded file with  821,035,008 bytes = ~0.8 GB.

Thus my first proposal is to just try putting it on your 8 GB stick
and to see what happens.


But for the sake of science let's assume that you really have problems
with an oversized Debian ISO.

In this case i would try to repack it while removing a few files, of
which i believe that i won't need them. The obvious candidates in the
netinst ISO are the firmware files. In larger Debian ISOs there may be
some other big .deb files which you may decide not to need.

Mount the ISO

  mkdir /mnt/iso

  mount debian-13.1.0-amd64-netinst.iso /mnt/iso

Look for big firmwware files which your hardware will not need.

  find /mnt/iso -exec ls -ld '{}' ';' 2>&1 | less

yields lines like

  -r--r--r-- 2 root root 29474828 Apr 24 22:47 /mnt/iso/firmware/firmware-atheros_20250410-2_all.deb
  ...
  -r--r--r-- 2 root root 39481748 Apr 24 22:47 /mnt/iso/firmware/firmware-nvidia-graphics_20250410-2_all.deb

That's 70 MB. It might be difficult to find another 130 MB of unneeded
stuff in the 800 MB of netinst.

The firmware files in ISO directory
  /firmware/
are hardlinked with files in the
  /pool/non-free-firmware/*/firmware-nonfree/
directories. In case of the above two:

  -r--r--r-- 2 root root 29474828 Apr 24 22:47 /mnt/iso/pool/non-free-firmware/f/firmware-nonfree/firmware-atheros_20250410-2_all.deb
  -r--r--r-- 2 root root 39481748 Apr 24 22:47 /mnt/iso/pool/non-free-firmware/f/firmware-nonfree/firmware-nvidia-graphics_20250410-2_all.deb

You'd need to remove both file paths of each file in order to get rid
of their content in the ISO.

After having made the decision which files to remove, you may create
the new ISO filsystem according to
  https://wiki.debian.org/RepackBootableISO#In_xorriso_load_ISO_tree_and_write_modified_new_ISO

That would be:

  umount /mnt/iso

  xorriso \
    -indev debian-13.1.0-amd64-netinst.iso \
    -outdev debian-13.1.0-amd64-custom.iso \
    -rm /firmware/firmware-atheros_20250410-2_all.deb \
        /firmware/firmware-nvidia-graphics_20250410-2_all.deb \
        /pool/non-free-firmware/f/firmware-nonfree/firmware-atheros_20250410-2_all.deb \
        /pool/non-free-firmware/f/firmware-nonfree/firmware-nvidia-graphics_20250410-2_all.deb \
        -- \
     -boot_image any replay \
     -compliance no_emul_toc \
     -padding included
        
This xorriso run is supposed to report
-----------------------------------------------------------------------
...
Drive current: -indev 'debian-13.1.0-amd64-netinst.iso'
Media current: stdio file, overwriteable
Media status : is written , is appendable
Boot record  : El Torito , MBR isohybrid cyl-align-on GPT APM
Media summary: 1 session, 400896 data blocks,  783m data,  340g free
Volume id    : 'Debian 13.1.0 amd64 n'
...
Drive current: -outdev 'debian-13.1.0-amd64-custom.iso'
...
Removed from ISO image: file '/firmware/firmware-atheros_20250410-2_all.deb'
Removed from ISO image: file '/firmware/firmware-nvidia-graphics_20250410-2_all.deb'
Removed from ISO image: file '/pool/non-free-firmware/f/firmware-nonfree/firmware-atheros_20250410-2_all.deb'
Removed from ISO image: file '/pool/non-free-firmware/f/firmware-nonfree/firmware-nvidia-graphics_20250410-2_all.deb'
xorriso : WARNING : -volid text problematic as automatic mount point name
xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA 119 rules
xorriso : NOTE : Replayed 22 boot related commands
...
Written to medium : 367104 sectors at LBA 0
Writing to 'debian-13.1.0-amd64-custom.iso' completed successfully.
-----------------------------------------------------------------------
So the file debian-13.1.0-amd64-custom.iso is about 33000 sectors of
2048 bytes smaller than the original ISO.

(The warning about the -volid text is due to blanks, dot, and lower
case letters in the Volume Id text "Debian 13.1.0 amd64 n".)

Inspection by
  x=debian-13.1.0-amd64-netinst.iso
  xorriso -indev $x -report_el_torito plain -report_system_area plain
and
  x=debian-13.1.0-amd64-custom.iso
  xorriso -indev $x -report_el_torito plain -report_system_area plain
shows the same (quite entangled) boot equipment in both ISOs.

The remaining question is, whether the debian-installer tolerates the
missing of the two firmware files. One will have to try.


I wrote:
> > i'm chiming in because your mail address is not subscribed to this
> > list (you could do at  https://lists.debian.org/debian-cd ) and because
> > the two answers so far did not Cc your mail address.

Tim MCCONNEL wrote:
> Sorry if  I broke the rules.

No rules were broken. It's just unusual on the Debian lists to Cc
the original poster of a mail thread. So i felt the need to justify my
Cc to you.
Debian mailing lists add a header  X-Spam-Status  where the word
LDOSUBSCRIBER indicates that the sender is subscribed to the list.
When i don't see it, i assume that the sender will not receive messages
which are sent only to the list.


Have a nice day :)

Thomas


Reply to: