Creating bootable CD-ROMS Part 2 - bootcd

Posted by Steve on Sat 28 May 2005 at 07:04

Tags: none.

Have you ever wanted to create your own livecd? A complete Debian system which runs entirely from CD-ROM is simple to create, and can be made in minutes with bootcd.

There are many bootable "live distributions" around which run entirely from CD-ROM. Argubly the most popular one in existance is Knoppix which is based upon Debian GNU/Linux.

It's possible to remaster, or update many of the existing "Live CD-ROMs" with your own packages, most of the live distributions. But this doesn't help you much if you wish to create something widely different from their offerings.

This article is a followup to a previous article describing how to create bootable CD-ROM images with dfsbuild.

Th advantage of using the bootcd package is that you can duplicate your existing system without any major changes. This allows you a lot of flexability compared to merely remastering an existing distribution, and avoids a lot of the trial and error of constructing a system from raw packages, as with dfsbuild

It's ideal for creating a backup of an existing system, or for creating clones of bare machines.

Install it with the predictable:

apt-get install bootcd

Once it is installed you can customize its operation by editting the file /etc/bootcd/bootcdwrite.conf.

One of the most obvious things to do to cut down on the space of your CD-ROM is to remove the /home partition.

Because you cannot exclude a directory /home directly you must instead exclude the directories beneath it:

NOT_TO_CDROM="/home/skx /home/qemu /home/misc /home/mp3"

Once you're happy with the way the basic setup lookss execute, as root, bootcdwrite to start the build process.

When the program runs it will tell you if there are any problems with your setup - such as requiring more space than will fit on a single CD-ROM (even with compression). At each point you can elect to ignore the warning and continue, or cancel.

Once the build process has finished you will be left with a bootable ISO image saved as /var/spool/bootcd/cdimage.iso.

Testing The Image

If you've installed qemu package you can test the new image upon your system without actually rebooting.

The output image, by default, will be created inside /var/spool/bootcd and you can load this by executing:

qemu -boot c -cdrom /var/spool/bootcd/cdimage.iso

This should allow you to verify that the image works before it is burnt to CD-ROM.

The most likely problem you will encounter is that your currently running system won't fit upon a single CD-ROM. This isn't really an avoidable problem at the moment unless your base system is a minimalist installation - although it might be something which is solvable in the future when DVD writer support arrives.

In the meantime though qemu doesn't care how big your CD-ROM is, so you can setup a virtual installation from your CD-ROM. It's not the most speedy setup, but it will allow you to play with backups and virtualisation.

To really get the best out of bootcd you will probably need to start from a bare, customized, and tailored environment.

 

 


Posted by Anonymous (82.153.xx.xx) on Mon 30 May 2005 at 22:37
So how about bootcd-mkinitrd?

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Wed 1 Jun 2005 at 08:46
[ View Steve's Scratchpad | View Weblogs ]

I've never needed to use it .. is there something specifically you'd like to see mentioned about it?

Steve
-- Steve.org.uk

[ Parent | Reply to this comment ]

Posted by Anonymous (41.249.xx.xx) on Wed 9 Apr 2008 at 10:23
well when i launch bootcmkinitrd ihave the message:
------------FATAL ERROR----------------
Error:no Bootloader found
what can i do please?

[ Parent | Reply to this comment ]

Posted by Anonymous (148.87.xx.xx) on Wed 15 Jun 2005 at 20:22
I am running a scsi hdd with 2.6 kernel. For some reason the iso in qemu loads all the RAM files (/tmp, /var, etc) as read-only.

Thanks in advance

[ Parent | Reply to this comment ]

Posted by Anonymous (216.8.xx.xx) on Sun 17 Jul 2005 at 20:53
I had the same problem. I was using bootcd 2.45 from Ubuntu Hoary. Going through the changelog of bootcd 2.48 from Debian Sid it seemed like it addressed the issue. I backported the sid 2.48 package and tried again and it eliminated the read-only problem for me. You may want to try a newer version if you can as well.

[ Parent | Reply to this comment ]

Posted by Anonymous (65.42.xx.xx) on Thu 7 Jul 2005 at 19:05
I thought I would play with this using Mepis. When I run the script I get "/vmlinuz Wrong definition of kernel". Is there something I need to do to the KERNEL line in the config file? Thanks

[ Parent | Reply to this comment ]

Posted by Anonymous (200.165.xx.xx) on Mon 25 Jul 2005 at 01:27
only Kernel panic!!

[ Parent | Reply to this comment ]

Posted by Anonymous (193.175.xx.xx) on Wed 10 Aug 2005 at 11:47
i tried it just - ended up with "kernel panic" because of "dev/console" not found :-(

[ Parent | Reply to this comment ]

Posted by Anonymous (62.159.xx.xx) on Fri 12 Aug 2005 at 08:21
me too! I did a fresh sarge installation. after building the image and booting with qemu I also ended up with "Kernel panic: Attempted to kill init! --> "cannot open dev/console". Does anyone have an idea?

[ Parent | Reply to this comment ]

Posted by Anonymous (222.152.xx.xx) on Tue 30 Aug 2005 at 10:17
Excellent how to - worked like a charm and I was able to create a cd that could be used for both windows and linux (debian) that we have installed on our P4SCT+ servers (Marvell SATA controller).
Prior to making that cd, rescuing them was not possible, due to the drivers not being within the linux kernel or supported natively by windows either.

Many thanks. :)

[ Parent | Reply to this comment ]

Posted by Anonymous (64.42.xx.xx) on Fri 9 Sep 2005 at 19:25
Even I got the same error:
/sbin/init: 432: canot open dev/console No such file
"Kernel panic: Attempted to kill init!

I got a warning when I was gave the commmand bootcdwrite:

You have to make sure, that the module "isofs.o" is loaded from
the initrd system. Please read the FAQ or use bootcdmkinitrd.
--- (e)xit (i)gnore ---

and I just ignore it.

Any ideas?

[ Parent | Reply to this comment ]

Posted by Anonymous (69.227.xx.xx) on Wed 14 Sep 2005 at 05:29
Yup, just use bootcdmkinitrd... as it says... I also had the same problem and when I gave that command, all was fine.

[ Parent | Reply to this comment ]

Posted by Anonymous (64.42.xx.xx) on Fri 14 Oct 2005 at 21:12
Yeah I figured out that by using boocdmkinitrd it works fine.

Also, I would like to pass the parameter 'ide=nodma' when I boot from the CD that I have created with bootcd. Where can I specify this parameter to the kernel. Do I have to do it before I start building my CD on my host machine or can I give it during the boot time.??

Any Thoughts???

Thanks

[ Parent | Reply to this comment ]

Posted by Anonymous (216.153.xx.xx) on Tue 13 Jun 2006 at 15:30
Exact same errors as posted above.

Would appreciate someone explaining just exactly how to go about using bootcdmkinitrd.

Or point me to the fm...

[ Parent | Reply to this comment ]

Posted by echalabi (64.172.xx.xx) on Tue 15 May 2007 at 23:37
try running update-initramfs -u and then creating the bootcd

[ Parent | Reply to this comment ]

Posted by Anonymous (195.188.xx.xx) on Wed 12 Apr 2006 at 10:31
Does anyone know if it's possible to create a compact flash inmage using this system? If so does does the image keep all the modules you have attached to your base system. ie I've installed nvidia drivers, will these be transfered to the CD or hopefully CF?

[ Parent | Reply to this comment ]

Posted by Anonymous (64.76.xx.xx) on Wed 3 May 2006 at 16:36
I was able to make the CD image but after booting when I want to login, after typing root it doesn't even ask me for the password. It says "Login incorrect"
Any help please?
Thx
Marcos

[ Parent | Reply to this comment ]

Posted by Anonymous (64.172.xx.xx) on Wed 13 Jun 2007 at 18:22
If you are running kde, make sure to edit /etc/kde3/kdmrc:
look for the line that says AllowRootLogin=fase and change it to true

[ Parent | Reply to this comment ]

Posted by Anonymous (209.150.xx.xx) on Tue 20 Jun 2006 at 19:04
This is exactly what I've been looking for for a long time. THANK YOU THANK YOU THANK YOU.

[ Parent | Reply to this comment ]

Posted by Anonymous (190.30.xx.xx) on Tue 7 Nov 2006 at 02:51
I need to user a 2.6 kernel. Its runs ok from a CD Image in a VMWARE virtual machine, but when I burn the CD and boot from it, it shows kernel panic.
Can you post the kernel .config and the bootcdwrite.conf.?

[ Parent | Reply to this comment ]

Posted by Anonymous (200.117.xx.xx) on Sun 26 Nov 2006 at 05:28
I wrote the previous comment about using bootcd thats runs fine on a VMWare VM but does not boot from a real CDROM.
All my problems with bootcd were resolved using kernel 2.4.32 instead 2.6.

[ Parent | Reply to this comment ]

Posted by localhost (196.203.xx.xx) on Tue 14 Nov 2006 at 12:06
[ View Weblogs ]
Keeping in mind that a live cd should run on a big variety of workstations with very different hardware configurations, how to let the live cd transparently run over any hardware config, at least network and X should be working.

[ Parent | Reply to this comment ]

Posted by localhost (196.203.xx.xx) on Wed 15 Nov 2006 at 18:38
[ View Weblogs ]
Am getting a problem using bootcd on debian etch:

--------------------------------------------------------------
# bootcdwrite
To see full output: tail -f /var/log/bootcdwrite.log
--- Checking for possible Problems ---
/var will be cleaned (apt-get clean) !

Ok to continue? (y/n) y

--- Cleanup ---
20995 blocks
--- Sizes in KByte (du -klsc ) ---
NOT_TO_CD = . . . . . . . . . . . . . . . . . . . . . . . . . . . 0
CD_ALL (SRCDISK v NOT_TO_CD) = . . . . . . . . . . . . . . . . . . 512056
Needed = CD_ALL - NOT_TO_CD . . . . . . . . . . . . . . . . . . . 512056
CD (650 MB) = . . . . . . . . . . . . . . . . . . . . . . . . . . 665600
OK - SRCDISK does fit on CD (Needed <= CD)
VAR = . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34453808
OK - enough space in /var/spool/bootcd (Needed <= VAR)
NOT_TO_RAMCD (NOT_TO_RAM v NOT_TO_CD) = . . . . . . . . . . . . . 0
RAM_ALL (etc v home v root v NOT_TO_RAM v NOT_TO_CD) = . . . . . . 8636
Needed RAM (RAM_ALL - NOT_TO_RAMCD) = . . . . . . . . . . . . . . 8636
90 % of RAM = . . . . . . . . . . . . . . . . . . . . . . . . . . 14745
OK - enough RAM (Needed RAM <= 90 % of RAM)
--- Building Modifications ---
--- Creating /ram[1|2].cpio.gz for FASTBOOT ---
--- Creating CD-Image ---
Size of boot image is 4 sectors -> No emulation
mkisofs: File '/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/ep_81/bEnd pointAddress' did shrink.
exit=255
--- OUTPUT from <mkisofs -graft-points -r -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o /var/spool/bootcd/cdimage -x /proc /var/spool/bootcd /var/log/bootcdwrite.log /etc /var /tmp /dev /home /root /etc/mtab /etc/cron.daily/find /etc/cron.daily/standard /etc/fstab /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_dsa_key /etc/ssh/ssh_host_rsa_key.pub /etc/ssh/ssh_host_dsa_key.pub /usr/share/bootcd/bootcd-run.lib /="/" /home.ro/="/home" /root.ro/="/root" /var.ro/="/var" /etc.ro/="/etc" /dev.ro/="/dev"> ---
mkisofs: File '/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/ep_81/bEnd pointAddress' did shrink.
exit=255
--- (e)xit (r)edo (i)gnore ---
--------------------------------------------------------------

here's my lspci:

--------------------------------------------------------------
00:00.0 Host bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface (rev 01)
00:02.0 VGA compatible controller: Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 81)
00:1f.0 ISA bridge: Intel Corporation 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801DB (ICH4) IDE Controller (rev 01)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 01)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)
02:08.0 Ethernet controller: Intel Corporation 82801DB PRO/100 VE (LOM) Ethernet Controller (rev 81)
02:0c.0 Communication controller: Conexant Unknown device 2702 (rev 01)
--------------------------------------------------------------

[ Parent | Reply to this comment ]

Posted by Steve (62.30.xx.xx) on Wed 15 Nov 2006 at 19:04
[ View Steve's Scratchpad | View Weblogs ]

This article was written almost a year and a half ago!

I'd suggest you look at the current documentation, and if that doesn't help report a bug.

Sorry to be so unhelpful, but I've not used this tool in a long time and can't really help you with it at the moment.

Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (82.242.xx.xx) on Tue 19 Dec 2006 at 16:33
Too bad this didn't work in ubuntu, I wanted to use bootcd to boot a headless box with wifi and sshd preconfigured.

Apparently the initramfs-tools in ubuntu are older than the ones in debian, and they don't use the same shell. On the other hand, the debian netinstall I tried to use lacked wifi support.

[ Parent | Reply to this comment ]

Posted by Arthur (66.28.xx.xx) on Sat 17 Mar 2007 at 10:01
[ View Weblogs ]
While the article is very old, I'm going to add a comment just in case it might help someone.

The hot ticket with bootcdwrite is to shut down everything you possibly can before running it, especially things like iceweasel/firefox that maintain their state on disk. If a user is running iceweasel while bootcdwrite is running, that account won't be able to start iceweasel from the CD because it thinks it's already running.

Oops!

[ Parent | Reply to this comment ]

Posted by Anonymous (61.7.xx.xx) on Tue 8 Jul 2008 at 08:25
Thanks very much for the walk-through, it got my backup install dvd made. Yes, I know that this article is like 3 years old, but it was virtually the only thing that google turned up in the way of a "how to" for bootcd. I just wanted to add for the next guy that there is one critical package that you need to avoid the "kernel panic" that so many posters here (including myself) experienced. As stated in the article, you need to apt-get bootcd, but you also need to install the package "bootcd-mkinitramfs". Adding this package enabled bootcd to generate a working iso.

Thanks Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (192.198.xx.xx) on Sun 10 Aug 2008 at 03:20
like me

[ Parent | Reply to this comment ]

Posted by Anonymous (207.216.xx.xx) on Wed 8 Oct 2008 at 23:38
After trying this with a fresh debian etch install, I continually get this error (paste-bin'ed):

http://pastebin.com/fe2c38cd

If I ignore and burn the iso anyway, it boots on the system it was created on but not on my laptop or a VM.

Is there anything else I need to do besides installing the bootcd-mkinitramfs package that might make it work properly?

Thanks for the help so far! :)

Also, second question - is there an easy way to add the ability to use the LiveCD created by bootcdwrite to install the custom distribution to hard disk?

Again, thanks!

[ Parent | Reply to this comment ]

Sign In

Username:

Password:

[Register|Advanced]

 

Flattr

 

Current Poll

What do you use for configuration management?








( 494 votes ~ 5 comments )