0

My laptop was ruined in the Zadar flash flood on Tuesday, but the internal drive survived intact. The OS was Ubuntu 14.04.

I managed after 8 hours of sweat to dual install Ubuntu 16.04 with Windows 10 on a new laptop, and migrated my Thunderbird and Mozilla files, all working now.

How do I now reinstall all my old programs on the new installation? Is it just a matter of copying over the directories above my home directory?

Thanks in advance!

More details: sudo parted -l gives the following with the old internal drive mounted in the USB port:

Model: ATA TOSHIBA MQ01ABD1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  525MB   524MB   primary   ntfs            boot
 2      525MB   108GB   107GB   primary   ntfs
 3      108GB   109GB   888MB   primary   ntfs            diag
 4      109GB   1000GB  891GB   extended
 5      109GB   992GB   883GB   logical   ext4
 6      992GB   1000GB  8474MB  logical   linux-swap(v1)


Model: JMicron  (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  992GB   992GB   primary   ext4            boot
 2      992GB   1000GB  8454MB  extended
 5      992GB   1000GB  8454MB  logical   linux-swap(v1)`

And the drive in question is the JMicron. In Nautilus the disk is listed as 992 GB Volume and when I open this disk, the name above the folder is 4619c393-d2d3-4999-a09a-98def8d8ba3e. In Gparted it is listed as /dev/sdb1 ext4 with /dev/sdb2 extended and /dev/sdb5 linux-swap.

2 Answers2

0

Under no circumstances should you think of "copying over the directories above my home directory". Some of the directories like proc and dev are very special mounts.

  • Connect the external drive say under mnt.
  • chroot /mnt
  • dpkg -l
  • Thanks @Kaveh! I'm not sure I understand your answer -- I've added some details in the OP. What on my drive system corresponds to /mnt in your answer? – sschultz Sep 14 '17 at 09:58
0

Here's how I accomplished the above, following @Kaveh's advice:

  1. sudo chroot /media/myname/4619c393-d2d3-4999-a09a-98def8d8ba3e.

  2. dpkg -l > /home/myname/Desktop/allpacks

This put a list of packages installed on my previous drive into the above file. Now I can decide which ones I want installed, leave them in the file, and use dpkg again to install the desired ones on my new system, as described in the link How to list all installed packages provided by @ByteCommander.