Debian complained about missing firmware during installation? Add missing 'non-free'? firmware to installation image! :)

Debian complained about missing firmware during installation? Add missing 'non-free' firmware to installation image! :)

If you have installed Debian, you might have faced the screen below:

No alt text provided for this image

And probably got very frustrated, because your wireless interface was not working as expected, or even not working at all! Well, Debian is an awesome Linux distribution, but it will not ship 'non-free' content during its installation. You will have to explicitly install any 'non-free' software afterward.

Or you can just download the ISO and make your custom modifications to it. Let's take a look at how to do that. I will present that as a step-by-step quick guide.

------------------------------------------------------------------

1) Install xorisso:

sudo apt install xorriso


------------------------------------------------------------------

2) Download netinst and firmware package:


wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.8.0-amd64-netinst.iso

wget https://cdimage.debian.org/cdimage/unofficial/non-free/firmware/buster/current/firmware.tar.gz


------------------------------------------------------------------

3) Extract hybrid MBR from original ISO (used later to rebuild it)
   This will also make the system able to boot from different medi types and systems!

dd if=debian-10.8.0-amd64-netinst.iso bs=1 count=432 of=isohdpfx.bin


------------------------------------------------------------------

4) Extract the iso to a desired location

xorriso -osirrox on -indev debian-10.8.0-amd64-netinst.iso -extract / debian-10.8.0-amd64-netinst-nf-fmw


------------------------------------------------------------------

5) Extract missing firmware into the propper /firmware directory:


tar xvf firmware.tar.gz -C debian-10.8.0-amd64-netinst-nf-fmw/firmware/


------------------------------------------------------------------

6) Build a new ISO file. Here we are using xorriso as a replacement 
   for the previously genisoimage + isohybrid:

xorriso -as mkisofs -r -V 'Debian 10.8.0 amd64 Custom' -o debian-10.8.0-amd64-netinst-nf-fmw.iso -J -R -joliet-long -cache-inodes -isohybrid-mbr isohdpfx.bin -b isolinux/isolinux.bin -c isolinux/boot.cat -boot-load-size 4 -boot-info-table -no-emul-boot -eltorito-alt-boot -e boot/grub/efi.img -no-emul -boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus debian-10.8.0-amd64-netinst-nf-fmw 



------------------------------------------------------------------
7) Now just burn that image to an USB device:

dd if=debian-10.8.0-amd64-netinst-nf-fmw.iso of=/dev/sdXY bs=32M status=progress 

        

Once you have done this, Debian will be able to find all the missing firmware during installation, considering that the missing firmware .deb files were correctly placed in the /firmware directory.

Cool, right? Now you have your own custom netinst ISO file! And you can add even more stuff, depending on what you need! Have fun!

FIN!

要查看或添加评论,请登录

Gabriel M.的更多文章

  • Docker 101

    Docker 101

    A (tiny) introduction to Docker. If you want to get your hands dirty with some Docker content, this quick introduction…

  • Building custom kernels for Linux + updating the system firmware.

    Building custom kernels for Linux + updating the system firmware.

    In this post I'll show you how you can replace your current Linux kernel with a new one built entirely from the…

  • Using Traps in Bash Scripts

    Using Traps in Bash Scripts

    Imagine that you have a script to perform some critical operation, one that would render the system completely unusable…

    2 条评论
  • Safer Bash Scripting Tips

    Safer Bash Scripting Tips

    I hope you are all well and safe. As "stay safe" is the most used expression during this COVID-19 period, I thought it…

    1 条评论
  • Pointers and 2D-arrays in C

    Pointers and 2D-arrays in C

    When taking the Engineering or CS undergrad path, like 1+1 leads to 2 (let's keep it simple here, shall we?), students…

    2 条评论
  • Linux Kernel Inotify Subsystem

    Linux Kernel Inotify Subsystem

    When dealing with Unix-style filesystems there must be a data structure that is capable of describing an object from…

  • Linux File I/O

    Linux File I/O

    When using system calls for dealing with file I/O, open(), read(), write() and close() are the four functions used to…

  • Shifting bits in C

    Shifting bits in C

    Have you ever asked yourself how much memory space do you waste when writing your code? Sometimes you just need a…

  • Improving your Linux box security

    Improving your Linux box security

    Did you know that more than never, during these quarantine days, there is a lot more malicious activities undergoing…

  • Build UnrealEngine on Linux, making it use less disk space! :)

    Build UnrealEngine on Linux, making it use less disk space! :)

    If you are playing with the amazing Unreal Engine on your Linux box, you might have noticed that the final size after…

社区洞察

其他会员也浏览了