Creating bootable CD-ROMS Part 2 - bootcd
Posted by Steve on Sat 28 May 2005 at 07:04
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 ImageIf 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.isoThis 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.
[ Parent | Reply to this comment ]
[ Send Message | 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 ]
------------FATAL ERROR----------------
Error:no Bootloader found
what can i do please?
[ Parent | Reply to this comment ]
Thanks in advance
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
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 ]
/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 ]
[ Parent | Reply to this comment ]
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 ]
Would appreciate someone explaining just exactly how to go about using bootcdmkinitrd.
Or point me to the fm...
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
Any help please?
Thx
Marcos
[ Parent | Reply to this comment ]
look for the line that says AllowRootLogin=fase and change it to true
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
Can you post the kernel .config and the bootcdwrite.conf.?
[ Parent | Reply to this comment ]
All my problems with bootcd were resolved using kernel 2.4.32 instead 2.6.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
--------------------------------------------------------------
# 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 ]
[ Send Message | 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.
[ Parent | Reply to this comment ]
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 ]
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 ]
Thanks Steve
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
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 ]