Cent OS 6 and SSD - Kernal Panic

Issues related to hardware problems
sciflux218
Posts: 13
Joined: 2016/04/24 23:36:35

Cent OS 6 and SSD - Kernal Panic

Post by sciflux218 » 2016/05/11 15:13:05

I built a little Mini ITX computer at home and I'm trying to install Cent OS 6 on it. The computer has two drives. One drive is a 256GB SSD and the other is a 1 terabyte SATA drive. From some reason I'm getting a kernel panic after installing Cent OS on the SSD. I get the panic kernal panic after it finishes installing and asks me to restart the machine. The weird thing is that when I tried using my 1 terabyte SATA drive it worked fine. What would be some reasons for why cent OS is not accepting my SSD?

sciflux218
Posts: 13
Joined: 2016/04/24 23:36:35

Re: Cent OS 6 and SSD - Kernal Panic

Post by sciflux218 » 2016/05/11 15:37:02

I did a verbose boot to see if I can get any more information on the cause of my problem and for some reason the kernel is telling me that it's having an issue finding the SE Linux policy file...

sciflux218
Posts: 13
Joined: 2016/04/24 23:36:35

Re: Cent OS 6 and SSD - Kernal Panic

Post by sciflux218 » 2016/05/11 15:47:27

Update

I found the website below and I followed the instructions on it and I was able to get Cent OS to boot properly. Why did this issue only affected my SSD and not my sata drive, and is my server going to be secure without SELinux?


https://lists.centos.org/pipermail/cent ... 42951.html

"That fixed it. After following the above I edited the /etc/selinux/config file to change SELINUX from
enforcing to permissive before rebooting and it rebooted into permissive
mode without issue."

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cent OS 6 and SSD - Kernal Panic

Post by TrevorH » 2016/05/12 10:06:00

What version of CentOS 6 are you attempting to install? You should be using the 6.7 media which is the most up to date currently available (6.8 is in the pipeline).
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

sciflux218
Posts: 13
Joined: 2016/04/24 23:36:35

Re: Cent OS 6 and SSD - Kernal Panic

Post by sciflux218 » 2016/05/12 17:07:03

TrevorH wrote:What version of CentOS 6 are you attempting to install? You should be using the 6.7 media which is the most up to date currently available (6.8 is in the pipeline).

6.7

sciflux218
Posts: 13
Joined: 2016/04/24 23:36:35

Re: Cent OS 6 and SSD - Kernal Panic

Post by sciflux218 » 2016/05/13 02:07:40

I'm having a lot of issue with my hard drives whenever I create partitions.

This is the result of the fdisk -l
Disk /dev/sda: 256.1 GB, 256060514304 bytes
255 heads, 63 sectors/track, 31130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x908e38e0

Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 31131 249545728 8e Linux LVM

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x47764a04

Device Boot Start End Blocks Id System
/dev/sdb1 1 121602 976760832 83 Linux

Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xaf641688

Device Boot Start End Blocks Id System
/dev/sdc1 1 243201 1953512001 83 Linux
Partition 1 does not start on physical sector boundary.

Disk /dev/mapper/vg_scifluxsvr-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_scifluxsvr-lv_swap: 8363 MB, 8363442176 bytes
255 heads, 63 sectors/track, 1016 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_scifluxsvr-lv_home: 193.5 GB, 193483243520 bytes
255 heads, 63 sectors/track, 23522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

The only reason sdb is not throwing off any errors is because I used gparted to partition it. I used fdisk to partition sdc and the Cent OS installer partitioned sda.

sciflux218
Posts: 13
Joined: 2016/04/24 23:36:35

Re: Cent OS 6 and SSD - Kernal Panic

Post by sciflux218 » 2016/05/13 02:31:24

I found the website below which explains what's going with my drives. When I was first tried to troubleshoot my problem I took my SSD drive out of my server and plugged it into a machine that was running linux mint and and fdisk revealed that the drive had an issue with the partition not ending on cylinder boundary so I deleted the partition and recreated it using gparted. When I stuck the SSD back into the server and started the installer again, it didn't give me the option to use the existing linux partition. The Cent OS installer forced me to delete the existing partitions and recreate them, and that's the problem that I'm having. The Cent OS installer is not recognizing all of my drives Advanced Format 4096-byte sectors.

http://askubuntu.com/questions/156994/p ... r-boundary

owl102
Posts: 413
Joined: 2014/06/10 19:13:41

Re: Cent OS 6 and SSD - Kernal Panic

Post by owl102 » 2016/05/13 05:09:18

sciflux218 wrote:and fdisk revealed that the drive had an issue with the partition not ending on cylinder boundary
Just ignore this message from fdisk, it's not an issue.

If a partition does start or end on a cylinder boundary was never a serious issue, it was simply a speed optimization issue in the very very very old days.

It became totally irrelevant with modern hard disks, and since SSDs does not even have real cylinders it's of course totally irrelevant here, too.

Instead something else has become relevant with SSDs and hard disks with larger sectors than 512 Bytes: Alignment. Many modern hard discs do not reveal their real sector size (to offer a better compatibility with old computers), and SSDs do not reveal their real internal block size, too.

Therefore modern partition tools (like GParted or the CentOS installer and most Linux installers, too) align their partitions on MB boundaries. (Which will usually cause fdisk to complain about cylinder boundaries which you should simply ignore. As already written It's a good thing if it's not aligned at cylinder boundaries, but aligned to MB boundaries instead. But fdisk is a archaic tool and therefore it will show you archaic warnings. BTW: As far as I know the version of fdisk included in CentOS 7 does not show these misleading warnings anymore.)
Sigh. Unfortunately the accepted answer is not totally (but partly) incorrect, but has nothing to do with "Partition 1 does not start on physical sector boundary". The answerer has recognized that the first partition start on sector 63 which is not a good modern alignment, especially on a hard drive with logical 512 bytes but physical 4k sectors.

The wrong part from the accepted answer: "Thus, the warning occurs because partition 1 starts at logical sector 63 = byte 32256, a number not divisible by 4096; in fact it's near the end of the 7th physical sector (position 7.875 to be exact :)"

Yes, sector 63 is not a good alignment, that's correct, but no, that is not the reason why the warning occurs. The warning is not about physical sector alignment but about cylinder alignment instead. So it's no problem to align the partitions correctly but still getting the annoying and misleading warning.

As example my own partition scheme on my CentOS 6 installation on a SSD:

Code: Select all

#LANG=C fdisk -lu /dev/sda              # Parameter "-u" is important here otherwise it will not display sector units

Disk /dev/sda: 256.1 GB, 256060514304 bytes
255 heads, 63 sectors/track, 31130 cylinders, total 500118192 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: 0x000086b7

    Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048     2099199     1048576   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2         2099200    27265023    12582912   83  Linux
Partition 2 does not end on cylinder boundary.
/dev/sda3        27265024    44042239     8388608   82  Linux swap / Solaris
Partition 3 does not end on cylinder boundary.
/dev/sda4        44042240   500117503   228037632   83  Linux
As you see fdisk is complaining a lot here but in fact the alignment is perfect since every start sector and every partition size can be divided by 2048, and 2048 * 512 bytes (=reported sector size) is 1 MB. So every partition start and partition end is aligned to 1 MB.

Furthermore this part is interesting:
255 heads, 63 sectors/track, 31130 cylinders
It's a SSD, it does not have heads, it does not have tracks, and it does not have cylinders. But for compatibility reasons is has to report some "hard disk stuff" to the BIOS, even if this information is wrong (and irrelevant). Unfortunately fdisk uses this information as criteria of reporting (non existing) issues.
Last edited by owl102 on 2016/05/14 15:22:51, edited 1 time in total.
German speaking forum for Fedora and CentOS: https://www.fedoraforum.de/

owl102
Posts: 413
Joined: 2014/06/10 19:13:41

Re: Cent OS 6 and SSD - Kernal Panic

Post by owl102 » 2016/05/13 06:32:34

Addendum:

IMHO a very good article about heads, tracks, cylinders and why the reported values have to be wrong on modern hard discs because of historical limits:

https://en.wikipedia.org/wiki/Cylinder-head-sector
German speaking forum for Fedora and CentOS: https://www.fedoraforum.de/

sciflux218
Posts: 13
Joined: 2016/04/24 23:36:35

Re: Cent OS 6 and SSD - Kernal Panic

Post by sciflux218 » 2016/05/14 14:27:23

owl102 wrote:Addendum:

IMHO a very good article about heads, tracks, cylinders and why the reported values have to be wrong on modern hard discs because of historical limits:

https://en.wikipedia.org/wiki/Cylinder-head-sector
thanks

Post Reply