Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
|
05-23-2007, 03:15 PM
|
#31
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep: 
|
The reinstall would not reset anything on partitions it did not write to. Ubuntu just looks at what the partition boot record and file system tables show. My guess is that the boot record still contains elements copied from the iso file.
|
|
|
05-23-2007, 04:21 PM
|
#32
|
LQ Newbie
Registered: May 2007
Posts: 14
Original Poster
Rep:
|
Ok, now I'm thinking of just starting over, wiping it all completely.
I saw in another thread http://www.linuxquestions.org/questi...=554533&page=2
that I can maybe preserve my Windows XP install using dd to clone my Windows partition. However, since my goal is to get rid of these pesky MBR/partition problems, is there a way to do this that will ensure a fresh start when I copy everything back?
e.g. I want to keep my Windows apps, data, settings, but have it all be on a freshly partitioned drive.
|
|
|
05-23-2007, 04:44 PM
|
#33
|
Senior Member
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687
Rep:
|
Before going through allot of work, you should try Windows System Restore and restore it to a time prior to the incident, you can reverse any restore back to where you are now if it does not pan out. The dd copy will be exactly the same as the original. I don't think the partition table in the MBR is preventing Ubuntu from mounting Windows, rather it is errors in the NTFS partition.
|
|
|
05-23-2007, 04:59 PM
|
#34
|
Senior Member
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687
Rep:
|
Quote:
Originally Posted by jiml8
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.
|
One of the ideas behind a journaling file system is to avoid the lengthy times it takes for a file system integrity check utility to check the file system on a very large drive/partition. Because of journaling, file system check utilities just check the changes that were last implemented as reported in the journal.
EDIT: You can also run scandisc manually in Windows XP by opening My Computer and right clicking on the drive and select "properties/tools/error checking"
Last edited by Junior Hacker; 05-23-2007 at 05:14 PM.
|
|
|
05-23-2007, 05:01 PM
|
#35
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
You can use udevinfo to examine the present uuid on the filesystem. One of the ntfstools programs may be able to create a new UUID number for your ntfs filesystem.
udevinfo -q env -n /dev/sda1
Look at what the label on the partition says as well.
http://packages.ubuntu.com/warty/otherosfs/ntfstools
Last edited by jschiwal; 05-23-2007 at 05:11 PM.
|
|
|
05-23-2007, 11:34 PM
|
#36
|
LQ Newbie
Registered: May 2007
Posts: 14
Original Poster
Rep:
|
Here's the output from udevinfo:
Code:
ID_VENDOR=ATA
ID_MODEL=QUANTUM_FIREBALL
ID_REVISION=A35.
ID_SERIAL=1ATA_QUANTUM_FIREBALLP_LM30.0_186015536914
ID_SERIAL_SHORT=ATA_QUANTUM_FIREBALLP_LM30.0_186015536914
ID_TYPE=disk
ID_BUS=scsi
ID_PATH=pci-0000:00:1f.1-scsi-0:0:0:0
ID_FS_USAGE=filesystem
ID_FS_TYPE=iso9660
ID_FS_VERSION=Joliet
ID_FS_UUID=
ID_FS_LABEL=VMware
ID_FS_LABEL_SAFE=VMware_Tools
I'll try the ntfstools also.
I just tried using dd to overwrite the MBR completely to be zeros using
Code:
dd if=/dev/zero of=/dev/sda1 bs=512 count=1
Ubuntu booted up after that, so maybe I should have done /dev/sda instead of /dev/sda1. I'm trying obliterate the MBR and partition table and rebuild it, hopefully removing traces of the "vmware tools" iso.
Thing is, the Windows partition works OK (After fixboot), it's mountable, writable in ubuntu, boots into Windows ok, but it shows up as a joliet filesystem.
|
|
|
05-24-2007, 12:01 AM
|
#37
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
If you wipe out the mbr, you won't be able to boot, and you will loose the partitioning information.
You could relabel the disk either in windows for a windows partition or using ntfslabel.
What does "sudo file /dev/sda1" say about the filesystem?
Look at "sudo /sbin/fdisk -l". Is the filesystem ID a 7? (Although there isn't an iso9660 filetype entry, so maybe that isn't where the system is thinking the fs is iso9660.)
Example:
Code:
Disk /dev/hda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 3786 30409287 7 HPFS/NTFS
If the files are now readable, you might want to backup the files, reformat the partition, and restore the files you need.
Last edited by jschiwal; 05-24-2007 at 12:07 AM.
|
|
|
05-24-2007, 12:13 AM
|
#38
|
Senior Member
Registered: Sep 2003
Posts: 3,171
Rep: 
|
Quote:
dd if=/dev/zero of=/dev/sda1 bs=512 count=1
|
If you actually did this, you wiped out the boot record on that partition. This will keep you from accessing that partition. You'll need to fix that. This is your ntfs partition, right? There are tools to fix it. I believe testdisk will fix it.
Quote:
Ubuntu booted up after that, so maybe I should have done /dev/sda instead of /dev/sda1. I'm trying obliterate the MBR and partition table and rebuild it, hopefully removing traces of the "vmware tools" iso.
|
You don't want to eliminate the partition table.
Last edited by jiml8; 05-24-2007 at 12:14 AM.
|
|
|
05-24-2007, 12:44 AM
|
#39
|
LQ Newbie
Registered: May 2007
Posts: 14
Original Poster
Rep:
|
Well, I did the overwriting the MBR of /dev/sda. I then used GPartEd and testdisk to rebuild the partition table.
Still the same (though I had to reinstall grub to the MBR). Where on earth is Ubuntu getting the information it lists in the Device Manager and properties->volume?
"sudo fdisk -l" shows the partition as type 7 and "sudo file /dev/sda1" comes back "/dev/sda1: block special (8/1)"
Last edited by transparent9; 05-24-2007 at 12:46 AM.
|
|
|
05-24-2007, 04:52 AM
|
#40
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Quote:
Originally Posted by transparent9
Well, I did the overwriting the MBR of /dev/sda. I then used GPartEd and testdisk to rebuild the partition table.
Still the same (though I had to reinstall grub to the MBR). Where on earth is Ubuntu getting the information it lists in the Device Manager and properties->volume?
"sudo fdisk -l" shows the partition as type 7 and "sudo file /dev/sda1" comes back "/dev/sda1: block special (8/1)"
|
Sorry, I missed an option.
sudo file -s /dev/sda1
|
|
|
05-24-2007, 08:18 AM
|
#41
|
LQ Newbie
Registered: May 2007
Posts: 14
Original Poster
Rep:
|
Ok, I think I was able to repair what was wrong. Instead of just wiping the MBR, I used dd to write zeros to the first 13.8mb of the disk, the same size as the iso I accidentally copied to /dev/sda1. Then I did the same stuff as before, repaired the partition, MBR, fixboot. I haven't checked to see if Windows boots yet, but I'm confident that I can get that working.
Now in ubuntu, things appear to be correct. The volume now mounts as "sda1" instead of "vmware tools" and it reports the volume as NTFS in both properties and the device manager.
Here's the output of "file -s /dev/sda1" before the changes (I made a clone with dd):
Code:
/dev/sdc1: ISO 9660 CD-ROM filesystem data UDF filesystem data (unknown version, id 'NSR0h') 'VMware Tools
Here's after the changes:
Code:
/dev/sda1: x86 boot sector, code offset 0x52, OEM-ID "NTFS ", sectors/cluster 8, reserved sectors 0, Media descriptor 0xf8, heads 255, hidden sectors 63, dos < 4.0 BootSector (0x0)
Now the only thing that I'm wondering is if I need to set a UUID for the NTFS volume somehow. I think prior to the mishap, there was a UUID, but I haven't been able to find anything on how to set UUIDs for NTFS volumes (lots of stuff on how to set them for ext2/3). Is setting a UUID even necessary or preferred? What I'm reading around the forums is that it's a choice?
One thing's for sure-- I have learned more about partitions and MBRs than I ever expected or cared to! 
Last edited by transparent9; 05-24-2007 at 08:40 AM.
|
|
|
11-28-2016, 01:25 PM
|
#42
|
LQ Newbie
Registered: Oct 2016
Posts: 5
Rep: 
|
Quote:
Originally Posted by transparent9
Does that mean there is no way to repair the damage?
|
Try running GParted, navigate to SDA1 (or whatever drive you killed), menu>device>attempt data rescue
This has about a 50% success rate for me, good luck  .
|
|
|
11-28-2016, 03:33 PM
|
#43
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,443
|
I would doubt (over 9 years later) the OP cares anymore.
Try to avoid resurrecting long-dead threads.
|
|
|
All times are GMT -5. The time now is 02:02 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|