0

After installing ubuntu 20.04 on a new differnt drive from my Windows 10, I restored my linux / from previous install as explained here. Before restoring I was able to go from Linux to Windows by pressing F12 before OS boot up.

Beginning of my problem: I didn't reinstall GRUB after restore, and restarted. Grub seen at startup had previous PC's details. Several errors came, and I turned to boot-repair - whose details are here.

After using boot-repair's recommended fix, my Dell laptop froze on ubuntu screen.

My question is.. how to get ubuntu running without a clean new install. A clean install is possible only after removing Windows m2 ssd which is enabled with Intel RST. That's how I installed Ubuntu in the first place.

Windows shouldn't be affected.

Here are some outputs taken from the live USB

Output of lsblk

sda      8:0    0 447.1G  0 disk 
├─sda1   8:1    0   512M  0 part 
└─sda2   8:2    0 446.6G  0 part 
sdb      8:16   1   7.5G  0 disk 
└─sdb1   8:17   1   7.5G  0 part /cdrom

output of blkid|grep "dev/sd"

/dev/sda1: UUID="F00D-05A3" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="107a1476-213a-41d6-bd31-920a7abdf993"
/dev/sda2: UUID="7733f1fe-fde6-4142-8f42-c26187052366" TYPE="ext4" PARTUUID="91f222f3-f67f-4ded-98f4-adad420c42cd"
/dev/sdb1: LABEL="UBUNTU 20_0" UUID="A4FD-88A2" TYPE="vfat" PARTUUID="03d3e14d-01"

Note that Windows is not seen by Ubuntu which I suspect to be the source of freezing. Boot-repair generated a grub config file with hd0,gpt2 as sda2 (current linux root) while grub rescue shows hd1,gpt2 to be the real root. But I am not sure.

Please give advice.

  • Does this mean that you have only Ubuntu installed on your laptop? AND do you have your data saved somewhere else? – Serafim Jul 04 '20 at 21:06
  • There are two separate disks, one with ubuntu and another with windows 10. And yes, my data is saved right now in ubuntu ssd which I can access using live usb. Ubuntu cannot see windows... and perhaps that's why boot repair is giving wrong label to sda2 – physicophilic Jul 04 '20 at 21:14
  • and the SSD is the one called sda in your edit above? To start Windows, do you change the SSD for another disk? – Serafim Jul 04 '20 at 21:20
  • Yes. Sda2 has backup. But most important stuff is on dropbox. I change the boot loader from bios settings right now to go to windows before grub loads, for windows is not on grub's boot menu. – physicophilic Jul 04 '20 at 21:26
  • I seem to misunderstand the situation. 1) Is your data on the SSD AND on dropbox? I am puzzled because the windows disk can not be seen. 2) Do you have one SSD (sda) with Ubuntu on and a HDD with windows on in the laptop? 3) If you start with the Live USB and mount the sda2 with sudo mount -t ext4 /dev/sda2 /mnt then what does ls /mnt show? Many questions because I don't understand so I numbered them. – Serafim Jul 04 '20 at 21:42
  • Sorry for confusing! 1 Dropbox has most important. Ubuntu SSD has all. Which means if needed, I can sacrifice the one on SSD. 2. Both are SSDs, windows came with the PC and I added ubuntu later. 3. It will show folders like sys home var etc (sda2 is root directory with ext4 filetype). I really appreciate your help. Please also see my comments on the your answer – physicophilic Jul 04 '20 at 21:57
  • IF you enter BIOS and turn secure boot off, then try to boot. What happens? I must sleep now, continue tomorrow. – Serafim Jul 04 '20 at 22:06

1 Answers1

1

I can't guarantee that it works for every error of this kind but you ought to be able to use your Ubuntu USB if it is a Live Ubuntu USB. In that case:

  1. Boot from your Live USB stick and select “Try Ubuntu”.
  2. Open a terminal and enter the following commands:
  3. sudo add-apt-repository -y ppa:yannubuntu/boot-repair
  4. sudo apt-get update
  5. sudo apt install -y boot-repair && boot-repair
  6. Once boot-repair has started, select "Recommended repair"

Another option is to:

  1. Boot from a Live USB stick.
  2. Select “Install Ubuntu”.
  3. Optionally, select to download updates and third-party software while installing. Click ‘Continue’.
  4. The next step is important. Select "Reinstall Ubuntu" (probably followed by a version number). Click "Continue" or "Install Now" (I don't remember which).

Your system will be reinstalled without erasing any of your files.

EDIT: As the above recipes didn't work and after your recent edits to your post I can see that there are two problems, secure boot and Intel RST ("FAKE") Raid. There are a number of articles on the subject and all of them indicate that it is not a simple problem. Only two Linux distributions have support for RST and both are commercial, RHEL (Red Hat Enterprise Linux) and SLES (SUSE Linux Enterprise Server). There is an interesting article: Intel® Rapid Storage Technology (Intel® RST) in Linux* and several interesting Ubuntu-oriented questions and answers on several forums (Google "Ubuntu intel RST"), showing that this is far from simple. I tried several different approaches on an ASUS laptop and failed every time but two.

Note that RST is not essential and that it is normally only for RAID. There is no point in using it in a single HDD or SSD setup or if you have one SSD for Windows and another for Linux and even if you have a RAID setup there is no or very little gain in using it so I would opt for turning it off.

The two approaches that didn't fail:

  1. Install Ubuntu with RST disabled in BIOS. In my case that meant that I had to go into BIOS on every boot and enable RST if I wanted to start on Windows and disable it if I wanted to start on Ubuntu and then override the start order. Cumbersome and after what I have understood from search on the internet, not working the same way on all computers.

  2. a. Backup all files and find the Windows key using e.g. ProduKey from NirSoft or open powershell and use the command (Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey Note carefully the key if you would have to use it later.

    b. Create a Windows Installation USB stick

    c. Then turn off RST in BIOS (enable AHCI) and optionally also turn off Secure Boot in BIOS.

    d. Install Windows from the USB stick (you might have to use the product key)

    e. Install Ubuntu (you might have to disable Secure Boot)

These two worked for me but the last one was better from my point of view.

Serafim
  • 495
  • i did this, and after that laptop froze on boot. I have bootinfo generated from it here.. can you please take a look at it.. – physicophilic Jul 04 '20 at 19:20
  • This is strange, hmmm ... can you start from the Live USB, open a terminal and edit your original post with the output from the command sudo lsblk, never mind the loops, just the output for the disks. And also from the command sudo blkid | grep "/dev/sd" – Serafim Jul 04 '20 at 20:08
  • I've added it! Please check – physicophilic Jul 04 '20 at 20:22
  • I suspect the problem is that boot repair doesn't know I have two disks.. and labels ubuntu as (hd0,gpt2) while actually grub rescue shows it to be (hd1,gpt2) – physicophilic Jul 04 '20 at 21:08
  • Boot-repair should find all disks, I actually don't understand. Did you turn off secure boot on BIOS? I suspect that Windows is installed with secure boot and that Ubuntu isn't. I would turn off Secure Boot and then use second option above. – Serafim Jul 05 '20 at 08:21
  • I haven't, because I think the issue could be that Windows uses Intel RST enabled m2 ssd, During install, I had my uncle remove the m2 ssd first, which was the only way I could make it work. Secure boot is not an issue, because Ubuntu did boot at first. If you still insist, I can retry disabling secure boot. – physicophilic Jul 05 '20 at 08:26
  • It is of course possible to enable it again. I insist on nothing, but the first report when you reinstalled grub was "1. secure boot prohibits boot from ..". (Haven't entered second option yet) – Serafim Jul 05 '20 at 08:30