LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-10-2010, 05:44 AM   #1
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 658

Rep: Reputation: 35
Question Custom ISO 4x bigger than the original?


Hello,

This is my first attempt at upgrading a live ISO file. Things seem to have worked OK, but the resulting ISO is four times bigger than the original:

original.iso : 334.917.632 bytes
ubuntu-2.6.31-22-custom.iso : 1.590.505.472

I followed the LiveCDCustomization HOWTO:
1. In home directory, mount ISO to explode squashfs in ~/edit, and the rest of the ISO into ~/extract-cd
2. chroot to ~/edit (ie. exploded squashfs), upgrade kernel + applications, and build new initr.gz
3. exit chroot, and rebuild ISO

Does someone know why the ISO ends up being so much bigger?

Thank you.
 
Old 09-10-2010, 06:15 AM   #2
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
thats kinda weird

did you remove the old kernel(s) images,headers?
you went exactly by that how-to?
which ubuntu is that? 10.04?
what was the original iso?
 
Old 09-10-2010, 04:24 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Maybe you didn't delete old data and compress the new data in the fuse (or other filesystem)?
 
Old 09-11-2010, 05:10 AM   #4
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 658

Original Poster
Rep: Reputation: 35
Thanks guys for the help. It's a rescue disk based on Xubuntu 9.10.

In the Customizations section, I left everything as-is, and simply...
- removed the NV driver and added the Nouveau driver so that X would work OK with an Nvidia chip
- using "apt-get ugprade", upgraded the kernel + initrd.gz to the latest available, and copied vmlinuz/initrd.gz into ~/extract-cd (since the squashfs doesn't contain the kernel, which is found at the root of the ISO file)

I ran "sudo mksquashfs edit extract-cd/casper/filesystem.squashfs -no-duplicates" without the "-nolzma" because the HOWTO says: "The -nolzma option is only available from Hardy , and was removed in Karmic"

I added "-no-duplicates" because otherwise, it would get stuck at 6005 (Google shows that other users have had the same problem.)

The HOWTO doesn't mention "fuse". What does it do?

BTW, does someone know what "mkinitramfs" does precisely? Does it take everything that lives in /lib/modules, and save those into a compressed file?

Thank you.
 
Old 09-11-2010, 06:35 AM   #5
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
mkinitramfs created the initrd.img file need it to boot the kernel, you can find the initrd files in /boot and they gonna look
something like: initrd.img-2.6.32-22-generic (example)

If you do a LiveCD you should use LZMA and make sure that your squashfs module from your kernel supports LZMA compression.

Last edited by robertjinx; 09-11-2010 at 06:36 AM.
 
Old 09-11-2010, 03:11 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
In this case the squash file not fuse.
 
Old 09-12-2010, 03:04 PM   #7
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 658

Original Poster
Rep: Reputation: 35
Thanks for the help. I'll investigate further to find why the output ISO is so much bigger than the original.
 
Old 09-12-2010, 04:21 PM   #8
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 658

Original Poster
Rep: Reputation: 35
Quote:
Originally Posted by robertjinx View Post
If you do a LiveCD you should use LZMA and make sure that your squashfs module from your kernel supports LZMA compression.
Thanks for the tip. The LiveCDCustomization says no to use "-nolzma" in 9.10 and later, and the filesystem.squashfs output is about 300MB.

So if I get a 1.5GB ISO, it looks like it has something to do with mkisofs:
Code:
sudo mkisofs -D -r -V "$IMAGE_NAME" -cache-inodes -J -l -b extract-cd/isolinux/isolinux.bin -c extract-cd/isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../ubuntu-2.6.31-22-custom.iso .

[...]
Total translation table size: 2048
Total rockridge attributes bytes: 5228732
Total directory bytes: 17248256
Path table size(bytes): 88556
Max brk space used 2819000
613316 extents written (1197 MB)

$ ll ../ubuntu-2.6.31-22-custom.iso
-rw-r--r-- 1 root root 1256071168 2010-09-12 12:34 ../ubuntu-2.6.31-22-custom.iso
Does someone know why mkisofs ends up building an ISO file that is so much bigger than the original?

Thank you.
 
Old 09-13-2010, 04:07 AM   #9
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
How big is "." or directory which you are building before you create the iso?
 
Old 09-20-2010, 03:13 AM   #10
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 658

Original Poster
Rep: Reputation: 35
Thanks for the help, and sorry about the delayed response.

Fact is, the directory where the live root filesystem (squashfs) is unpacked does weigh 884MB already even after running the commands specified in the HOWTO above to trim down the fat before building a new ISO:

Code:
$ du -h ./edit
884M    ./edit/

$ du -h ./extract-cd/
17M     ./extract-cd/

$ ls -al ~
~/896.798.720 ubuntu-2.6.31-22-custom.iso
Does someone know how to investigate why I went from the original ISO of 350MB and ended up with a 900MB file after just upgrading its kernel?

Thank you.
 
  


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
why is my backup file bigger than the original? joseph2020 Ubuntu 9 06-07-2009 01:50 AM
booting iso from grub + looking for original unix hasanatizaz Linux - Newbie 1 12-11-2008 12:48 PM
Checking MD5 match of burned disc to original ISO SlowCoder Linux - General 3 02-26-2008 02:46 PM
Sampling bits of information in bigger and bigger pieces lugoteehalt General 0 10-29-2003 05:38 AM
Custom ISO Jay_highlands Slackware 1 10-18-2003 05:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:02 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