LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 05-13-2012, 07:16 AM   #1
edbarx
Member
 
Registered: Sep 2010
Distribution: Used Debian since Sarge. (~2005)
Posts: 357

Rep: Reputation: 18
Making a LiveCD of my Debian Wheezy installation


Is it possible to create a live CD of my Wheezy installation but without having to redownload all the packages?

I have been trying to find a command parameter for live-build which prevents the script from downloading all the packages: I only want a live image of my existing filesystem. However, because CDs/DVs are readonly, I have to change some configuration files before actually burning the iso onto a DVD. For sure I will need to edit the fstab file but I have no idea whether that would be enough.
 
Old 05-13-2012, 07:25 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,650
Blog Entries: 2

Rep: Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095
Normally live-build should make the changes that are needed for running the system as live-system.
The option are searching is for the config step:
Code:
--bootstrap copy
More info here: http://forums.debian.net/viewtopic.php?f=16&t=38870
 
Old 05-13-2012, 02:38 PM   #3
edbarx
Member
 
Registered: Sep 2010
Distribution: Used Debian since Sarge. (~2005)
Posts: 357

Original Poster
Rep: Reputation: 18
Thanks for your accurate and prompt reply.

The first attempt failed while attempting to read the filesystem (df). However, a second attempt seems to have worked but I still am without an iso!

Code:
[...]
P: Begin install linux-image...
cp: cannot stat `chroot/boot/vmlinuz-*': No such file or directory
P: Begin unmounting filesystems...
P: Saving caches...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
These are the files under work/binary/live:
Code:
/home/edbarx/work/binary/live# ls -l
total 82160
-rw-r--r-- 1 root root     3524 May 13 20:37 filesystem.packages
-rw-r--r-- 1 root root      262 May 13 20:37 filesystem.packages-remove
-rw-r--r-- 1 root root 84119552 May 13 20:35 filesystem.squashfs
The third file is the compressed live filesystem. Apparently, this error was fatal:
Code:
P: Begin install linux-image...
cp: cannot stat `chroot/boot/vmlinuz-*': No such file or directory
I checked the chroot directory for an installed kernel but there are none!
Code:
work/chroot/boot# ls -l
total 0
How can I install a kernel manually so that the procedure would be able to provide an iso?


Any ideas as to how to circumvent?

Last edited by edbarx; 05-13-2012 at 02:58 PM. Reason: To add more information
 
Old 05-13-2012, 03:19 PM   #4
edbarx
Member
 
Registered: Sep 2010
Distribution: Used Debian since Sarge. (~2005)
Posts: 357

Original Poster
Rep: Reputation: 18
I chrooted to the chroot directory and manually installed a kernel there. After that, I issued these commands as shown:
Code:
work# /usr/share/live/build/scripts/build/lb_config --bootstrap copy
P: Considering defaults defined in /etc/live/build.conf
P: Updating config tree for a debian/amd64 system
root@edbarx-pc2:/home/edbarx/work# /usr/share/live/build/scripts/build/lb_build
And finally, the iso was created!
Code:
work# ls -l
total 98648
drwxr-xr-x  4 root root      4096 May 13 20:29 auto
drwxr-xr-x  6 root root      4096 May 13 21:15 binary
-rw-r--r--  1 root root 101711872 May 13 21:15 binary-hybrid.iso
-rw-r--r--  1 root root      1983 May 13 21:15 binary.list
-rw-r--r--  1 root root      3524 May 13 20:37 binary.packages
drwxr-xr-x  6 root root      4096 May 13 21:12 cache
drwxr-xr-x 22 root root      4096 May 13 21:15 chroot
-rw-r--r--  1 root root      3619 May 13 21:12 chroot.packages.install
-rw-r--r--  1 root root      3619 May 13 21:12 chroot.packages.live
drwxr-xr-x 21 root root      4096 May 13 20:29 config
 
Old 05-13-2012, 03:31 PM   #5
edbarx
Member
 
Registered: Sep 2010
Distribution: Used Debian since Sarge. (~2005)
Posts: 357

Original Poster
Rep: Reputation: 18
Although the iso was created, its size, ~100 MB is ridiculously small. Something must have gone very wrong! Hopefully, I didn't bork my system when I was fiddling with chroot installing a kernel.
 
Old 05-13-2012, 03:40 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,650
Blog Entries: 2

Rep: Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095
I am somewhat surprised about the order of the steps you have done:
1. the config stage usually happens only once, no need to launch it again.
2. When you want to chroot into the live system it is better to use the option that enbles you to chroot into the system when just before the squashfs and the iso are built, or to use the include directories to copy stuff to the system.
3. A live system usually needs no kernel, but only kernel modules in the squashfs. The kernel is started by the bootloader directly from the CD.
 
Old 05-13-2012, 04:48 PM   #7
edbarx
Member
 
Registered: Sep 2010
Distribution: Used Debian since Sarge. (~2005)
Posts: 357

Original Poster
Rep: Reputation: 18
I tried for a second time with a default configuration. The result is a failure to produce a .iso file! It seems Wheezy does not want me to have it portable.

This is the response of rerunning lb build:
Code:
work# lb build
[2012-05-13 23:01:56] lb_build 
W: No config/ directory; using defaults for all options
[2012-05-13 23:01:56] lb_bootstrap 
P: Setting up cleanup function
[2012-05-13 23:01:56] lb_bootstrap_cache restore
P: Restoring bootstrap stage from cache...
W: skipping bootstrap_cache.restore, already done
[2012-05-13 23:01:56] lb_bootstrap_copy 
[2012-05-13 23:01:56] lb_bootstrap_cdebootstrap 
[2012-05-13 23:01:56] lb_bootstrap_debootstrap 
P: Begin bootstrapping system...
[2012-05-13 23:01:56] lb_testroot 
W: skipping bootstrap, already done
[2012-05-13 23:01:56] lb_bootstrap_cache save
P: Saving bootstrap stage to cache...
W: skipping bootstrap_cache.save, already done
P: Begin unmounting filesystems...
P: Saving caches...
Reading package lists... Done
Building dependency tree... Done
[2012-05-13 23:01:57] lb_chroot 
P: Setting up cleanup function
[2012-05-13 23:01:57] lb_chroot_cache restore
[2012-05-13 23:01:57] lb_chroot_devpts install
[2012-05-13 23:01:57] lb_testroot 
P: Begin mounting /dev/pts...
[2012-05-13 23:01:57] lb_chroot_proc install
[2012-05-13 23:01:57] lb_testroot 
P: Begin mounting /proc...
[2012-05-13 23:01:57] lb_chroot_selinuxfs install
[2012-05-13 23:01:57] lb_testroot 
[2012-05-13 23:01:58] lb_chroot_sysfs install
[2012-05-13 23:01:58] lb_testroot 
P: Begin mounting /sys...
[2012-05-13 23:01:58] lb_chroot_debianchroot install
P: Configuring file /etc/debian_chroot
W: skipping chroot_debianchroot, already done
[2012-05-13 23:01:58] lb_chroot_dpkg install
P: Configuring file /sbin/start-stop-daemon
W: skipping chroot_dpkg, already done
[2012-05-13 23:01:58] lb_chroot_tmpfs install
[2012-05-13 23:01:58] lb_chroot_sysv-rc install
P: Configuring file /usr/sbin/policy-rc.d
W: skipping chroot_sysv-rc, already done
[2012-05-13 23:01:58] lb_chroot_upstart install
P: Configuring file /sbin/initctl
W: skipping chroot_upstart, already done
[2012-05-13 23:01:58] lb_chroot_hosts install
P: Configuring file /etc/hosts
W: skipping chroot_hosts, already done
[2012-05-13 23:01:59] lb_chroot_resolv install
P: Configuring file /etc/resolv.conf
W: skipping chroot_resolv, already done
[2012-05-13 23:01:59] lb_chroot_hostname install
P: Configuring file /etc/hostname
W: skipping chroot_hostname, already done
[2012-05-13 23:01:59] lb_chroot_apt install
P: Configuring file /etc/apt/apt.conf
W: skipping chroot_apt, already done
[2012-05-13 23:01:59] lb_chroot_archives chroot install
P: Configuring file /etc/apt/sources.list
W: skipping chroot_archives, already done
[2012-05-13 23:01:59] lb_chroot_linux-image 
W: skipping chroot_linux-image, already done
[2012-05-13 23:01:59] lb_chroot_preseed 
P: Begin executing local preseeds...
W: skipping chroot_preseed, already done
[2012-05-13 23:01:59] lb_chroot_package-lists install
P: Begin queueing installation of package lists (install pass)...
W: skipping chroot_package-lists.install, already done
[2012-05-13 23:01:59] lb_chroot_install-packages install
P: Begin installing packages (install pass)...
[2012-05-13 23:02:00] lb_chroot_task-lists install
P: Begin installation of task lists (install pass)...
[2012-05-13 23:02:00] lb_chroot_package-lists live
P: Begin queueing installation of package lists (live pass)...
W: skipping chroot_package-lists.live, already done
[2012-05-13 23:02:00] lb_chroot_install-packages live
P: Begin installing packages (live pass)...
[2012-05-13 23:02:00] lb_chroot_task-lists live
P: Begin installation of task lists (live pass)...
[2012-05-13 23:02:00] lb_chroot_live-packages 
Reading package lists... Done
Building dependency tree... Done
E: Unable to locate package auto
P: Begin unmounting filesystems...
P: Saving caches...
Reading package lists... Done
Building dependency tree... Done
work#
It is weird because without an iso it is impossible to make a LiveCD.

Post Scriptum:
Since this time I used the default settings, I am concluding the failure to create an iso is due to the error:
Code:
Building dependency tree... Done
E: Unable to locate package auto
In my previous posts, I said that I manually installed the kernel. I did this step because lb_build complained that there were no kernels installed in chroot/boot. Although, I knew kernels were not included in the compressed file system on live cds, I followed the intuition offered by that error. Moreover, the lb_build script appeared to behave inconsistently forcing me to try several 'bizarre' solutions.

Post Scriptum II:
Since I have a functioning Wheezy installation, is it possible that I use squashfs to compress it into an archive and create a Live CD from it? The problem is that I have no idea which configuration files I have to edit. Does it make sense to boot the compressed fs as read only to avoid the OS attempting to write to convfiguration files?

Thanks for trying to guide me.

Last edited by edbarx; 05-14-2012 at 06:42 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Newly installed debian sid & saved debian wheezy home would like to transfer files EDDY1 Linux - Newbie 11 01-20-2012 08:43 PM
[SOLVED] Java and Vuze installation on KDE Debian Wheezy sid infoslaw Linux - Newbie 11 12-28-2011 09:24 AM
LXer: Debian to offer MultiArch support with Debian Wheezy 7 in 2013 LXer Syndicated Linux News 0 08-11-2011 02:50 AM
LXer: Debian looking at a June 2012 freeze for Debian Wheezy LXer Syndicated Linux News 0 08-10-2011 11:00 AM
Making a portable Debian USB hard disk installation. bidhulinux Debian 1 05-03-2010 07:12 PM


All times are GMT -5. The time now is 05:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration