Alan McKinnon píše v Út 23. 01. 2007 v 21:55 +0100: > On Tuesday 23 January 2007 19:47, Hans-Werner Hilse wrote: > > > Did you reboot between changing the partition layout and creating > > that new partition (and moving data)? Otherwise the kernel wouldn't > > be aware of the new partition layout. Well, if everything you wrote > > is correct, that data should have ended up on that former Windows > > partition and that partition should now be an ext3 one. But if you > > just didn't care and mounted the old linux partition (sdb2 at that > > point in time before the new partition layout), copied data and you > > _then_ rebooted -- then you would have written your data to a > > partition that was only a reminiscence in the kernel's structures and > > not > > corresponding to what cfdisk wrote to the HD. That would be an > > explanation why the next boot failed. > > > > > When I do "mount /dev/sdb1 /mnt/zaloha" at /mnt/zaloha I see that > > > old Windows NTFS partition that I already deleted (There are > > > "Program Files", "WINDOWS", ...). I don't understand why (somewhere > > > I read that ext3 start writing at the middle of the disk space to > > > prevent defragmentation). > > > > Deleting the partition is something that only affects the boot > > sector. Ext3 should in fact have overwritten this with it's first > > superblock. So the mkext2fs you issued did definitively hit the wrong > > partition. > > > > So my suggestion is: try "gpart -w ext2,1.5 /dev/sdb" to find your > > partition (even better: write back the backup you've made from the > > old partition table. Errrm...) > > Some background here to elaborate on what Hans has said: > > It looks like when you moved the data onto the new partition, it got > written somewhere on the disk. However, the kernel's idea of how the > partitions are laid out at that time and what fdisk just wrote to the > disk probably don't agree and the kernel had got it wrong.... This does > happen when you delete two or more partitions and create one large one. > > That's the bad news. The good news is that unless you did something to > wipe the disk clean, the data is there somewhere and you need to find > it. Hans' gpart command will search the disk looking for the sequence > of data that is found at the start of a filesystem, and will then make > a smart estimate as to what the partition ought to look like. > > The next good news is that you can create and delete partitions many > times and still get the data back intact as long as you don't overwrite > it. fdisk updates the partition table right at the start of the disk > and does nothing else so you can always undo these changes. Until you > are happy that everything is back it will be smart to mount this > partition read-only so it can't be changed: > > mount -o rw /dev/sdb1 /path/to/mount/point > > You say in your original mail that after moving the data "everything was > fine". What exactly do you mean by that: > > 1. The command ended without failure so you assume it moved stuff > correctly, or > 2. You proved the move was done by mounting the partition and all your > files were there, or > 3. Some other reason? > > alan >
-- gentoo-user@gentoo.org mailing list