Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
fdisk knows nothing of file-systems, and more to the
point, it's not trying to detect them. To change the
partition type (this is what you're actually looking at)
you use fdisk and then t (for type).
Thanks Tinkster, That worked great. I then boot off a Windows 98 boot floppy and formated the /dev/hda5 partition so I could make use of the integrity check of format.com. That made my partition table look like this:
Code:
root@0[knoppix]# fdisk -l
Disk /dev/hda: 40.9 GB, 40982151168 bytes
16 heads, 63 sectors/track, 79408 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1920663 3757825 925929529+ 68 Unknown
Partition 1 does not end on cylinder boundary.
/dev/hda2 1319628 1854326 269488144 79 Unknown
Partition 2 does not end on cylinder boundary.
/dev/hda3 534712 1921977 699181456 53 OnTrack DM6 Aux3
Partition 3 does not end on cylinder boundary.
/dev/hda4 * 1383560 1383581 10668+ 49 Unknown
Partition 4 does not end on cylinder boundary.
Partition table entries are not in disk order
root@0[knoppix]#
Anyone have any idea how to put it back to the way it was?
I can't see how Windows' format would scramble the partition-table
in all honesty ... did you (by any chance) let it "use the whole
available disk-space" via DOS' fdisk?
nope. I had 2 disks available to me from dos. c: (/dev/hda3) and d: (/dev/hda5). I then did format d: and everything went ok. I rebooted right after the format finished only to find my partition table went poof. Any ideas on how to fix it?
I may be wrong about this, but i think i see something strange in your original
fdisk listing. It appears that your hda4 and hda5 are both using the same physical
disk space, yet being referenced twice - once as windows 'f' and once as 83 linux. Im really
not too sure about this, but i've never seen that before...
/dev/hda4 4319 4981 5325547+ f W95 Ext'd (LBA)
/dev/hda5 4319 4981 5325516 83 Linux
/dev/hda4 and /dev/hda5 are essentially the same partition because /dev/hda4 is an extended partition and /dev/hda5 is a logical partition inside of it.
fdisk /dev/hda
and then change the type for each partition accordingly
83 for Linux, 82 for Linux swap, c for the extended partition
and f for the FAT partition(s).
Originally posted by Moses420ca /dev/hda4 and /dev/hda5 are essentially the same partition because /dev/hda4 is an extended partition and /dev/hda5 is a logical partition inside of it.
Yes, i understand this but look at the listing again. It shows that the extended partition
is being used by both windows and linux. This may not be an issue, but as i said, i've
never seen this type of listing before.
Use cfdisk if you want an easier fdisk. Partitions that you are going to be used for FAT or FAT32 needs a partitin type of b. The utility cfdisk is a front end to fdisk.
By typing mkfs.vfat will format the drive but it will not check for bad sectors. If you mount the partition as vfat, you should be able to access it. Windows and DOS will have problems.
To fix your partition table. Use cfdisk to compare the start and end cylinders of each partition that represents the information that you gave from your first post. You can change the partition table as many times as you like. Each partition table change you have to reboot or run hdparm to re-calculate the geometry. Your data will be still be there. Do not format the partitions or your data will be history.
Quote:
you don't want to format,
you want to create a filesystem.
just try
mkdosfs /dev/hda5
if nothing works delete partition and create a new one with fdisk at least that should work.
Format is the same thing as create a filesystem. You need to format before writing/reading data or else the computer will spend a lot of time writing/reading the storage medium. The term format means it will draw a grid on the medium to make the data oranized instead of all over the medium.
Well. All is back to rights. I reinstalled my mbr by grub-install /dev/hda and my /dev/hda5 partition is usable under Windows XP and Linux but not under DOS now. So I'm back at the beginning.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.