Author Topic: Findings while working on alternative install DVD...  (Read 309517 times)

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Findings while working on alternative install DVD...
« Reply #75 on: January 26, 2012, 04:02:44 pm »
As to the size issue... What are the chances the .iso you made previously still exists on your desktop? ;)
It is trying to stuff your previous iso into your new iso. I didn't delete it as part of the process because sometimes during testing I would forget to backup versions.

Shame about the personal installer, as I said, I stopped testing that many versions ago... and libdvdcss2 is what I am looking for to remove... I will check libdvdcss as well. Thank you so much for the replies. I will fix these options shortly.



« Last Edit: January 26, 2012, 04:47:38 pm by l3mce »
I never quit... I just ping out.

DragonK

  • Guru
  • ****
  • Posts: 446
    • View Profile
Re: Findings while working on alternative install DVD...
« Reply #76 on: January 26, 2012, 07:24:23 pm »
Ok so from here on out we will test the distributable version, unless otherwise specified by you.

I removed the iso from the desktop, and I removed everything in the /root/lmcetmp
I restarted but still fails with the iso being to big.
You think it might be because I ran the Diskless_CreateTBZ.sh. The data is too much to fit on a DVD?

I was doing all this testing at the office, and something affected the VM I was testing on. When I got home and started the VM, it went straight to the AV-Wizard....... After the AV-Wizard I briefly saw some pakages getting downloaded.

Hope this all makes sense???

Karel

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Findings while working on alternative install DVD...
« Reply #77 on: January 26, 2012, 07:36:19 pm »
I was surprised at the size of your personal iso. An iso made from a fresh install never yielded more than 2.2gb for me. Around 3.2 with Diskless_SetupTBZ having run. I was even able to stuff MAME on one.

Did you by chance create any MDs? Have you got .debs hiding someplace unusual?

When the script starts it looks to see if the workdir (/root/lmcetmp) exists, and deletes it... so you don't have to worry about that. Again a further version will destroy it on cleanup... but I liked it persisting until a new pass to look at stuff.

Can you possibly do a find /root/lmcetmp -name '*' -size +50000k and look for something big and unusual... like another iso or something? The only time I ever ran into size problems was after installing MAME and other stuff... unless I forgot about that iso you already removed.
« Last Edit: January 26, 2012, 08:23:53 pm by l3mce »
I never quit... I just ping out.

DragonK

  • Guru
  • ****
  • Posts: 446
    • View Profile
Re: Findings while working on alternative install DVD...
« Reply #78 on: January 27, 2012, 08:26:52 am »
Damn QT-SDK installer was sitting in the home directory and taking up 1.3GB of size.

It took about 1hour and 30min to create the distributable version and reinstall everything again afterwards, that was removed to create the image.
Im sure these times would change with different hardware specs, i.e Faster cores and internet bandwith.

I might still have some crap laying around, because the iso image is 3GB in size.

Now to test the install on a VM and actual core.

Karel


l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Findings while working on alternative install DVD...
« Reply #79 on: January 27, 2012, 10:36:14 am »
Outstanding. Knew it had to be something ;)

If you ran TBZ I would expect it to be about that size... regardless, you should be in the clear for whatever you want to do (other than mame)
I never quit... I just ping out.

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Findings while working on alternative install DVD...
« Reply #80 on: January 27, 2012, 08:59:46 pm »
Ok... it isn't you, I somehow broke the installer. I will have to grab several versions and see what I did to break it... has been so long since I looked at it.

I will try and fix it now. Sorry.
I never quit... I just ping out.

DragonK

  • Guru
  • ****
  • Posts: 446
    • View Profile
Re: Findings while working on alternative install DVD...
« Reply #81 on: January 28, 2012, 01:59:44 pm »
What isnt working?

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Findings while working on alternative install DVD...
« Reply #82 on: January 29, 2012, 07:01:24 am »
I think I broke the "install" option. Seems to only live boot...
I never quit... I just ping out.

DragonK

  • Guru
  • ****
  • Posts: 446
    • View Profile
Re: Findings while working on alternative install DVD...
« Reply #83 on: February 02, 2012, 07:21:46 am »
Any progress?

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Findings while working on alternative install DVD...
« Reply #84 on: February 02, 2012, 08:20:54 am »
No outward progress... lol... I think script 62 works... I will try and get a working script up and rolling tonight.

I have been busy trying to get 1004 snapshots going from a builder which has been sucking up my time/bandwidth for the last few days.
I never quit... I just ping out.

DragonK

  • Guru
  • ****
  • Posts: 446
    • View Profile
Re: Findings while working on alternative install DVD...
« Reply #85 on: February 14, 2012, 02:14:10 pm »
Hi L3mce,

Any progess update???

Karel

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Findings while working on alternative install DVD...
« Reply #86 on: February 19, 2012, 07:46:17 am »
Yes, quite a bit, but not on this version.

Versions 58-60 have varying degrees of success. I am now working on a similar method which can either build LMCE from scratch (abnormally) and press an installing DVD, or take the pre-made abnormal image and produce the DVD.

I produced my first DVD that would make it through the installer today. A lot of errors to cleanup, and address a couple of processes and you should see a different sort of iso coming out soon.

Once I get it a bit more stable, I could use some help. It is currently spitting .iso's at 1.05Gb without video-wizard-videos. End result SHOULD be an install dvd at under 2 gb with Diskless_Setup already run.
I never quit... I just ping out.

DragonK

  • Guru
  • ****
  • Posts: 446
    • View Profile
Re: Findings while working on alternative install DVD...
« Reply #87 on: February 20, 2012, 03:10:49 pm »
Cant wait to start testing.....

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: Findings while working on alternative install DVD...
« Reply #88 on: February 21, 2012, 05:38:23 am »
Well...

What you COULD do if you really can't wait... and are feeling brave... is create a dd image from scratch with... this...
scratch_master.sh
Code: [Select]
#!/bin/bash
#
# Create an image which can be dd'ed onto
# a harddisk, and, after adding a boot loader
# using grub, be ready for consumption.
# TODO must apt-get install syslinux squashfs-tools genisoimage sbm on HOST

#set -e
LIVECDURL="http://www.linuxmce.org"
IMAGEFILE=`tempfile -p 1004`
#IMAGEFILE=1004
http_proxy=http://127.0.0.1:3128
TEMPDIR=`mktemp -d 1004-dir.XXXXXXXXXX`
TEMPISO=`mktemp -d 1004-iso.XXXXXXXXXX`
#TEMPDIR=snapshot
#TEMPISO=isoshot
apt-get install syslinux squashfs-tools genisoimage sbm
mkdir -p $TEMPISO/{casper,isolinux,install}

trap futureTrap EXIT
futureTrap () {
umount -lf $TEMPDIR/proc
umount -lf $TEMPDIR/sys
umount -lf $TEMPDIR/dev/pts
umount -lf $TEMPDIR
}

#########################
# FUNCTIONS
#########################
bootstrapper() {
dd if=/dev/zero of=$IMAGEFILE count=4 bs=1GB
mkfs.ext2 -F $IMAGEFILE
debootstrap --arch=i386 --include=mysql-server lucid $TEMPDIR
}

mainMount () {
mount -o loop $IMAGEFILE $TEMPDIR
mount none -t proc $TEMPDIR/proc
mount none -t devpts $TEMPDIR/dev/pts
mount none -t sysfs $TEMPDIR/sys
mkdir -p $TEMPDIR/root/new-installer/lmcemaster/
cp /etc/network/interfaces $TEMPDIR/etc/network/interfaces
}

mkExe () {
chmod +x $TEMPDIR/root/new-installer/lmcemaster/ping.sh
chmod +x $TEMPDIR/root/new-installer/lmcemaster/cleanup.sh
chmod +x $TEMPDIR/usr/pluto/bin/gpgupdate.sh
chmod +x $TEMPDIR/usr/sbin/invoke-rc.d
chmod +x $TEMPDIR/usr/bin/screen
chmod +x $TEMPDIR/root/new-installer/lmcemaster/chmaster.sh
}

stopStartups () {
mv $TEMPDIR/usr/sbin/invoke-rc.d $TEMPDIR/usr/sbin/invoke-rc.d.orig
cat <<EOL > $TEMPDIR/usr/sbin/invoke-rc.d
#!/bin/bash
exit 0
EOL

mv $TEMPDIR/usr/bin/screen $TEMPDIR/usr/bin/screen.orig
cat <<EOL > $TEMPDIR/usr/bin/screen
#!/bin/bash
exit 0
EOL
}

fixSources () {
cat <<EOL > $TEMPDIR/etc/apt/sources.list
deb http://deb.linuxmce.org/ubuntu/ lucid  beta2
deb http://deb.linuxmce.org/ubuntu/ 20dev_ubuntu  main
deb http://packages.medibuntu.org/ lucid free non-free
EOL

cat <<EOL > $TEMPDIR/etc/apt/sources.list.d/ubuntu.org
deb http://archive.ubuntu.com/ubuntu lucid main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu lucid-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu lucid-security main restricted universe multiverse
deb http://debian.slimdevices.com/ stable  main
EOL

#create preseed file
cat <<EOL | LC_ALL=C chroot $TEMPDIR debconf-set-selections
debconf debconf/frontend  select Noninteractive
# Choices: critical, high, medium, low
debconf debconf/priority        select critical
msttcorefonts   msttcorefonts/http_proxy        string
msttcorefonts   msttcorefonts/defoma    note
msttcorefonts   msttcorefonts/dlurl     string
msttcorefonts   msttcorefonts/savedir   string
msttcorefonts   msttcorefonts/baddldir  note
msttcorefonts   msttcorefonts/dldir     string
msttcorefonts   msttcorefonts/blurb     note
msttcorefonts   msttcorefonts/accepted-mscorefonts-eula boolean true
msttcorefonts   msttcorefonts/present-mscorefonts-eula  boolean false
sun-java6-bin   shared/accepted-sun-dlj-v1-1    boolean true
sun-java6-jre   shared/accepted-sun-dlj-v1-1    boolean true
sun-java6-jre   sun-java6-jre/jcepolicy note
sun-java6-jre   sun-java6-jre/stopthread        boolean true
debconf debconf/frontend        select  Noninteractive
# Choices: critical, high, medium, low
debconf debconf/priority        select  critical
EOL
}

mkImg () {
rm -f  $TEMPDIR/etc/udev/rules.d/70-persistent-net-rules
umount $TEMPDIR
sleep1
e2fsck -fy $IMAGEFILE
cp $IMAGEFILE ./1004
cp 1004 1004bu
}

####################################
# SCRIPTS
####################################
# chrooted

writeScripts () {
cat <<EOL > $TEMPDIR/root/new-installer/lmcemaster/chmaster.sh
#!/bin/bash
export HOME=/root
export LC_ALL=C
mkdir -p /var/run/network
/root/new-installer/lmcemaster/ping.sh
apt-get install -y dbus
dbus-uuidgen > /var/lib/dbus/machine-id
dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl
/usr/pluto/bin/gpgupdate.sh
apt-get dist-upgrade -y --force-yes --allow-unauthenticated
apt-get clean
apt-get install linux-image-generic libc-dev-bin linux-libc-dev libc6-dev linux-headers-generic manpages-dev screen -y
apt-get clean

mysqldPID=\`mysqld --skip-networking&\`
echo MySQL PID: \$mysqldPID
chmod 755 \$TEMPDIR/var/lib/mysql

apt-get install lmce-hybrid -y --allow-unauthenticated
apt-get clean

# Add the minimal KDE meta package, which will also install Xorg.
apt-get install kde-minimal -y --allow-unauthenticated
apt-get clean

#
apt-get install pluto-x-scripts pluto-orbiter -y --allow-unauthenticated
apt-get clean

# Asterisk stuff
apt-get install lmce-asterisk -y --allow-unauthenticated
apt-get clean

# Additional stuff wanted by l3top
apt-get install ubuntu-standard casper lupin-casper discover1 laptop-detect os-prober linux-generic grub2 plymouth-x11 ubiquity-frontend-kde initramfs-tools
apt-get clean

kill \`lsof $TEMPDIR|grep mysqld|cut -d" " -f3|sort -u\` || :
sleep 3
kill \$mysqldPID || :
EOL

#### Check online status
# chrooted
cat <<EOL > $TEMPDIR/root/new-installer/lmcemaster/ping.sh
#!/bin/bash
while ! ping -c 1 google.com | sleep 1 > /dev/null 2>&1; do /etc/init.d/networking restart; sleep 5; done
EOL

#### Update and get gpg keys
# chrooted

cat <<EOL > $TEMPDIR/usr/pluto/bin/gpgupdate.sh
#!/bin/bash
gpgs=\$(apt-get update |& grep -s NO_PUBKEY | awk '{ print \$NF }' | cut -c 9-16); if [ -n \$gpgs ]
then for gpg in \$gpgs; do gpg --keyserver pgp.mit.edu --recv-keys \$gpg
gpg --export --armor \$gpg | apt-key add -
done
apt-get update
fi
EOL

#### Cleanup script
# chrooted
cat <<EOL > $TEMPDIR/root/new-installer/lmcemaster/cleanup.sh
#!/bin/bash
ls /boot/vmlinuz-2.6.**-**-generic > list.txt
sum=\$(cat list.txt | grep '[^ ]' | wc -l)
if [ \$sum -gt 1 ]; then
dpkg -l 'linux-*' | sed '/^ii/!d;/'"\$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
fi
rm list.txt
apt-get clean
rm -rf /tmp/*
rm /etc/resolv.conf
rm /var/lib/dbus/machine-id
rm /sbin/initctl
dpkg-divert --rename --remove /sbin/initctl
rm /usr/sbin/invoke-rc.d
mv /usr/sbin/invoke-rc.d.orig $TEMPDIR/usr/sbin/invoke-rc.d
rm /usr/bin/screen
mv /usr/bin/screen.orig $TEMPDIR/usr/bin/screen
umount -lf /proc
umount -lf /sys
umount -lf /dev/pts
#umount $TEMPDIR/dev
EOL

#############################
# Config files
#############################

#### Set temporary network file
#cat <<EOL > $TEMPDIR/etc/network/interfaces.2
#auto lo
#iface lo inet loopback

#auto eth0
#iface eth0 inet dhcp

#auto eth1
#iface eth1 inet dhcp
#EOL
}

###########################
# Main Execution Area
###########################
# If not bootstrapping, hash bootstrapper, fixSources, finalizeFs, and mkImg

bootstrapper
mainMount
writeScripts
mkExe
fixSources
stopStartups
LC_ALL=C chroot $TEMPDIR /usr/pluto/bin/gpgupdate.sh
LC_ALL=C chroot $TEMPDIR /root/new-installer/lmcemaster/chmaster.sh
LC_ALL=C chroot $TEMPDIR /root/new-installer/lmcemaster/cleanup.sh
finalizeFs
mkImg

then get lmcemaster
and dvd-installer You will rename them to remove the numbers. I put the commands below. You will need to install debootstrap and dpkg-devel before running the first script. The second will install what it needs.

chmod +x on all of them. Keeping them all in the same directory. Make the following modifications. To save yourself SOME time, grab a copy of video-wizard-videos_1.1_all.deb from /var/cache/apt/archives of a current LMCE 1004 directory, put it in the same directory as the scripts, and unhash lines 50-54 of lmcemaster to prevent having to download all 489 megs of it. Unhash line 50 at the very least to copy dvd-installer.sh into the proper place.

Another thing YOU should do is drop that nifty image of yours in the same directory and hash line 363 of lmcemaster and add a line like so:
Code: [Select]
#   if [ -e $DDMASTER/splash.png ]; then cp $DDMASTER/splash.png $ISODIR/isolinux/splash.png; fi
cp splash.png $ISODIR/isolinux

I am also screwing with the menu sizing to try and fit on your little screen, which is why it will be a little... weird if you use it as is. I am currently trying (at line 190 lmcemaster)
menu width 70
menu margin 10

I do sudo su before these sorts of things... so I don't type sudo before everything as it should be implied.
Code: [Select]
chmod +x scratch_master.sh
mv lmcemaster.3 lmcemaster
chmod +x lmcemaster
mv dvd-installer.2.sh dvd-installer.sh
chmod +x dvd-installer.sh
./scratch_master.sh

A bit of warning... I have never run scratch_master... but I have looked over it a lot and it really SHOULD work... lol. It is just too big a drain on my tiny internet... if it encounters any errors they should be minor. Post and I will fix.

Another thing, keep that 1004 image backup the first script spits out. You will only want to make it once, and you will be using it a lot. Now
Code: [Select]
./lmcemasterOnce you run lmcemaster you will douche up that image... so once run just: cp 1004bu 1004
and you are ready to run again to create another image. lmcemaster will spit out an iso named LMCE-1004-beta.iso and its md5. You can load that in a vm, use unetbootin to drop it to a thumb or burn a dvd.

I have not even begun to get back to live boot again. No idea what it will do.

If lmcemaster hits an error it will die. It should not hit an error. If it does and you want to continue because it is awesome even if it errors, hash line two. (set -e)
« Last Edit: February 21, 2012, 04:07:31 pm by l3mce »
I never quit... I just ping out.

DragonK

  • Guru
  • ****
  • Posts: 446
    • View Profile
Re: Findings while working on alternative install DVD...
« Reply #89 on: February 22, 2012, 08:59:21 am »
I'll give it a bash.