Creating live CD from already installed Linux

Taking care of your Linux box.
usamahashimi

Creating live CD from already installed Linux

Post by usamahashimi »

Hi
I have installed kubuntu 8.04 with all the necessary codecs, restricted driver and necessary softwares, and this is obvious that if I ever reinstall my kubuntu, I have to reinstall all these softwares too, so is there any package (software) which can create the iso image of my current installation (with all the codecs and softwares) so that (after burning this iso on CD) whenever I reinstall my kubuntu, all the previous softwares and codecs install automatically during the linux install process?
Thanks
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

i don't think you can go from an installed system to an install cd, unless you have all the .deb files lying around. you can add the deb files to a custom install cd (docs), or you can use a tool named reconstructor.

see also: http://ubuntuforums.org/tags.php?tag=custom
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
x2oxen
Major General
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Location: Faisalabad
Contact:

Post by x2oxen »

if you want to install that on same pc all the time you can look into software called acronis it might help you. or else you can see in latest version of norton ghost it might be able to create image of ext2-3 partitions.
Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com
Muhammad Saad
Battalion Havaldaar Major
Posts: 273
Joined: Sat Jan 27, 2007 11:07 pm
Location: Dera Ismail Khan, Pakistan
Contact:

Post by Muhammad Saad »

If you want to make an image of the disk then you can also try partimage. But I think making an installer would be better.
usamahashimi

Post by usamahashimi »

I followed the link;
https://help.ubuntu.com/community/Insta ... ction=show
given by lambda and the entire process went on with a single error, but, when the new customized iso image formed and I checked that image in vmware-workstation, the live cd was exactly the previous one (original cd) and without any new software or codecs (which are already installed in my system).
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

what are you trying to say, exactly?
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
usamahashimi

Post by usamahashimi »

I booted the the newly created iso image and checked the live sesssion (kpanel), the menus like Mulimedia, Internet do not have my installed softwares (like mplayer, vlc, amule, kget etc), also plugins were not there, also /var/cache/apt/archives was empty.
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

what do you think went wrong?
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
usamahashimi

Post by usamahashimi »

I think that the customized iso image must contain (as preinstall) the software, and codecs which are already installed in my system, like vlc, mplayer, kget, nvidia driver etc, but these were not present in that iso image!
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

how would someone go about reproducing the problem? do you have all the steps you took written down somewhere?
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
usamahashimi

Post by usamahashimi »

I have taken the following steps;

Code: Select all

sudo apt-get install squashfs-tools genisoimage
sudo modprobe squashfs
sudo mount -t iso9660 /dev/scd0 /mnt
mkdir extract-cd
rsync --exclude=/casper/filesystem.squashfs -a /mnt/ extract-cd
mkdir squashfs
sudo mount -t squashfs -o loop /mnt/casper/filesystem.squashfs squashfs
mkdir edit
sudo cp -a squashfs/* edit/
sudo mount --bind /dev/ edit/dev
sudo chroot edit
mount -t proc none /proc
mount -t sysfs none /sys
export HOME=/root
export LC_ALL=C
dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -nr | less
apt-get remove --purge songbird
sudo cp ~/pictures/*.jpeg /usr/share/wallpapers
umount /proc
umount /sys
exit
sudo umount edit/dev
chmod +w extract-cd/casper/filesystem.manifest
sudo chroot edit dpkg-query -W --showformat='${Package} ${Version}\n' > extract-cd/casper/filesystem.manifest
sudo cp extract-cd/casper/filesystem.manifest extract-cd/casper/filesystem.manifest-desktop
sudo sed -i '/ubiquity/d' extract-cd/casper/filesystem.manifest-desktop
sudo rm extract-cd/casper/filesystem.squashfs
sudo mksquashfs edit extract-cd/casper/filesystem.squashfs -nolzma
sudo -s
rm extract-cd/md5sum.txt
cd extract-cd && find . -type f -print0 | xargs -0 md5sum > md5sum.txt
exit
cd extract-cd
sudo mkisofs -D -r -V "$IMAGE_NAME" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../ubuntu-8.04.1-desktop-i386-custom.iso .

Muhammad Saad
Battalion Havaldaar Major
Posts: 273
Joined: Sat Jan 27, 2007 11:07 pm
Location: Dera Ismail Khan, Pakistan
Contact:

Post by Muhammad Saad »

Have you tried the scripts available at http://www.linux-live.org ?
usamahashimi

Post by usamahashimi »

Let me try it!
usamahashimi

Post by usamahashimi »

I followed the following link;
https://help.ubuntu.com/community/Insta ... ction=show
and after chrooting into edit directory, I build all the required softwares, codecs, driver again (as they are already installed), and I succeeded :)
My customized distro contains all the things which I want to include.
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

you said you followed the instructions and they didn't work, and then you say you followed the same instructions and they worked. what did you do differently the second time?
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Post Reply