Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Creating a custom Debian CD

User discussion about Debian Development, Debian Project News and Announcements. Not for support questions.
Message
Author
User avatar
MeanDean
Posts: 3866
Joined: 2007-09-01 01:14

Re: Creating a custom Debian CD

#16 Post by MeanDean »

alvakoldo10 wrote:I actually cannot afford to have one computer always available for that purpose; whenever updates were required I would have to install again the system or have that frozen computer.
Besides, I need the profiles capability at install time.
is there any other way I may build my own debian CD with install profiles?
In that situation I would just create a repo/cd for the updated packages

But you wouldn't need one computer, all you would need is a partition

Actually you could just unpack the iso, unpack the live system, chroot into it and update/change it and then repack the live system and repack the iso. But that is a bit manual....and a bit of a process.

If it was me and I did not want to bother with the live cd then I would create a cd from my custom repo. Then I would just do a normal debian install and then use my custom repo cd.

alvakoldo10
Posts: 59
Joined: 2010-09-17 07:49

Re: Creating a custom Debian CD

#17 Post by alvakoldo10 »

VirtualBox could be, what about the profiles? does l-h handle it?

alvakoldo10
Posts: 59
Joined: 2010-09-17 07:49

Re: Creating a custom Debian CD

#18 Post by alvakoldo10 »

If it was me and I did not want to bother with the live cd then I would create a cd from my custom repo. Then I would just do a normal debian install and then use my custom repo cd.
mmmhh, I feel a bit confused now; that is exactly what i'm seeking from the begginning of this post but question is what tool or how do I create such CD live or not? Now you tell me not to use live :shock: ....
sorry maybe I am missunderstanding you

User avatar
nadir
Posts: 5961
Joined: 2009-10-05 22:06
Location: away

Re: Creating a custom Debian CD

#19 Post by nadir »

alvakoldo10 wrote:VirtualBox could be, what about the profiles? does l-h handle it?
I do that in Vbox with live-helper and -in general- it does work.
(in general: i got problems to set the keyboard to german and keep it on the live/install-CD i create. -> easy password required. As an example).
Nothing of that is kind of a drawback, but a bit "annoying".
The good thing: I keep the VBox installation, but don't do much with it. If i want to add stuff i boot into VBox, add the stuff, run the two lh commands and got my new iso/live-CD. That way it is getting better and better :-). I use Refracta for that, but it is not necessary (only comfortable, and only for me, cause i use 17 anyway)

Make sure to have got enough space in Vbox (about 3x the space your installation in Vbox is. Squashfs-stuff gets unpacked and moved around, hence you need much space. For me that are about 8GB)

I know none of the other tools (besides remastersys), but live-helper does a nice job for such stuff.
I use it on a low-level. Depending on what you want your mileage may vary.

-----------------------------------------------------------------------------------------------------------------------
site note (Dean is the live-helper master, just give you some of my experiences here:)
Instead of installing and re-configuring again you might also rsync your installation from hard-disk to vbox-disk, but leave away the huge users-data. Then rsync the hidden home-configs and then run the two live-helper commands. You need to boot into VBox from a live-cd, mount the vbox-disk-installation, rsync the OS, kinda like this:

Code: Select all

mount /dev/vbox_sda /media/backup
rsync -auv -e ssh -n --delete-after \
--exclude="/home/username/[a-zA-Z0-9]*
--exclude="/proc/*"  --exclude="/lost+found/*" \
--exclude="/dev/*"  \
--exclude="/mnt/*" \
--exclude="/media/*" \
--exclude="/sys/*" \
--exclude="/tmp/*" \
root@debian-harddisk-ip:/ /media/backup >dry.txt
Remove -n and >dry.txt if you are ready to go.
Then rsync the users hidden configs (seems more easy to mv the data to a backup-dir then to go for --exclude:

Code: Select all

rsync -auv -e ssh debian --exclude="all data" --exclude=".VirtualBox"  root@debian-harddisk-ip:/home/username/ /media/backup/username
chroot into it and re-install grub. edit fstab. perhaps edit or remove /etc/udev/rules/70-persistent-net.rules
This, of course, is the short/wrong version. This is just to give you the idea. Don't simply copy and paste. For a long time project it is worth the trouble. It is rather easy, but not that easy to explain. Rsync is the way to go.

PS: in case this post was confusing: sorry.
Last edited by nadir on 2010-09-26 17:44, edited 2 times in total.
"I am not fine with it, so there is nothing for me to do but stand aside." M.D.

User avatar
nadir
Posts: 5961
Joined: 2009-10-05 22:06
Location: away

Re: Creating a custom Debian CD

#20 Post by nadir »

alvakoldo10 wrote:
If it was me and I did not want to bother with the live cd then I would create a cd from my custom repo. Then I would just do a normal debian install and then use my custom repo cd.
mmmhh, I feel a bit confused now; that is exactly what i'm seeking from the begginning of this post but question is what tool or how do I create such CD live or not? Now you tell me not to use live :shock: ....
sorry maybe I am missunderstanding you
We both posted at the same time.
Create a 10GB Vbox hard-disk and install a small Debian.
Follow this how-to:
http://forums.debian.net/viewtopic.php?f=16&t=38870
After that you know if it is the right thing or not. You don't have to do much, but wait a bit (ca an hour)
"I am not fine with it, so there is nothing for me to do but stand aside." M.D.

User avatar
MeanDean
Posts: 3866
Joined: 2007-09-01 01:14

Re: Creating a custom Debian CD

#21 Post by MeanDean »

alvakoldo10 wrote: ....
sorry maybe I am missunderstanding you
1- use the debian install disk that is downloaded from debian.org to do a debian install
2 - reboot
2- burn a cd with your repo on it, use that cd to install your custom packages

alvakoldo10
Posts: 59
Joined: 2010-09-17 07:49

Re: Creating a custom Debian CD

#22 Post by alvakoldo10 »

strange but, the more this post goes forward, the more confused I get.
Anyway, at the moment, thanks all for all your info, i'll spend today playing with live-helper and see then If I see things clearer.
The goal I must achieve is prepare an install method (with all my extra sw and maintenance thru the years) the easiest possible for dummies, as they will be the installers.
I'll come back, at least, to tell it all went right.

Thanks again.

alvakoldo10
Posts: 59
Joined: 2010-09-17 07:49

Re: Creating a custom Debian CD

#23 Post by alvakoldo10 »

I always knew i am not a lucky guy; been nearly all this morning issuing lh commands to get an iso and no way. I issue next command :

Code: Select all

lh_config -d squeeze -a amd64 --mirror-binary "file:///home/lvr/REPOSITORY" --mirror-bootstrap "file:///home/lvr/REPOSITORY" --mirror-chroot "file:///home/lvr/REPOSITORY"  -p xfce --bootstrap copy --debian-installer=enabled -b iso --packages "apache2 bzip2 chkconfig fluxbox ifenslave-2.6 mysql-client-5.1 mysql-server-5.1 mysql-gui-tools-common mysql-admin ntp ntpdate proftpd-basic rdesktop sudo sun-java6-jre telnet tightvncserver tomcat6 unzip vim wine xserver-xorg xtightvncviewer"
where my REPOSITORY now for sure it's completely right and even well signed.
Once I issue the lh_build command, all the output it produces ends up with following lines :

Code: Select all

The following packages will be REMOVED:
  apache2-mpm-prefork libapache2-mod-php5 libapache2-mod-python
The following NEW packages will be installed:
  apache2-mpm-itk apache2.2-bin dash diffutils install-info isc-dhcp-client isc-dhcp-common libaprutil1-dbd-sqlite3 libaprutil1-ldap libfile-copy-recursive-perl libnfnetlink0
  python-reportbug sensible-utils
The following packages will be upgraded:
  apache2.2-common bash debianutils dhcp3-client info iptables libaprutil1 python python-minimal reportbug update-inetd
11 upgraded, 13 newly installed, 3 to remove and 0 not upgraded.
Need to get 0B/5606kB of archives.
After this operation, 963kB disk space will be freed.
E: Could not perform immediate configuration on 'apache2-mpm-itk'.Please see man 5 apt.conf under APT::Immediate-Configure for details. (2)
P: Begin unmounting filesystems...
and at the end no iso file at all nowhere. I am clumsy, quite clumsy I know but this is too much. I've followed all your advices, URLs and more .... forgive my language but WTH am i doing wrong?

alvakoldo10
Posts: 59
Joined: 2010-09-17 07:49

Re: Creating a custom Debian CD

#24 Post by alvakoldo10 »

did I blunder?

alvakoldo10
Posts: 59
Joined: 2010-09-17 07:49

Re: Creating a custom Debian CD

#25 Post by alvakoldo10 »

sorry If a I disturbed some one, but I am quite stalled at this point.
Besides this, just a not so important doubt, why VirtualBox if most of debian tools include options to test resulting iso's with qemu? what added value does offer then VirtualBox, besides the thrilling Oracle ownership?

User avatar
nadir
Posts: 5961
Joined: 2009-10-05 22:06
Location: away

Re: Creating a custom Debian CD

#26 Post by nadir »

As far i know qemu works out of the box (from the kernel).
The advantage of VirtualBox is that it is faster and very easy to configure. If you are able to use kvm that might be a good choice.

Looks like your command would be ok, but that is heavy stuff.
If something (-> anything) fails while you run lh_build then the build fails. Therefor i like the lh_config command to be as easy as possible. In that case there is a -probably tiny- problem with apt/an apache package. If you had an installation and would go for "lh config --bootstrap copy --debian-installer live" it was more easy to troubleshoot.
You can probably set apt to ignore or solve that issue (somewhere in the live-directory), but i don't know about that.

If i would do what you do i would start very easy:

Code: Select all

lh config -d squeeze
lh build
to check if i am able to build squeeze at all (that will be a very tiny and useless iso). Then add what i need, one after the other.
That will take very long and be very frustrating (and that is why i install, configure and run the live-helper-copy command instead of editing many config-files and adding many arguments to the command)

Try the live-helper mailing list too:
http://lists.debian.org/debian-live/

Search for the term "live" in the how-to section of forums.debian.net (aka here). There are 6 or 8 or more threads about live-helper, some of them are very long.
"I am not fine with it, so there is nothing for me to do but stand aside." M.D.

alvakoldo10
Posts: 59
Joined: 2010-09-17 07:49

Re: Creating a custom Debian CD

#27 Post by alvakoldo10 »

First of all thanks nadir.
Indeed that's the problem, because i tried just a lh config; lh build (latest version and having problems I moved to the lh_ version) and all it happened at the end was :

Code: Select all

P: Setting up cleanup function
P: Begin caching bootstrap stage...
P: Begin bootstrapping system...
E: need root privileges
P: Begin unmounting filesystems...
And, as i am a complete ignorant, I expected to have one ISO but nothing.

Any way, for me it is not so easy to trust the debootstrap whatever version it is, I mean, I have a frozen netinst and my frozen repo too and so I am not allowed to add newer versions than that at all.

I'll follow your advice to read thos posts.

User avatar
nadir
Posts: 5961
Joined: 2009-10-05 22:06
Location: away

Re: Creating a custom Debian CD

#28 Post by nadir »

It says:

Code: Select all

"needs root privileges"
Try it as root.

The advantage of a first and easy test run is that you don't need to wait so long to get your error (the disadvantage is that the iso is pretty useless)

I didn't mean not to ask, i meant to check if you find hints there (in case you assumed something like that. Some threads are very long and might contain some info you need).

PS: and yes, i have banged my head against the wall cause of live-helper. If there is a problem it often is hard to find (try the mailing list, i think they are quite helpful). In general it is more easy to build a stable Live instead of a testing one (again: for me, and only me).
"I am not fine with it, so there is nothing for me to do but stand aside." M.D.

alvakoldo10
Posts: 59
Joined: 2010-09-17 07:49

Re: Creating a custom Debian CD

#29 Post by alvakoldo10 »

Once again thanks nadir. Being spending 3 or even 4 days working with simple-cdd, lh and other trials to get a custom install CD, I've been unable to see a simple "need root privileges" .....it happens from time to time.
Any way, as time is like a sword over my head, I think I may consider I have a solution at the moment: my own repo - a netinst and so, and adecuated dependencies marked in my own control files will make the install nearly as easy as a common Debian Install. My ideal solution seems to go background ....... although I really resist my self, having tasted simple-cdd and lh ...... so close so far away

mehdirahimi
Posts: 1
Joined: 2014-12-17 07:37

Re: Creating a custom Debian CD

#30 Post by mehdirahimi »

alvakoldo10 wrote:Once again thanks nadir. Being spending 3 or even 4 days working with simple-cdd, lh and other trials to get a custom install CD, I've been unable to see a simple "need root privileges" .....it happens from time to time.
Any way, as time is like a sword over my head, I think I may consider I have a solution at the moment: my own repo - a netinst and so, and adecuated dependencies marked in my own control files will make the install nearly as easy as a common Debian Install. My ideal solution seems to go background ....... although I really resist my self, having tasted simple-cdd and lh ...... so close so far away

I need the same thing that you have done . please guide me to achieve that . what i have done is by simple-cdd (which is not simple at all !) for two weeks with no success.
I need install the base os + packages and dependencies needed (like : LAMP) + source packages (like : asterisk) finally config all of them and save that state ready to install on another machine .
Appreciate any help

fsmithred
Posts: 1873
Joined: 2008-01-02 14:52

Re: Creating a custom Debian CD

#31 Post by fsmithred »

Set up the installation exactly how you want it. Install refractasnapshot-base and refractainstaller-base from the deb files. (You can use 'apt-get -f install' to get the dependencies when dpkg complains.) Refracta Snapshot uses rsync to make a copy of your system, then it rolls it up into a bootable live-CD. Refracta Installer uses rsync to copy the running live-CD to hard drive. In both cases, your software selection and configurations get copied.

Edit /etc/refractasnapshot.conf to your liking. Options are explained in the comments. Edit /usr/lib/refractasnapshot/snapshot_exclude.list if you need to add or remove anything from the rsync excludes list. Then run 'refractasnapshot' from a root terminal.

For wheezy, get the versions in the Tools section. For jessie/sid, get Testing versions.
http://sourceforge.net/projects/refracta/files/

I assume you only want the cli tools. If you want gui, there are gui packages in the same place. They require zenity or yad and a graphical environment (and a few more deps.)

spacex
Posts: 637
Joined: 2015-01-17 01:27

Re: Creating a custom Debian CD

#32 Post by spacex »

Remastersys can still be used to create a snapshot of the working install. Even with Sid. With a few tweaks to the remastersys-installer it even works fine with Debian unstable and systemd. Only dealbreaker is uefi. Because that would have to be converted post-install. Or if someone could write a uefi-version of the Remastersys-installer, it would greatly benefit the Debian community and all the Debian derivatives. Or create something simular that is uefi-aware and able to do a native uefi-install. But that's beyond me.

Strange that someone isn't creating a good tool to do snapshot of a running system, and include a installer that is up to date with gpt/uefi and systemd. I someone did it, they would become very popular. I would have donated quite a bit, and I'm sure other would too. Otherwise I would have to dig into the Debian Live Manual, and I won't go there if I can avoid it :)

spacex
Posts: 637
Joined: 2015-01-17 01:27

Re: Creating a custom Debian CD

#33 Post by spacex »

Oh, I didn't see the last comment. Does Refracta do UEFI OOTB ? Otherwise I would be left where I'm at with my modified Remastersys-scripts.

fsmithred
Posts: 1873
Joined: 2008-01-02 14:52

Re: Creating a custom Debian CD

#34 Post by fsmithred »

I don't have a computer with uefi to test it, but someone just told me that they patched refractasnapshot so that the snapshots will boot on a uefi system. Refracta Installer knows nothing about uefi. If someone wants to contribute code for that, I'll probably use it, and if someone wants to send me a new computer, I'll work on the code myself.

Refracta snapshot and installer do work with systemd. Getting them to work with jessie/sid without systemd is a little trickier. It can be done, but the fix hasn't been added to the tools yet. You have to edit one system file before making the snapshot, else it won't boot.

anticapitalista
Posts: 428
Joined: 2007-12-14 23:16
Has thanked: 12 times
Been thanked: 13 times

Re: Creating a custom Debian CD

#35 Post by anticapitalista »

spacex wrote: ... I would have donated quite a bit, and I'm sure other would too. ..
Get your wallet out and head over to the Refracta forum :)
antiX with runit - lean and mean.
https://antixlinux.com

Post Reply