Jump to content











Photo
- - - - -

Ubuntu LiveCD(remastering..)


  • Please log in to reply
2 replies to this topic

#1 rawr

rawr

    Frequent Member

  • Advanced user
  • 163 posts

Posted 07 May 2010 - 11:55 AM

found the script below in the comments of
"How to Customise the Ubuntu Desktop CD"


its used to replace the
steps
from "How to Customise the Ubuntu Desktop CD"

using aufs
en.wikipedia.org/wiki/Aufs

to 'mount' the iso and the filesystem.squashfs as writable

( so you need not extract them ! )

leaving you to script the (chroot) customization

and finally

- Compressing filesystem
- Recomputing MD5 sums
and Creating ISO image

for testing the scripted customization !!


# aufs - remastering - script
# from https://help.ubuntu.com/community/LiveCDCustomization  

#comments 



#Hi, I've created a simple script to ease remastering the Kubuntu Live CD. It uses aufs to avoid copying all the files #back and forth. Maybe it will be usefull to others too. The script must be run as root. 



CD="${1:-kubuntu-9.04-desktop-i386.iso}"; shift

# exit after any error:

set -e



which mkisofs mksquashfs tempfile sed



WDIR=`mktemp -d $PWD/kubuntu-remastered.XXXXXXXXXX`

ISO="$WDIR/${CD##*/}"

ISO="${ISO%.iso}-remastered-KDM.iso"

EXIT=""

function addExit {

	EXIT="$@; $EXIT"

	trap "$EXIT" EXIT HUP TERM INT QUIT

}

function mnt {

	local margs="$1"; shift

	local mp="$WDIR/$1"

	for D in "$@"; do

		mkdir -v -p "$WDIR/$D"

	done

	mount -v $margs "$mp"

	addExit "umount -v $mp"

}



# mount the CD image

mnt "-t auto $CD -o loop,ro" cd



# mount compressed filesystem

mnt "-t squashfs $WDIR/cd/casper/filesystem.squashfs -o ro,loop" sq



# create joined writable filesystem for the new CD

mnt "-t aufs -o br:$WDIR/cd-w=rw:$WDIR/cd=ro none" cd-u cd-w



# create joined writable filesystem for the new compressed squashfs filesystem

mnt "-t aufs -o br:$WDIR/sq-w=rw:$WDIR/sq=ro none" sq-u sq-w



echo ">>> Updating CD content"



(

	cd sq-u



	# DO YOUR CUSTOMIZATION STUFF HERE, CHROOT, MODIFY FILES, ETC.

	# ...

	# ...



)



echo ">>> Compressing filesystem"

mksquashfs $WDIR/sq-u/ $WDIR/cd-u/casper/filesystem.squashfs -noappend



echo ">>> Recomputing MD5 sums"

( cd $WDIR/cd-u && find . -type f -not -name md5sum.txt -not -path '*/isolinux/*' -print0 | xargs -0 -- md5sum > md5sum.txt )



echo ">>> Creating ISO image $ISO"

mkisofs \

	-V "Custom KUbuntu Live CD" \

	-r -cache-inodes -J -l \

	-b isolinux/isolinux.bin \

	-c isolinux/boot.cat \

	-no-emul-boot -boot-load-size 4 -boot-info-table \

	-o "$ISO" \

	$WDIR/cd-u



# The trap ... callbacks will unmount everything.

#//===============================================



or try the gui this (remastersys, Create a customized Ubuntu LiveCD)
also the
http://remastersys.s...e.net/tips.html has lots of tips !


and

https://wiki.ubuntu.com/BootToRAM

#2 rawr

rawr

    Frequent Member

  • Advanced user
  • 163 posts

Posted 14 May 2010 - 02:55 PM

in addition
some links / info for testing iso without burning to cd/dvd ( to complement minimalist remastering )

Grub4dos (forum)

Grub4dos Guide

grub4dos booting ubuntu iso

example menu.lst entry
using iso file "ubuntu-9.04-beta-desktop-i386.iso"
and "initrd.gz" *

title Ubuntu LiveCD
find --set-root /ubuntu-9.04-beta-desktop-i386.iso
map /ubuntu-9.04-beta-desktop-i386.iso (0xff)
map --hook
root (0xff)
kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper iso-scan/filename=/ubuntu-9.04-beta-desktop-i386.iso quiet splash --
initrd /casper/initrd.gz
#boot


*Ubuntu 9.04 uses "initrd.gz" note the file extension

-Ubuntu 9.10 the initrd file uses lz extension
eg: "initrd.lz"


grub4dos, .iso images and (hd32) or (0xFF) mapping <--- list of "real" working menu.lst entry

#3 stonesonnow

stonesonnow

    Newbie

  • Members
  • 23 posts
  •  
    United States

Posted 14 May 2010 - 07:53 PM

why using the old ubuntu? instead i am using the new version, here is my menu.lst

title Ubuntu 10.04 Netbook Remix\nAn operating system built by a worldwide team of expert developers.It contains all the applications you need: a web browser, office suite, media apps, instant messaging and much more.Ubuntu is an open-source alternative to Windows and Office.
find --set-root /ubuntu-10.04-netbook-i386.iso
map /ubuntu-10.04-netbook-i386.iso (0xff)
map --hook
root (0xff)
kernel /casper/vmlinuz file=/cdrom/preseed/netbook-remix.seed boot=casper persistent iso-scan/filename=/ubuntu-10.04-netbook-i386.iso splash
initrd /casper/initrd.lz


:cheers: :cheers:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users