Results 1 to 10 of 12

Thread: Chroot with Internet

Hybrid View

  1. #1
    Join Date
    Apr 2005
    Beans
    1,356

    Chroot with Internet

    I'd like to chroot from Karmic into Lucid to upgrade it (I cannot boot into it). I can do it but I do not have teh Internet connection in teh chroot Lucid environment. How can I enable it? Thanks in advance.
    ASUS K53S Ubuntu 14.10 64-bit
    ASUS 1015PX Netbook Lubuntu 14.10
    Two Dell laptops with 14.04

  2. #2
    Join Date
    Aug 2009
    Location
    United States
    Beans
    4,459
    Distro
    Ubuntu Development Release

    Re: Chroot with Internet

    Quote Originally Posted by foxy123 View Post
    I'd like to chroot from Karmic into Lucid to upgrade it (I cannot boot into it). I can do it but I do not have teh Internet connection in teh chroot Lucid environment. How can I enable it? Thanks in advance.
    Get the sda1 or what ever yours is. Label your partition in gparted (lets say you labeled it lucid)
    Lets say your partitition for lucid is sda5.

    sudo mkdir /media/lucid ( Make directory for lucid in karmic One time thing)

    sudo mount /dev/sda5 /media/lucid (mount lucid)

    sudo cp /etc/resolv.conf /media/lucid/etc/resolv.conf (copy domain to lucid)

    sudo chroot /media/lucid (get into root of lucid)

    apt-get update && apt-get upgrade

    Ctrl/d (get out of root)

    sudo umount /media/lucid (that is no typo umount) allways unmount from command line
    Remember hence where you come and pass it down.
    Ubuntu Forums member #899097 and Ubuntu Member:
    http://www.ubuntupocketguide.com/index_main.html
    Main Page -

  3. #3
    Join Date
    Apr 2005
    Beans
    1,356

    Re: Chroot with Internet

    I'm not sure if Lucid uses resolving.conference. Otherwise I would'be bound it from Karmic. But let me try to copy it instead as you suggest and see this evening.
    ASUS K53S Ubuntu 14.10 64-bit
    ASUS 1015PX Netbook Lubuntu 14.10
    Two Dell laptops with 14.04

  4. #4
    Join Date
    Aug 2009
    Location
    United States
    Beans
    4,459
    Distro
    Ubuntu Development Release

    Re: Chroot with Internet

    Quote Originally Posted by foxy123 View Post
    I'm not sure if Lucid uses resolving.conference. Otherwise I would'be bound it from Karmic. But let me try to copy it instead as you suggest and see this evening.
    It uses resolv.conf I copy it all the time because I need what is generated by Network Manager to get my wireless to domain. Before I used sudo cp blah blah blah I use to copy and paste. Without sudo cp /etc/resolv.conf /media/lucid/etc/resolv.conf you are not getting any internet action but you can chroot into sudo chroot apt-get remove plymouth
    and sudo apt-get clean and then wait for next plymouth version to see if it works. Which I do everyday. Only real problem I have had in Lucid is plymouth, I lot better than 9.10 testing for me anyway.
    Remember hence where you come and pass it down.
    Ubuntu Forums member #899097 and Ubuntu Member:
    http://www.ubuntupocketguide.com/index_main.html
    Main Page -

  5. #5
    Join Date
    Jul 2007
    Location
    UK
    Beans
    16,860
    Distro
    Ubuntu Development Release

    Re: Chroot with Internet

    Quote Originally Posted by foxy123 View Post
    I'm not sure if Lucid uses resolving.conference. Otherwise I would'be bound it from Karmic. But let me try to copy it instead as you suggest and see this evening.
    Here's the script I use.

    Code:
    #!/bin/sh
    
    ##sudo mkdir /mnt/karmic
    sudo mount /dev/sdb1 /mnt/karmic/
    sudo mount -o bind /proc /mnt/karmic/proc
    sudo mount -o bind /dev /mnt/karmic/dev
    sudo mount -o bind /dev/pts /mnt/karmic/dev/pts
    sudo mount -o bind /sys /mnt/karmic/sys
    sudo cp /etc/resolv.conf /mnt/karmic/etc/resolve.conf
    sudo chroot /mnt/karmic /bin/bash
    
    fi

  6. #6
    Join Date
    Apr 2005
    Beans
    1,356

    Re: Chroot with Internet

    Quote Originally Posted by philinux View Post
    Here's the script I use.

    Code:
    #!/bin/sh
    
    ##sudo mkdir /mnt/karmic
    sudo mount /dev/sdb1 /mnt/karmic/
    sudo mount -o bind /proc /mnt/karmic/proc
    sudo mount -o bind /dev /mnt/karmic/dev
    sudo mount -o bind /dev/pts /mnt/karmic/dev/pts
    sudo mount -o bind /sys /mnt/karmic/sys
    sudo cp /etc/resolv.conf /mnt/karmic/etc/resolve.conf
    sudo chroot /mnt/karmic /bin/bash
    
    fi
    no, it does not seem to work. After all this I do:
    Code:
    :/# apt-get update
    Err http://gb.archive.ubuntu.com lucid Release.gpg
      Could not resolve ‘gb.archive.ubuntu.com’
    Err http://security.ubuntu.com lucid-security Release.gpg
      Could not resolve ‘security.ubuntu.com’
    ASUS K53S Ubuntu 14.10 64-bit
    ASUS 1015PX Netbook Lubuntu 14.10
    Two Dell laptops with 14.04

  7. #7
    Join Date
    Aug 2009
    Location
    United States
    Beans
    4,459
    Distro
    Ubuntu Development Release

    Re: Chroot with Internet

    You are not connected to internet:

    Did you give your lucid partition a label.
    If you named it lucid:
    Your mount point would be /media/lucid

    sudo mkdir /media/lucid (make a directory)

    All you want is to get internet access.

    sudo mount /dev/sda5 /media/lucid (telling sda5 with mount point /media/lucid to mount)
    Change sda5 and lucid to whatever yours are

    sudo cp /etc/resolv.conf /media/lucid/etc/resolv.conf (copy from working internet to lucid.

    sudo chroot /media/lucid

    apt-get update && apt-get upgrade.

    ctrl/d to get out of root

    sudo umount /media/lucid

    You can learn how to mount proc,dev,pts and sys later get yourself running first. Then practice with live CD til you get it all down. Once you label your mount point is always
    /media/(whatever you label) for any partition.
    Remember hence where you come and pass it down.
    Ubuntu Forums member #899097 and Ubuntu Member:
    http://www.ubuntupocketguide.com/index_main.html
    Main Page -

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
  •