LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-24-2020, 07:37 AM   #1
jwinc7
LQ Newbie
 
Registered: Feb 2020
Posts: 2

Rep: Reputation: Disabled
Creating a portable RHEL live boot iso image


Hello,

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?

Thank you in advance for all the help.

--jwinc7
 
Old 02-25-2020, 08:41 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,412

Rep: Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338
Welcome to LQ, jwinc7.

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
 
1 members found this post helpful.
Old 02-25-2020, 10:44 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,764

Rep: Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931
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.
 
1 members found this post helpful.
Old 03-02-2020, 05:12 PM   #4
jwinc7
LQ Newbie
 
Registered: Feb 2020
Posts: 2

Original Poster
Rep: Reputation: Disabled
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.

I have tried the following methods:

https://bencane.com/2013/06/12/mkiso...x-install-iso/

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 .

and poweriso for Linux: https://www.poweriso.com/download-po...-for-linux.htm

Thank you for any advice you are able to provide.

Last edited by jwinc7; 03-02-2020 at 05:17 PM.
 
Old 03-03-2020, 05:29 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
RHEL 7.7 : The free version "Redhat CentOS 7.7" is available as live DVD
→ CentOS-7-x86_64-LiveGNOME-1908.iso, CentOS-7-x86_64-LiveKDE-1908.iso
http://mirror.netcologne.de/centos/7...8/isos/x86_64/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Creating a HDD boot image from a ISO boot image Basher52 Linux - Software 5 12-02-2011 04:01 PM
creating live usb image using moblin image creator 2 mobquest Linux - Newbie 0 07-08-2009 11:35 PM
need a portable linux distro to bring on portable usb hard drive... pippo17 Linux - Distributions 3 10-20-2008 06:41 AM
Does anyone Know how to open either .iso.rz or these .iso.xdelta,.iso.bz2,.iso.lzma?? maximalred Debian 5 06-09-2004 06:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration