I have installed W7 as a second OS with dual boot on my notebook which was already running Ubuntu 14.10.
W7 was installed on the HDD. For Ubuntu the /home and /usr/share are installed on the HDD and the rest is installed on the the additional SSD. After the installation of W7 the grub boot menu was deleted so I tried to reinstall it with a live CD.

I run boot-repair and selected Recommended repair which then gave me a prompt saying:

 apt-error detected. Please open a terminal then type (or copy-paste) the following command:
 sudo chroot "/mnt/boot-sav/sdb2" apt-get -f install

But when I run this command I get:

  debconf: Perl may be unconfigured (Can't locate strict.pm in @INC (you may need to install the strict module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.1 /usr/local/share/perl/5.20.1 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at (eval 1) line 2.
  BEGIN failed--compilation aborted at (eval 1) line 2.
 ) -- aborting
 E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory)
 Setting up install-info (5.2.0.dfsg.1-4) ...
 Not a directory: /usr/share/info.
 dpkg: error processing package install-info (--configure):
 subprocess installed post-installation script returned error exit status 1
 Errors were encountered while processing:
 install-info
 E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried to run sudo apt-get install -f and sudo apt-get autoremove but didn't help...

Here some additional infos of the disk/partitions:

ubuntu@ubuntu:~$ sudo parted -l
Model: ATA WDC WD10JPVX-08J (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  106MB   105MB  primary  ntfs         boot
 2      106MB   253GB   253GB  primary  ntfs
 3      253GB   777GB   525GB  primary  ext4
 4      777GB   1000GB  223GB  primary  ext4


 Model: ATA LITEONIT LSS-16L (scsi)
 Disk /dev/sdb: 16.0GB
 Sector size (logical/physical): 512B/512B
 Partition Table: msdos
 Disk Flags: 

 Number  Start   End     Size    Type     File system  Flags
  2      1049kB  16.0GB  16.0GB  primary  ext4         boot


 Model: MATSHITA DVD-RAM UJ8C2 (scsi)
 Disk /dev/sr0: 4700MB
 Sector size (logical/physical): 2048B/2048B
 Partition Table: mac
 Disk Flags: 

 Number  Start   End     Size    File system  Name   Flags
  1      2048B   6143B   4096B                Apple
  2      1152MB  1155MB  2327kB               EFI

And

 Disk /dev/loop0: 1 GiB, 1115594752 bytes, 2178896 sectors
 Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
 Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 4096 bytes
 I/O size (minimum/optimal): 4096 bytes / 4096 bytes
 Disklabel type: dos
 Disk identifier: 0x00098003

 Device     Boot      Start        End    Sectors   Size Id Type
 /dev/sda1  *          2048     206847     204800   100M  7 HPFS/NTFS/exFAT
 /dev/sda2           206848  493502463  493295616 235.2G  7 HPFS/NTFS/exFAT
 /dev/sda3        493502464 1518438399 1024935936 488.7G 83 Linux
 /dev/sda4       1518438400 1953523711  435085312 207.5G 83 Linux

 Disk /dev/sdb: 14.9 GiB, 16013942784 bytes, 31277232 sectors
 Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disklabel type: dos
 Disk identifier: 0x38b890f8

 Device     Boot Start      End  Sectors  Size Id Type
 /dev/sdb2  *     2048 31277055 31275008 14.9G 83 Linux

and

 ubuntu@ubuntu:~$ sudo blkid
 /dev/sda1: LABEL="System Reserved" UUID="F878F91778F8D57A" TYPE="ntfs"    PARTUUID="00098003-01" 
 /dev/sda2: UUID="8AB0009CB00090BD" TYPE="ntfs" PARTUUID="00098003-02" 
 /dev/sda3: UUID="5eede873-4ba1-4979-8cd3-91954305dd24" TYPE="ext4" PARTUUID="00098003-03" 
 /dev/sda4: UUID="22edd7a2-9794-4192-be60-8d595047f72d" TYPE="ext4" PARTUUID="00098003-04" 
 /dev/sdb2: UUID="0cd95271-f784-4e78-94aa-ebd8d80a3e52" TYPE="ext4" PARTUUID="38b890f8-02" 
 /dev/sr0: UUID="2014-10-22-19-43-11-00" LABEL="Ubuntu 14.10 amd64" TYPE="iso9660" PTUUID="4a022e4f" PTTYPE="dos" 
 /dev/loop0: TYPE="squashfs" 
share|improve this question
    
The issue may be that you have /usr/share as a separate partition. Boot repair will work with /boot as a separate partition but not any others, you need to do a full chroot and be sure to mount all partitions. Most instructions for chroot do not include that, but procedure is the same for every partition. – oldfred Jan 12 '15 at 17:09
    
Ok, so I just do a full chroot for all partitions and then run boot-repair again? – wasp256 Jan 12 '15 at 17:18
    
Have you tried "sudo apt-get install --reinstall perl-base"? The first error message suggests that the perl package may be missing components. and if your package manager starts barfing errors, then you may have to resort to dirty tricks to get it working again. – Ohnana Jan 12 '15 at 19:45
    
I tried the command but no difference... – wasp256 Jan 12 '15 at 20:15
    
No you have to chroot into your system and run whatever fixes need to be done from there. Not sure of details of Boot-Repair, can you mount your extra partition while in it so then its fixes may work? Not sure why with an SSD you want to have the usr/share separate anyway. – oldfred Jan 12 '15 at 22:19

Ok I finally found a solution: Since the /home, /usr/share and the rest are on different partitions I needed to mount everything correctly:

sudo mount /dev/sdb2 /mnt
sudo mount /dev/sda4 /mnt/usr/share
sudo mount /dev/sda3 /mnt/home
for i in /dev /dev/pts /proc /sys /run ; do sudo mount -B $i /mnt$i ; done
sudo mount -o bind /etc/resolv.conf /mnt/etc/resolv.conf 
sudo chroot /mnt /bin/bash
[Optional -> was needed in my case] sudo apt-get install grub-pc
grub-install /dev/sda
sudo update-grub

And everything worked again!

share|improve this answer

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.