LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-09-2004, 04:10 AM   #1
morrisset
LQ Newbie
 
Registered: May 2004
Posts: 23

Rep: Reputation: 15
how to know my linux partition?


Hi,

my have 2 os on my pc, XP and RHlinux, XP has 3 partition, C,D,E and the rest is for linux.

now i want to update my kernel, meet some question, one is to decide which the root partition use on my linux, /dev/hdaX

I really don't know how to figure out my linux partition, i use hardware browse, but it seems no use for me, it shows that i have hda2--hda9, which hda5-hda6 is fat32(i know for win),
hda7-8 are ext3 and hda9 is linux-swap

how can i know which is my root partition? Does anybody be so kind to tell me?

thx in advance!!
 
Old 07-09-2004, 04:18 AM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Issue "df -h" without the quotes...

It will look something like this
Code:
bash-2.05b$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hdd2             954M  492M  463M  52% /  <-- that's my root partition
/dev/hdd1              48M   37M   12M  77% /boot
/dev/hdd3             4.7G  2.0G  2.7G  43% /usr
/dev/hdd5              29G  4.2G   25G  15% /home
/dev/hdd6             1.9G  108M  1.8G   6% /var
/dev/hdd7             955M   38M  917M   4% /tmp
/dev/sdb1              38G   30G  7.8G  80% /mnt/sdb1
/dev/hda7              14G  947M   14G   7% /DATA_FAT32

Last edited by Bruce Hill; 07-09-2004 at 04:19 AM.
 
Old 07-09-2004, 05:55 AM   #3
scatterhead
LQ Newbie
 
Registered: Jul 2004
Location: Zagreb, Croatia
Distribution: Debian3.0,suse9
Posts: 5

Rep: Reputation: 0
Re: how to know my linux partition?

[QUOTE]Originally posted by morrisset
Hi,

my have 2 os on my pc, XP and RHlinux, XP has 3 partition, C,D,E and the rest is for linux.


afaik you can have 4 primary partitions
hda1-hda4 are reserved for primary partitions
i assume you have only one primary and winxp is installed on it
that is hda 1 or C: under windows
other partitions are logical partitions inside the extended partition.
hda5 is for extended partition
so on hda6 is first logical partition which is win D, hda7 win E
your first linux partition should be hda8 and so on (if you have few linux partitions....). should be, but doesn't have to be. Your first logical partition could be linux one.

I assumed wrong you have two primary partitions hda1 & hda 2 (C & D)
extended partition hda5
logical part hda6 (fat32(E))
logical part hda7 (ext2) - probably /boot
logical part hda8 (ext2) - probably / (root)
logical part hda9 (swap)

you can also just type mount and you will see which hd partition is mounted as what :
deda:~ # mount /dev/hda2 on / type reiserfs (rw) root
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5) /dev/hda1 on /boot type ext2 (rw)
tmpfs on /dev/shm type tmpfs (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
 
Old 07-09-2004, 06:03 AM   #4
scatterhead
LQ Newbie
 
Registered: Jul 2004
Location: Zagreb, Croatia
Distribution: Debian3.0,suse9
Posts: 5

Rep: Reputation: 0
.

Last edited by scatterhead; 07-09-2004 at 06:08 AM.
 
Old 07-09-2004, 06:09 AM   #5
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Re: Re: how to know my linux partition?

Quote:
Originally posted by scatterhead


you can also just type mount and you will see which hd partition is mounted as what :
deda:~ # mount /dev/hda2 on / type reiserfs (rw) root
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5) /dev/hda1 on /boot type ext2 (rw)
tmpfs on /dev/shm type tmpfs (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
Thanks for the mention of the command "mount" - I didn't realize that would give the output.

To make your output easier to read, you can either use the Code button in
the Post Reply window and paste your output there, or put [_code_] without
the underscores before it, and [_/code_] without the underscores after it,
so it looks like this:

Code:
bash-2.05b$ mount
/dev/hdd2 on / type reiserfs (rw)
proc on /proc type proc (rw)
/dev/hdd1 on /boot type reiserfs (rw)
/dev/hdd3 on /usr type reiserfs (rw)
/dev/hdd5 on /home type reiserfs (rw)
/dev/hdd6 on /var type reiserfs (rw)
/dev/hdd7 on /tmp type reiserfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sdb1 on /mnt/sdb1 type vfat (rw,noexec,nosuid,nodev,umask=1000,user=mingdao)
/dev/hda7 on /DATA_FAT32 type vfat (rw,noexec,nosuid,nodev,umask=1000,user=mingdao)
/dev/scd0 on /mnt/cdrw type iso9660 (ro,noexec,nosuid,nodev,unhide,user=mingdao)
 
Old 07-09-2004, 06:21 AM   #6
scatterhead
LQ Newbie
 
Registered: Jul 2004
Location: Zagreb, Croatia
Distribution: Debian3.0,suse9
Posts: 5

Rep: Reputation: 0
Chinaman
I have 6Gb HD for debian, any proposals how to distribute that space among /usr /home /var /tmp & / partitions. Minimal values or sometin.
should run samba,ssh,KDE, and be used as home internet gateway
tnx
 
Old 07-09-2004, 06:32 AM   #7
scatterhead
LQ Newbie
 
Registered: Jul 2004
Location: Zagreb, Croatia
Distribution: Debian3.0,suse9
Posts: 5

Rep: Reputation: 0
Code:
Thanks for the code thing :-)
 
Old 07-09-2004, 07:33 AM   #8
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Quote:
Originally posted by scatterhead
Chinaman
I have 6Gb HD for debian, any proposals how to distribute that space among /usr /home /var /tmp & / partitions. Minimal values or sometin.
should run samba,ssh,KDE, and be used as home internet gateway
tnx
That's not exactly my forte, but these are suggestions:

I like a separate /tmp in case some log gets out of hand, without
/tmp being in / then it can't make my system inoperable. Depending
upon your needs, 512MB could be plenty - or way too much.

As for the other ones, look at how much space you're now using for
each of them, and plan accordingly. It it helps to look at mine, the ones
in the coded part of the df -h post are with a full install of Slack 10.0.
When you separate them from / especially /usr where most of the apps
are located, you can keep that / partition smaller. And with a /home
partition for any files you're saving, that is the one that grows the most.

Since you're running Debian, I would suggest that you go to the website
of Markus Welsch who IMO is a real Debian and security guru...

You're welcome for the code thing. Look at others and try them by using
the Preview Reply button.

Last edited by Bruce Hill; 07-09-2004 at 08:20 AM.
 
Old 07-09-2004, 08:10 AM   #9
morrisset
LQ Newbie
 
Registered: May 2004
Posts: 23

Original Poster
Rep: Reputation: 15
thx for you help!

here is my linux information, but i can't understand it, could someone help me?

this is my partiton table
Quote:
Disk /dev/hda: 80.5 GB, 80583068672 bytes
255 heads, 63 sectors/track, 9797 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1020 8193118+ b Win95 FAT32
/dev/hda2 1021 9796 70493220 f Win95 Ext'd (LBA)
/dev/hda5 1021 3570 20482843+ b Win95 FAT32
/dev/hda6 3571 6630 24579418+ b Win95 FAT32
/dev/hda7 6631 6643 104391 83 Linux
/dev/hda8 6644 9666 24282216 83 Linux
/dev/hda9 9667 9796 1044193+ 82 Linux swap
this is my /etc/fstab information
Quote:
/etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda9 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
thx in advance!
 
Old 07-09-2004, 08:15 AM   #10
morrisset
LQ Newbie
 
Registered: May 2004
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Chinaman
[B]Issue "df -h" without the quotes...
follow your instruction I do it, and here is my result:
Quote:
/dev/hda8 23G 3.7G 18G 17% /
/dev/hda7 99M 19M 76M 20% /boot<--- can I say this is my root partition? right?
none 251M 0 251M 0% /dev/shm
thx!
 
Old 07-09-2004, 08:17 AM   #11
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
You didn't issue "df -h" or "mount" but instead did "fdisk -l" and "cat /etc/fstab"

If you want help, you should follow the advice given. ;-}
 
Old 07-09-2004, 08:26 AM   #12
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
No, that is your boot partition, which is why it says /boot

Code:
/dev/hda8 23G 3.7G 18G 17% /  <-- this is your root partition
/dev/hda7 99M 19M 76M 20% /boot
none 251M 0 251M 0% /dev/shm
 
Old 07-09-2004, 08:26 AM   #13
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
No, that's your /boot partition. (It makes sence having /boot as a sep logical volume only if your computer can boot from it. )
The root partition is /dev/hda8
 
Old 07-09-2004, 09:11 AM   #14
scatterhead
LQ Newbie
 
Registered: Jul 2004
Location: Zagreb, Croatia
Distribution: Debian3.0,suse9
Posts: 5

Rep: Reputation: 0
Re: how to know my linux partition?

Quote:
Originally posted by morrisset

now i want to update my kernel, meet some question, one is to decide which the root partition use on my linux, /dev/hdaX

I really don't know how to figure out my linux partition
you have more than enough to investigate before updating kernel
i don't know exactly what that is , core of OS i suppose ;-)
i look at it like installing new service pack on windows but much more complicated
windows helped me to not understand things & to feel stupid
isn't so bad to feel that way, cant beat the feeling yet, resistance is futile.

China tnx for links & tips & tricks
 
Old 07-09-2004, 10:15 PM   #15
morrisset
LQ Newbie
 
Registered: May 2004
Posts: 23

Original Poster
Rep: Reputation: 15
scatterhead:
I couldn't agree you more,but now,I meet a big trouble

Say, my RH is 2.40 and i wanna update to 2.6.7 to make the soundcard work. for a newbie, I search for many others experience and try, after I finish compile, and reboot it, i meet kernel panic, which is the problem a mentioned before. so I try to modify grub.conf and fstab, but....2.6.7 i couldn't get in still kernel panic, now 2.40 either

I only can get in a repair filesystem(maybe) and its a read-only system, i can't change the fstab at all!!!

please, if you know the solution, please let me know! thx

for readable, i post my linux information under this thread.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
moving files from windows partition to linux partition M O L8ingN2dust Linux - Newbie 11 01-08-2006 09:11 PM
Deleted ntfs partition - added linux partition in its place - corrupt! eklhad Linux From Scratch 2 06-28-2005 01:31 AM
How can I access files in my Windows 98 partition from my Linux partition, /w BASH? Fabyfakid Linux - Newbie 4 09-17-2004 11:05 PM
What is the code to copy a file from my windows partition to my linux partition? THEBIGFISH Linux - Newbie 3 03-15-2004 10:14 PM
How to add new partition before Linux partition in an existing Linux box? ashutosh Linux - Software 3 04-23-2002 03:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration