Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am attempting to create a portable live boot RHEL ISO image. I have a requirement that it must be RHEL and the iso will reside on a multiboot partition of a portable hard drive. The intention of the image is to be able to boot from a laptop with no OS on it and use a browser to configure an ESXI server.
I have installed RHEL 7.7 onto a USB drive with 3 partitions: /, /boot and /boot/efi. I have tested the USB on all the different hardware platforms that this is intended to be used on and it works nicely.
I know it is possible to use dd to copy one partition into an iso file, but when I try all three, the iso is unreadable. Is there a way to create a bootable iso from my working USB with all three partitions?
If I need to use a single partiton, will it need to be FAT so that the BIOS can read it?
Additionally I will need to work out how the /etc/fstab calls out the drive. When I dd the image to a different USB drive it will not boot as there is a mismatch with the new USB drive's UUID. This is to be expected. I cannot call out the device such as /dev/sda as this is intended on being used on several laptop configurations and we don't know what device will be mounted first on bootup. Can an ISO file have it's own UUID?
First of all, all bare laptops come with PXE booting in the BIOS. It may be called 'network boot' in the bios. First the laptop solicits a dhcp connection via eth0 (The RJ45 socket). Your tftp server on the other end of the cat5 cable doles out an IP. Then the laptop asks for an OS, and installs what it is given, again using tftp. No usb key needed. If you're doing many laptops, this is probably fastest. Instead of usb speeds, most of the work is at network speeds. There's plenty of online guides to setting this up.
Next, the 1 partition or 3 partitions is a big deal, because usb disks start in reading at sector 1, and they want code, not a partition table. Format isn't a huge deal, as long as the kernel can handle it. /boot and /EFI are subdirs of / where the extra partitions can be mounted. And it can't be done
dd if=some.iso of=/dev/sdb1
because that will puke. It needs to be
dd if=some.iso of=/dev/sdb
By definition an ISO file is a byte for byte archive of a CD which contains an ISO9660 file system. Using the dd command to create a disk image does not create an ISO file. Most distribution ISO files you downlaod these days are hybrids which are ISO9660 filesystems that also contain a boot loader for a regular disk drive and can be written to a USB drive.
There are several utilities to create an ISO from a running system. respin, systemback (no longer supported) and linux live kit. I have never tried using them and therefore do not know how well they work. respin is a fork of remastersys which was the defacto utility for many years.
Thank you for the responses. After two weeks of trying to get a RHEL image, I was able to convince my leads to allow me to use Fedora since it is similar to RHEL and there are multiple spins readily available to accomplish what needed to be done.
I was able to use mock and livemedia-creator to create an image of Fedora 31 lxde with Firefox installed. When I use dd to copy the iso to a usb, the image boots nicely, but it does give a 60 second timeout and defaults to choice 1. I would like to modify the iso's grub to have a timeout of 0 and default to choice 0. I have tried using a couple of different methods to extract the iso's contents, change the grub.cfg, and repackage the iso, but it will no longer boot. I even tried extracting and repackaging without making changes and it was still unable to boot (no boot device found). When I do a "file repkg-Fedora.iso" it comes back as bootable.
https://access.redhat.com/discussions/1422213
specifically the following about 2/3 of the way down the page: mkisofs -U -r -v -T -J -joliet-long -V "RHEL-7.1 Server.x86_64" -volset "RHEL-7.1 Server.x86_64" -A "RHEL-7.1 Server.x86_64" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot -o ../hpbs.iso .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.