LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Learning of dual OS (https://www.linuxquestions.org/questions/linux-newbie-8/learning-of-dual-os-924382/)

cent_uries@yahoo.co.id 01-18-2012 03:41 AM

Learning of dual OS
 
dear Linuxers,
so glad to be a member of this group.a view weeks ago i install centos 5.2 on my unused windows disk partition. But so sad, i lost my windows boot.now i can only boot to centos and can not see my windows file. i'm newbie, how i fix this step by step whereas i'm not familyar in linux command line sintax.Tq in advance.

T3RM1NVT0R 01-19-2012 12:21 PM

@ Reply
 
Hi cent_uries@yahoo.co.id,

Welcome to LQ!!!

Please spell out your words correctly. It is "thank you" not "Tq". We do not promote the use of text language here at LQ.

Let get back to the issue. As you said that you installed CentOS on your free partition. Are you sure that you did not delete any of the Windows partition?

Login as root on your CentOS machine, open up terminal (this you can do by right clicking on your desktop and then select open terminal) and type the following commands:

1.
Code:

df -h
2.
Code:

ls -l /dev/ | grep sd
Paste the output of the above command here in this thread and we will take it from there.

johnsfine 01-19-2012 12:41 PM

Maybe T3RM1NVT0R can deduce more from the output of those commands than I could. But I think more info is required, such as the output (logged in as root) from
Code:

/sbin/fdisk -l
and
Code:

cat /boot/grub/device.map
and
Code:

cat /boot/grub/grub.conf

cent_uries@yahoo.co.id 01-27-2012 04:30 AM

Thank You
 
Quote:

Originally Posted by T3RM1NVT0R (Post 4579059)

Dear T3RM1NVT0R, i'm sorry for not polite words, i'm not so good in english.
I'm not sure deleted it.
this is my output:
df -l
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
17870152 4411028 12536708 27% /
/dev/hda6 101086 24549 71318 26% /boot
tmpfs 512716 0 512716 0% /dev/shm

ls -l /dev/|grep sd
brw-r----- 1 root disk 8, 0 Jan 27 16:59 sda

please help..what should i do now..

cent_uries@yahoo.co.id 01-27-2012 05:03 AM

dear johnsfine, here is i got
root@localhost fernando]# df -l
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
17870152 4411028 12536708 27% /
/dev/hda6 101086 24549 71318 26% /boot
tmpfs 512716 0 512716 0% /dev/shm
[root@localhost fernando]# ls -l /dev/|grep sd
brw-r----- 1 root disk 8, 0 Jan 27 16:59 sda

[root@localhost fernando]# cat /boot/grub/device.map
# this device map was generated by anaconda
(hd0) /dev/hda
[root@localhost fernando]# cat /grub/grub.conf
cat: /grub/grub.conf: No such file or directory
[root@localhost fernando]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,5)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/hda
default=3
timeout=5
splashimage=(hd0,5)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-274.17.1.el5)
root (hd0,5)
kernel /vmlinuz-2.6.18-274.17.1.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-274.17.1.el5.img
title CentOS (2.6.18-274.12.1.el5)
root (hd0,5)
kernel /vmlinuz-2.6.18-274.12.1.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-274.12.1.el5.img
title CentOS (2.6.18-92.el5)
root (hd0,5)
kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-92.el5.img
title Other
rootnoverify (hd0,4)
chainloader +1

johnsfine 01-27-2012 07:43 AM

I still can't nail down the details without seeing the partition table, which was why I asked for.
Code:

/sbin/fdisk -l
Do you know how to edit text files in Linux?

There are many ways to edit text files. If you know a way, using that way would be best. If you do not know, someone can figure out which simple GUI text editor is available in your Centos system to make it easy to edit text files.

At the end of the file you listed ( /boot/grub/grub.conf ) there were three lines:
Code:

title Other
rootnoverify (hd0,4)
chainloader +1

Those lines represent an option to boot some other OS that seems to have already been present when Centos was installed. But the 4 seems to mean it was an extended partition. Windows normally can't boot from an extended partition. Possible changing that 4 to 0, 1 or 2 would fix the problem. But until I see the partition table I'm just guessing.

sundialsvcs 01-27-2012 08:07 AM

When you start up your computer, a "boot loader" (probably grub...) runs first, using various files that you will find in the "/boot" directory. This (/boot/grub/grub.conf) is where the menu of choices, that appears when you turn on the machine, actually comes from.

One of those choices should be one that will start Windows.

Most distros these days know how to detect that Windows is present, and to set up grub.conf correctly for you.

The technical reason why you can't start Windows right now is that the "master boot record" (MBR) has been changed so that it will start grub, not the Windows loader (NTLOADER.EXE). But there ought to be an entry in grub.conf right now that will tell grub to hand control of the system over to the Windows loader, so that "Windows" becomes one of your choices and "it just works."

(You can see from the grub web-site or manual-page ... Google grub start windows ... that grub certainly can "chain" from one boot-loader to another, in order to be able to start Windows or any other OS that requires the use of "its own" boot loader.)

Maybe the thing to do next is: post a copy of your /boot/grub/grub.conf file here.

johnsfine 01-27-2012 08:32 AM

Quote:

Originally Posted by sundialsvcs (Post 4585865)
Maybe the thing to do next is: post a copy of your /boot/grub/grub.conf file here.

Please read post #5 of this thread. Maybe try to tell the OP how to use CODE tags so it won't take so much effort for us to find and read those things when he posts them.

Unless I missed it buried in something the OP posted, we still don't know whether the Windows partition survived at all, and if it survived we don't know its partition number.

aazkan 01-27-2012 09:21 AM

Hi all, cent_uaries,

I might be wrong but perhaps i can help rephrase the question to cent_uaries in Bahasa Melayu.

I understand this is an English speaking forum so I'd like to apologise first and hope moderators/senior members/members would allow this.
I meant to help cent_uaries so he'd can provide the answer to the partition numbers.

Kepada cent_uaris,

a). Jadi root, taipkan

Code:

fdisk -l
b). Command di step a). tadi akan menunjukan partitions yang ada pada hard drive kamu. Jika windows parttion masih ada, command tadi akan menujukan nya i.e: boleh di kenal pasti dgn partition type nya.

c). Bila kamu udah dapat partitions tadi kamu reply pada thread ini. Jangan lupa ya, output tadi kamu enclose dalam code block supaya formating nya ngak lari.

i hope you would be able to get partitons listing and reply back. If its (the window partition) is still there, others should be able to tell you how to get grub to work with the windows partition.

Regards,

johnsfine 01-27-2012 10:33 AM

Quote:

Originally Posted by aazkan (Post 4585925)
perhaps i can help rephrase the question to cent_uaries in Bahasa Melayu.

I appreciate your efforts, failure to communicate is frustrating for both sides. Because of communcations issues, I didn't even try to open up the question of how to be root. I just hoped the OP knows.

But regarding your specific advice
Quote:

fdisk -l
When I switch to root on my Centos system, that fails to add /sbin to the path. I don't know if that is specific to my Centos system. In case the OP has that same issue, I suggested
Quote:

/sbin/fdisk -l
I expect fdisk is in the same place on his Centos as on mine.

cent_uries@yahoo.co.id 01-31-2012 04:05 AM

Quote:

Originally Posted by johnsfine (Post 4585841)
I still can't nail down the details without seeing the partition

dear Johnfine, i'm sory so late to reply, as you know i have no "pulsa" to be Online.
please see below details:
[root@localhost /]# /sbin/fdisk -l

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 2 8683 69738165 f W95 Ext'd (LBA)
/dev/hda2 * 8684 9728 8393962+ 7 HPFS/NTFS
/dev/hda5 2 6120 49150836 7 HPFS/NTFS
/dev/hda6 6121 6133 104391 83 Linux
/dev/hda7 6134 8683 20482843+ 8e Linux LVM

what should i do now.
my appologize to disappoint everybody.

johnsfine 01-31-2012 07:47 AM

Do you know how to edit text files in Linux?

At the end of the file you listed ( /boot/grub/grub.conf ) there were three lines:
Code:

title Other
rootnoverify (hd0,4)
chainloader +1

Those lines represent an option to boot some other OS.

You need to change the 4 to 1 because your bootable Windows is on the partition grub calls hd0,1. (The rest of Linux calls that sda2).

The word Other is what will be displayed on the grub menu to offer you the choice f what to boot. You can edit that to say anything you want to appear in that menu.

cent_uries@yahoo.co.id 01-31-2012 11:47 PM

It's done. thank you very very much..
 
[QUOTE=johnsfine;[/QUOTE]

Dear Johnfine, You're the best.It's done. Now i could access my windows with all my data. thank you for guide me, and also all off you who help me for solution, aazkan tq for understanding my poor english,sundialsvcs and T3RM1NVT0R thank you for your kindess..God Bless you All.


All times are GMT -5. The time now is 09:37 AM.