I think I copied a file over my entire Windows partition
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.
Wow! Looks like filesystems have come a long way since I looked at FAT and UDF.
NTFS is actually a pretty solid system. It's major defect (IMO) is that it will fragment quite easily. It tolerates a lot of corruption before it goes down, and it has sufficient redundancy that if you take some minor pains to maintain it (run chkdsk periodically) it'll hold up forever.
Of course, any filesystem at all is subject to corruption; the problem with NTFS is that Windows doesn't periodically check it - unless, that is, Windows finds itself unable to start.
Linux (and pretty much every other OS in existence) does routinely schedule filesystem checks.
Copying data directly to a device is certainly possible. All 'dd' does is open it like any other file.
Without ever giving it much consideration, it had been my belief that command line tools that did reading and writing to a drive did it explicitly through the filesystem. Actually, I would certainly expect this.
In this case, one would expect any attempts to read or write any /dev would fail because there would be no filesystem attached.
Within this framework, dd would represent a different, lower level tool which accessed a device at the hardware level, bypassing all filesystems and accessing the kernel level driver that actually talks to the device ports. In this context, dd is pretty smart in terms of deciding whether or not it should talk to a filesystem (is my input or output a file, or a raw device?). I certainly would expect it to use very different drivers (and some significantly different logic) depending on whether or not it was dealing with a filesystem.
Ok, here's yet another update. I've run a repair install from the Windows install CD, and now my Windows seems to boot fine, and all my settings and files seem to be intact.
Ubuntu still doesn't see the partition, showing "vmware tools" as a volume instead.
Output from "sudo fdisk -l"
Code:
sudo fdisk -l
Password:
Disk /dev/sda: 30.0 GB, 30020272128 bytes
255 heads, 63 sectors/track, 3649 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2432 19535008+ 7 HPFS/NTFS
/dev/sda2 2433 3649 9775552+ 5 Extended
/dev/sda5 2433 3551 8988336 83 Linux
/dev/sda6 3552 3649 787153+ 82 Linux swap / Solaris
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 30401 244196001 83 Linux
and from "cat /etc/fstab"
Code:
cat /etc/fstab
# /etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# Entry for /dev/sda5 :
UUID=4d76fc56-b2ca-4816-92d0-2ad52d957433 / ext3 defaults,errors=remount-ro 0 1
# Entry for /dev/ !! UNKNOW DEVICE !! :
UUID=9AB8DFE4B8DFBD47 /media/sda1 ntfs-3g defaults,locale=en_US.UTF-8 0 1
# Entry for /dev/sdb1 :
UUID=13439e46-de8a-4ab6-a9e8-b66451974c41 /media/sdb1 ext3 defaults 0 2
# Entry for /dev/sda6 :
UUID=13285d7d-1bfd-4728-a901-4de82ce2a03b none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
I'm not familiar with fstab, so I'm not sure what to do from here. If I edit the file to correct the second entry where it says "!! UNKNOW DEVICE !!" will that let my partition show up properly?
Thanks again everyone for all the help, I'm surprised I was able to recover anything at all!
I'm not familiar with fstab, so I'm not sure what to do from here. If I edit the file to correct the second entry where it says "!! UNKNOW DEVICE !!" will that let my partition show up properly?
Should do; try this (clean up that comment while you're there)
Ok, so I've made the edit, and rebooted. Good news! Now, when I click on the "vmware tools" volume, I get the files in my Windows partition!
However, when I look at the volume properties, ubuntu reports the drive as having the joliet filesystem from the iso.
Do I just edit this information using the hardware information applet for ubuntu? This applet shows lots of fields that seem editable. As long as I'm asking, where would I go to change the same of "sdb1" to something more descriptive, like "music" or "documents"?
Or is there another place I should be making the changes, or a tool that I should be using? Also, does it matter that all the other entries use UUIDs except that one I added that says /dev/sda1?
I'm sorry if these are really basic questions, but I'm a little wary of experimenting now... especially when it comes down to the lower level volume/partition stuff. Thanks!
Last edited by transparent9; 05-22-2007 at 10:28 PM.
No, it's not consistent. But the UUID seemed to be that of the CD, not the NTFS partition. That uses the classic notation, but it can move around if the hard drives are adjusted (new ones added, chains changed, etc.)
I would think that fdisk could change the partition type back to NTFS. Be careful, of course, fdisk can also fsck your partition table.
So before I give up and reinstall ubuntu... I just wanted to find out a few things.
Where does ubuntu get the information for the hard drives when you pull up the Device Manager (System -> Preferences -> Hardware Information)? This appears to be the same information that shows up when you right click a volume and choose "properties".
Is there any way to get ubuntu to re-detect all the hard drives on the system, like if it was installing for the first time?
What would happen if I deleted /etc/fstab? Would that get the OS to re-detect things?
When I try to use:
Code:
sudo tune2fs -l /dev/sda1
to get the volume's UUID, it says:
Code:
tune2fs 1.40-WIP (14-Nov-2006)
tune2fs: Bad magic number in super-block while trying to open /dev/sda1
Couldn't find valid filesystem superblock.
Is that a clue as to what's actually wrong here? The partition seems to be in working shape, I can boot Windows and all parted, fdisk, and testdisk report the filesystem to be NTFS/HPFS.
Deleting fstab will kill your Linux. There are two daemons: HAL and D-BUS dealing with your hardware and automounting. I do not use them myself (I like to keep my system static), thus cannot tell you what exactly you have to do to reset HAL. tune2fs is an ext3 filesystem utility, it won't work on NTFS. You can definitely mount your Windows partition at startup simply by adding manually a line to the fstab.
I just reinstalled ubuntu, formatting the ubuntu partition (/dev/sda5), but this new install still sees my NTFS partition as "vmware tools" and as a joliet filesystem!
Where is the system getting this information?
I even rewrote the MBR on the disk using Windows' fixmbr command.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.