GRUB can't see the second disk despite BIOS sees it

Small_Boy

Commendable
Nov 30, 2016
7
0
1,510
Hi,

GRUB can't see the second disk despite BIOS sees it.

BIOS' drive detection during POST says:

Fixed Disk 0: HITACHI HTS.........300
Fixed Disk 1: Samsung SSD 850 Evo 120GB

but after this, BIOS does not show the SSD in the boot options.

GRUB says:

floppies_orig=0, harddrives_orig=1, floppies_curr=0, harddrives_curr=2
map (hd1) (hd0)
Error 21: Selected disk does not exist

How come GRUB can't see it while BIOS has detected it?

The SSD can be seen correctly by booting into Win 8.1, and also by various bootable rescue medias.

The SSD is inside a caddy(and I have to, because I want shock protection for the HDD, and my system(ThinkPad E15) apparently is not one of the Thinkpads who support shock protection for a secondary drive).

The GRUB is the NeoGrub installed by EasyBCD, and I also tried the GRUB from Super Grub2 Disk with the same results, so it seems the problem is not because of a specific faulty GRUB binary.

Thanks.
 

Small_Boy

Commendable
Nov 30, 2016
7
0
1,510

Yes.
I ran it in Linux Mint live CD, and here are the results(I know the SSD must have only one partition. :) The Linux partition was only for testing).
-------------------------------------------
mint@mint ~ $ sudo fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
... first disk ...

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 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 identifier: 0x000755af

Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 102402047 51200000 7 HPFS/NTFS/exFAT
/dev/sdb2 102404094 112166911 4881409 5 Extended
/dev/sdb5 102404096 112166911 4881408 83 Linux
-------------------------------------------

I noticed it's physical sector size is being reported 512 instead of 4096. Are all SSDs 4096? (if not, it's a Samsung 850 Evo)

Windows 8.1 has the same wrong detection:
-------------------------------------------
C:\>fsutil fsinfo sectorinfo f:
LogicalBytesPerSector : 512
PhysicalBytesPerSectorForAtomicity : 512
PhysicalBytesPerSectorForPerformance : 512
FileSystemEffectivePhysicalBytesPerSectorForAtomicity : 512

Device Alignment : Aligned (0x000)
Partition alignment on device : Aligned (0x000)
No Seek Penalty
Trim Supported

-------------------------------------------
C:\>fsutil fsinfo ntfsinfo f:
NTFS Volume Serial Number : 0x465ad2535ad23efd
NTFS Version : 3.1
LFS Version : 2.0
Number Sectors : 0x00000000061a7fff
Total Clusters : 0x0000000000c34fff
Free Clusters : 0x0000000000c2da5a
Total Reserved : 0x0000000000000000
Bytes Per Sector : 512
Bytes Per Physical Sector : 512
Bytes Per Cluster : 4096
Bytes Per FileRecord Segment : 1024
Clusters Per FileRecord Segment : 0
Mft Valid Data Length : 0x0000000000040000
Mft Start Lcn : 0x00000000000c0000
Mft2 Start Lcn : 0x0000000000000002
Mft Zone Start : 0x00000000000c0040
Mft Zone End : 0x00000000000cc840
Resource Manager Identifier : 7F0FD383-B5C7-11E6-9C04-C80AA96B0614
-------------------------------------------

Also various bootable medias can see it, including Paragon Backup and Restore, Paragon Partition Manager, MinTool Partition Wizard, and EaseUs Todo Backup.

Thank you for helping. :)
 

dgingeri

Distinguished
All SSDs I know of use a 512 byte sector size. Only the latest mechanical hard drives have gone to the 4k sector size, and even those emulate a 512 sector size unless it is a specialty "advanced format" drive. It was specifically developed for large size mechanical hard drives. So, that's not the issue.

I'd say the likely culprit is the initialization type. If the drive was initialized GPT, then GRUB wouldn't like it. You will have to jump through some hoops to get it to utilize a GPT disk. http://www.rodsbooks.com/gdisk/booting.html

I don't know for sure how to tell if it is GPT formatted from the fdisk info you put up here. I'd go into Windows, open the Disk Management panel, and check the drive in question. If it is GPT formatted, when you right click on the drive (the drive square at the far left, not on any of the partitions) it will give a grayed out menu item that says "Convert to MBR". If it is not, that menu will give a grayed out menu item that says "Convert to GPT". There is no other indicator in Windows.

In Linux, follow this advice: http://unix.stackexchange.com/questions/120221/gpt-or-mbr-how-do-i-know

 

Small_Boy

Commendable
Nov 30, 2016
7
0
1,510

Thank you for the detailed description, but no, I'm MBR as always. I thought the disk type(Basic or Dynamic) could be referred to as well, but I went into doubt per your reply.



Thanks but every SSD I've seen is said to read and write in 4KB blocks, like mine:
http://www.samsung.com/semiconductor/minisite/ssd/product/consumer/850evo.html

And also I've much heard of a necessity for SSD partitions to be aligned to 4KB boundary, like this page:
http://

And per this answer:
http://
I think my SSD drive is probably emulating 512 physical sector size, so will have performance degradation(haven't used it yet, due to being unable to boot from it).

I think the only solution is to forget HDD shock protection. Almost everybody has recommended to put the SSD in HDD's place and not in the caddy, but I ignored it for the sake of HDD shock protection.
 

dgingeri

Distinguished
Yeah, SSDs do prefer to have the formatting aligned to 4k pages, but they have a 512 bye sector size. This has more to do with how the NAND works compared to the file system. Most SSDs can only write pages in 4k sizes, so when a 512 byte sector is changed, it rewrites the existing 3 sectors while writing the one changed sector. If that is out of sync with the pages of the file system, like a NTFS 4k allocation unit, the it causes massive write amplification and degrades performance and endurance. Perhaps SSDs would do better with a 4k sector size, to match NTFS, but SSD manufacturers are still afraid they'll lose Windows XP customers doing it.
 

Small_Boy

Commendable
Nov 30, 2016
7
0
1,510

Thank you for the description.

So what you're saying is that despite the physical sector being 512, the OS understands that it should optimistically read & write in 4KB blocks.
Could you please provide me a way of knowing if my OS has understood it?

UPDATE: (By the previous question I mean how can I make sure the caddy hasn't caused the OS to not understand that?) Could I use a reliable speed test and compare it to the drive's advertised levels?
 

dgingeri

Distinguished
I know for certain that Windows 7 and up will detect SSDs and align the partitions correctly when creating them. If you installed Windows 7, 8, or 10 directly on this drive, and it is connected to the main SATA controller in AHCI mode, you can be assured it is aligned.

However, all bets are off if the drive is a clone from a mechanical hard drive or from an OS that doesn't know to properly align. Some cloning programs will align the file system on a target SSD, but many won't. Also, if the drive is being used on certain controllers, such as RAID controllers or certain Jmicron controllers, it can't know that it is a SSD in order to align things properly.

There is an easy way to check on the partition alignment: AS SSD. It does a check on each drive at startup. http://www.overclock.net/t/1226963/how-to-properly-re-align-your-ssd-hdd-partitions

Now we've gone far afield from the original discussion topic. The only other thing I can think of that could keep GRUB from seeing your drive is if the BIOS doesn't support booting from that drive. Perhaps there is a BIOS setting that will allow that drive to be part of the boot order. Check that out. Laptop BIOSes usually aren't very flexible, so it is unlikely, but worth checking.
 

Small_Boy

Commendable
Nov 30, 2016
7
0
1,510
Sorry for not realizing your answer. I came here some more times in the next days and even a mail came for me, but the topic showed without the new answer! This very effect happened when I posted my own answer too(if you noticed, I posted an answer twice before, then deleted one), and even Ctrl+F5 couldn't fix it!('cause I certainly checked that many times).



Thanks but sorry for my bad explanation, I wasn't concerned about drive alignment, I was concerned about OS making low-level writes using that physical sector size of 512. In other words, is cluster size only used for FS file allocation, or also for ANY low-level data transfer by OS? If not, - I wonder - a correctly aligned drive and 4K cluster size, will still have some degree of performance problem. That's why the reported physical sector size of 512 had horrified me.

By the way, the issue is now over because my laptop most certainly can't boot off a secondary HDD(The BIOS only lets an ODD to boot from the ODD's SATA port. There should be a difference between an E-series ThinkPad and a T-series one, if not for any other reason!)


Turns out, this is in fact how my "main" SATA controller is about the ODD's port.


Thanks. Checked and OK.


Yes, this is the main question :) (Thank you for getting back to it), and no, the BIOS doesn't support booting an HDD(or SSD) in ODD's port, but I didn't want the BIOS to boot from that SSD! I wanted the BIOS to boot GRUB from the HDD, then GRUB boots Win from that SSD. Does GRUB's booting another drive (after itself booted) has anything to do with BIOS's not supporting booting from it?(I'm asking). It shouldn't have.


Thanks but I've checked that thoroughly before, and there is simply no need for it, 'cause it's the rather "hard" option. What we want to do is as easy as booting GRUB from HDD(this is performed OK) and then, having that GRUB "seeing" the SSD which almost every rescue media sees. Thanks again dear Coyotte :)
 

Small_Boy

Commendable
Nov 30, 2016
7
0
1,510
Post the whole grub config please
Thanks. I guess the problem is the GRUB binaries I used, 'cause this NeoGRUB form EasyBCD introduces it's config folder at C:\NST which the only config file in it is menu.lst:
Code:
 Directory of C:\NST

12/20/2016  03:48    <DIR>          .
12/20/2016  03:48    <DIR>          ..
12/03/2016  23:09             9,216 AutoNeoGrub5.mbr
12/20/2016  03:48             9,216 AutoNeoGrub6.mbr
06/18/2013  18:38         3,170,304 boot.sdi
12/04/2016  04:57               387 menu.lst
12/03/2016  04:04             9,216 NeoGrub.mbr

I doubted NeoGRUB's GRUB binary before, but then I tried Super Grub2 Disk with the same results, so I concluded NeoGRUB is innocent. But now, as per your answer, I doubted it again. Thanks. I'm looking to install one from a reputable Linux distro.

Ps my guess is enclosure cause issue. Plug in internally temporarily to check.
If by "enclosure" you mean the caddy, yes, maybe the caddy is incapable of that either, but plugging it at the HDD's port is not an option(I described in the first post), and I'm even almost sure it'll work OK there. My wonder is, how come many rescue medias see it, and the GRUB which is a program focused and specialized for this very task does not?!
 

TRENDING THREADS