Linux Mint 18.2 boot/Grub/MBR problem

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
BobMint2017
Level 1
Level 1
Posts: 13
Joined: Mon Jul 17, 2017 5:40 pm

Linux Mint 18.2 boot/Grub/MBR problem

Post by BobMint2017 » Mon Jul 17, 2017 5:58 pm

I was running Mint 18.1 and after the upgrade to 18.2 the PC would no longer boot to the menu; it just went directly into Windows. So I tried a clean install which yielded no errors during the Mint 18.2 (Cinnamon 64) install but again, after rebooting, the PC went directly into Windows. I am guessing that something between the MBR, Grub and the Windows Boot Manager is broken but I don't know how to fix it.
Background:
PC is a 64 bit Dell XPS8100 with BIOS (No UEFI) which was originally configured with Windows 7 and has been upgraded to the latest Windows 10 Home (v1703) running on an Intel i7 with 6gb of RAM and 2 x 1TB HDs in RAID configuration.
Before installing, I disabled Fast Start and shrank Windows, which left me 150gb of unallocated space for Mint. I ran the Mint 18.2 installation dvd, selected Install Alongside Windows and 3rd party utilities. Everything went well but after rebooting the PC went directly into Windows. I have also tried to delete the partition and reinstall using the "Something Else" method, selecting root and swap directories manually with the same result. I have also tried to install directly into a root Primary (4th ext4) partition without a swap file (in case the logical drives weren't visible) but all with the same result. I can verify that all the files are there and access them through the live DVD. I have also tried sudo update-grub...
I would greatly appreciate help with this problem.

mr_raider
Level 6
Level 6
Posts: 1317
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: Linux Mint 18.2 boot/Grub/MBR problem

Post by mr_raider » Mon Jul 17, 2017 10:55 pm

You are running RAID 1? Are you trying to install Mint to the RAID 1 array? I assume it's teh Intel integrated RAID.
Image

BobMint2017
Level 1
Level 1
Posts: 13
Joined: Mon Jul 17, 2017 5:40 pm

Re: Linux Mint 18.2 boot/Grub/MBR problem

Post by BobMint2017 » Tue Jul 18, 2017 1:33 pm

Yes I'm using Intel RST (Rapid Share Technology) but the system was working fine when I was on Mint 18.1 and I had not dont anything to configure RAID on the Linux side...

mr_raider
Level 6
Level 6
Posts: 1317
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: Linux Mint 18.2 boot/Grub/MBR problem

Post by mr_raider » Tue Jul 18, 2017 3:48 pm

You are using what Linux people call fake raid. This is a bios assisted software raid. Linux can do pure software raid, and sometime fake raid.

I'm 90% sure this is what is happening:

When you first installed mint you did something right and your installer put mint on the raid array. Something broke during the update, and now mint sees you fake raid array as 2 separate drives. Did you install the 4.8 kernel?

How motivated are you to fix this? This is non trivial but can be done. If I do a raid install, I don't muck around with mint and use Ubuntu server.

The first step is to successfully boot a live usb. Can you do that.
Image

BobMint2017
Level 1
Level 1
Posts: 13
Joined: Mon Jul 17, 2017 5:40 pm

Re: Linux Mint 18.2 boot/Grub/MBR problem

Post by BobMint2017 » Tue Jul 18, 2017 7:15 pm

Yes I am very motivated to do this and to understand how it all works. And yes, I can boot from the Live DVD (didn't make a live USB).

mr_raider
Level 6
Level 6
Posts: 1317
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: Linux Mint 18.2 boot/Grub/MBR problem

Post by mr_raider » Tue Jul 18, 2017 7:37 pm

From the live usb you are going to open a terminal and run the two following commands and paste the output:

sudo blkid


sudo parted -l
Image

BobMint2017
Level 1
Level 1
Posts: 13
Joined: Mon Jul 17, 2017 5:40 pm

Re: Linux Mint 18.2 boot/Grub/MBR problem

Post by BobMint2017 » Wed Jul 19, 2017 12:01 pm

/dev/dm-1: SEC_TYPE="msdos" LABEL="DellUtility" UUID="3030-3030" TYPE="vfat" PARTUUID="77e3ed41-01"
/dev/dm-2: LABEL="RECOVERY" UUID="DC329A2F329A0EA0" TYPE="ntfs" PARTUUID="77e3ed41-02"
/dev/dm-3: LABEL="OS" UUID="2A8299D68299A73B" TYPE="ntfs" PARTUUID="77e3ed41-03"
/dev/dm-5: UUID="a7b527f3-9c6f-46c3-a34a-844ba43910fc" TYPE="ext4" PARTUUID="77e3ed41-05"
/dev/sr0: UUID="2017-06-28-15-44-43-00" LABEL="Linux Mint 18.2 Cinnamon 64-bit" TYPE="iso9660" PTUUID="08a2574b" PTTYPE="dos"
/dev/loop0: TYPE="squashfs"
/dev/sda1: SEC_TYPE="msdos" LABEL="DellUtility" UUID="3030-3030" TYPE="vfat" PARTUUID="77e3ed41-01"
/dev/sda2: LABEL="RECOVERY" UUID="DC329A2F329A0EA0" TYPE="ntfs" PARTUUID="77e3ed41-02"
/dev/sda3: LABEL="OS" UUID="2A8299D68299A73B" TYPE="ntfs" PARTUUID="77e3ed41-03"
/dev/sda5: UUID="a7b527f3-9c6f-46c3-a34a-844ba43910fc" TYPE="ext4" PARTUUID="77e3ed41-05"
/dev/sda6: UUID="4f21ad11-3656-4b98-b85e-c31ae89b7988" TYPE="swap" PARTUUID="77e3ed41-06"
/dev/sdb1: SEC_TYPE="msdos" LABEL="DellUtility" UUID="3030-3030" TYPE="vfat" PARTUUID="77e3ed41-01"
/dev/sdb2: LABEL="RECOVERY" UUID="DC329A2F329A0EA0" TYPE="ntfs" PARTUUID="77e3ed41-02"
/dev/sdb3: LABEL="OS" UUID="2A8299D68299A73B" TYPE="ntfs" PARTUUID="77e3ed41-03"
/dev/sdb5: UUID="a7b527f3-9c6f-46c3-a34a-844ba43910fc" TYPE="ext4" PARTUUID="77e3ed41-05"
/dev/sdb6: UUID="4f21ad11-3656-4b98-b85e-c31ae89b7988" TYPE="swap" PARTUUID="77e3ed41-06"
/dev/mapper/isw_ebefdegfdh_Volume_0000p6: UUID="4f21ad11-3656-4b98-b85e-c31ae89b7988" TYPE="swap" PARTUUID="77e3ed41-06"

Model: ATA ST1000DM003-1ER1 (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 32.3kB 41.1MB 41.1MB primary fat16 diag
2 41.9MB 13.2GB 13.2GB primary ntfs boot
3 13.2GB 843GB 830GB primary ntfs
4 843GB 1000GB 157GB extended
5 843GB 994GB 151GB logical ext4
6 994GB 1000GB 6398MB logical linux-swap(v1)


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

Number Start End Size Type File system Flags
1 32.3kB 41.1MB 41.1MB primary fat16 diag
2 41.9MB 13.2GB 13.2GB primary ntfs boot
3 13.2GB 843GB 830GB primary ntfs
4 843GB 1000GB 157GB extended
5 843GB 994GB 151GB logical ext4
6 994GB 1000GB 6398MB logical linux-swap(v1)


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/isw_ebefdegfdh_Volume_0000p2: 13.2GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags:

Number Start End Size File system Flags
1 0.00B 13.2GB 13.2GB ntfs


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/isw_ebefdegfdh_Volume_0000p5: 151GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags:

Number Start End Size File system Flags
1 0.00B 151GB 151GB ext4


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/isw_ebefdegfdh_Volume_0000p3: 830GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags:

Number Start End Size File system Flags
1 0.00B 830GB 830GB ntfs


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/isw_ebefdegfdh_Volume_0000p6: 6398MB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags:

Number Start End Size File system Flags
1 0.00B 6398MB 6398MB linux-swap(v1)


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/isw_ebefdegfdh_Volume_0000p1: 41.1MB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags:

Number Start End Size File system Flags
1 0.00B 41.1MB 41.1MB fat16

Ignore/Cancel?

I selected Cancel

BTW I noticed that my RAID IntelRST is only running from Pre-OS, i.e. after the BIOS but before Windows starts. The IntelRST app is not running (or installed) in Windows...

mr_raider
Level 6
Level 6
Posts: 1317
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: Linux Mint 18.2 boot/Grub/MBR problem

Post by mr_raider » Wed Jul 19, 2017 2:47 pm

Looks like you used dmraid, an older utility to install to teh RAID array. Currently mdadm is what is used, since Ubuntu 16.04. Nevertheless your install seems to be intact.

I've used the newer mdadm tool, but not dmraid. By default dmraid comes installed on Mint I believe.

Open your /etc/fstab file and make sure the UUIDs correspond to your RAID disks /dev/mapper*** Your Linux partitions have suffixes like p1 and p2

If these are correct, you can try boot repair:

https://help.ubuntu.com/community/Boot-Repair

Form the live environement isntall the boot-repair PPA, run the program, and see if it can autodetect the problem.

Before running the recommended repair, create the bootinfi URL and post it. If it looks good, you want to install grub to the appropriate /dev/mapper device. If boot repair does not see the /dev/mapper devices, it means it's seeing your raid as separate disks.


Might I add that you have an install of extraordinary complexity. I suggest you change your subject line for your post to add the words "Intel RST fake RAID" so more people can help. I am really at the limits of my understanding.
Image

BobMint2017
Level 1
Level 1
Posts: 13
Joined: Mon Jul 17, 2017 5:40 pm

Re: Linux Mint 18.2 boot/Grub/MBR problem

Post by BobMint2017 » Wed Jul 19, 2017 6:51 pm

I did not quite understand your last set of instructions but here is an extract from the fstab file
...
/dev/mapper/isw_ebefdegfdh_Volume_0000p5 / ext 4 errors=remount-ro 0 1
/dev/mapper/osw_ebefdegfdh_Volume_0000p6 none swap sw 0 0

So the Volumes p5 and p6 seem correct but I do not know what the "errors=remount-ro 0 1" means, is this normal?

Also I am wondering about how Grub actually works; does it create a sort of link between the MBR and the Windows boot manager?

During the Mint installation process, in the "Installation Type" screen, if I choose "Something Else" instead of "Alongside", the installer lists all the drive partitions twice (presumably it sees the RAID as two different drives) once under /dev/mapper.../Volume_0000 and again all the samename drive partitions under /dev/mapper.../Volume0000p1 but in the box below the partition, it points to /dev/sda as "Device for boot loader installation"., but /dev/sda is not listed in the Device list.

Is this perhaps where the installation error occurs? What is the correct "Device for boot loader installation:"?

I have included a printout of the Installation Type screen in case my comments were more confusing than helpful...

BobMint2017
Level 1
Level 1
Posts: 13
Joined: Mon Jul 17, 2017 5:40 pm

Re: Linux Mint 18.2 boot/Grub/MBR problem

Post by BobMint2017 » Wed Jul 19, 2017 7:48 pm

Sorry I can't seem to be able to send you the bootinfo file and did not see a url to point to but I did select to upload it to pastebin.
At the top of the file it says cfd9efe and I can't attach the file to this document for some reason, I get an Invalid File Type error.
I have saved a copy of the file and could email it to you if you give me an address to send it to...

BobMint2017
Level 1
Level 1
Posts: 13
Joined: Mon Jul 17, 2017 5:40 pm

Re: Linux Mint 18.2 boot/Grub/MBR problem

Post by BobMint2017 » Wed Jul 19, 2017 7:55 pm

OK I figured out how to paste to ubuntu, here is the address: http://paste.ubuntu.com/25129186/

mr_raider
Level 6
Level 6
Posts: 1317
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: Linux Mint 18.2 boot/Grub/MBR problem

Post by mr_raider » Wed Jul 19, 2017 8:58 pm

Your devices are listed three times. Once as /dev/sda and /dev/sdb and once as /dev/mapper/xxxxx. The first 2 are your disks as is, with no RAID. Linux sees through the IIntel Fake RAID as normal disks. Next /dev/mapper/***** is teh array as a whole. Now is the tricky part.

Windows does not boot the disks individually, it sees the array as a single disk, since it has built in drivers for Intel RST. So it can boot the array as a whole. Grub needs to install in the MBR or beginning of the disk. Then it can transfer control to the windows loader (chainloader) or the linux loader (next stage of grub) which is probably located inside your fifth partition. Linux only sees the RAID array once the kernel has booted.

There are two possible solutions:

1. Use boot-repair to manually repair, and set teh device target as /dev/mapper/isw_ebefdegfdh_Volume_0000 and it should duplicate the bootloader on booth drives if RAID is working.

2. Let Boot repair do the recommended install as stated:

Code: Select all

=================== Suggested repair
The default repair of the Boot-Repair utility would purge (in order to enable-raid) and reinstall the grub2 of dm-5 into the MBRs of all disks (except USB without OS).
Additional repair would be performed: unhide-bootmenu-10s repair-filesystems  fix-windows-boot


=================== Final advice in case of suggested repair
Please do not forget to make your BIOS boot on sda (1000GB) disk!
I have no idea which one will work. I have no idea how you got it to work the first time, as this type of install is not trivial.

Might I also add that trying to dual boot with windows on a fake raid array is an extraordinarily bad idea, and I don't know who suggested you do this. I would have made a separate /boot partition that was not on the array on a different disk.
Image

BobMint2017
Level 1
Level 1
Posts: 13
Joined: Mon Jul 17, 2017 5:40 pm

Re: Linux Mint 18.2 boot/Grub/MBR problem

Post by BobMint2017 » Thu Jul 20, 2017 10:04 am

Well, no one suggested that I setup my drives that way; it happened all by itself. I bought the PC 6 years ago with the two drives and windows 7. I then used IntellRST to setup the RAID1 configuration and everything worked flawlessly until the new Windows 10 upgrade happened a while back. Then I kept getting errors on the IntelRST from within Windows and I think I uninstalled it (the Windows app) thinking that since it was working before the OS booted there was no need to reconfigure it and all was well. Then I installed Mint 18.1 without problem until the upgrade to 18.2, which is where we are now.
I am wondering whether I should try to "fix" the RAID situation before attempting the repair (if it needs fixing)? And if I can perhaps I should erase the Linux partitions and do a clean install to see if it would work then?
I am a little worried about the statement at the bottom of the file above saying that it will write to all the disks as well as the error message warning in the BootInfo file. What do you think?
Sorry about the confusion it turned out to be a bigger problem than expected...

mr_raider
Level 6
Level 6
Posts: 1317
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: Linux Mint 18.2 boot/Grub/MBR problem

Post by mr_raider » Thu Jul 20, 2017 5:40 pm

I would absolutely fix the RAID issue in windows before attempting to fix Linux Mint. If necessary, remove Mint completely before. You need to understand that FAkeRAID requires driver support in teh OS, unlike true hardware RAID. The fact that you got Mint to work was dumb luck.

Furthermore, I would seriously consider if you need to put Mint on the RAID array. Can it go on another disk?

Finally, I would question the need for RAID 1 altogether on a laptop. It adds overhead, slows down transfers, and doubles the risk of data corruption, not mention loosing the whole array. If I had a two drive laptop, I would put windows one one, and Mint on the other and dual boot.
Image

BobMint2017
Level 1
Level 1
Posts: 13
Joined: Mon Jul 17, 2017 5:40 pm

Re: Linux Mint 18.2 boot/Grub/MBR/RAID1 problem SOLVED

Post by BobMint2017 » Fri Jul 21, 2017 6:30 pm

OK thanks for all your help and support. I have (somewhat) resolved the issue by using a different configuration. So I deleted the Linux partitions for my HD and re-stretched Windows to fill the whole HD as before. Then I acquired a 32gb USB drive and installed Mint 18.2 on it as bootable from the Live DVD. So now I can boot either without having to deal with the RAID array or dual-booting. So problem solved. Finally I will look into reinstalling the IntelRST utility into windows - in case I need to reconfigure RAID again some day but for now I consider this whole adventure finished WHOOO; it was a fun ride !

mr_raider
Level 6
Level 6
Posts: 1317
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: Linux Mint 18.2 boot/Grub/MBR problem

Post by mr_raider » Sat Jul 22, 2017 12:09 pm

Does your laptop have an SD card slot. A high quality fast microSD card, 32 or 64gb would also be a good choice.
Image

yerbamatemint
Level 1
Level 1
Posts: 2
Joined: Sun Apr 06, 2014 12:11 am

Re: Linux Mint 18.2 boot/Grub/MBR problem

Post by yerbamatemint » Mon Aug 21, 2017 3:03 pm

mr_raider wrote:I would absolutely fix the RAID issue in windows before attempting to fix Linux Mint. If necessary, remove Mint completely before. You need to understand that FAkeRAID requires driver support in teh OS, unlike true hardware RAID. The fact that you got Mint to work was dumb luck.

Furthermore, I would seriously consider if you need to put Mint on the RAID array. Can it go on another disk?

Finally, I would question the need for RAID 1 altogether on a laptop. It adds overhead, slows down transfers, and doubles the risk of data corruption, not mention loosing the whole array. If I had a two drive laptop, I would put windows one one, and Mint on the other and dual boot.
I'm not following how using RAID 1 (mirroring) doubles the risk of data corruption. One feature of RAID 1 is to protect from a single disk failure.

Did you mean either
  • using RAID 0 (striping) where no matter how many disks in the array, if one drive is lost, the whole array is lost and all data gone, or
  • two different OS's operating on the same logical disk drive (whether mirrored or striped) can cause double the problems?

mr_raider
Level 6
Level 6
Posts: 1317
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: Linux Mint 18.2 boot/Grub/MBR problem

Post by mr_raider » Mon Aug 21, 2017 5:54 pm

Under normal circumstances raid just duplicates reads and writes to both disks. If data becomes corrupted one disk, unless you have a filesystem with built in error checking, raid 1 will just read back the corrupted data half the time.
Image

Post Reply

Return to “Installation & Boot”