LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-03-2006, 08:49 PM   #1
1veedo
Member
 
Registered: Dec 2004
Location: WV, USA
Distribution: Gentoo, Debian
Posts: 186

Rep: Reputation: 34
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...

Last edited by 1veedo; 05-03-2006 at 08:59 PM.
 
Old 05-03-2006, 09:14 PM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Thumbs up 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
 
Old 05-03-2006, 09:19 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.

Last edited by jschiwal; 05-03-2006 at 09:29 PM.
 
Old 05-04-2006, 05:07 PM   #4
1veedo
Member
 
Registered: Dec 2004
Location: WV, USA
Distribution: Gentoo, Debian
Posts: 186

Original Poster
Rep: Reputation: 34
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.

Last edited by 1veedo; 05-04-2006 at 05:14 PM.
 
Old 05-06-2006, 03:22 PM   #5
1veedo
Member
 
Registered: Dec 2004
Location: WV, USA
Distribution: Gentoo, Debian
Posts: 186

Original Poster
Rep: Reputation: 34
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

Last edited by 1veedo; 05-06-2006 at 03:51 PM.
 
Old 05-06-2006, 08:58 PM   #6
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
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.
 
Old 05-07-2006, 05:52 PM   #7
1veedo
Member
 
Registered: Dec 2004
Location: WV, USA
Distribution: Gentoo, Debian
Posts: 186

Original Poster
Rep: Reputation: 34
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.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make initrd.img? zahadumy Slackware 2 11-13-2005 09:05 AM
I accidentally deleted make file in /usr/local/bin, now cannot use make command.... Niceman2005 Linux - Software 2 11-17-2004 07:55 PM
command to make initrd.img utanja Debian 12 09-06-2004 12:18 PM
'make' and 'make install' commands dont work on my system? ginda Linux - Newbie 9 04-18-2004 11:17 AM
how to make boot.img leihsun Linux - General 5 07-15-2002 01:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:37 PM.

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
Open Source Consulting | Domain Registration