Solved

partition problem

Posted on 2004-08-01
28
699 Views
Last Modified: 2013-12-06
hi experts,
i will be really thankful if someone could help me out in this problem.
I installed fedora core recently, I have win Xp home installed already. I used parition magic to partition my hard drive. i partitioned 55 Gb to 20GB and 35GB. Installed Linux in that 35GB, while installing i made 7GB as root partiton and another 1Gb swap and 10 Gb (named "/home") for my data,s so total 18GB, rest 17Gb i kept for windows. Now when i am booting into windows i cannot see that partition. Moreover there are four partiton in Linux, named as Hard Disk[/], Hard Disk(hda5)[/],Hard Disk(hda6)[/home],Hard Disk[/home],Hard Disk[/var/lib/nfs/rpc_pipefs]
I really dont know what happend? I am new to Linux. Also when i am trying to acess Disk[/] it gives me the following error "mount: according to mtab, /dev/hda5 is already mounted on /
mount failed
Please check that the disk is entered correctly."
But no problem accesing Hard Disk(hda5)[/]. Same error message for Hard Disk[/home] and no problem accesing Hard Disk(hda6)[/home].
One more thing i notice is Hard Disk[/], Hard Disk(hda5)[/] have same contents. Same with Hard Disk(hda6)[/home],Hard Disk[/home], they also have same contents.
i will appreciate the help. Please help me out, i am a newbie in Linux.
One more question not related to the problem mentioned above, Why this webpage looks awkward in linux.i mean question body column is at the middle of this webpage in windows but its on the right hand side a small column in linux, i know i did some settings wrong. anyway the problem above is the serious one. please help me in that. ,
thanks in advance.
deep
0
Comment
Question by:deepthiji
  • 13
  • 9
  • 4
  • +1
28 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 11690409
From Linux what does 'fdisk -l /dev/hda' show?

> Now when i am booting into windows i cannot see that partition.

Which partition? The windows partition or the 17GB area?
0
 
LVL 3

Author Comment

by:deepthiji
ID: 11690582
hi jlevie,

>Which partition? The windows partition or the 17GB area?
    yea the 17 Gb partition which i left for windows. i can see the 20 GB partition where windows is installed, i did not mess with that yet >)
pls considor i am new to Linux, i am trying to swtich from Windows to linux, i typed  'fdisk -l /dev/hda' in a shell konsole it says,
bash:fdisk:command not found.
When i typed in run command it says " Coudl nt run the specified command"
0
 
LVL 40

Expert Comment

by:jlevie
ID: 11690654
/sbin apparently isn't in your PATH. The command will have to be executed by root and '/sbin/fdisk -l /dev/hda' will work because it explictly specifies the path to fdisk.
0
 
LVL 3

Author Comment

by:deepthiji
ID: 11690671
hi jlevie,
thanks for the quick reply. this is what i got
/sbin/fdisk -l/dev/hda

/sbin/fdisk: invalid option -- /

Usage: fdisk [-b SSZ] [-u] DISK     Change partition table
       fdisk -l [-b SSZ] [-u] DISK  List partition table(s)
       fdisk -s PARTITION           Give partition size(s) in blocks
       fdisk -v                     Give fdisk version
Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors
0
 

Expert Comment

by:theravibes
ID: 11690678
Why not just partition as follows...

hda1 - /boot - 250MB
hda2 - /windows/c - 17GB
hda3 - / - 35GB
hda4 - <swap> - 1GB

then you should modify GRUB or LILO to include 2 boot paths

Linux - /dev/hda1
Windows - /dev/hda2

If you wish to include a /home partition or any others for that matter, then add an additional partition under hda5 and so on.

Also, there isnt a real need to specify the multiple mount points any more since hard disk sizes have dramatically increased.
You can still manually specify additional mount points if you would like.

Personally, I would say that you should include a separate /home partition if there is any doubt that anything could happen that would need a re-image.

Hope this helps,
Tyson Edwards
0
 
LVL 3

Author Comment

by:deepthiji
ID: 11690680
when i typed /sbin/fdisk -l
it says
"Cannot open /dev/hda"
0
 
LVL 3

Author Comment

by:deepthiji
ID: 11690708
hi theravibes,

>"Why not just partition as follows...
hda1 - /boot - 250MB
hda2 - /windows/c - 17GB
hda3 - / - 35GB
hda4 - <swap> - 1GB"

you mean i have to partition like this? actually i did not get you, sorry English is not my first language.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 11690738
You must execute the command as root, an ordinary user account hasn't the privs to read the partition table. The command is '/sbin/fdisk -l /dev/hda'. Note that there's a space following fisk and one following -l.
0
 
LVL 3

Author Comment

by:deepthiji
ID: 11690747
hi,
this is what i got
root@localhost anwar]# sbin/fdisk -l /dev/hda
bash: sbin/fdisk: No such file or directory
0
 

Assisted Solution

by:theravibes
theravibes earned 100 total points
ID: 11690972
Deepthiji,

In my original message, I did infact mean that you should use the following values for your partition table.

hda1 - /boot - 250MB
hda2 - /windows/c - 17GB
hda3 - / - 35GB
hda4 - <swap> - 1GB

If you have any questions about how to go about doing this, I will go into further detail for you about how to do this.

By partitioning like this, you will not have a problem if you are dual booting between Windows and a Linux release with the 2.6 kernel.

Tyson Edwards
0
 
LVL 20

Expert Comment

by:Gns
ID: 11691850
Could you please report the verbatim output of the mount command? This will give us a clue as to why the /dev/hda "convenience" doesn't work (it is probably because there is no such device handle... I'm guessing you're system is using the /dev/ide/host0/bus0/target0/lun0/part1 "longhand":-). It would also provide an incling as to how linux is seeing things:-).

When you used PQmagic to do the split, it is very likely you "tagged" the 17 GiB partition as something... but never performed a format of it...

About theravibes advise: This is a very generic, and often good, strategy... to have /boot "early on the disk" makes sure linux can boot. But since you obviously _can_ boot you really don't _need_ change that part.

Provide the mount output, and I'm sure we'll (finally) be able to get an fdisk listing that will lead to us understanding (and remedying) why the 17 GiB partition is "invisible";-).

-- Glenn
0
 
LVL 40

Expert Comment

by:jlevie
ID: 11694713
"sbin/fdisk -l /dev/hda" won't work because the leading slash is missing. Please try to execute the command exactly as I described.
0
 
LVL 20

Expert Comment

by:Gns
ID: 11694784
LOL, I must have been blind... Good spot Jim.

-- Glenn
0
 
LVL 3

Author Comment

by:deepthiji
ID: 11694854
hi jlevie,

Finally i ran the fdisk and found out my lost 18 GB partition.  i got an article about fdisk commands all that and finally i managed to get my 18 GB=). i got into windows and formated that partition and i can use that now. Now my Other problem is still alive.  
>"when i am trying to acess HardDisk[/] it gives me the following error "mount: according to mtab, /dev/hda5 is already mounted on /
mount failed Please check that the disk is entered correctly."
But no problem accesing Hard Disk(hda5)[/]. Same error message for Hard Disk[/home] and no problem accesing Hard Disk(hda6)[/home].
One more thing i notice is Hard Disk[/], Hard Disk(hda5)[/] have same contents. Same with Hard Disk(hda6)[/home],Hard Disk[/home], they also have same contents."

please help me to ssolve this. I am pasting  what i got now when i ran /sbin/fdisk -i /dev/hda, incase if you need to solve this problem.
Disk /dev/hda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        2608    20948728+   7  HPFS/NTFS
/dev/hda2            2609        7296    37656360    f  W95 Ext'd (LBA)
/dev/hda5            2609        3500     7164958+  83  Linux
/dev/hda6            3501        4775    10241406   83  Linux
/dev/hda7            4776        4902     1020096   82  Linux swap
/dev/hda8            4903        7296    19229773+   7  HPFS/NTFS

thanks
deep
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 40

Expert Comment

by:jlevie
ID: 11695402
Okay, now we can see what you have. I presume from the question that Windows still boots. The problem now is is that you "can't see" the partition shown as /dev/hda8. Was that previously visible in windows (most likely as the D: drive), or is it a new partition that you wish to make into a D: drive?
0
 
LVL 3

Author Comment

by:deepthiji
ID: 11695594

okay, about /dev/hda8 , it was there previously.when i ran fdisk before making the hda8 partiton what i got is somthing like this i guess.
dev/hda1   *           1        2608    20948728+   7  HPFS/NTFS
/dev/hda2            2609        7296    37656360    f  W95 Ext'd (LBA)
/dev/hda5            2609        3500     7164958+  83  Linux
/dev/hda6            3501        4775    10241406   83  Linux
/dev/hda7            4776        4902     1020096   82  Linux swap
/dev/hda8            4903        7296    19229773+  X  Linux

I ran fdisk and  made the partiton /dev/hda8 and change the file sysytem because i wanted to use that pariton for windows. . Now i can see that partition from windows. I formated that drive in windows and i can use it now, Its E: in my system . Now what i see in windows is C: and E: i think that is hda1 and hda8. Earlier i could not see the E: Drive which is 18Gb.

Now what i see in Linux is this
Hard Disk[/]
Hard Disk(hda5)[/]
Hard Disk(hda6)[/home]
Hard Disk[/home]
Hard Disk[/var/lib/nfs/rpc_pipefs]
This is my problem , five partitoins. and the error message that i mentioned above while openning Hard Disk[/]   and Hard Disk[/home]
thanks once again for the quick reply.
deep



0
 
LVL 40

Expert Comment

by:jlevie
ID: 11696225
If the partition type was Linux after the repartitioning execise you would not have been able to use it from XP. Switching the type to HPFS/NTFS and then formating the partition from XP was the correct solution.
0
 
LVL 3

Author Comment

by:deepthiji
ID: 11696392
hi jlevie,

I think i made you confused enough.>). When i asked this question for the first time i had two problems. One is i could not see one of my paritions in windows . This was my out put when i ran fdisk at that time
dev/hda1   *           1        2608    20948728+   7  HPFS/NTFS
/dev/hda2            2609        7296    37656360    f  W95 Ext'd (LBA)
/dev/hda5            2609        3500     7164958+  83  Linux
/dev/hda6            3501        4775    10241406   83  Linux
/dev/hda7            4776        4902     1020096   82  Linux swap
/dev/hda8            4903        7296    19229773+  X  Linux

 I think i solved that problem and now i can see that partition , that is my E: 18GB.
This is my ouput of fdisk when i ran now(after solved the 1st problem).

Disk /dev/hda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        2608    20948728+   7  HPFS/NTFS
/dev/hda2            2609        7296    37656360    f  W95 Ext'd (LBA)
/dev/hda5            2609        3500     7164958+  83  Linux
/dev/hda6            3501        4775    10241406   83  Linux
/dev/hda7            4776        4902     1020096   82  Linux swap
/dev/hda8            4903        7296    19229773+   7  HPFS/NTFS

Now my problem is (second one)
>"when i am trying to acess HardDisk[/] it gives me the following error "mount: according to mtab, /dev/hda5 is already mounted on /
mount failed Please check that the disk is entered correctly."
But no problem accesing Hard Disk(hda5)[/]. Same error message for Hard Disk[/home] and no problem accesing Hard Disk(hda6)[/home].
One more thing i notice is Hard Disk[/], Hard Disk(hda5)[/] have same contents. Same with Hard Disk(hda6)[/home],Hard Disk[/home], they also have same contents."
Hope now you are clear now..
0
 
LVL 40

Expert Comment

by:jlevie
ID: 11696627
What does /etc/fstab contain and what does 'df' show?
0
 
LVL 3

Author Comment

by:deepthiji
ID: 11696679
This is what df shows,

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda5              7052464   3846508   2847712  58% /
none                    250104         0    250104   0% /dev/shm
/dev/hda6             10080488     39984   9528436   1% /home

/etc/fstab contains ,

LABEL=/1                /                       ext3    defaults        1 1
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
LABEL=/home1            /home                   ext3    defaults        1 2
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
/dev/hda7               swap                    swap    defaults        0 0
/dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,owner,kudzu,ro 0 0

0
 
LVL 40

Expert Comment

by:jlevie
ID: 11696884
>"when i am trying to acess HardDisk[/] it gives me the following error "mount: according to mtab, /dev/hda5 is already mounted on /

What are you doing when you see that error?

I find it interesting that the partition LABELs are /1 & /home/1. Ordinarily one only sees that when an install is done on a system that already has another disk with a Linux installation. Is that the case here?
0
 
LVL 3

Author Comment

by:deepthiji
ID: 11697010
>What are you doing when you see that error?
I click "Ok" when the error message pops up,   The error message pop up two times and i clik just "Ok " (i dont have any other choice i guess). After clicking ok i can view the contents in the partition.
>I find it interesting that the partition LABELs are /1 & /home/1. Ordinarily one only sees that when an install is done on a system that already has another disk with a Linux installation. Is that the case here?

Thats is not the case here, I had only Xp home installed in my comp. Also i have only one hard drive. I partitioned my hard drive using partion magic  and made the 55 GB to 35 and 20.
0
 
LVL 40

Assisted Solution

by:jlevie
jlevie earned 200 total points
ID: 11697289
> I click "Ok" when the error message pops up,

Yes, but what did you do that lead to the error message popping up?

As root I'd like to see what:

/sbin/tune2fs -l /dev/hda5 | grep "volume name"
/sbin/tune2fs -l /dev/hda6 | grep "volume name"

shows.
0
 
LVL 3

Author Comment

by:deepthiji
ID: 11698314
>Yes, but what did you do that lead to the error message popping up?
Ok, I use Graphical U I, KDE .
 I go to "start here"  menu in my desktop which will open konqueror.
i click the services tab on the left had side of konqueror and it shows 'Audio CD Broweser' , 'Devices' , 'Font' etc etc ......
I go to devices and i can see 4 hard dics (partitions) there, named as :
Hard Disk[/]
Hard Disk(hda5)[/]
Hard Disk(hda6)[/home]
Hard Disk[/home]
Hard Disk[/var/lib/nfs/rpc_pipefs]
in the same above order. When i enter into Hard Disk[/] and Hard Disk[/home] it gives the mentioned error.

/sbin/tune2fs -l /dev/hda5 | grep "volume name"  did not show anything
same with the other command. in the voulume name i wrote, "/home" and for another one" /  " , was i correct?
0
 
LVL 3

Author Comment

by:deepthiji
ID: 11698338
> When i enter into Hard Disk[/].....................................

What i mean is ,  when i click on that
0
 
LVL 20

Expert Comment

by:Gns
ID: 11701857
Ok, so that problem is more of a display bug in KDEs konqueror. Not much to bother with;).

In Linux/Unix all partitions that have a filesystem (is formatted) are presented as one big filesystem with / being the topmost directory (this is the filesystem  labeled /1 above). All other filesystems are then "grafted" onto this upsidedown tree with the mount command.
So you never need access an individual filesystem apart from the filesystem maintenace commands (fsck (which is a bit like chkdskin windoze), mount etc), but rather access the files solely according to the path... So no need to specify c:/etc/fstab, or d:/home/... as in windows, but rather just access /etc/fstab or /home/... directly. So also in a GUI filemanager like konqueror. If you'd like to browse around in your filesystem(s), just click the up arrow a couple of times:-).

The konqueror error might have something to do with the labels, so one could well adjust that, but since there is a margin for error there, one might as well leave it be.

-- Glenn
0
 
LVL 3

Author Comment

by:deepthiji
ID: 11705502
Ok, so you are saying no need to worry about that error? Will this effect me anyways in future? Anyways thannks for the comments, So how will i give the points?, to whoom=)
0
 
LVL 20

Accepted Solution

by:
Gns earned 200 total points
ID: 11705883
Yes. Probably not. And finally: It's your question, you decide... You can choose one comment as your answer (the one that helped you best would be a likely candidate:-), or split them any way you like ... In the latter case, just click the "Split" link just above the comment entrybox.

-- Glenn
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now