Files

559 lines
28 KiB
Plaintext
Raw Permalink Normal View History

Episode: 446
Title: HPR0446: Building Live CDs with Fedora
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr0446/hpr0446.mp3
Transcribed: 2025-10-07 20:45:00
---
The Holy Presentation was recorded by the U Digital Media at the inaugural Southeast Linux
Fest in Clemson, South Carolina on June 13, 2009.
For more information about the Southeast Linux Fest, visit SoutheastLinuxFest.org
In this, I'm actually going to be building a live CD, and so we were trying to build that
live CD this morning.
I tested it, it worked out great, so I'm going to boot that live CD to start with, and
then I'm going to build a live CD from that.
So how many of you guys are Fedora users right now?
I hope to actually convert you all by the end of the day, so in general, what we're really
going to do is we're going to spend some time talking about what's called a Fedora Remix.
The concept of a Fedora Remix is basically we want to take the current Fedora distribution
or any distribution that you have, if you want, if you like.
These are 100% free tools, so you can take them and rebuild your own custom distro from
it.
We're hoping that when I get this booted up, I can actually show you how to do the tools,
how the tools work.
So how many of you guys have done custom distributions before?
Can you talk a little bit about what we're waiting about, what's unique and special about
Fedora?
What's unique and special about Fedora?
It seems 100% free.
That's like the number one thing.
We have four foundations we talk about.
Freedom is our key element.
We talk about how freedom is important to us and why actually Fedora is free is we want
to make sure that everybody has an opportunity to use the tools that we have.
We talk about features.
We are usually the first generating new features.
We're out there trying to be an upstream to everybody else, and we give back to that
community as well.
We always make sure that they're available and they're free.
We also have friends, and that's actually one of the really important parts of our
components, is that we actually have a lot of friends that we work with, and I really
enjoy a lot of the guys that I hang out with.
Greg Daconixberg in the last talk just next door was talking about the OLPC, and he and
I've made a cool friendship over time.
Paul Freeldt, who's going to do our keynote tonight, he and I are good buddies.
He said to me this morning, I walked out of the hotel and he's like, all right, give me
a big man hug.
This is Paul.
We have a lot of good friends as well, and we also talk about first, and that's the
first in certain areas we really want to focus on how we're the first in doing certain
things.
There's a lot of cool programs out there that we've written.
There's a lot of cool society, a lot of cool community that we actually try to excel
at.
How many of you guys have heard of Fedora Community?
Anybody?
Few of you?
Okay.
So we actually just released 100% free community tool.
Basically it's a look into all the different parts of Fedora, and eventually we're going
to make it so that it's really easy to log bugs and look at packages and this sort of thing
all in one interface, and it's really automatable in that way that it works.
So I'm going to talk about a tool called Live CD, or Live CD creator, which is the very
first one we'll talk about, and it's a simple Python script that builds an entire distribution
using the Anaconda tools, SquashFS, and several others including Kickstart.
But then we'll actually talk about how to build a live, excuse me, an install set as
well from a tool called Pungy.
Pungy is a tool out there that's available for building DVD sets.
And then Reviser is basically those two tools with a GUI for intent.
It has a lot of configuration options on the command line as well.
All right.
How many of you guys have a computer and a browser, because I actually have these slides
online and you're welcome to follow along?
Oh, yeah.
Yeah.
We're going to do it that way.
Even more fun.
So we're going to do it that way.
If you go to fedoraproject.org slash wiki slash presentations, and then you go to the
self-section in the fedora remix, I've done this presentation like five times, so I can
like ad hoc most of it.
Yes, fedoraproject.org slash wiki slash presentations.
So if you go there, that'll work for you.
So as they said, my name is Clint Savage.
I have a website called 6060Penguins.com.
You're welcome to visit that anytime.
If you don't like the word sexy in your logo, you can put fedora to us tutorials.com.
As they also mentioned, I'm the fedora regional ambassador for Mountain West section, which
is Utah in the mountain region out there.
I live in Salt Lake City, and I run the Utah Open Source Conference.
And so basically what we're going to talk about is how to build your own custom distribution
from fedora tools.
What you can do with that is you can say, okay, look, there's a website out there called
fedoraproject.org slash wiki slash remix.
And if those of you following along on your laptops, you're seeing basically the same
thing in a PDF.
And it's based upon fedora.
And the idea here is that we want to give out 100% free tools.
So everybody out here, you can download these today.
You can use them.
You don't have to use it with custom fedora.
And that's one of the great ideas of the fedora remix.
You can take this and you can build your own.
But there's this concept of a spin, which is a approved version of a remix that has
100% free software that's a board approved by the fedora project board.
Okay.
Then there's this remix.
And we're going to talk a little bit more about the remix in a minute.
But the idea is that you can take and build any application on top of this and make your
own that you like.
You can take selected updates.
So for instance, last year or last month or so, we've had a lot of updates to the fedora
10, right?
And you maybe you wanted the latest and greatest thing on fedora 10 and you wanted to show
it to your friend.
And so you took the fedora 10 repository and then you took all the updates that were available
and you spun them into a remix or you can do like security fixes or whatever else that
you want.
You can also do your own customizations.
So for those of you who enjoy certain types of non-free software, I'm not promoting that
today.
However, that is possible.
There's a repository out there called, or a release called Omega 10.
It was created by a gentleman by the name of Susmit and he's out in India and he's a pretty
cool guy.
And he built this Omega 10 and it has a lot of the non-free components in it that fedora
doesn't permit.
And so we want to be able to do that sort of thing.
If you want to do that, you can.
Say for instance, you have your own custom theme that you want to create.
So you build this custom theme.
It's really neat and cool and you put it together.
This is awesome.
The lamp life is ending.
No modification or one that I'm really interested in is the kiosk mode.
So for instance, itself wouldn't it be great if you, of course, you don't have to pay for
anything or anything here.
But if you registered and you wanted to get your badge or your own name on it and you
went to this kiosk and you typed a couple keys and you hit enter and then it printed the
thing up for you.
Let me try a hidden.
All right.
So you can take some existing technologies.
One of the existing technologies that we can take is anaconda and the kickstart component
of anaconda.
There's a customizable kickstart script that comes with a package called spin kickstarts.
You can actually install it from the Fedora project and it actually provides, let's see if
we can get a terminal here.
There we go.
Anybody read that?
Okay.
Okay.
I usually run this as a root so you're going to get to see root there.
Okay.
So there's these kickstart files in here and I already have an ISO that I created earlier
called herlo-remix as I mentioned earlier.
My Nikon IRC is herlo.
Anytime you see herlo online, it's probably me.
I have a customization that I've built on top of some of these kickstart.
So I'm going to show you the constructs of a kickstart.
They have some kickstarts like the Fedora install, Fedora install Fedora kickstart is for
the DVDs.
So I don't know why they named it that but that's what they named it.
They have a Fedora live base which I'm going to use for my live CD and then they have,
I built this one called remix customizations.
I also have one for my Utah open source conference kiosk that I'm working on.
And so that's one that I can build and customize.
And there's an application called x-guess that does that for me.
So let's go ahead and have a look at the Fedora live base just for a second and talk about
what's in it.
Let me go to the top here.
So what you'll see is how many of you guys have seen a kickstart before?
Okay.
So a fair amount of you.
If you haven't ever seen a kickstart before, this is an automation of installation.
This is how they do a lot of installs in standard Red Hat systems and Fedora systems.
So you'll see the language, you'll see the keyboard, you see the time zone, this sort
of thing.
And we can modify this and customize it.
So I live in Utah, so I'm going to want to put mountain or mountain time, right?
That's where I live.
So that's the time zone I want.
You guys are here in the Eastern time zone.
Luckily for you, that's the default, so you don't have to change it.
You'll notice the SU Linux is on, they do a bunch of things like that.
And then I've got these repositories right there by my cursor.
So I've got one called release which I actually make a file repository and by the way I
recommend this, make a repository locally on your system.
Because if you try to download this over the internet, it could take days, most likely.
I download the entire repository and then I build a custom repository from that.
I also have one called updates, just so I can get the latest and greatest stuff.
And I are seeing that on a regular basis.
You can also do raw hide, you can kind of see it there, let's turn this in text off.
So there's the raw hide thing at the bottom.
And then we have a list of packages, things that we can install.
Now each of these are defined in an XML file, so base, base, x, core, fonts.
There are groups of packages.
And I can list all these sorts of things.
I also install the kernel and memory tests, because I like memory tests.
This actually comes with the root.
Now the ones with minuses, remove.
So it takes those packages away.
We want to build a CD that's approximately 700 megs.
So we don't want something that's huge.
So we take and make these sorts of things.
Down here, a little further we have a bunch of packages they remove for cleaning up.
And then they have some scripts that they do at the end.
And this is called a pre or post script.
It's things that get run at the end.
And this is actually where they add the live user and this sort of thing.
So I'm going quickly.
I apologize if I'm going quickly through all of this too fast for everybody.
But you're welcome to follow along.
These are all available.
Spin kick starts as the RPM that you can get this from.
Let's see what else is here.
Okay, so that's great and wonderful.
But I want to do my own custom configurations.
So I'm going to go into the remix customizations that I made.
Now I'm going to change up the conversation here for just a minute.
I'm going to get you guys involved.
The way I'm going to get you involved is I want some packages that you guys want to install yourself.
So they have to be in the Fedora repository, right?
And they have to be free.
So the ones I've chosen so far are Inkscape, Nautilus Open Terminal.
I love GVIM and I'm a big VIN man.
So for those of you who like EMAX, you could offer that up.
Who wants to suggest some packages?
Ruby?
We can do Ruby.
Do you want like Ruby and Ruby Gems Rails and stuff like that?
All right, Python's already installed.
By default.
What's that one?
Python 3, I don't think it's in the repositories yet.
Might be, we can try, I want to try it.
It'll tell us if it didn't work.
Any others?
Did I spell it wrong?
It's an X, huh?
Yeah.
What was that one?
Spell that for me.
I'm going to go ahead and just do those and that's a good list.
We've got what?
10 extra packages now.
So I've just added and I've made a spin that I've done.
And it's considered a remix because, well, it's mine and I've
customized it the way I want.
But if I wanted to, I could actually take this to the Fedora
board and I could say, can you approve this for me?
They'd probably say no, because it doesn't have any real benefit,
anything above and beyond the standard repositories.
But it would work.
So I've done that and now I want to actually start a remix.
And the way we do this is we actually go ahead and run a command.
And this command is called live CD creator.
Live CD creator and then you specify a config file.
That kickstart file we just looked at, that's the kickstart file we're going to use.
So let me go ahead and do that really quick.
And here's the command that I run.
So I'm going to talk about all these options for you in just a second.
Beware, and if you've got salt and slides, it's space hungry.
It likes lots and lots of space.
Probably two to three gigs of disk space.
Let's be aware of that.
The other part here is you'll notice I have things like cache.
I don't want to download the packages over and over and over when I'm testing a
testing a build.
So I will put it into this repository directory basically.
And I also have a temp directory where it actually builds the ISO.
And so those two options are there.
And then at the end you'll notice I named it her low remix.
So that's the name.
And so I'm going to start this up.
And while I start this up, it's going to build myself a full file system.
And then it's going to go through a process of downloading those packages.
Luckily, they're on my machine.
Once it's done that, it will actually go through and build an ISO with make ISOFS.
It'll squash it and then create a physical ISO for us to use.
Just pretty cool.
The orders up to you and that failed.
Look, Hilafax is not available.
So let's fix that.
So Hilafax here at a look, while we're waiting for that,
let's go ahead and continue our conversation here about.
So as I mentioned, it's very resource intensive.
We also have how big you want it.
So this really interesting question size doesn't really matter, it says.
So why is that?
So we can also take the live CD and we can put it on a USB.
So you could make a two gig live USB if you like.
It doesn't have to be 700 megs.
But if you wanted to be on a CD and distribute it that way, you can.
Now I mentioned earlier, we're going to talk about remix a little bit.
One of the things about Fedora remix is that you can actually take this custom repository
stuff, build your own repository, put some non-free stuff in it, put some stuff that you think
is useful that's free in a repository that you like, and you can build a custom remix.
We don't have to ask Fedora permission.
But what you do have to do is you have to say that it is a remix.
You have to use these little things down the bottom right corner that say Fedora remix
on them.
You have to actually label it if you're going to distribute it.
And you have to label it with one of these.
You can use any variation on them.
There's a hundred of them.
I'll show you the link once we get done with this, with all the different things, but
you can actually label it.
And it's a legal issue where Fedora says you can't use our logo unless it's under these
circumstances.
So it's because they don't want to hurt their brand and that sort of thing.
So we're really interested in that.
But if you wanted to distribute it, please take this code and do it.
Let's see where we are in the distribution component here.
Oh, it failed again.
So Python 3 is not in there.
So it's fun.
It's an experiment I'm trying and that's cool and all but too bad.
Okay.
So one of the things that's interesting is we can also take that and build a live USB as
I mentioned.
This is the command that you do it with, live ISO to disk.
Now as I mentioned, this is all available in the live CD tools, RPM.
And so you just run the command.
You say, I want to run this as root.
That's what the SU minus C says.
And then I want to run that command.
I can actually set up what's called a persistent overlay.
The persistent overlay basically allows me to take what's on this disk and not erase
it.
Okay.
So if I have two gig disks, which is what is in my hand, I don't erase what's on it.
It will actually let me have persistence where I can actually store a piece on there like
say, you know, another gig or something and I can actually store configurations and other
extra files.
Okay.
So it's non-destructive as well.
So let's see what's on this disk really quick while we're waiting for that to happen.
There's also a tool called live USB creator.
Live USB creator is a GUI tool that allows us to create a live USB as well.
And I'm going to go ahead and show both of those while we're waiting.
See where we are here.
So it looks like that might actually work.
So here's live USB creator.
So what you can do is you can actually browse online over here on the right and get any
of these packages, download them automatically and put them on your USB.
So if you want just some standard, you know, Fedora 11 live CD or something like that, it's
really easy to grab Fedora 10s there, Fedora 9.
Or you can go and grab one that you want.
So if I wanted to go and get my hurloremix which we're going to build, it would work just
fine.
And then you just specify the device and how much persistent storage you want.
Now we can do that same sort of thing with the command line as we mentioned.
So it's like live, oops, CD, ISO to disk, it's like this.
So I mentioned this earlier so you can say, for instance, I can format the disk, I can
set the NBR if I want and then I have an overlay size and you set that overlay size to
whatever you like.
You can also have an encrypted home directory by default which is nice and you can say don't
encrypt it if you don't want it to be.
And then you specify the ISO and then you specify the disk.
There it goes.
See we're building the CD.
So it's actually downloading packages and installing them in this temporary directory.
That temp directory we talked about, it's building the ISO inside there.
So it's downloading them all in there and installing them.
So one of the other things we can do is what's called Pungy which is building live, I mean,
install DVDs.
So Pungy is available to you as well.
Pungy works very similarly.
It actually builds DVDs though and it has several stages.
You can actually build just like the kickstart part or you can actually go through the entire
configuration and build the ISO.
You can also split it into pieces so you can say I want six CDs instead of one big DVD.
And it also works off of a USB.
You can install from that as well.
So Pungy's a nice little tool.
Let's actually move on to the next things for a second and we'll go back to it.
So as I mentioned, there's no split media, no source.
If you want the source code, you can get that.
That's pretty interesting too.
And that's kind of fun to play with and you don't have to get the RPMs if you don't want.
And it has a caster as well, similar to the live CD.
Again, Pungy is very, very demanding on your disk, it uses a lot.
Be careful with that.
And you can add packages or take them away as well.
Cobbler, how many of you guys know Cobbler is?
So Cobbler is an automated install system.
Works with over the network that sort of thing.
Cobbler takes advantage of this.
Tool Pungy to build CD ISOs that are based upon distributions that you've already built.
Any questions so far?
Okay, yeah.
Two questions actually.
Are you using that in your publisher?
It's RPM only using the data.
If we have Debian available, you can install and use Debian.
The reason the thing is, as you've got to understand that it's using kickstart as the technology.
But there is a support for kickstart in Ubuntu, for instance.
They use the thing called kickseed.
So it's possible, I don't know how much work there would be, but it could be done.
The second question is you keep talking about, obviously, this is doing a lot of this by...
Does this have to be a local driver or a pro to say a nice guzzy and...
As far as I'm concerned, you can do anything you can mount.
Like, I...
Yeah, I'm sure I could do it over ice guzzy, it wouldn't be a problem.
Recently, I've gotten to play with some more ice guzzy stuff, and I haven't been able to do that before, so it's kind of fun.
There is actually one tool that does both of these, though.
That's called Reviser.
I'm going to show you Reviser here in a second, and I'll do Pungy and all that fun stuff, as we go to it.
But the thing about this is that you can actually build a live, or an install CD, or DVDs, from Reviser.
It's built by the Fedora Unity Group.
They're actually a SIG, a special interest group of Fedora, and they've been around quite some time.
They do F-Paste, and the Fedora Unity, yeah, respins.
They do about three months in.
They do a respin of all the updates for you.
You can get it at FedoraUnity.org, and they do a great job as well.
They have a simple GUI mode in a very configurable CLI. It's very, very powerful.
I'm going to turn this on, and I'm going to show you guys that, and we'll see where it goes from there.
Let me show you Pungy first, since we're here. Pungy looks like this.
It's pretty long, as you can see.
If you're interested in Pungy, you can say, for instance, I want to name it this.
I want it to be this version. I want it to be this flavor.
One of the things you can do is you can actually, I believe, base it on another one.
See these stages at the bottom?
You can say, for instance, I don't want to do anything up to the Create Repo stage,
so it'll actually just test that part, which is very nice for building ISOs.
That's the sort of thing.
Let's see what else we got. Here we got a Revisor, which is really, really nice.
Another great tool. Revisor is a GUI, as I mentioned.
You can do dash, dash, help, and get all the command line options, if you're interested in it.
But it looks like this, and you can just go ahead and click get started here,
and you can choose. I want a DVD set, or a CD set.
I want it to be optical live media, which can be USB as well, with the live CD creator tool.
So I can click this, and I can click forward.
I can choose from configurations, and I can choose from repository definitions that I want.
So I want an F10i 386. Looks like they haven't updated it to F11 yet.
It will be stored in SRV Revisor, and here's the packages that I want.
I can also add repositories to it, which is neat.
So if you have your own custom repository, just click it and add it.
Then you specify your kickstart, just like you do in the command line version of Pungy or live CD creator.
And then you create it, and it will go in and load the repositories, and it will fail.
I'm not going to let it do that.
And then you'll just create when we're done with that.
So hopefully this will actually die.
Let's see where our build is.
So our build is going along.
It's at 666 of 1039 packages.
And so in a couple of minutes here, we should be able to see it start building the rest of the CD stuff.
Let's see what else we got here.
How much time do I have left? Five minutes? Cool.
I'm on time, because we're going to be away ahead.
Even with only 30 minutes to present.
We pulled this off, because there's just questions left, I believe.
We'll let it run here for a minute while we talk about anything you guys want to talk about.
Yeah.
Question about the ISO to use me?
Is that creating a lab?
The live CD ISO to disk, is it you're talking about?
Well, that's the script that does that.
Is that creating a live boot or what?
Yep.
And on this CD I have right here, I will actually do that in a couple minutes.
I'm just waiting for it to finish.
The fact that it's live, if I reboot, is it going back to the base?
Yeah. And just a minute, I'm actually going to do that.
I'm actually going to go through and reboot.
So we've got about five minutes left and hopefully it'll finish.
If not, we'll kind of stick around and pretend that we're done.
And try to finish it anyway.
It totally builds on the USB.
And then I can reboot that and it boots right up in the live environment.
So if you have that persistent overlay that we talked about, you can do that and save it
in there.
And then it doesn't go away.
So even configurations don't go away.
Anything you want to save, you save it in that persistent overlay.
And it also has that home directory, which you can keep it in there as well.
Any talk a little bit more about that because I didn't quite understand it.
Okay.
So the persistent overlay part?
Yeah.
Okay.
So basically there's space on your disk.
So you have a four gig disk, right?
And you want to be able to put a little bit of file space available so you can store configurations
like say you like pigeon, an example, right?
And you want to store your pigeon configs in there.
So you go ahead and boot up the system, you launch pigeon, and then you just copy the pigeon
configs in there.
So next time you reboot, when you come back up, that persistent information is still there.
You go into that directory, you pull it off and copy it back.
Can I make my whole home directory the persistent?
Home directory is actually already included.
If you noticed up there, there was a home directory section.
It's a very small partition, but you could link it or something like that, or run a simple
script off your persistence that would mount that automatically or whatever.
And I thought you were also, sorry, I was just kidding.
No worries.
We got plenty of time.
You were talking also about building multiple live CD versions and putting them on a single
device and hearing this persistent.
Technically we could do that, yeah?
Okay.
So your home directory configurations can be persistent, I believe automatically.
But the persistent stuff, like in Etsy or whatnot, no.
Global configurations are a little different.
You'd have to store them there, like things like, you know, I'm configuration or KDE configurations
would work that way.
And I've seen that work.
You can sort of cheat.
Right.
I mean, persistence is the whole point of persistence in this case is so you have a way
to access documents for things that you want to do.
The next revision of this presentation that I want to do is I basically want to take,
put all of my notes and everything I do on that persistence, boot it up, install a couple
packages.
In fact, I will probably want, I have like 30 seconds left.
I'll probably want my presentation to, you know, to be there and all my configurations
to be there.
I just run a command and I'll have my Kickstarter already have built that and I'll build
a live CD from building a live CD, which is kind of cool to think about it.
You can actually build an environment that you can build an environment from.
It's pretty neat.
So I guess I'm out of time, but if you guys have any more questions or whatnot, we can
talk for a few minutes after and they're going to probably open the doors and that sort
of thing.
But we'll keep this up here as long as we can and so we can finish this off and I can
reboot into a live environment for you.
Any other questions?
Yeah.
Yeah, that's basically what I was saying, absolutely, that's exactly what I was thinking.
You take a Bash RC, like you said, and run a little script and have it mount the right
partitions onto your persistent overlay.
That would totally work.
Any other questions?
Oh.
Yeah.
Is it possible to do a live CD from, say, your currently installed system?
That's what I'm doing right now.
Okay.
So I said, I need to apply and then say FTP client and several other things that will be built
into the live.
No, you need to tell it in the kickstart.
So you say in the kickstart, go in there and you're saying base upon a specific and you
can actually do that with live CD, you can say base it upon a particular ISO, but you
can't do it.
Like you can't do custom configurations like that.
You'd have to put them in, right, right.
Like you're specific with all the packages and configurations that you have, you can't
base it on that yet.
There's not a way to just copy that in there.
That'd be neat though.
Well, please do not accept that.
Like I said, at the moment you can't, but feel free to hack, it's 100% free.
Thanks you guys.
Thank you very much.
This work was recorded by View Digital Media and is licensed under a Creative Commons
distribution, share it like version 3.0.
For more information about the Southeast Linux Fest, visit SoutheastLinuxFest.org.