[SOLVED] /dev/sda3 is NTFS according to fdisk but it is ext3

General support questions
Post Reply
centguy
Posts: 271
Joined: 2008/08/11 16:03:29

[SOLVED] /dev/sda3 is NTFS according to fdisk but it is ext3

Post by centguy » 2015/04/24 00:01:22

Hi,

I have a very bizzare situation.

According to

[root@centos66-acer ~]# fdisk -l

Disk /dev/sda: 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 / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x26b32760

Device Boot Start End Blocks Id System
/dev/sda1 1 2220 17825792 27 Unknown
/dev/sda2 * 2220 2233 102400 7 HPFS/NTFS
/dev/sda3 2233 32379 242149376 7 HPFS/NTFS
/dev/sda4 32379 121602 716683264 5 Extended
/dev/sda5 32379 41940 76800000 83 Linux
/dev/sda6 41940 54688 102400000 83 Linux
/dev/sda7 54689 61063 51200000 83 Linux
/dev/sda8 61063 67437 51200000 83 Linux
/dev/sda9 67437 121602 435078144 83 Linux

But I am able to assgin a label to /dev/sda3

[root@centos66-acer ~]# e2label /dev/sda3
C66
[root@centos66-acer ~]#

Actually /dev/sda3 is the very CentOS 6.6 that I have booted up and I am writing this post.

gparted correctly says /dev/sda3 is ext3

A bit of history:
/dev/sda3 was originally Windows NTFS.
I booted up CentOS 6.1 from /dev/sda5 and then
issue a command mkfs.ext3 /dev/sda3
and then I use the CentOS 6.6 DVD to install the new OS onto /dev/sda3. During the installation
process I did not ask the installer to reformat /dev/sda3 since I have already done so from CentOS6.1.
A first sign of weird behaviour is that I cannot chainload from /dev/sda5 to /dev/sda3 even though I had specifically asked the installer to
install the bootloader to the first sector /dev/sda3. In order to boot, I have to copy the two files to /dev/sda3/boot
and have an entry :

title DIRECT CentOS 6.6 (2.6.32-504.el6.x86_64)
root (hd0,4)
kernel /boot/vmlinuz-2.6.32-504.el6.x86_64 ro root=UUID=7eb333c6-eab7-43ab-919f-2128beb1a23f nomodeset rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_LVM rd_NO_DM rhgb quiet
initrd /boot/initramfs-2.6.32-504.el6.x86_64.img

Now, I was hoping to install the bootloader to /dev/sda3 while booting up from CentOS 6.6, but then

grub
root (hd0,2)
Filesystem type unknown, partition type 0x7

setup (hd0,2)
Error 1: Cannot mount selected partition

The following up is even more bizzare:
grub> find /boot/grub/grub.conf
find /boot/grub/grub.conf
(hd0,4)
(hd0,5)
(hd0,6)
(hd0,7)

I think either the mkfs.ext3 did not do the job properly, or the installer of CentOS 6.6 is confused, or fdisk -l is confused by something else.

I wish I have chosen the option to reformat /dev/sda3 when I was installing CentOS 6.6, but then I had formatted before from another OS.

Can anyone spot who to fix this weird situation, or provide a plausible explanation?

I could go all the way back to reinstall CentOS 6.6 (silly but necessay if I want to seriously continue
with CentOS 6.6) from scratch onto /dev/sda3 but then this incident is telling something is wrong.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: my /dev/sda3 is NTFS according to fdisk but it is ext3

Post by gerald_clark » 2015/04/24 01:17:59

Fdisk just displays the type tag ( partition ID ) on the partition.
If you want to see what is really there, use blkid.
To fix the "error" just use fdisk to set the partition to type to 83.

centguy
Posts: 271
Joined: 2008/08/11 16:03:29

Re: my /dev/sda3 is NTFS according to fdisk but it is ext3

Post by centguy » 2015/04/24 05:26:19

Okay. Will try that out soon. Thanks. Hopefully the new id will help me to install the bootloader on the first section of /dev/sda3.

centguy
Posts: 271
Joined: 2008/08/11 16:03:29

Re: [SOLVED] my /dev/sda3 is NTFS according to fdisk . . .

Post by centguy » 2015/04/24 13:08:01

Yes. By changing the id to 83, now my 3 stanzas in grub.conf are able to boot up CentOS 6.6.
If I had not learned the first way of doing, I think I am not able to boot up CentOS 6.6 at all.

Please mark this as solved.
Thanks. This is a tricky but fruitful experience.

Code: Select all

title DIRECT centos66-acer (sda3) (2.6.32-504.el6.x86_64)
        root (hd0,4)
        kernel /boot/vmlinuz-2.6.32-504.el6.x86_64 ro root=UUID=7eb333c6-eab7-43ab-919f-2128beb1a23f nomodeset rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_LVM rd_NO_DM rhgb quiet
        initrd /boot/initramfs-2.6.32-504.el6.x86_64.img
title DIRECT2 centos66-acer (sda3) (2.6.32-504.el6.x86_64)
        root (hd0,2)
        kernel /boot/vmlinuz-2.6.32-504.el6.x86_64 ro root=UUID=7eb333c6-eab7-43ab-919f-2128beb1a23f nomodeset rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_LVM rd_NO_DM rhgb quiet
        initrd /boot/initramfs-2.6.32-504.el6.x86_64.img
title CHAINED centos66-acer (sda3) CentOS 6.6
        rootnoverify (hd0,2)
        chainloader +1


Post Reply