LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   How to Create an Installer in ISO Format for our LFS/BLFS ? (https://www.linuxquestions.org/questions/linux-from-scratch-13/how-to-create-an-installer-in-iso-format-for-our-lfs-blfs-4175709609/)

glanzfreya 03-18-2022 02:23 AM

How to Create an Installer in ISO Format for our LFS/BLFS ?
 
Dear all,
I have finished create BLFS till XFCE as my Desktop Environment. The funny thing is, I do it all in Qemu, and I want to install it on my full Laptop. So I can use my hardworking LFS as my main OS. How to do this? Do I need to do certain configuration for the hardware adjustment in the linux kernel?

I need this since I only install packages and software that I use daily instead of bunch of softwares that I will never use. Less than 10 softwares are enough for me.

It will be great if I am able to create an ISO from my LFS work, the kind of ISO like other Linux distribution such as Arch Linux, Ubuntu, CaeLinux, so it can be bootable and installed on my laptop. Why not installed Ubuntu instead? Because I can choose the packages I want in LFS, just like the motto "my distro my rule" haha...

I am using Dell Precision laptop, I can check the hardware and enable the module at kernel. Just need to know how to create the ISO. Thank you all. Have a great day.

business_kid 03-18-2022 07:55 AM

What I do is mount them all in one directory tree, cd to one below it usually, end enter
Code:

mkisofs <options> directory/*
Bootable isos are a stage up in complexity but there's plenty of examples on the web. An iso is not compressed, so if you're using a usb key, you can copy it to to usb and run it from there.

Iso files are read only, which creates many issues and they are definitely going out of fashion in favour of other options.

glanzfreya 03-19-2022 03:44 PM

I have read several posts about this. I will learn about mkfsiso. I want to ask is anyone know the guide to create installation scripts / an installer for the OS (to copy the file to new computer/hardware) or can we just use the iso and mount it with USB on different hardware and it will load the OS we have in the iso directly without installing? I am new to this.

wiigelec 03-19-2022 09:50 PM

create a tarball and extract it to the desired partition then run grub-install. will probably have to reconfigure kernel as new hardware dictates.

wiigelec 03-19-2022 10:15 PM

fair warning the following are not step-by-step instructions like the lfs/blfs books, but rather a set of guidelines to get you pointed in roughly the right direction to accomplish what you are looking to accomplish.

lfs hint for bootable iso:
https://www.linuxfromscratch.org/hin...ot-cd_easy.txt

a (mostly) bootable iso i built:
https://sourceforge.net/projects/lfshost-distro/

build scripts for previously mentioned (mostly) bootable iso:
https://github.com/wiigelec/lfsHost-.../main/isobuild

initramfs:
https://www.linuxfromscratch.org/blf...initramfs.html

emmett1 03-20-2022 12:00 AM

Hye, i'm Venom Linux dev. I've write script to build multilib LFS,initrmfs generator that support live boot and etc.

Here i wanna share you guys guide to create live iso for your LFS system.
https://github.com/emmett1/mkinitrd/...ake-livecd-ISO

Hope this helps.

arch-linq 03-20-2022 11:17 AM

Just use tar of the build to move it as was mentioned. Creating a bootable ISO is not a trivial thing to do and it's old school idea.

frankbell 03-20-2022 08:44 PM

Remastersys is no longer maintained, but this article points to several active alternatives to it.

glanzfreya 04-20-2022 03:58 AM

LFS ISO
 
Quote:

Originally Posted by wiigelec (Post 6339909)
fair warning the following are not step-by-step instructions like the lfs/blfs books, but rather a set of guidelines to get you pointed in roughly the right direction to accomplish what you are looking to accomplish.

lfs hint for bootable iso:
https://www.linuxfromscratch.org/hin...ot-cd_easy.txt

a (mostly) bootable iso i built:
https://sourceforge.net/projects/lfshost-distro/

build scripts for previously mentioned (mostly) bootable iso:
https://github.com/wiigelec/lfsHost-.../main/isobuild

initramfs:
https://www.linuxfromscratch.org/blf...initramfs.html

Hi wiigelec,

thanks for this I am wondering can I create ISO like yours? I am downloading your lfsHostFULL11.iso now and want to try it.
I have installed several packages in my BLFS system and I want to create ISO so I can install my BLFS in another computer.

Like when I install Ubuntu-Studio.iso to my PC, it has preinstalled package, or CAELinux.iso has preinstalled packages as well (GNU Octave, Arduino IDE).
I want to create something like that. But everyone here is saying ISO is old fashion. What is the best most efficient way nowadays now?

Thank You all.

Sorry took a long time. I was installing bunch of packages like ParaView, VTK, Scilab, ... , and I am still learning a lot about Linux. Love this.

glanzfreya 04-20-2022 04:01 AM

Quote:

Originally Posted by emmett1 (Post 6339921)
Hye, i'm Venom Linux dev. I've write script to build multilib LFS,initrmfs generator that support live boot and etc.

Here i wanna share you guys guide to create live iso for your LFS system.
https://github.com/emmett1/mkinitrd/...ake-livecd-ISO

Hope this helps.

Hi Emmett1,
thanks for the reply, thanks for the sharing. I will see your github.

I want to share my experience on creating iso, you might want to give me revision or advice on this:
I tried cat /dev/sda5 > ~/gfreya.iso and it is not finished
then the the iso file size become 69 GB

it prompts :
cat: write error: No space left on device

my /dev/root size is actually only used 43 GB. With all the installed packages and Desktop Environment (I install lot of STEM applications).

glanzfreya 04-20-2022 04:17 AM

Quote:

Originally Posted by wiigelec (Post 6339909)

a (mostly) bootable iso i built:
https://sourceforge.net/projects/lfshost-distro/

I tried to mount your LFS11 ISO on my Qemu but it can't works. It said "Boot failed: No bootable device"

glanzfreya 04-20-2022 05:48 AM

Quote:

Originally Posted by arch-linq (Post 6340073)
Just use tar of the build to move it as was mentioned. Creating a bootable ISO is not a trivial thing to do and it's old school idea.

I am doing this right now, from directory / (contain all the folders from boot root bin usr ...)
I run this :
tar -cvzf gfreya.tar.bzip2 /*

So I have another computer. Do I just run a random ISO (e.g. ArchLinux / Ubuntu) then go to the terminal console to the top directory and then rm -rf *
then I copy the gfreya.tar.bzip2 and extract it?

Is that the logic? I will do trial and error to make it works. Thanks for the guidance.

wiigelec 04-20-2022 06:53 AM

Quote:

Originally Posted by glanzfreya (Post 6347381)
I tried to mount your LFS11 ISO on my Qemu but it can't works. It said "Boot failed: No bootable device"

for reasons i haven’t dug into yet it does not work on qemu. it does work on virtual box and live usb, at least in my limited testing. sorry.

business_kid 04-20-2022 01:58 PM

I know the positionof bootup stuff is critical. A lot of those bootable isos use syslinux which I personally found a bit inscrutable, but there you go.

wiigelec 04-20-2022 05:12 PM

Quote:

Hi wiigelec,

thanks for this I am wondering can I create ISO like yours?
absolutely! if you want you can even figure out how to make it work on qemu!


All times are GMT -5. The time now is 01:43 AM.