Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: A bootable CD to get to an interactive command line?

  1. #1
    Join Date
    Mar 2008
    Location
    Sri lanka
    Beans
    764
    Distro
    Ubuntu 10.04 Lucid Lynx

    A bootable CD to get to an interactive command line?

    As I have posted here (http://ubuntuforums.org/showthread.php?t=1661110), my laptop powered down during an update because I forgot to plug it into the mains power. Anyway, after going through the thread I referred to above, I learned that I must chroot into the existing installation and patch it up. I can do this using a live CD but unfortunately, I gave my most recent live CDs away and the Live CDs I have left don't recognize the file system on the current Ubuntu installation. (If I remember correctly, the current [broken] installation is 10.04).
    Downloading a new live CD is a bit difficult as internet speeds over here aren't very fast. I was wondering if there is another alternative bootable CD that I could use to get a interactive command line which I can use to "chroot".
    Thanks

  2. #2
    Join Date
    Aug 2009
    Beans
    824

    Re: A bootable CD to get to an interactive command line?

    You might give tinycore linux a go. That's only 10MB but after you boot it you have to install bash.

    And because it runs out of memory you have to install it every time you reboot. I advice installing seamonkey as well so you can go to the Internet and look up stuff without rebooting. (just leave tinycore active)

    Then open up a terminal and post the output of the following command:

    Code:
    sudo fdisk -l
    Then we can check to see what to mount and where to chroot to, by the way chroot is change root. Not change root user but change root directory so after that command you'll be using the files from your Ubuntu install instead of tinycore.

    There might be some problem because tinycore uses different environment variables but we'll cross that bridge when we get there.

  3. #3
    Join Date
    Mar 2008
    Location
    Sri lanka
    Beans
    764
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: A bootable CD to get to an interactive command line?

    thanks for the quick reply. I'll post back in a few hours after I get familiar with Tiny core...

  4. #4
    Join Date
    Aug 2009
    Beans
    824

    Re: A bootable CD to get to an interactive command line?

    To find out for sure where your ubuntu is installed enter the following commands in a terminal (black computer screen icon)
    Code:
    sudo mount /dev/sda7 /mnt
    cat /etc/fstab
    After we found out for sure where your Ubuntu is installed we can do the following
    If you got tinycore working you can click on the desktop choose "system tools" -> "appbrowser" click connect then next to search type bash and press enter, click in the found items on bash.tcz and click go
    Repeat with seamonkey and install seamonkey (this might take a while)
    Now you can start up seamonkey (new icon will appear in the icon bar below) and go to this page.
    If anything goes wrong just post whatever was wrong here.
    Click on the black sceen icon (terminal) and type the following commands:
    Code:
    sudo bash
    sudo mount /mnt /dev/sda7
    cp /etc/resolv.conf /mnt/etc/
    mount --bind /dev/ /mnt/dev
    chroot /mnt
    mount -t proc none /proc
    mount -t sysfs none /sys
    mount -t devpts none /dev/pts
    export HOME=/root
    export LC_ALL=C
    dbus-uuidgen > /var/lib/dbus/machine-id
    dpkg-divert --local --rename --add /sbin/initctl
    ln -s /bin/true /sbin/initctl
    # (left out apt-get clean because it'll delete all the already downloaded packages and your internet is slow)
    apt-get update
    apt-get upgrade
    dpkg --configure -a
    exit
    umount /mnt/dev/pts
    umount /mnt/sys
    umount /mnt/proc
    umount /mnt/dev
    umount /mnt
    exit
    Last edited by amsterdamharu; January 19th, 2011 at 11:21 AM.

  5. #5
    Join Date
    Mar 2008
    Location
    Sri lanka
    Beans
    764
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: A bootable CD to get to an interactive command line?

    Quote Originally Posted by amsterdamharu View Post
    You might give tinycore linux a go. That's only 10MB but after you boot it you have to install bash.

    And because it runs out of memory you have to install it every time you reboot. I advice installing seamonkey as well so you can go to the Internet and look up stuff without rebooting. (just leave tinycore active)

    Then open up a terminal and post the output of the following command:

    Code:
    sudo fdisk -l
    Then we can check to see what to mount and where to chroot to, by the way chroot is change root. Not change root user but change root directory so after that command you'll be using the files from your Ubuntu install instead of tinycore.

    There might be some problem because tinycore uses different environment variables but we'll cross that bridge when we get there.
    I got TinyCore running.
    Code:
     sudo fdisk -l
    shows that linux is on /dev/sda6 and the swap is on /dev/sda7

    EDIT:
    Why do I have to install bash? (It's just another ternimal client right? Can't I use the terminal already in Tiny core? I have no problem installing it but I would like to know the reason for doing so. . Also, I would really appreciate it if you could explain what the commands in post #4 do..
    Last edited by mahela007; January 20th, 2011 at 01:51 PM.

  6. #6
    Join Date
    Aug 2009
    Beans
    824

    Re: A bootable CD to get to an interactive command line?

    It might work without bash, you can try to run the commands without installing anything really.

    If you found your system on sda6 then replace sda7 with sda6.

  7. #7
    Join Date
    Mar 2008
    Location
    Sri lanka
    Beans
    764
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: A bootable CD to get to an interactive command line?

    how is bash different from what's already on Tinycore?

  8. #8
    Join Date
    Mar 2008
    Location
    Sri lanka
    Beans
    764
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: A bootable CD to get to an interactive command line?

    duplicate
    Last edited by mahela007; January 20th, 2011 at 06:08 PM.

  9. #9
    Join Date
    Mar 2008
    Location
    Sri lanka
    Beans
    764
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: A bootable CD to get to an interactive command line?

    after command #3, I get a warning that a file is about to be overwritten. Should I select "yes"?

  10. #10
    Join Date
    Aug 2009
    Beans
    824

    Re: A bootable CD to get to an interactive command line?

    Yes, you can overwrite resolf.conf

Page 1 of 2 12 LastLast

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
  •