0

I have a broken Ubuntu 14.04 LTS system (i.e., it does not boot) in sda6 (in sda3, extended), so I am booting from the 14.04 LTS installation CD. sda6 is readable, and I can mount sda6, but I cannot boot. This additional info on the cause of problems may help.

I mean to install Ubuntu 16.04.1 LTS directly from iso, into a new partition sda1 (primary). I have placed the iso file in a directory in an ext4 partition sda4 (primary). I followed instructions in the accepted answer of Install Ubuntu from ISO image directly from hard disk of a system running Linux? . When I try to

sudo update-grub

I get

/usr/bin/grub-probe: error: failed to get canonical path of '/cow'.

All references to this problem (Failed to get canonical path of /cow , e.g.) indicate that one should identify the grub partition and perform a couple of steps. But I do not know if I have such partition, nor how to identify it. I have one other partition sda2.

I guess anything I do in / is volatile, and I can only have persistent stuff under mounted sda partitions.

Here is the output of fdisk -l /dev/sda

Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 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
Disk identifier: 0x7fa54200

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1       976564224  1078964223    51200000   83  Linux
/dev/sda2   *        2048     1955839      976896   83  Linux
/dev/sda3         1957886   976564223   487303169    5  Extended
Partition 3 does not start on physical sector boundary.
/dev/sda4      1078964224  1465147391   193091584   83  Linux
/dev/sda5         1957888    66406399    32224256   82  Linux swap / Solaris
/dev/sda6        66408448   976564223   455077888   83  Linux

Partition table entries are not in disk order

Gparted is shown below

enter image description here

  • Which error you get by execute $sudo update-grub with out adding the GRUB2 entry? – StellaMaris Nov 04 '16 at 01:15
  • @StellaMaris - You mean without editing /etc/grub.d/40_custom? I did not try that. – sancho.s ReinstateMonicaCellio Nov 04 '16 at 01:19
  • Yes, please try. It seems to me there could be something wrong else, which has nothing to do with your task or the link you are working out. – StellaMaris Nov 04 '16 at 01:21
  • @StellaMaris - I needed to do it with an iso from HD since BIOS changing to USB boot was password locked. I managed to boot from iso by typing what was needed in the grub editor at boot time. But installation failed anyway. – sancho.s ReinstateMonicaCellio Nov 05 '16 at 12:53
  • That was not what I mentioned. I said, that I'm interested in the behavior of grub-update without the previous changes that you made with respect to point 2 (Add the Grub2 entry) in the tutorial you linked. That tutorial requires a running Linux System. So I'm not sure what you are trying to tell me. I didn't ask you for booting from USB or edit a GRUB file during boot sequence. – StellaMaris Nov 07 '16 at 02:01
  • @StellaMaris - What I mean (as described in my own answer) is that, without trying your suggestion, and without knowing the answer to the question posted, I found a workaround. At this point, there is no way to test this, as my system has changed (for good!). Thanks. – sancho.s ReinstateMonicaCellio Nov 07 '16 at 18:11

1 Answers1

0

I needed to modify grub configuration to boot from an iso image from HD since BIOS changing to USB boot was password locked, so a linux live was not viable.

I managed to boot from iso by typing what was needed in the grub editor at boot time.

So, technically, I solved my problem without answering this question, and I still do not know the answer.

But installation failed anyway. I then got a password for the BIOS, change boot to USB, used a linux live and installed 16.04 with no problem.

Conclusion: the results of an installation attempt from iso on HD was different than from USB, even if they should be the same (failure vs. success).