LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   make a .img file for custom liveCD, dd?? (Also, how to make your system very small) (https://www.linuxquestions.org/questions/linux-newbie-8/make-a-img-file-for-custom-livecd-dd-also-how-to-make-your-system-very-small-441412/)

1veedo 05-03-2006 08:49 PM

make a .img file for custom liveCD, dd?? (Also, how to make your system very small)
 
I'm determined to make a liveCD w/ toram and graphics support. I have a debian install and think I figured out XFree86 for both nvidia and ati.

I'm trying to use the method described here,
http://vmlinux.org/twiki/bin/view/Ba...otableDebianCD

It wants to "gzip the file system into a compressed image",
Code:

gzip -c vroot.img >initrd.img
But how do you go about making this vroot.img file? I know it somehow has to be an image of the root filesystem and I think the method for this is dd but dd is a very confusing app -- particularly where you make bs=cylinders/rows/whatever. I tried using dd but it made this HUGE file (like 110gb).

btw mkinitrd is, I'm pretty sure, the wrong app.


Another thing I need to do is somehow make the install smaller. There has to be some sort of magic method for this. There are no docs (well no doc.debs, there may be app docs somewhere), no kernel sources, and I've tried keeping it as small as I could but decompressed it's like 1.3GB!

How much smaller is XFCE4 than gnome?

There are "dictionaries" installed for spellcheck... But they dont take up much space, as far as I can tell. Honestly though, there isn't much installed. Gnome, apache2, firefox, abiword, bzflag, wesnoth... I dont really understand why it's so huge! Other liveCDs have much more than this and are also much smaller! :(

I was looking at the ubunto liveCD and it has noticibly fewer progs in systen tools but it also has openoffice and a few more apps! And knoppix... knoppix is just plain huge, and you can load it all in RAM if you have 1G thus freeing the CD drive! There has to be something I'm missing here...

AwesomeMachine 05-03-2006 09:14 PM

Ok
 
I read the page in your link, and I didn't have any problem understanding it. I do not understand what is unclear. There is a link on that page to "Bootstrapdebian". http://vmlinux.org/twiki/bin/view/Ba...4ab6f0c99e6f87 You have to read that, too. If you do everything how they tell you it will work. But, this is a crappy way to make a live linux CD. There are countless articles, and even shell scripts to do it all, the right way. Why do you want to make a live CD that only works on one system?

Try this page:

http://www.livecdlist.com/wiki/index...rating_Systems

jschiwal 05-03-2006 09:19 PM

You didn't follow the link mentioned in the beginning of the article.BootstrapDebian

The dd command creates an empty file. Then you create a filesystem in the file using mke2fs. After you do this, will be able mount it with the "loop" option and store the files you want inside the file.

If you take a closer look at this command:
dd if=/dev/zero of=vroot.img bs=1024000 count=250
The input file (if) is the zero device. The output file (of) will be created containing all zeros.
The block size is 1MB. The count is the number of blocks to write. So in this example, you will be creating a file 250MB in size. If you want a different size filesystem change the 250 to something else. The rest of the link explains how to install debian in this empty loopback filesystem.

The mkisofs is the command that creates the cdrom image (cd.iso). If you wanted to, you could use k3b to burn this image to CDROM. You will want to chose a size of your image such that the isolinux boot image and your debian stuff don't exceed the size of a cdrom, and don't occupy all of your memory. As the article explains, everything is loaded into the memory, so you will need to install less than you would if it were running off the cdrom.

1veedo 05-04-2006 05:07 PM

Oh, I missed the link to bootstrap debian.

Quote:

Originally Posted by AwesomeMachine
Why do you want to make a live CD that only works on one system?

If you create a kernel with lots of driver modules, use XFree86, and install nvidia/ati, why would the CD only be able to boot on my computer? Just run debconfig or whatever (maybe get xconf and similar scripts) and it'll create a new XFree86-Config file for whatever graphics the computer has.

Btw I'd already found the wiki, but thanks anyway. I have a huge liveCD bookmarks folder but so far it seems like different howtos and "CD makign scripts" have one or two things but lack something else. (one has nvidia/ati yet doesn't have toram... one has toram but doesn't have nvidia/ati)

I'd use the slax method but slax liveCDs dont seem to be able to configure monitors. I think I'm going to try a gentoo liveCD cause debian installs are extreamly huge. apt-get wants to install a bunch of unesisary packages and then make then dependent so you cant apt-get remove stupidbulkyprograms.

1veedo 05-06-2006 03:22 PM

Ok, I've figured this out (I think). In the step where you use dd it uses if=/dev/zero,
Code:

dd if=/dev/zero of=vroot.img bs=1024000 count=250
If I already had an install though, would this command work?
Code:

dd=/dev/hda4 of=vroot.img bs=1024000 count=250
What if the image isn't exacly 250MB? Would the rest be filled w/ nothing or would it start over again at the beginnign of /dev/hda4?

I guess you could always tar everything up, create the zero img, and untar it there. Gentoo has its own bootstrap.sh so I can follow the guide as is, but I already have an install at /dev/hda4.

AwesomeMachine???

edit--
Actually, I think this would do it:
Code:

dd=/dev/hda4 of=vroot.img bs=1024000

AwesomeMachine 05-06-2006 08:58 PM

You will learn a lot
 
Quote:

Originally Posted by 1veedo
Ok, I've figured this out (I think). In the step where you use dd it uses if=/dev/zero,
Code:

dd if=/dev/zero of=vroot.img bs=1024000 count=250
If I already had an install though, would this command work?
Code:

dd=/dev/hda4 of=vroot.img bs=1024000 count=250
What if the image isn't exacly 250MB? Would the rest be filled w/ nothing or would it start over again at the beginnign of /dev/hda4?

I guess you could always tar everything up, create the zero img, and untar it there. Gentoo has its own bootstrap.sh so I can follow the guide as is, but I already have an install at /dev/hda4.

AwesomeMachine???

edit--
Actually, I think this would do it:
Code:

dd=/dev/hda4 of=vroot.img bs=1024000

You will learn a lot on this project. I hope you get it to work.

1veedo 05-07-2006 05:52 PM

I got it working. Now I just need to install xorg and xfce4! It turns out Gentoo is the perfect distro to do this with.

It was 28M so I made a 29 vroot.img and copied everything over,
Code:

dd=/dev/zero of=vroot.img bs=1024000 count=29
...
cp -Pr /mnt/hda4 /mnt/vroot

And just followed the howto.


All times are GMT -5. The time now is 09:43 AM.