Wednesday, July 19, 2017

Using a Manifest To Recreate Your Linux System Selectively

Last week, I had finally had enough of not being able to hibernate my computer.  There was enough "chaff' and weird things happening.

I did realize that I could create a list of everything I had, and then get Linux to import that list and reinstall all my programs.

That would be my Manifest.

I did it knowing that I could be reintroducing the problem that I created with the old system.

I was right.  So I did it over, selectively.

And it worked.  Hibernate and video crashes were problems, and after 17 consecutive hibernate cycles over two days of active use, I'd say I am done.

This was a whole lot simpler.  You see, this scary Manifest thing is nothing more than a text file that is generated within "Synaptic" that contains all the markings of the programs that I installed over the 7 years that I had that Linux install.

I went through that file and deleted everything that I did not expressly know what that particular program was, or anything I knew I did not want.

Easy except the file was in chronological order or ... well, lets just pretend it was and leave it at that.  Basically it can be sorted in alphabetical program order simply.

One line in Terminal, just like everything in Linux, would solve it.

Assuming the Manifest is called /home/bill/Desktop/Manifest.txt

In Terminal, issue this command string on one line:

cat /home/bill/Desktop/Manifest.txt | sort > /home/bill/Desktop/SortedManifest.txt

Now you're in alpha order, and it makes it easier.

I did delete anything that started "lib" as well as KDE, gnome, and mate since I strongly prefer XFCE to all of those.  My choice, no big deal

I simply edited the file in Mousepad, and deleted all things I did not want.

If you want the long form description of all of this, Last Week's Post is at this link.  However the short form is here:

1) on original install create a Manifest within Synaptic Package Manager.
    a) open synaptic
    b) Select File, Save Markings As
    c) navigate to the place you want to store this file, and give it a name.
    d) Tick the box "Save full state, not only changes"
    e) Click Save.

2) Verify that your manifest is on removeable media.

3)  Remove any unwanted programs from the Manifest

4) save your important files from the operating system on removable media
    /etc/samba/smb.conf,
    /etc/apt/sources.list,
    the Manifest file

5) Install a fresh copy of your Debian Based operating system on the destination computer.
    Debian, *Ubuntu, Linux Mint, whatever...

6) Get the destination computer "up to date" and stable.

7) compare and manually update your /etc/apt/sources.list file from the original computer
    copy the installed version to a save file
    I copied my own from the original computer in its place and updated
    then you will need to update the PGP keys for one or more added such as www.deb-multimedia.com

8) install the manifest by
    a) open synaptic
    b) Select File, Read Markings
    c) find and open the manifest.txt file
    d) click open
    e) verify needed markings have been imported into Synaptic, and click Apply.
    f) there will be additional libraries incorporated into your install list due to any new dependencies.

8) you're done.  Verify everything is OK.  Live with it for a while.

You will want to add in programs like libdvdcss to allow DVDs to play, Samba to share files, but these things will need to be done individually.

9) File Sharing.  I used the Debian Wiki entry at https://wiki.debian.org/SambaServerSimple
    a) apt install samba samba-client
    b) edit /etc/samba/smb.conf  - or put the one in from the old computer assuming you had it working.
    c) add your samba users:  smbpasswd -a USERNAME
        replace USERNAME with the correct name, and it will ask you for the password
    d) restart Samba:
    # /etc/init.d/samba restart
    or, if you are using systemd 
    # /usr/sbin/service smbd restart

No comments:

Post a Comment