mass producing linux
Its almost like it did not create the 3GB root.disk by looking at the disks folder being 5GB. I am almost positive i did the cp -a to move it from mnt old to mnt new...
[quote]
[root@retail clients]# du -h /home/clients/ubuntu/* --max-depth=1
1.8G /home/clients/ubuntu/disks/mnt
26M /home/clients/ubuntu/disks/boot
5.1G /home/clients/ubuntu/disks
700M /home/clients/ubuntu/install
28K /home/clients/ubuntu/Ubuntu.ico
1.5M /home/clients/ubuntu/uninstall-wubi.exe
432K /home/clients/ubuntu/winboot
[root@retail clients]# du -sk ubuntu/*
5295252 ubuntu/disks
716440 ubuntu/install
28 ubuntu/Ubuntu.ico
1508 ubuntu/uninstall-wubi.exe
432 ubuntu/winboot
[root@retail clients]# [/quote]
[quote]
[root@retail clients]# du -h /home/clients/ubuntu/* --max-depth=1
1.8G /home/clients/ubuntu/disks/mnt
26M /home/clients/ubuntu/disks/boot
5.1G /home/clients/ubuntu/disks
700M /home/clients/ubuntu/install
28K /home/clients/ubuntu/Ubuntu.ico
1.5M /home/clients/ubuntu/uninstall-wubi.exe
432K /home/clients/ubuntu/winboot
[root@retail clients]# du -sk ubuntu/*
5295252 ubuntu/disks
716440 ubuntu/install
28 ubuntu/Ubuntu.ico
1508 ubuntu/uninstall-wubi.exe
432 ubuntu/winboot
[root@retail clients]# [/quote]
There should be nothing under /home/clients/ubuntu/disks/mnt if you unmounted it. In fact that directory should not even exist when you create your zip if you followed my instructions. Also, what all is under /home/clients/ubuntu/disks? Looks like there is a lot more than should be there. Copy/paste the output of this:
# ls -lR /home/clients/ubuntu
# ls -lR /home/clients/ubuntu
the mnt folder was there and it was mounted so I umounted it. I must of left it during the second time I did it.
Here is the output:
Here is the output:
Code: Select all
[root@retail clients]# ls -lR /home/clients/ubuntu
/home/clients/ubuntu:
total 1548
drwxrwxr-x 3 mojoadmin mojoadmin 4096 2009-07-23 15:29 disks
drwxrwxr-x 2 mojoadmin mojoadmin 4096 2009-07-21 16:29 install
-rwxrw-r-- 1 mojoadmin mojoadmin 25214 2009-07-16 15:18 Ubuntu.ico
-rwxrw-r-- 1 mojoadmin mojoadmin 1538888 2009-07-16 15:18 uninstall-wubi.exe
drwxrwxr-x 2 mojoadmin mojoadmin 4096 2009-07-21 16:40 winboot
/home/clients/ubuntu/disks:
total 3411212
drwxrwxr-x 3 mojoadmin mojoadmin 4096 2009-07-21 16:29 boot
-rw-r--r-- 1 root root 3221225472 2009-07-21 16:44 root.disk
-rwxrw-r-- 1 mojoadmin mojoadmin 268435456 2009-07-16 15:56 swap.disk
/home/clients/ubuntu/disks/boot:
total 26372
-rwxrw-r-- 1 mojoadmin mojoadmin 529118 2009-04-16 22:41 abi-2.6.28-11-generic
-rwxrw-r-- 1 mojoadmin mojoadmin 528128 2009-06-30 16:56 abi-2.6.28-13-generic
-rwxrw-r-- 1 mojoadmin mojoadmin 96795 2009-04-16 22:41 config-2.6.28-11-generic
-rwxrw-r-- 1 mojoadmin mojoadmin 96768 2009-06-30 16:56 config-2.6.28-13-generic
drwxrwxr-x 2 mojoadmin mojoadmin 4096 2009-07-21 16:29 grub
-rwxrw-r-- 1 mojoadmin mojoadmin 7814880 2009-07-16 16:04 initrd.img-2.6.28-11-generic
-rwxrw-r-- 1 mojoadmin mojoadmin 7825957 2009-07-17 08:35 initrd.img-2.6.28-13-generic
-rwxrw-r-- 1 mojoadmin mojoadmin 128796 2009-03-27 12:15 memtest86+.bin
-rwxrw-r-- 1 mojoadmin mojoadmin 1456232 2009-04-16 22:41 System.map-2.6.28-11-generic
-rwxrw-r-- 1 mojoadmin mojoadmin 1449810 2009-06-30 16:56 System.map-2.6.28-13-generic
-rwxrw-r-- 1 mojoadmin mojoadmin 1074 2009-04-16 22:43 vmcoreinfo-2.6.28-11-generic
-rwxrw-r-- 1 mojoadmin mojoadmin 1074 2009-06-30 16:58 vmcoreinfo-2.6.28-13-generic
-rwxrw-r-- 1 mojoadmin mojoadmin 3501776 2009-04-16 22:41 vmlinuz-2.6.28-11-generic
-rwxrw-r-- 1 mojoadmin mojoadmin 3488208 2009-06-30 16:56 vmlinuz-2.6.28-13-generic
/home/clients/ubuntu/disks/boot/grub:
total 24
-rwxrw-r-- 1 mojoadmin mojoadmin 191 2009-07-16 16:04 default
-rwxrw-r-- 1 mojoadmin mojoadmin 30 2009-07-16 16:04 device.map
-rwxrw-r-- 1 mojoadmin mojoadmin 5237 2009-07-17 08:30 menu.lst
-rwxrw-r-- 1 mojoadmin mojoadmin 4779 2009-07-17 08:30 menu.lst~
/home/clients/ubuntu/install:
total 0
/home/clients/ubuntu/winboot:
total 428
-rwxrw-r-- 1 mojoadmin mojoadmin 806 2009-07-16 15:15 menu.lst
-rwxrw-r-- 1 mojoadmin mojoadmin 197915 2009-07-16 15:15 wubildr
-rwxrw-r-- 1 mojoadmin mojoadmin 214843 2009-07-16 15:15 wubildr.exe
-rwxrw-r-- 1 mojoadmin mojoadmin 8192 2009-07-16 15:15 wubildr.mbr
[root@retail clients]#
That looks about right once you unmount the root.disk. After creating a new root.disk and copying the files over and unmounting it what does it zip down to by itself? I guess it might just be easier to just look at a listing of your zip file. Can you copy/paste the output of your zip file?
That should show a list of the files in the zip file and their sizes before and after compressing.
Code: Select all
unzip -v ubuntu.zip
Sure, here it is:
Code: Select all
[root@retail clients]# unzip -v ubuntu3.zip
Archive: ubuntu3.zip
Length Method Size Ratio Date Time CRC-32 Name
-------- ------ ------- ----- ---- ---- ------ ----
0 Stored 0 0% 07-21-09 16:40 00000000 ubuntu/
0 Stored 0 0% 07-22-09 15:13 00000000 ubuntu/disks/
0 Stored 0 0% 07-22-09 15:13 00000000 ubuntu/disks/mnt/
0 Stored 0 0% 07-21-09 16:29 00000000 ubuntu/disks/boot/
3488208 Defl:N 3368287 3% 06-30-09 16:56 ffffffff ubuntu/disks/boot/vmlinuz-2.6.28-13-generic
1456232 Defl:N 379342 74% 04-16-09 22:41 22e4ea36 ubuntu/disks/boot/System.map-2.6.28-11-generic
7814880 Defl:N 7627200 2% 07-16-09 16:04 a1f1f650 ubuntu/disks/boot/initrd.img-2.6.28-11-generic
1074 Defl:N 488 55% 06-30-09 16:58 5ef5019b ubuntu/disks/boot/vmcoreinfo-2.6.28-13-generic
529118 Defl:N 120546 77% 04-16-09 22:41 7f08d83a ubuntu/disks/boot/abi-2.6.28-11-generic
0 Stored 0 0% 07-21-09 16:29 00000000 ubuntu/disks/boot/grub/
191 Defl:N 142 26% 07-16-09 16:04 58999189 ubuntu/disks/boot/grub/default
30 Defl:N 23 23% 07-16-09 16:04 58fdce16 ubuntu/disks/boot/grub/device.map
4779 Defl:N 1841 62% 07-17-09 08:30 645baede ubuntu/disks/boot/grub/menu.lst~
5237 Defl:N 1867 64% 07-17-09 08:30 5764b49a ubuntu/disks/boot/grub/menu.lst
528128 Defl:N 120247 77% 06-30-09 16:56 c505de4c ubuntu/disks/boot/abi-2.6.28-13-generic
96795 Defl:N 23225 76% 04-16-09 22:41 0181a5ca ubuntu/disks/boot/config-2.6.28-11-generic
128796 Defl:N 50061 61% 03-27-09 12:15 93752168 ubuntu/disks/boot/memtest86+.bin
7825957 Defl:N 7635069 2% 07-17-09 08:35 ff2bdc63 ubuntu/disks/boot/initrd.img-2.6.28-13-generic
96768 Defl:N 23213 76% 06-30-09 16:56 7aeb75c4 ubuntu/disks/boot/config-2.6.28-13-generic
1449810 Defl:N 377739 74% 06-30-09 16:56 5b2c2d7a ubuntu/disks/boot/System.map-2.6.28-13-generic
1074 Defl:N 487 55% 04-16-09 22:43 95f23fdd ubuntu/disks/boot/vmcoreinfo-2.6.28-11-generic
3501776 Defl:N 3381019 3% 04-16-09 22:41 ffffffff ubuntu/disks/boot/vmlinuz-2.6.28-11-generic
268435456 Defl:N 219410840 18% 07-16-09 15:56 3f7ee9f3 ubuntu/disks/swap.disk
3221225472 Defl:N 775471620 76% 07-21-09 16:44 a4d5dcc1 ubuntu/disks/root.disk
0 Stored 0 0% 07-21-09 16:29 00000000 ubuntu/install/
732909568 Defl:N 724103262 1% 04-20-09 09:30 714984ba ubuntu/install/.fuse_hidden0000000400000001
25214 Defl:N 9685 62% 07-16-09 15:18 53134521 ubuntu/Ubuntu.ico
0 Stored 0 0% 07-21-09 16:40 00000000 ubuntu/winboot/
214843 Defl:N 108209 50% 07-16-09 15:15 2174b89a ubuntu/winboot/wubildr.exe
8192 Defl:N 5449 34% 07-16-09 15:15 88e09b89 ubuntu/winboot/wubildr.mbr
197915 Defl:N 105840 47% 07-16-09 15:15 92d0aba4 ubuntu/winboot/wubildr
806 Defl:N 197 76% 07-16-09 15:15 ec29c74a ubuntu/winboot/menu.lst
1538888 Defl:N 1514867 2% 07-16-09 15:18 47fd1f98 ubuntu/uninstall-wubi.exe
-------- ------- --- -------
4251485207 1743840765 59% 33 files
[root@retail clients]#
You should go in your profile and enable BBCODE so when you use the "CODE" tags they actually work. You can also uncheck "Disable BBCode" when posting your message.
Regarding what I see in your file I see three things. First off get rid of that ".fuse_hidden*" file which will reduce the image size by over 700MB right off the bat. I forgot that I actually had that one too and had removed it early on (sorry!!).
Second one is your swap isn't getting compressed at all where mine gets compressed almost completely (you would gain over 200MB there). I think Fedora might initialize the swap when it exits which would explain it. You could create a new swap file before compressing:
Third, as far as the root.disk file I would think that should compress down a bit more if you created a new file system and copied your files over from the old file system.
I'll get rid of Fedora off my VM and install Ubuntu again and see if there is anything else that would need to be done after creating a new swap file (possibly need a modification to the /etc/fstab).
Regarding what I see in your file I see three things. First off get rid of that ".fuse_hidden*" file which will reduce the image size by over 700MB right off the bat. I forgot that I actually had that one too and had removed it early on (sorry!!).
Second one is your swap isn't getting compressed at all where mine gets compressed almost completely (you would gain over 200MB there). I think Fedora might initialize the swap when it exits which would explain it. You could create a new swap file before compressing:
Code: Select all
rm swap.disk
dd if=/dev/zero of=swap.disk bs=1M count=256
mkswap swap.disk
I'll get rid of Fedora off my VM and install Ubuntu again and see if there is anything else that would need to be done after creating a new swap file (possibly need a modification to the /etc/fstab).
Ok, I enabled the BBcode, so hopefully I look normal 
When doing your instructions, I now got down to 800MB. This was creating a new swap disk and it did deflate 100%.
I did it again but this time creating a new root disk and copying the old root disk over, and ziped it up, I got down to 720MB.
So if I get in and remove more packages, will is shrink some more? I would like to be under 700 so I can place on a CD and ship to the sites

When doing your instructions, I now got down to 800MB. This was creating a new swap disk and it did deflate 100%.
I did it again but this time creating a new root disk and copying the old root disk over, and ziped it up, I got down to 720MB.
So if I get in and remove more packages, will is shrink some more? I would like to be under 700 so I can place on a CD and ship to the sites
Yes, after you remove the packages you will have to recreate a new file system and copy over the remaining data to the new file system in order for the compression to work. Also, you should only need one kernel and one initrd (whichever one you are booting in your menu.lst). The others can be removed. That should gain you 10-15MB. You don't need the "uninstall-wubi.exe". On the file system itself check the /tmp and /var/tmp. Make sure the cache directories are clean etc (Firefox, apt-get, etc).
Following up: I have three systems up and running with the linux player, all built with different methods. One is a PC, built from scratch, one is ubuntu, loaded remotely with the wubi image copied to the windows directory and after modifying boot.ini, it booted exactly as planned. The third is fedora loaded onto an 'appliance' type pc, small enough where it could be mounted behind monitors if need be, but also really cheap, as it has the dual-core ATOM proc so these machines are about $325 each - $449 with a M$ os on them
After lettting them run for a week, it seems that the fedora image just runs better. It is easier for me to modify stuff and I just feel all around more comfortable with the fedora install.
So now the question is, do you think the fedora image could work in the wubi installer? I remember you said it kind of worked but that there were times it locked up?

After lettting them run for a week, it seems that the fedora image just runs better. It is easier for me to modify stuff and I just feel all around more comfortable with the fedora install.
So now the question is, do you think the fedora image could work in the wubi installer? I remember you said it kind of worked but that there were times it locked up?
Sure I think it "could" work, and if fact I have it working. The only problem I had with it was a problem with a shutdown/restart sometimes hanging because it wasn't able to unmount a file system because it was in use. That should be something that can be easily figured out though. I just didn't put any time into resolving that since you though you would just go with the Ubuntu install. I wish I had a higher speed connection (upload wise) so you could just download the image I have created. I could probably work out the shutdown/reboot issue and then dump it to CD and hand it off at a lunch meeting.
Or you could build the image yourself (like you have) and I could give you the steps I did to make it work. In fact I might have already done that earlier in this thread. It's basically nothing more than modifying/using the Ubuntu initrd image with the Fedora kernel (replace the Ubuntu kernel modules with the Fedora kernel modules in the initrd), and making a couple of simple changes to the /etc/fstab and menu.lst files. That would get you up and booted to where I am. I think one of the rc or service scripts will have to be modified to fix the reboot hang issue.
Or you could build the image yourself (like you have) and I could give you the steps I did to make it work. In fact I might have already done that earlier in this thread. It's basically nothing more than modifying/using the Ubuntu initrd image with the Fedora kernel (replace the Ubuntu kernel modules with the Fedora kernel modules in the initrd), and making a couple of simple changes to the /etc/fstab and menu.lst files. That would get you up and booted to where I am. I think one of the rc or service scripts will have to be modified to fix the reboot hang issue.