Results 1 to 6 of 6

Thread: Restore software packages from a broken Ubuntu installation using a live cd

  1. #1
    Join Date
    Jul 2009
    Beans
    60
    Distro
    Ubuntu 12.04 Precise Pangolin

    Restore software packages from a broken Ubuntu installation using a live cd

    I installed Karmic on a friend's laptop and also installed all the needed programs. Something went wrong and I can't boot this installation anymore and I'll try to reinstall.

    Is there a way to get the installed packages from the old installation using a live cd?
    Or, at least, is there a way to get a list of the Synaptic markings so that I can do 'read markings' when I reinstall ?

    Thanks for reading.
    Thanks twice if you have any ideas!

  2. #2
    Join Date
    Aug 2008
    Location
    WA
    Beans
    2,186
    Distro
    Ubuntu

    Re: Restore software packages from a broken Ubuntu installation using a live cd

    I would use the liveCD to boot to the partition to see I could fix the existing install first.

  3. #3
    Join Date
    Jul 2009
    Beans
    60
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Restore software packages from a broken Ubuntu installation using a live cd

    There are many problems with the existing installation. I would probably have to reinstall the kernel AND Grub2. I tried to do that too booting a live cd and chroot-ing to the old installation but I didn't make it.

    If anyone could give me detailed directions to reinstall the kernel and grub, maybe I would give it one more try.

    Thanks a lot

  4. #4
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

    Re: Restore software packages from a broken Ubuntu installation using a live cd

    assuming that /dev/sda1 is the root partition:
    Code:
    sudo mkdir /mnt/ubuntu
    sudo mount /dev/sda1 /mnt/ubuntu
    sudo mount --bind /dev/ /mnt/ubuntu/dev
    sudo mount --bind /dev/pts /mnt/ubuntu/dev/pts
    sudo mount -t proc none /mnt/ubuntu/proc
    sudo mount -t sysfs none /mnt/ubuntu/sys
    sudo mount -o bind /etc/resolv.conf /mnt/ubuntu/etc/resolv.conf
    EDIT3:
    Code:
    xhost +
    Code:
    sudo chroot /mnt/ubuntu
    run:
    Code:
    synaptic
    go to File -> Save Marking As..., select the Save full state, not only changes check box and save the markings in the root ("/") of the filesystem.

    EDIT1: you can try to reinstall the kernel via synaptic.

    EDIT2: to reinstall grub:
    Code:
    update-grub
    grub-install /dev/sda
    sudo grub-install --recheck /dev/sda
    replace sda with the actual device name.

    for more details see: https://help.ubuntu.com/community/Gr...ng from LiveCD

    exit from the chroot:
    Code:
    exit
    backup the file:
    Code:
    sudo cp /mnt/ubuntu/filename /media/partition
    Last edited by sisco311; December 29th, 2009 at 06:58 PM.

  5. #5
    Join Date
    Jul 2009
    Beans
    60
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Restore software packages from a broken Ubuntu installation using a live cd

    That's one of the most helpful answers I've ever got. Not only I saved the synaptic markings this way but I really managed to make the old installation bootable again.

    I didn't know which directories I should mount where so that I could make synaptic graphically accessible from chroot....

    If anyone has any relative documentation or manuals, I would be grateful. I'm willing to really learn how linux works so that I can help others too.

    Thanks a lot sisco311. You're great!

  6. #6
    Join Date
    May 2007
    Beans
    6

    Re: Restore software packages from a broken Ubuntu installation using a live cd

    Very Impressive work you have there but it did not work for me..
    I am stuck at the Synaptic stage.
    I run
    [code] synaptic
    go to File -> Save Marking As..., select the Save full state, not only changes check box and save the markings in the root ("/") of the filesystem.

    When i save i get an error message "Can't Write /"

    Please any help would be appreciated

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
  •