Page 17 of 34 FirstFirst ... 7151617181927 ... LastLast
Results 161 to 170 of 337

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

  1. #161
    Join Date
    Jul 2008
    Location
    /home/nicholas
    Beans
    207
    Distro
    Ubuntu 9.10 Karmic Koala

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

    I got an errors at the end of following your guide.
    Last edited by niccholaspage; November 10th, 2008 at 10:42 PM.
    Never mind.Kept screwing up XFCE.XD
    http://www.crashie.com will crash an IE install.

  2. #162
    Join Date
    Dec 2007
    Beans
    560

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

    Quote Originally Posted by capink View Post
    They are required for both the host and the target (only in gutsy and hardy). They are required in the host to be able to create a squahsfs image. And they are required in the target to be able to mount the squashfs and the unionfs.




    linux-headers-(uname -r) is not really required. You can put it if you want it as part of your system though.



    Intersting idea. I thought about making a script for the whole procedure, but I decided against it because I thought chrooting and installing packages would be better done interactively to react to any problems that might arise. Also there is a script that does a similar thing to this guide called remastersys. You can check the link for the script in the first post in this thread.
    Thanks for the clarification

    With the scripts I tried to emphasize how easy it is to edit the system once after the first iso is made.

  3. #163
    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 niccholaspage View Post
    I got an errors at the end of following your guide.
    Can you post the error messages and clarify which steps triggerd them.

  4. #164
    Join Date
    Jul 2008
    Location
    /home/nicholas
    Beans
    207
    Distro
    Ubuntu 9.10 Karmic Koala

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

    I will after school.
    Never mind.Kept screwing up XFCE.XD
    http://www.crashie.com will crash an IE install.

  5. #165
    Join Date
    Nov 2006
    Location
    Homeless.
    Beans
    86

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

    Minor problem.. I must admit i'm in a bit unfamiliar territory with chroot & debootstrap.

    Anyway - I created a working live CD using the debootstrap method. I added another user, while still in chroot. When I boot the cd i would like it to ask me for a login prompt and not log in directly as 'ubuntu'

    Anyone know how to fix this? This is a text-only boot, there is no GUI..

    The reason I would like to do this is because I would like certain files to be available upon login.. for example my ssh keys which i put in the home directory of the new user i created.

    What I'm trying to accomplish is a bootable disc that that I can insert into my media center pc and execute dd over a ssh connection to the server, to clone the drive for backup purposes. But I only allow ssh sessions with key.. So i need the keys available on the live cd..

    Long story short - i just need to know how to make it go to a login prompt on boot up and not auto login as 'ubuntu'.

    Thanks,
    -spit
    Last edited by Spitphire; November 15th, 2008 at 02:50 PM.

  6. #166
    Join Date
    Dec 2007
    Beans
    560

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

    Quote Originally Posted by Spitphire View Post
    Minor problem.. I must admit i'm in a bit unfamiliar territory with chroot & debootstrap.

    Anyway - I created a working live CD using the debootstrap method. I added another user, while still in chroot. When I boot the cd i would like it to ask me for a login prompt and not log in directly as 'ubuntu'

    Anyone know how to fix this? This is a text-only boot, there is no GUI..

    The reason I would like to do this is because I would like certain files to be available upon login.. for example my ssh keys which i put in the home directory of the new user i created.

    What I'm trying to accomplish is a bootable disc that that I can insert into my media center pc and execute dd over a ssh connection to the server, to clone the drive for backup purposes. But I only allow ssh sessions with key.. So i need the keys available on the live cd..

    Long story short - i just need to know how to make it go to a login prompt on boot up and not auto login as 'ubuntu'.

    Thanks,
    -spit
    It would be easier to do the following (in my opinion)

    first you'd have to change the user name to your user name on the livecd

    set the variables you set before

    Code:
    export WORK=~/work
    export CD=~/cd
    export FORMAT=squashfs
    export FS_DIR=casper
    
    sudo mount -t proc proc ${WORK}/rootfs/proc
    sudo mount -t sysfs sysfs ${WORK}/rootfs/sys
    sudo mount --bind /dev ${WORK}/rootfs/dev
    sudo chroot ${WORK}/rootfs /bin/bash
    
    nano /etc/casper.conf
    change the USERNAME= to fit the username you want to ssh with in nano

    then within chroot run these commands

    Code:
    export kversion=`cd /boot && ls vmlinuz-* | sed 's@vmlinuz-@@'`
    depmod -a ${kversion}
    update-initramfs -u -k ${kversion}
    then exit out of chroot

    set your variables you set before

    Code:
    export WORK=~/work
    export CD=~/cd
    export FORMAT=squashfs
    export FS_DIR=casper
    
    sudo rm ${CD}/boot/initrd.gz
    find ${WORK}/rootfs/boot -iname 'initrd.img*' -exec sudo cp -vp {} ${CD}/boot/initrd.gz \;
    this should work


    then copy your ssh key into ${WORK}/rootfs/etc/skel

    then remove the old user you created

    I think using userdel

    then of course make a new iso

    what you should get with this, is a autologin with your username, from what I read this should be what you want
    Last edited by chris4585; November 15th, 2008 at 08:44 PM.

  7. #167
    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 Spitphire View Post

    Long story short - i just need to know how to make it go to a login prompt on boot up and not auto login as 'ubuntu'.

    Thanks,
    -spit
    For this to be done you will have to use live-initramfs instead of casper. After this it is just a matter of adding to following option to your grub boot entry.

    Code:
    noautologin

    Note: Another solution is to stick to casper and use ALT + F(2) to switch to another getty and log in as whatever user you wish.

    Beware though that if you opt to use live-initramfs, you will not be able to install ubiquity (The Ubuntu installer) as it depends on casper. Also, you need to do some modifications to the guide. They are as follows:

    1. In step A.1 replace:

    Code:
    export FS_DIR=casper
    with:

    Code:
    export FS_DIR=live

    2. Replace the command in Step C.2 with:

    Code:
    apt-get install live-initramfs unionfs-modules-$(uname -r) discover1 xresprobe
    Note that in order to install live-initramfs you have to enable the universe repository in your chroot ennviroment. Here are guides to enable universe ,CLI).

    3. Skip step C.3 and D.2 as you will not be using ubiquity.

    4. In Step D.5 Replace every occurence of BOOT=casper and boot=casper in menu.lst with BOOT=live and boot=live respectively.

    5. To disable automatic login in a text only system, add the following line to your main boot entry in menu.lst (In step D.5):

    Code:
    noautologin
    Last edited by capink; November 15th, 2008 at 11:03 PM.

  8. #168
    Join Date
    Nov 2006
    Location
    Homeless.
    Beans
    86

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

    Code:
     This file should go in /etc/casper.conf
    # Supported variables are:
    # USERNAME, USERFULLNAME, HOST, BUILD_SYSTEM
    
    export USERNAME="am"
    export USERFULLNAME="am"
    export HOST="lp"
    export BUILD_SYSTEM="Ubuntu"
    I decided to put the files I need in /etc/skel . Great idea btw, don't know why I didn't think about doing that. Thank you!

    I changed /etc/casper.conf (as seen above)

    When I boot the live CD though it still logs me in as ubuntu@ubuntu.

    Am I missing something?

  9. #169
    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 Spitphire View Post
    Code:
     This file should go in /etc/casper.conf
    # Supported variables are:
    # USERNAME, USERFULLNAME, HOST, BUILD_SYSTEM
    
    export USERNAME="am"
    export USERFULLNAME="am"
    export HOST="lp"
    export BUILD_SYSTEM="Ubuntu"
    I decided to put the files I need in /etc/skel . Great idea btw, don't know why I didn't think about doing that. Thank you!

    I changed /etc/casper.conf (as seen above)

    When I boot the live CD though it still logs me in as ubuntu@ubuntu.

    Am I missing something?
    If I remember correctly, chris4585 had a the same problem. Changing the username in casper.conf does not have the intended effect. Maybe it is a bug in casper. Maybe if you try to create the user with an id less than 999 the settings in casper.conf will be honoured.

  10. #170
    Join Date
    Nov 2006
    Location
    Homeless.
    Beans
    86

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

    Quote Originally Posted by capink View Post
    If I remember correctly, chris4585 had a the same problem. Changing the username in casper.conf does not have the intended effect. Maybe it is a bug in casper. Maybe if you try to create the user with an id less than 999 the settings in casper.conf will be honoured.

    Ok, I didn't add the user 'am', i put the files i wanted access to in /etc/skel . for casper.conf to work correctly does the user need to be added to the system? or does is it suppose to add the user specified in casper.conf to the system upon boot up?

    If casper creates the user, to achieve the desired results of a id less than 999 do you think changing /etc/adduser.conf to reflect so that the first user added would have an id less than 999?

    I could change the following in /etc/adduser.conf:

    Code:
    FIRST_SYSTEM_GID=100
    LAST_SYSTEM_GID=997
    
    FIRST_GID=998
    LAST_GID=29999
    I haven't tried it yet, I'm just not exactly sure how casper creates the user ubuntu..

Page 17 of 34 FirstFirst ... 7151617181927 ... 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
  •