Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I have dual boot linux RH8 and w2k setup. I had this FAT32 partition which I wanted to convert to EXT3. I did fdisk, typed p for info, typed t to change the partition type to linux. Did "mkfs -t ext3 <>". Mounted the partition. Everything went fine. I could use it.
But then, I booted into w2k. Took looooong time to boot, warned about chdsk needed to be run on a volume. I had forgotten that that partition was mounted as D: in w2k. w2k was un-usably slow. So, I deleted the logical drive from w2k with disk mgmt. The disk space became free and D: no longer existed.
Went back to linux, it of course cribbed about partition mount because w2k had just screwed it. Created a new partition from the free space. Linux was back as it was before. Now I booted back in w2k. It still said that the FAT32 volume had problems. Took long to boot. Any disk tools took forever to load. No reference to D: in explorer. I found the volume which it cribbed about during boot in the registry under HKLM\...\MountedDevices alongwith other usual suspects. Thinking that it will correct, I deleted that entry and booted again. Same cribs. It had created another entry with a different label in registry with the same value.
Another thing is that even norton ghost reports it as FAT32 partition. But can't do anything with it beyond that. Only linux believes that its EXT3 partition and is happily living with it.
Right now I can't use w2k, its too damn slow because it keeps looking for this volume which is not it's anymore.
How do I make w2k not look for that volume? Any help will be appreciated.
More troubleshooting done. I went ahead and deleted the partition from linux again. Rebooted. Booted into windows. Booted fine, no hang ups, showed the space as free. Booted again into w2k, just to make sure it was fine. It was. Went back into linux and created the partition, re-booted. Then booted into w2k. Again the same problem, it thinks that there is a FAT32 partition and starts to correct it, while it is actually an EXT3 partition.
Some good times there eh? Any chance of chopping it out completely from w2k, or do you only have the choice to format it Fat32/NTFS? If you can chop it out, make it invisible, that'd be good.
Then go into linux (or even if you can't..) and just delete the partition. Don't "t" to change the type, but rather "d" to delete it, then "n" to create a new one, and finish out the rest of the operation.
Post up what you get from:
fdisk -l
As well. Tell us a bit about your drive layout/desires.
I had used 'd' to delete and 'n' to create last two times. The problem is when I delete the partition from linux, w2k is very happy and reports it as free space, no problem. But when I re-create the partition with 'n', it starts seeing it as a FAT32 partition. after "mkfs -t ext3 /dev/hda7", linux 'mount' mounts it as vfat by default but as ext3 with "-t ext3", which is bizzare to say the least.
The bottom line is that if you use cfdisk or fdisk to change the size
of a DOS partition table entry, then you must also use dd to zero the
first 512 bytes of that partition before using DOS FORMAT to format the
partition. For example, if you were using cfdisk to make a DOS parti-
tion table entry for /dev/hda1, then (after exiting fdisk or cfdisk and
rebooting Linux so that the partition table information is valid) you
would use the command "dd if=/dev/zero of=/dev/hda1 bs=512 count=1" to
zero the first 512 bytes of the partition.
BE EXTREMELY CAREFUL if you use the dd command, since a small typo can
make all of the data on your disk useless.
I had read about it in the man page, but I don't see how that applies to my situation. I never created a DOS partition from linux. All the fat32 and win95 partitions you see above were created before linux was installed.
Can you please elaborate as to how this applies to this situation? And which parition do I make the first 512 bytes zeroes of?
I had this FAT32 partition which I wanted to convert to EXT3.
FAT32 is in the category of DOS 6 partitions mentioned on the man page. So you modified a DOS6 partition.
I'm not 100% sure that this does apply, but let me explain what I think may have been the problem.
Using fdisk you converted the FAT32 to type ext3 and then did an mk2efs on that partition.
In the partition table there is enough information to tell linux that it is an ext3 partition, so everything is sweetness and light.
When you went back to Windoze, the Windoze system reads the partition table and looks for more information than is used by linux or is written by FDISK. The size of the partition is contained in there as well. Let me illustrate very crudely
Partition table info -- purely illustrative -- highly inaccurate
<-----------------------------512 bytes--------------------------------->
before <this is a FAT32 partition><size of partition><who knows what else other info>
fdisk merely changes this to
after <this is ext3 parition><this is same as above><this is same as above>
So Windoze sees some strange information about ext3, but the
rest of the size of the parition info is still intact and anything else
So being clever, it tries to repair it.
A better example is when you try to resize a partition with fdisk eg
before : hda1 8 GB
fdisk change to 4 GB
mkdosfs
linux reports file system size as 4 GB
Go back to Windoze, and it will tell you the size is 8 GB
If you try and use it, Windoze will overwrite files in your ext3 filesystem.
Use Format C: and it will format it as 8 GB
This is why you have to use dd to wipe out that other Windoze related information in the partition table information.
The only reason I know about this, is because I found out by hard experience .... :+}
So what you need to do is,
1) do you have any vital data on the parition which you converted
from FAT32 to ext3?
2) if so and you are runnign windoze, stop immediately and
boot into Linux
3) backup those essential files from that partition to another
using tar
-------------------
Backup.
Leave the linux partition table as is.
Unmount.
Wipe the 512 bytes.
mkfs to format as ext3.
Mount.
Restore the data.
Now free to go to windows.
-------------------
Is that it or some reboots required in between? I have become paranoid now, so please understand. And thanks for your time in responding, you have been great!
Corin, I can't thank you enough! You rock my friend!
It corrected the problem. Windows boots great and works like before. Linux is happy as always.
One quirk: I typed /dev/hd7 instead of /dev/hda7 with 'dd' command, after MUCH checking and being VERY careful. I mean what is it? When things have to go wrong, they do go wrong. I almost fainted after hitting enter. But lucky for me, there is no device by that name. It just created a 512 bytes file /dev/hd7.
O Man! This has been a very tense evening. I need to chill out with some beer!
As I said, the reason one gets to know about these things is not by just sitting down an reading throught a book "Linux in 24h' or the man page or whatever, but by actually coming face to face with a problem and [ ]in desperation[/i] trying to solve it (as I did when I shrank my FAT32 winC partition and Windoze kept telling me it was still the same size) :+)
However, it does pay to read what programs tell you, since when you use FDISK it does exit with the warning about
"if you have modified any DOS partitions, then check the man page"
And with regard to dd, it is absolutely essential to check and double check what one has written since
dd if=some_device of=/dev/hda{wrong_number} ... other options or not..
can in one step wipe your entire {thesis, web pages, collection of hours of downloading time of MP3s, movies whatever}.
But of course, you do have backups? :+)
So as the man page says, exercise extreme caution when using dd.
backups are fine but still a pain. during that 'faintout' period I was already thinking of tough times ahead restoring from backups. But I lucked out in the end.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.