PDA

View Full Version : building your own distribution



PatrickMoore
July 12th, 2009, 03:39 AM
i was curious about how hard it would be to build my own custom distribution based off ubuntu. there is alot of programs preloaded with ubuntu that i dont use and alot that i need to manually install that i use so im compelled to make my own perfect install cd

Gizenshya
July 12th, 2009, 03:43 AM
I've wondered about this myself.

For the time-being I decided to just backup the drive after installing and updating everything I wanted.

Unfortunately, I don't know how to do that either :o

Sublime Porte
July 12th, 2009, 04:05 AM
Remastersys (http://en.wikipedia.org/wiki/Remastersys)

It has both a backup option (so you can just make a LiveCD of your own personal setup/data) or a distro option, to create your own distro-remix LiveCD.

PatrickMoore
July 12th, 2009, 04:32 AM
Remastersys (http://en.wikipedia.org/wiki/Remastersys)

It has both a backup option (so you can just make a LiveCD of your own personal setup/data) or a distro option, to create your own distro-remix LiveCD.

beautiful. i think im going to have a go. can i change the splash screen to one of my own design

Sealbhach
July 12th, 2009, 05:32 AM
More info here on various ways to roll your own distro:

http://www.tuxradar.com/content/how-build-your-own-linux-distro

.

Sublime Porte
July 12th, 2009, 05:46 AM
can i change the splash screen to one of my own design

Yes.

P Minix
July 12th, 2009, 05:47 AM
I would rather have a way of generating an APT-GET report that I could use to setup new machines from a CD. Any ideas.

PatrickMoore
July 12th, 2009, 07:07 AM
Yes.

what would i do to change that?

PatrickMoore
July 12th, 2009, 07:26 AM
should i start with a minimal cd? or a plain live cd i want to make it ubuntu based i think?

earthpigg
July 12th, 2009, 07:47 AM
I would rather have a way of generating an APT-GET report that I could use to setup new machines from a CD. Any ideas.


dpkg-query -l > packinfo

will make a text file, called packinfo, containing every package installed on your system.

in alphabetical order.

now, we need someone smarter than me to figure this out:


dpkg-query -l | grep (something to remove the first four characters of every line) | grep (something to remove everything in a line starting with the first space) > packinfo


if someone can replace my (parenthesis) with an actual command or option of some type, the result would be a text file containing the package names and nothing else.

using that file as the pattern, we could then install the exact same packages on multiple machines with exactly one command per machine.

earthpigg
July 12th, 2009, 07:58 AM
grrrr

there is a command that omits things that follow a specific pattern.

what is it?!

earthpigg
July 12th, 2009, 08:12 AM
so i was sitting here thinking 'man, this would be SO much easier to do in arch than ubuntu, usin pacman....'

'...hey! maybe i can just install pacman! its free software, it should be in the repos! im sure those smart folks at debian have long ago figured out how to make another distros package manager work with debian packages'


sudo apt-get install pacman

'SWEET! its working! this will be easier than i thought!'


man pacman


NAME
pacman - the game of pacman

SYNOPSIS
pacman [grey]

DESCRIPTION
Pacman is an old action game.

You are Pacman, and you are supposed to eat all the small dots to get
to the next level. You are also supposed to keep away from the ghosts,
if they take you, you lose one life, unless you have eaten a large dot,
then you can, for a limited amount of time, chase and eat the ghosts.
There is also bonus available, for a limited amount of time. An X gives
just points, but a little pacman gives an extra life.

bla bla bla


*facepalm*

earthpigg
July 12th, 2009, 08:50 AM
i am reinventing the wheel.

google had half the answer.

http://forums.debian.net/viewtopic.php?f=6&t=37979

to get the list, from the machine-to-be-cloned:


aptitude search -F '%100p' '~i!~M' > package_list

to use the list, on the target machine:


sudo apt-get install $(cat package_list)


edit: wtf, the install command 'ate' the package names out of package_list as it installed them.... now that file is empty??!

aysiu
July 12th, 2009, 08:57 AM
If you don't really want to build a distribution but just want to change the default packages and artwork in Ubuntu, then Remastersys is definitely your best bet. Here's a tutorial on how to use it:
http://www.psychocats.net/ubuntu/remastersys

anupam
July 12th, 2009, 03:38 PM
dpkg-query -l | grep (something to remove the first four characters of every line) | grep (something to remove everything in a line starting with the first space) > packinfo


if someone can replace my (parenthesis) with an actual command or option of some type, the result would be a text file containing the package names and nothing else.

using that file as the pattern, we could then install the exact same packages on multiple machines with exactly one command per machine.

dpkg-query -l | cut -d" " -f 3 > packinfo

Gizenshya
July 12th, 2009, 04:27 PM
it filled up the ubuntu partition and got stuck. I had to quit it, and force remove all the files.

how do I make it use another directory?

earthpigg
July 12th, 2009, 04:49 PM
it filled up the ubuntu partition and got stuck. I had to quit it, and force remove all the files.

how do I make it use another directory?

downloading all the packages is what filled up the ubuntu partition?

one option is to download them on another machine and copy all the debs from /var/cache/apt/archives on a machine that does not have storage space issues to a thumb drive or external hard drive, and then run them from that external hard drive.

Gizenshya
July 12th, 2009, 04:51 PM
no, sorry lol

I meant I got everything installed but when I tried to make the backup, it filled up the free space on the ubuntu partition (only aobut 2.5 gigs was initially free).

how do I make that program put the files in another drive?

aysiu
July 12th, 2009, 06:24 PM
it filled up the ubuntu partition and got stuck. I had to quit it, and force remove all the files.

how do I make it use another directory?
Are you talking about Remastersys?

Gizenshya
July 12th, 2009, 07:44 PM
yeah, I want it to go to host or somewhere, not to /home/remastersys/blah

aysiu
July 12th, 2009, 10:21 PM
yeah, I want it to go to host or somewhere, not to /home/remastersys/blah
Click on Modify the remastersys config file to customize options

Then double-click Working Directory and select the place you want it to build your customized Ubuntu.

But also be sure to double-click Files to Exclude and exclude that place as well.

Gizenshya
July 12th, 2009, 11:36 PM
ok, but now it says in the terminal where it runs, that /host/remix/remastersys/blah blah blah is not a directory (the folders that I originally deleted in the remastersys /home/ folder). I thought it would create more there.. but apparently not. so do I need to reinstall? and then just copy those folders to the new directory manually?

Gizenshya
July 12th, 2009, 11:41 PM
removed...

I went to the site and added their repository and all is well with the install now...

but I still need to see if I can get it to use the host working directory...

CJ Master
July 13th, 2009, 12:37 AM
There's a simpler way: Simply create a bash script with an apt-get of everything you want.

Then make a minimal Ubuntu install and run it. It'll grab everything you want and no more.