LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Dual Boot Windows / CentOS7 problem (https://www.linuxquestions.org/questions/linux-newbie-8/dual-boot-windows-centos7-problem-4175531695/)

dakoris73 01-21-2015 02:18 AM

Dual Boot Windows / CentOS7 problem
 
I have a Toshiba Laptop that had a Dual Boot of Windows 7 and Linux Mint 17 on it and both OS's worked fine. I've been wanting to use CentOS 7 as my primary OS so that I can become more familar with RPM management and proceeded to remove my Mint installation and replace it with the CENTOS 7 installation, and the install completed successfully. HOWEVER, here's my problem.....

When my laptop starts up, I don't see GRUB nor do I have any option of selecting whether to run Windows or CentOS. It automatically loads up Centos 7. When I do a 'sudo fdisk -l', I can see that SDA1 is an NTFS drive, and when I try the following 'sudo mount /dev/sda1 /media/Main\ Drive' I get an error message saying that I can't mount an NTFS drive.

Am I missing something or is there a way to access my Windows files from within Centos. I was able to do this with Mint without an issue, but unable to see any of my windows drives because I can't mount an NTFS drive.

I have no problem with keeping CENTOS as my only OS on this laptop, however, I do need to access the files from the Window's partition, and if anyone can help me to access my files, that would be totally awesome.

Thank you in advance for reading through this and for any help offered.....

Mikey

syg00 01-21-2015 02:39 AM

Simple search found this as first hit - seems to fit the bill.
Haven't tried it - I think I deleted all my CentOS 7 installs.

dakoris73 01-21-2015 03:06 AM

SYG00 - I did see that when I was doing my research on this, and I did try this and it didn't work for me. I wasn't able to find any of the repo's that these instructions were listing.......

The error I get when trying to mount the NTFS drive is: ''mount: unknown filesystem type 'ntfs' '' - hope this helps with trying to get an answer to this issue.

Thanks again.......

syg00 01-21-2015 03:37 AM

My bad, I should have dug a little more.
You need the ntfs-3g package - have a look at the CentOS wiki page for NTFS here. Follow the instructions for 7 and EPEL - note the link for the repo. Looks like this should do it all for you
Code:

yum install epel-release
yum install ntfs-3g


Teufel 01-21-2015 04:21 AM

Can you post here the content of /boot/grub/grub.cfg file?
And output of
Code:

fdisk -l
command?

dakoris73 01-21-2015 04:50 AM

I don't have a file available at the /boot/grub/grub.cfg - however, when I do an ls on the /boot/grub, I did find a grub2 directory.... could that be part of the problem that there's a grub and a grub2 directory?

Code:

[mikey@localhost boot]$ ls
config-3.10.0-123.13.2.el7.x86_64
config-3.10.0-123.el7.x86_64
grub
grub2
initramfs-0-rescue-7090e266d0cd4645a514b2aea29d63a7.img
...


Here is what I have listed when I use the fdisk -l command:

Code:

[mikey@localhost ~]$ sudo fdisk -l

Disk /dev/sda: 640.1 GB, 640135028736 bytes, 1250263728 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 label type: dos
Disk identifier: 0x7c438fcb

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *        2048    3074047    1536000  27  Hidden NTFS WinRE
/dev/sda2        3074048  999960575  498443264    7  HPFS/NTFS/exFAT
/dev/sda3      999960576  1000984575      512000  83  Linux
/dev/sda4      1000984576  1250263727  124639576    5  Extended
/dev/sda5      1000986624  1250263039  124638208  8e  Linux LVM

Disk /dev/mapper/centos-swap: 6190 MB, 6190792704 bytes, 12091392 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 /dev/mapper/centos-root: 53.7 GB, 53687091200 bytes, 104857600 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 /dev/mapper/centos-home: 67.8 GB, 67750592512 bytes, 132325376 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

[mikey@localhost ~]$


dakoris73 01-21-2015 05:12 AM

SYG00 - I tried your two install commands, and these ones worked out so that I can now access my windows drive from the Centos desktop. Thank you for that.

As for having the dual boot option, I still can't seem to figure out how to get grub to list my windows partition...... any help with this would be much appreciated.

thanks again.
Mikey

Teufel 01-21-2015 05:47 AM

The directory may be named as "grub" or "grub2".
Anyway you should have there (under grub or grub2 directory) the configuration file - grub.cfg.

Find that file and check for the value of timeout set in that file. Try to increase it e.g. to 20 secs.
And since you installed ntfs-3g, mount sda1 and sda2 somewhere and run "grub-mkconfig" or "grub2-mkconfig", whichever is suitable for you.
This command will output the presumable menu content into terminal window. Check out whether your Windows found by grub and added to menu or not.
If not, your system probably missed os-prober package. This package needs to recognize Windows installation.

syg00 01-21-2015 05:54 AM

Sorry, completely overlooked that.
Because the NTFS partition couldn't be mounted, the grub setup couldn't locate the Win7 boot files. Now you can, try (as root probably) this and
reboot - first command makes a backup, second rebuilds the boot menu
Code:

cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.bkp
grub2-mkconfig -o /boot/grub2/grub.cfg


dakoris73 01-21-2015 06:07 AM

YAY!!!!! you guys are so totally awesome. Thank you for your help as I was able to get my Windows / Centos dual boot working once again with your commands SYG00........

Now onto learning more about Centos 7 and what it can do..........

Thanks again everyone......
Mikey

anchor_man 04-22-2015 02:56 PM

Hello everyone, I just wanted to confirm these steps above resolved the exact same issue with my system. Added the epel repo; installed ntfs; mounted the two Window 7 partitions; used cp command to create a backup; issued the 'grub2-mkconfig -o /boot/grub2/grub.cfg' command. Thanks!


All times are GMT -5. The time now is 02:16 PM.