Help - Search - Members - Calendar
Full Version: Knowing Your Partions?!?!
Linuxhelp > Support > Technical Support
It's a long story but I lost the info in my fstab file. This is more of a bummer because I don't know anything about my partions. Is there any way that I can find info about how my single HD is partioned, so I can put the info back in fstab?

What distro version are you running?

Run the command as root:
fdisk -l (small L)

This will list the partitions and what filesystem type they are.

However it will not tell you if the linux partitions are ext2, ext3, reiserfs etc. Or what partition is which like /boot or / etc.

The best you could do is mount each partition from the fdisk and see. The swap parititon will say swap so that is easy.
Thanks for the help, but when I do "fdisk -l" i don't get anything. Nothing. which is all a bit confusing because I know i've got 2 partions to my one hard drive. I know one is vfat and the other ext3.

I've got /dev/hda2 set to mount to / and it's ext3

When I type "mount -t vfat /dev/hda1 /" it does it, still nothing shows under "fdisk -l" but when I type in "df" it comes up. Both of them, thing is the info on them is identical . . . suggesting a problem somewhere. I really don't mind loosing what's on hda1 so I don't mind formatting it to ext3 if that help.

I'm running debian stable, and strugglin' to do anything with it, but learning alot at the moment!


fdisk -l /dev/hda

should also work.

You should not be able to mount hda1 which is vfat to /. If you do that then what happened to /. You should create directory like /mnt/disk and mount hda1 to it.
When I run

"fdisk -l /dev/hda" I do get the list up, which helps. Now i've got the small problem of the fact that /hda1 which has the star for the boot, is the one that I want to reformat and use under linux. It's currently on FAT16 and did have win95 on it, but i tried to reformat it and took all the data off but don't know how to change it to ext3.

For formating see man pages for mk2fs and tune2fs. To create a ext3 partition use the -j option.

To change an ext2 to ext3
tune2fs -j /dev/hdxy.

BTW did you change the filesystem id from FAT16 to linux?
I'm asuming that lilo will be on the boot and will i loose it if I redo it to ext3?

Thanks so much for all your help

You don't lose any data converting an ext2 to ext3
Hiya, Many thanks for all you help michaelk!!

Just to say that i'm off to africa in a few days for a month, i'll be in the sticks with internet access a mere 3hrs drive away. I'm guessing I won't actually get to it while i'm there. So I wont be around.

When I get back however, I'll begettin a new router and hub so I'll be back with vengance!

have a great trip jay-jay.
Thanks Joey, I'll try to!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.