Page 1 of 18 12311 ... LastLast
Results 1 to 10 of 337

Thread: How to make a live CD/DVD from your harddisk installation

Hybrid View

  1. #1
    Join Date
    Nov 2006
    Location
    Cairo, Egypt
    Beans
    300

    Make a live CD/DVD/Bootable flash from your harddisk installation

    The information in this thread has been moved to https://help.ubuntu.com/community/Ma...arddiskInstall

    A thread for discussion of the wiki page only can be found here http://ubuntuforums.org/showthread.p...4#post12062094

    Thread closed.


    Transforming your Installation into a Live DVD/CD




    Update 1: This guide is updated to use grub2 instead of grub-legacy


    Update 2: Appendix 2 shows how to make a bootable flash disk instead of a live CD.


    This HOWTO is about making a live CD/DVD from the main system on your hard drive. This might be desired if you have customized your system and want to have it on CD.

    Another approach that will be discussed here is building your live CD/DVD from scratch. This will be done by building a new system using debootstrap. This is usefull if you want to build a clean live CD, or if you want to build a minimal rescue cd. (Consult Appendix.1 for more details about building a CD from scratch).

    The live CD is usually created with a filesystem called squashfs. Squashfs is read only compressed filesystem that allow us to squeeze our system into a single CD. Note that your system has to be about 2GB (this might need some trial an error) to produce a compressed image that fits on the CD. Otherwise, you will have to use a DVD, or you can use a flash disk as pointed out in Appendix. 2.




    Background on live CD/DVD

    Note: This section is a clarification of how live CD works. You don't have to read it. You can skip it if you want.

    A live CD/DVD is basically a normal linux installation just like an ordinary harddrive installation. However, simply copying the harddirve installation over to a CD/DVD is not enough to produce a working system. Why? because there are still minor differences between a live CD/DVD and on ordinary harddrive installation. So in addition to copying our harddirve installation to the CD/DVD we must address those differences as well.

    So what are these differences?

    1. The CD or DVD is read only media. Linux needs to have write access to certain parts of the system to be able to operate properly (like "/dev" "/proc" "/var" "/tmp"). There are a lot of approaches to address this problem. All of which utilize the system RAM. Some of these approaches enable write access only to essential directories and files, and hence, they do not allow the user to modify the system or install new packages while in the live CD. Other approaches, like aufs2 which is what is used in this guide, allows the user to write to any part of the system. This is done by merging part of the RAM with the read-only filesystem of the live CD/DVD and making the look like one filesystem that have read-write access. Aufs2 has to be mounted at boot in a certain manner.


    2. With the harddrive installation the location of the root filesystem is fixed. So it is passed to the kernel at boot time using the root=/dev/... parameter. With a live CD/DVD, the location of the root device is not fixed as the user might have multiple cdrom drives, these drives can be ide, scsi ... etc. So for the root filesystem to be mounted, there must be a way to identify the root device, and then we have to load the suitable kernel modules (to be able to access the cdrom controller as well as the CD filesystem). All this has to be done even before we have a root filesystem mounted.



    3. To fit on a CD, the filesystem is usually compressed using squashfs. So we need to autodetect the filesystem type. We also need to have the proper modules for mounting it.





    These considerations require special preparation at boot time, some of which must be performed even before mounting the actual filesystem. How can we do this?

    Linux introduced a mechanism that allow for such preparations at boot time before the actual root filesystem is mounted. It is called the initial root filesystem or initramfs. This mechanism is used also in mounting normal harddirve installations, as it adds flexibilty to the boot process.


    initramfs is virtual filesystem. It is a compressed cpio (cpio is an archive format similar to tar) archive that contains a minimal shell, kernel modules necessary for mounting the root filesystem and number of scripts that perform some tasks at boot time. The most important of these scripts is a script called init located at the root of the initramfs.

    How does initramfs work?

    The boot loader loads both the kernel and the initramfs into memory and starts the kernel. The kernel then unpacks the initramfs and mount it as initial root filesystem, and then looks for the init program within the initial filesystem, and once it finds it, it executes it and hand the boot process over to it. This init scirpt is responsible for finding the real root filesystem and mounting it. It is also responsible for any special preparations required at boot time.

    So any special operations required for booting the system from live media can be coded into the initramfs boot scripts.

    How is initramfs is created?

    We do not have to create initramfs manually (although it can be done). There are tools for creating and updating initramfs like the command update-initramfs. Moreover, these tools can include custom scripts into the initramfs if they are placed in a certain preset locations (/usr/share/initramfs/scripts). So all we have to do is dump our custom scripts (which will do all the required preparation for booting the live CD/DVD) into these preset locations, and then create a custom initramfs by running update-initramfs.

    We don't even have to write these scripts. Why? becuase there are packages that have scripts tailored for booting form live CDs. One of these packages is called casper (this is the package used in this howto). By installing casper into the system, it places the scripts in there proper locations (where they can be spotted by update-initrfamfs). The only thing we need to do after installing casper is running update-initramfs to create an initramfs suitable for live CD/DVD.







    The live CD/DVD structure:

    The directory tree of the live CD/DVD we are going to create is going to look like this:

    Code:
    (CD ROOT)
    |-------+casper
    |	|-------filesystem.${FORMAT}	
    |	|-------filesystem.manifest
    |	|-------filesystem.manifest-desktop
    |	|-------vmlinuz
    |	|-------initrd.img
    |
    |-------+boot
    |	|--------+grub
    |	|	 |--------grub.cfg
    |	|
    |	|-------memtest86+
    |
    |--------md5sum.txt


    • /casper/filesystem.${FORMAT}: This is the container of the linux filesystem we are going to copy from our harddisk. It is usually a compressed filesystem like squahsfs.


    • /casper/filesystem.manifest: This file is optional. You only need it if you decide to include the Ubuntu installer in the CD. The purpose of this file will be explained later.


    • /casper/filesystem.manifest-desktop: This file is optional. You only need it if you decide to include the Ubuntu installer in the CD. The purpose of this file will be explained later.


    • /casper/vmlinuz: The linux kernel. This is copied form the linux filesystem.


    • /casper/initrd.img: the initramfs that contain the customizations necessary for the live CD/DVD.


    • /boot/grub/grub.cfg: File containing boot options for the live CD/DVD.


    • /boot/memtest86+: Optional file used to test the RAM of the machine form the live CD/DVD.


    • /md5sum.txt: Optional file containing checksums for all the files in the CD.








    Outline of the steps:

    A. Prepare Our work environment.

    B. Copy the Source system to the target directory.

    C. Chroot into the new system and make some modifications.

    D. Prepare The CD directory tree.

    E. Build the CD/DVD



    Appendix 1. Building the live media form scratch using Debootstrap.

    Appendix 2. How to Boot the ISO from a flash disk.



    Conventions used in this HOWTO:

    • Text highlighted in Magenta is meant to be replaced by the user's custom value. e.g. I will use gedit as my default text editor. Replace gedit with your favorite text editor.

    • Commands performed within a chroot will be in Blue.

    • Optional arguments or steps will be highlighted in Gray.











    A. Preparing the environment

    1. Set some variables

    Code:
    export WORK=~/work
    export CD=~/cd
    export FORMAT=squashfs
    export FS_DIR=casper

    The WORK Directory is where our temporary files and mount point will reside.
    The CD is the location of the CD tree.
    FORMAT is the filesystem type. We you are going to use a compressed squashfs.
    FS_DIR is the location of the actual filesystem image within the cd tree.

    Replace only the values highlighted in Magenta.




    2. Create the CD and the WORK directory structure:

    Code:
    sudo mkdir -p ${CD}/{${FS_DIR},boot/grub} ${WORK}/rootfs

    3. Install some packages on your current system:


    Code:
    sudo apt-get update
    Code:
    sudo apt-get install grub2 xorriso squashfs-tools qemu

    qemu is optional. It is only needed for testing the cd before burning it. It can be substituted with any other virtualization software like virtualbox.








    B. Copy your installation into the new filesystem.


    Code:
    sudo rsync -av --one-file-system --exclude=/proc/* --exclude=/dev/* \
    --exclude=/sys/* --exclude=/tmp/* --exclude=/home/* --exclude=/lost+found \
    --exclude=/var/tmp/* --exclude=/boot/grub/* --exclude=/root/* \
    --exclude=/var/mail/* --exclude=/var/spool/* --exclude=/media/* \
    --exclude=/etc/fstab --exclude=/etc/mtab --exclude=/etc/hosts \
    --exclude=/etc/timezone --exclude=/etc/shadow* --exclude=/etc/gshadow* \
    --exclude=/etc/X11/xorg.conf* --exclude=/etc/gdm/custom.conf \
    --exclude=/etc/lightdm/lightdm.conf --exclude=${WORK}/rootfs / ${WORK}/rootfs

    Note: rsync is used instead of cp to take advantage of the --one-file-system and the --exclude options.




    If you have a separate boot partition you will have to copy it using the following command:

    Code:
    sudo cp -av /boot/* ${WORK}/rootfs/boot


    (Optional) Copy settings in your home dir:


    If you want to preseve your user account settings which are stored in your home directory, you can copy them to ${WORK}/rootfs/etc/skel/.

    But first we have to define what files we want to copy. For example I am using xcfe4 as my DE, and it stores all it settings in a directory called .config in my home directory, so I am going to add .config to the variable $CONFIG:

    Code:
    CONFIG='.config .bashrc'
    Now, Copy the CONFIG files using the following command:

    Code:
    cd ~ && for i in $CONFIG
    do
    sudo cp -rpv --parents $i ${WORK}/rootfs/etc/skel
    done






    C. Chroot into the new system and modify it:

    1. Chroot into the copied system after mounting proc and dev:


    Code:
    sudo mount  --bind /dev/ ${WORK}/rootfs/dev
    Code:
    sudo mount -t proc proc ${WORK}/rootfs/proc
    Code:
    sudo mount -t sysfs sysfs ${WORK}/rootfs/sys
    Code:
    sudo chroot ${WORK}/rootfs /bin/bash

    N.B: All commands in Blue are done within a chroot.

    Now you are within chroot environment, type the following command:

    Code:
    LANG=



    2. Install Packages Essential for live CD:


    Code:
    apt-get update
    Code:
    apt-get install casper lupin-casper
    casper contains the live scripts.



    3. (Optional) If you want your live cd to have an installer, install the Ubuntu installer:

    Code:
    apt-get install ubiquity ubiquity-frontend-gtk
    Note: People using kde replace replace the previous command with

    Code:
    apt-get install ubiquity ubiquity-frontend-kde
    Credit for this goes note to Fragadelic author of remastersys. Remastersys.




    (Optional Step)Install any packages you want to be in the CD. Some of the following packages are useful in emergency situations:

    Code:
    sudo apt-get install gparted ms-sys testdisk wipe partimage xfsprogs reiserfsprogs jfsutils ntfs-3g ntfsprogs dosfstools mtools
    gparted: patitioning tool. It is automatically installed as a dependecy of ubiquity.
    testdisk: Partition scanner and disk recovery tool.
    wipe: Secure file deletion.
    partimage: backup partitions into a compressed image file (like norton ghost).
    xfsprogs reiserfsprogs jfsutils: Tools for handling different filesystems.
    mtools: Tools for manipulating MSDOS files






    4. Update the initramfs:



    First update modules.dep:

    Code:
    depmod -a $(uname -r)

    Code:
    update-initramfs -u -k $(uname -r)
    As already metioned above, the initramfs is reponsible for much of the preparation required at the boot time of the CD/DVD. The updated initramfs now contain the live scirpts installed with casper.









    5. Remove non system users

    Code:
    for i in `cat /etc/passwd | awk -F":" '{print $1}'`
    do
    	uid=`cat /etc/passwd | grep "^${i}:" | awk -F":" '{print $3}'`
    	[ "$uid" -gt "998" -a  "$uid" -ne "65534"  ] && userdel --force ${i} 2>/dev/null
    done
    Non-system users are users created by you that have user id more than 999.

    N.B: In case a user with uid 999 is present we remove as well because that uid is preserved for the live cd user.



    6. Clean the system

    First, clean apt cache

    Code:
    apt-get clean


    Clean all the extra log files

    Code:
    find /var/log -regex '.*?[0-9].*?' -exec rm -v {} \;


    The remaining log files are going to be zeroed lest the system complain if they are deleted.

    Code:
    find /var/log -type f | while read file
    do
    	cat /dev/null | tee $file
    done

    Code:
    rm /etc/resolv.conf /etc/hostname


    7. Exit chroot

    Code:
    exit




    D. Prepare The CD directory tree:

    1. Copy the kernel, the updated initrd and memtest prepared in the chroot:

    Code:
    export kversion=`cd ${WORK}/rootfs/boot && ls -1 vmlinuz-* | tail -1 | sed 's@vmlinuz-@@'`
    Code:
    sudo cp -vp ${WORK}/rootfs/boot/vmlinuz-${kversion} ${CD}/${FS_DIR}/vmlinuz
    Code:
    sudo cp -vp ${WORK}/rootfs/boot/initrd.img-${kversion} ${CD}/${FS_DIR}/initrd.img
    Code:
    sudo cp -vp ${WORK}/rootfs/boot/memtest86+.bin ${CD}/boot


    2. Generate manifest:

    Note: This step is only needed if you installed the Ubuntu installer ubiquity. This step generates two files (filesystem.manifest & filesystem.manifest-desktop).

    Code:
    sudo chroot ${WORK}/rootfs dpkg-query -W --showformat='${Package} ${Version}\n' | sudo tee ${CD}/${FS_DIR}/filesystem.manifest
    Code:
    sudo cp -v ${CD}/${FS_DIR}/filesystem.manifest{,-desktop}
    Code:
    REMOVE='ubiquity casper user-setup os-prober libdebian-installer4'
    Code:
    for i in $REMOVE 
    do
    	sudo sed -i "/${i}/d" ${CD}/${FS_DIR}/filesystem.manifest-desktop
    done
    
    These two files are used by the ubiquity installer when installing to harddisk. These two files are just lists of packages. Ubiquity compares these two files and removes packages unique to filesystem.manifest. This way when installing to harddisk, packages like casper which is only useful in a live CD/DVD are removed. These packages that will be removed at install are defined in the variable $REMOVE



    3. Unmount bind mounted dirs:

    Code:
    sudo umount ${WORK}/rootfs/proc
    Code:
    sudo umount ${WORK}/rootfs/sys
    Code:
    sudo umount ${WORK}/rootfs/dev


    4. Convert the directory tree into a squashfs:


    Code:
    sudo mksquashfs ${WORK}/rootfs ${CD}/${FS_DIR}/filesystem.${FORMAT} -noappend
    Note: Make sure the resulting file size can fit into your live media.






    5. Make filesystem.size


    Code:
    echo -n $(sudo du -s --block-size=1 ${WORK}/rootfs | tail -1 | awk '{print $1}') | sudo tee ${CD}/${FS_DIR}/filesystem.size



    6. Calculate MD5

    Code:
    find ${CD} -type f -print0 | xargs -0 md5sum | sed "s@${CD}@.@" | grep -v md5sum.txt | sudo tee -a ${CD}/md5sum.txt




    7. Make Grub the bootloader of the CD


    Make the grub.cfg

    Code:
    sudo gedit ${CD}/boot/grub/grub.cfg

    Copy the following text into it and save it.

    Code:
    set default="0"
    set timeout=10
    
    menuentry "Ubuntu GUI" {
    linux /casper/vmlinuz boot=casper quiet splash
    initrd /casper/initrd.img
    }
    
    
    menuentry "Ubuntu in safe mode" {
    linux /casper/vmlinuz boot=casper xforcevesa quiet splash
    initrd /casper/initrd.img
    }
    
    
    menuentry "Ubuntu CLI" {
    linux /casper/vmlinuz boot=casper textonly quiet splash
    initrd /casper/initrd.img
    }
    
    
    menuentry "Ubuntu GUI persistent mode" {
    linux /casper/vmlinuz boot=casper persistent quiet splash
    initrd /casper/initrd.img
    }
    
    
    menuentry "Ubuntu GUI from RAM" {
    linux /casper/vmlinuz boot=casper toram quiet splash
    initrd /casper/initrd.img
    }
    
    menuentry "Check Disk for Defects" {
    linux /casper/vmlinuz boot=casper integrity-check quiet splash
    initrd /casper/initrd.img
    }
    
    
    menuentry "Memory Test" {
    linux16 /boot/memtest86+.bin
    }
    
    
    menuentry "Boot from the first hard disk" {
    set root=(hd0)
    chainloader +1
    }




    E. Build the CD/DVD

    1. Make the ISO file

    Code:
    sudo grub-mkrescue -o ~/live-cd.iso ${CD}


    2. Test the CD

    Test using qemu emulator
    Code:
    qemu -cdrom ~/live-cd.iso -boot d
    Or use any other virtualization program you like.


    Update: As noted by az in this post, while testing the iso with qemu sometimes it drops you to an initramfs shell because of a problem with qemu. This behaviour has been confirmed by other users. In this case it is advisable to retest the iso with another virtualization software like virtualbox or to copy the iso to flash disk and test directly on your pc (See Appendix 2.).


    3. (Optional) Clean our workspace

    Code:
    [ -d "$WORK" ] && rm -r $WORK $CD







    Final Notes:



    • If you are using a custom kernel make sure it has support for the following:


      1. Support of loopback device.
      2. Support for squashfs.
      3. Support for aufs2.
      4. Support for initramfs.




    • There are some extra options I put in the grub menu:



      1. Start linux form RAM. This option is only possible if your ram is larger than data on the live media. This option can be useful if you are building a minimal command line rescue disc as it would enhance performance to start it from RAM.

      2. Start in presistent mode. To learn about it more look here.

      3. Start Linux in Text Mode. This will not start X. The user will be autologged into a virtual terminal (the kind of terminal you get when you press Alt+Ctrl+F1).








    Appendix 1. Building the live media form scratch using debootstrap.

    Instead of using your current installation to be the basis of you live CD, you can build a custom clean system from scratch using debootstrap, and then use that as the basis of your CD. The modifications you have to make are:


    • skip steps B & C alltogether. Instead, do the instructions listed here to build your custom system from scratch using debootstarp


    • after finishing the instructions of the guide mentioned above, you resume the steps in this guide, going straight to step D.





    Appendix 2. How to Make bootable USB flash



    Grub2 has many advantages. One of these is the ability to boot an ISO directly from HDD of a flash. This means that instead of burning the ISO to a CD/DVD you can just copy it to a USB flash disk and boot it from there.

    Another big advantage of Grub2 is that it supports UUIDs and LABELs which are better than device names because they are subject to change especially with flash disks.

    We need to know the UUID or the LABEL for the partition on which the ISO resides. We also need the device name of the usb flash (it will be used once to install grub to the flash drive). We can know that by issuing the following command which lists all the partition details:

    Code:
    sudo blkid

    Take note of the flash UUID (or LABEL) and the flash device name ( e.g /dev/sdc not /dev/sdc1)

    Now mount your flash drive:

    Code:
    sudo mount -t vfat /dev/by-uuid/<insert uuid here> /mnt
    Install grub to the flash disk:

    Code:
    sudo grub-install --no-floppy --force --root-directory=/mnt /dev/sdc
    replace the /dev/sdc with the device name of your flash. Note that we are using the device name of the flash itself not the partition in the flash (e.g. /dev/sdc not /dev/sdc1)


    copy the ISO to the flash drive:

    Code:
    cp -v ~/live-cd.iso /mnt

    Make the grub menu of the flash disk

    Code:
    sudo gedit /mnt/boot/grub/grub.cfg
    and add the following entry

    Code:
    set default="0"
    set timeout=10
    
    
    insmod ntfs
    search --no-floppy --fs-uuid <insert the UUID> --set=usb
    set iso_path=/live-cd.iso
    loopback loop (${usb})${iso_path}
    set root=(loop)
    set bootopts="boot=casper iso-scan/filename=${iso_path} noprompt"
    
    menuentry "Boot ISO from HDD/USB" {
    linux (loop)/casper/vmlinuz $bootopts
    initrd (loop)/casper/initrd.img
    }

    replace ntfs with the filesystem of your flash disk. e.g ntfs, fat, ......

    replace <insert the UUID> with the UUID of your flash disk.

    Note: If you want to use LABEL instead of UUID replace the first line in the entry with

    Code:
    search --no-floppy -l <insert the LABEL> --set=usb


    When you start you pc you have to select "boot from usb storage device" from your BIOS boot options.
    Last edited by nothingspecial; June 29th, 2012 at 09:31 AM.

  2. #2
    Join Date
    Jan 2008
    Location
    Republic of Korea
    Beans
    Hidden!
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: How to make a live CD/DVD from your harddisk installation

    정말 유용한 정보이군요.
    감사합니다.
    Happy New Year!
    (7. Feb is Korean Traditional New Year's day)

  3. #3
    Join Date
    Feb 2008
    Beans
    59

    Re: How to make a live CD/DVD from your harddisk installation

    Great post! Thanks. I was looking at switching back to Ubuntu and this seals it.
    The probability of someone watching you is directly proportionate to the stupidity of your actions.

  4. #4
    Join Date
    Nov 2006
    Location
    Cairo, Egypt
    Beans
    300

    Re: How to make a live CD/DVD from your harddisk installation

    Quote Originally Posted by RumorsOfWar View Post
    Great post! Thanks. I was looking at switching back to Ubuntu and this seals it.
    Can you confirm that it actually worked for you. What format did you go with? squashfs or ext2?

  5. #5
    Join Date
    Nov 2007
    Location
    República de Tejas,Centro
    Beans
    232
    Distro
    Ubuntu 10.04 Lucid Lynx

    Question Re: How to make a live CD/DVD from your harddisk installation

    Quote Originally Posted by capink View Post
    Can you confirm that it actually worked for you.
    I'm really after a duplicate install from one of my dedicated 'number crunchers'... down to the same single user and password would be fine. The only thing I really want different from machine to machine is the static IP address and hostname.

    I've read thru this entire thread and it certainly seems as close as I've found so far and seems so well written that even "I" might be able to do it.

    I have not looked into Remastersys yet, should I?

    Sure wish I'd found this 5 machines ago.

    Noob questions:

    1) Is there any reason that you can think of that this would not work for on a Xubuntu 64b v8.04 (Hardy) system?

    2) Since the Xubuntu machines don't have a CD burner on them can I create the .iso and save it on some samba shared storage and do the actual burn over on my WinXP box, then test it in a CD-ROM on the Xubuntu machine?

    3) Lastly, and of less importance... Are there any simple changes to make my repeatable install even more complete?
    a) user=me & pw=mine
    b) gkrellm theme (by copying in home?)
    c) desktop launchers (by copying in home?}
    d) sources.list (assume will have to overlay after the install)
    e) apt proxy settings (only need to have the file /etc/apt/apt.conf.d/01proxy included)
    f) X11vnc setup (gdm.conf-custom, /etc/gdm/Init/Default, remote PW is someplace in Home also)
    g) xorg.conf (they all use same display when it's attached and all use vesa driver, assume I'll have to copy over after install)

    Thanx in advance, Skip
    Last edited by Skip Da Shu; August 17th, 2008 at 09:32 PM.
    - da shu @ HeliOS,
    "A child's exposure to technology should never be predicated on an ability to afford it."

  6. #6
    Join Date
    Nov 2006
    Location
    Cairo, Egypt
    Beans
    300

    Re: How to make a live CD/DVD from your harddisk installation

    Quote Originally Posted by Skip Da Shu View Post
    I have not looked into Remastersys yet, should I?
    Remastersys can do what this guide is doing in an automated way (i.e make a distribution from your hard disk installation). So it can save you the hussle if you are not comfortable with the command line. Also the remastersys author is very friendly and is open for questions. You can find a link to remastersys site at the end of the opening post of this thread.

    The only thing that can be done using this method and not with remastersys, is creating a clean distro using the debootstrap method outlined in the guide.


    Quote Originally Posted by Skip Da Shu View Post
    1) Is there any reason that you can think of that this would not work for on a Xubuntu 64b v8.04 (Hardy) system?
    I have not tested it, but it should work. The only caveat here is that you will have to perform the instructions from a system with 64 bit kernel, otherwise you will not be able to chroot.

    Quote Originally Posted by Skip Da Shu View Post
    2) Since the Xubuntu machines don't have a CD burner on them can I create the .iso and save it on some samba shared storage and do the actual burn over on my WinXP box, then test it in a CD-ROM on the Xubuntu machine?
    Yes you can. But I do not have any experince in samba.
    You can also test the iso in a virtual machine like virtualbox or vmware before burning it.

    Quote Originally Posted by Skip Da Shu View Post
    a) user=me & pw=mine
    I am not sure what you mean?

    Quote Originally Posted by Skip Da Shu View Post
    b) gkrellm theme (by copying in home?)
    Yes. But instead of copying to home you will copy to /etc/skel. Refer to the the end of step B to see how to do it

    Quote Originally Posted by Skip Da Shu View Post
    c) desktop launchers (by copying in home?}
    Same as abobe. It is possible by creating a directory:

    Code:
    sudo mkdir ${WORK}/rootfs/etc/skel/Desktop

    and copying the launchers to this directory.



    Quote Originally Posted by Skip Da Shu View Post
    d) sources.list (assume will have to overlay after the install)

    Yes. You simply copy the sources.list file to:

    Code:
    ${WORK}/rootfs/etc/apt
    Quote Originally Posted by Skip Da Shu View Post
    e) apt proxy settings (only need to have the file /etc/apt/apt.conf.d/01proxy included)
    Same as above.

    Quote Originally Posted by Skip Da Shu View Post
    f) X11vnc setup (gdm.conf-custom, /etc/gdm/Init/Default, remote PW is someplace in Home also)
    I do not advise missing with gdm config files because it can prevent the cd from logging in.

    Quote Originally Posted by Skip Da Shu View Post
    g) xorg.conf (they all use same display when it's attached and all use vesa driver, assume I'll have to copy over after install)
    Yes.

  7. #7
    Join Date
    Jul 2008
    Beans
    2

    Re: How to make a live CD/DVD from your harddisk installation

    * How can the name of live-session-user be changed from 'ubuntu' to our own?
    * How can we use Ubuntu's own splashimage in grub for booting from cd?

  8. #8
    Join Date
    Feb 2008
    Beans
    59

    Re: How to make a live CD/DVD from your harddisk installation

    I'm using Gutsy 64 alternate install.
    I've added the apps I need, my system is up to 2.5 GB so I'll use ext2, DVD.
    I'm on step C, but when I "sudo LANG= chroot ${WORK}/rootfs /bin/bash", I get "sudo: LANG=: command not found" error.
    I'll keep trying, but if you know the problem, that would help
    ( to resume, do I need to reset the variables at the beginning of step A ?)
    Last edited by RumorsOfWar; February 16th, 2008 at 07:52 PM.
    The probability of someone watching you is directly proportionate to the stupidity of your actions.

  9. #9
    Join Date
    Nov 2006
    Location
    Cairo, Egypt
    Beans
    300

    Re: How to make a live CD/DVD from your harddisk installation

    Quote Originally Posted by RumorsOfWar View Post
    I'm using Gutsy 64 alternate install.
    I've added the apps I need, my system is up to 2.5 GB so I'll use ext2, DVD.
    I'm on step C, but when I "sudo LANG= chroot ${WORK}/rootfs /bin/bash", I get "sudo: LANG=: command not found" error.
    I'll keep trying, but if you know the problem, that would help
    ( to resume, do I need to reset the variables at the beginning of step A ?)
    replace the command with:

    Code:
    sudo chroot ${WORK}/rootfs /bin/bash
    Once in chroot type this command before proceeding:

    Code:
    LANG=

    You do not need to reset any of the variables as long as you are still working in the same terminal.

  10. #10
    Join Date
    Apr 2008
    Beans
    3

    Re: How to make a live CD/DVD from your harddisk installation

    I made a custom live cd of my gutsy 64 with remastersys and it's not workin'
    I get this error message about gdm :
    "Server Authorization directory (daemon/ServAuthDir) is set to /var/lib/gdm but this does not exist. Please correct GDM configuration and restart GDM"

    What do i did wrong ?? What can i do ??

Page 1 of 18 12311 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •