Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to shift from ubuntu-desktop 10.10 to ubuntu netbook edition 10.10 on my netbook. Currently, the moment I ssh into ubuntu from my ad-hoc network, ubuntu freezes. It always requires a cold shutdown. So hoping that netbook edition may not have this issue. I have custom installed many applications on the desktop edition. So I want save the app list into a script and run the script on the new installation, so that all apps will be downloaded and installed. I need suggestions as to the best way to achieve this.

share|improve this question
    
Anybody that thinks of suggesting dpkg --get-selections: remember that there's a different set of packages installed by the system. You'd need to filter based on which applications were installed after the base system. –  Oli Nov 3 '10 at 17:04
1  
Freezes are most likely related to kernel/xorg/X drivers, is very unlikely that changing the windows manager will fix it. –  João Pinto Nov 3 '10 at 17:32
    
Moreover, unity in 10.10 is more "freezing" than anything else –  Extender Nov 3 '10 at 18:12
1  
Also check out apt on cd if you don't want to have to download again. –  Jeremy Nov 4 '10 at 4:17
add comment

5 Answers 5

up vote 8 down vote accepted

Run this monster on your existing install, replace 12.04 your Ubuntu version and i386 with the architecture (i386 or amd64):

release_num='12.04'
arch='i386'

comm -23 \
    <(sort <(aptitude search '~i!~E' --disable-columns | grep -v "i A " | cut -d " " -f 3)) \
    <(sort <(wget -q -O- http://releases.ubuntu.com/maverick/ubuntu-${release_num}-desktop-${arch}.manifest | grep -E -o '^[^ ]+')) \
| sed 's/$/ install/g' > packages

It will generate a file called packages. Copy this to somewhere in your new install and then run:

sudo apt-get update
sudo bash -c "cat packages | xargs apt-get -y install"

Note: This compares the packages used on the LiveCD with the current ones. At the moment there are a few packages (gparted, btrfs-tools, etc) that are on the CD that aren't installed. If you installed gparted manually, you'll need to reinstall it on the new machine manually too. Thankfully this only applies to a few packages, all of which are simple to install if/when you realise you need it.

Also if you use any PPAs or other repositories, make sure you set them up on the new machine before you run this.

share|improve this answer
    
Just use the .manifest-desktop instead. Eg. gparted and btrfs-tools aren't part of the default installation (they are just on the CD). If you've manually installed those packages, they wouldn't show up in 'packages'. –  htorque Nov 4 '10 at 10:21
    
You might wanna pipe the two parts through sort, as 'comm' complained that both files weren't sorted. IIUC this should have the same 'problem' with packages from the default installation, that were manually marked as 'manually installed' (I guess that would be the 3rd column of 'comm'?). –  htorque Nov 4 '10 at 10:48
    
Where does .manifest-desktop live? I'm about to edit to add sorting. They looked sorted so I didn't think I had to do it but seemingly not. Good catch. In fairness to me, I typed this post from bed on my phone using a nasty little 15mm*100mm keyboard. ;) –  Oli Nov 4 '10 at 10:58
    
That's the downside - it doesn't seem to be available online like that .manifest file. :-/ On the CD it's in the 'casper' folder. –  htorque Nov 4 '10 at 11:06
    
I've had a hunt around and can't find a recent version. I think using an old version is just as damaging and downloading the ISO just to extract it is a waste of energy. I think that just has to be a caveat of this process. You might have to manually install a few packages that you had before but this will do most of them. –  Oli Nov 4 '10 at 11:19
show 1 more comment

I suggest using oneconf Install oneconf

It integrates with Software Center rather nicely, and does what you want.

share|improve this answer
    
Is oneconf ready for use by regular users? –  Decio Lira Nov 21 '10 at 19:06
    
Regular users can probably use it, but will not love it yet; it needs a lot of love before that is the case. Nevertheless it is useful. –  Chipaca Nov 21 '10 at 20:22
add comment

I think others have answered the technical piece of your question, I'd like to answer the implied question - "will moving to Unity fix this ssh problem", and the answer is I'm afraid I doubt it. Remote shell sessions are generally not exercising Unity or the desktop. If you can ssh fine into your desktop from a wired network, but not from an ad-hoc network, the freezing is probably related to your wireless drivers and not the desktop shell.

share|improve this answer
    
I second this - since the netbook edition and the desktop edition use almost all of the same drivers/packages, it's unlikely that reinstalling will solve anything. Better to diagnose network issues instead. –  ImaginaryRobots Nov 4 '10 at 19:33
    
Mark, Yes, it looks like it is a driver problem. But in rare cases it has happened while on wired network too. I should try turn off both the card and try. –  nixnotwin Nov 6 '10 at 1:43
add comment

There's a file called 'filesystem.manifest-desktop' in the folder 'casper' on the CD (or extract it from the ISO file). It contains all the packages that get installed, minus the ones downloaded during the installation (updates, langpacks?).

So something like this should give you the list of added and removed packages:

dpkg --get-selections | awk '{print $1}' > now.txt
awk '{print $1}' filesystem.manifest-desktop > then.txt
diff -u then.txt now.txt | grep '^+' | sed 's/^+//' | grep -v '^+' > add.txt
diff -u then.txt now.txt | grep '^-' | sed 's/^-//' | grep -v '^-' > rem.txt

You can then install via:

cat added.log | xargs sudo apt-get install

(You need to make sure that all those packages are available, else that command will fail.)

share|improve this answer
1  
Will this make current automatically installed packagesbe manually installed on the new system? –  Oli Nov 4 '10 at 1:27
    
It looks like my 'add.txt' contains the same packages as your 'packages', so I guess no. However, what this fails to do, is to set packages from the installation to 'manually installed', if you did so on the current system. –  htorque Nov 4 '10 at 10:50
2  
I have stolen your reinstallation method but you should note that xargs can break things into multiple commands if there are lots of arguments. Given how much time there could be between downloading the first batch and second, sudo would probably expire. That's why I wrapped mine in a sudo bash -c "...". –  Oli Nov 4 '10 at 13:38
    
Heh, actually I thought your install mode was better because dselect would explicitly show packages that cannot be installed (unknown PPAs, 3rd party .debs), so you could unmark them. With apt it's all or nothing. –  htorque Nov 4 '10 at 14:27
add comment

You could just install the netbook desktop interface - here are some simple instructions http://go.sparkfire.net/2010/05/try-out-ubuntu-unity-with-quick-install/ (I've done it, I still prefer the desktop interface)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.