0

After finish building a LFS system, installed on a IMG file (system.img) and being able to run the system with qemu with the command:

qemu-system-x86_64 -hda system.img -vga std -m 4G

I want now generate a ISO file based on this image disk file, with the follow conditions:

  1. with the generated ISO file, I want use a tool like Rufus or similar (is there something equivalent for linux?) to create a boot disk on an usd stick or sd card, to allow me boot with this system in another machines.

  2. the image disk have a total size of 5Gb, but have 1.9GB of free space. I want the ISO file be created with only the used space (if could be compressed without be incompatible with qemu or creation of the boot disk, would be great).

  3. when create the boot disk, I want to be able to have a mount point in the system to some of the free space available in the boot device.

  4. I want have some shell script that make possible install the system in the machine I boot on.

Anyone can give some hints of how to do that?

2
  • Please start by checking if the image itself makes a portable system. My experience is that also Linux installed systems are portable as long as the built-in kernel drivers can manage the hardware. The exception are for example nvidia graphics and broadcom wifi where you often need proprietary drivers. You may need to use another tool (there are free linux tools for it) to configure the network to become portable. In other words, clone from your system.img to an external drive, a fast USB3 pendrive or even better, an SSD connected via USB and try how it works. Commented May 13, 2023 at 17:53
  • In Linux you can use mkusb to clone from the image file to a USB drive. (In Windows you can use Rufus also for img files.) Commented May 13, 2023 at 18:07

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.