LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 05-23-2007, 03:15 PM   #31
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 123Reputation: 123

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.
 
Old 05-23-2007, 04:21 PM   #32
transparent9
LQ Newbie
 
Registered: May 2007
Posts: 14

Original Poster
Rep: Reputation: 0
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.
 
Old 05-23-2007, 04:44 PM   #33
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
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.
 
Old 05-23-2007, 04:59 PM   #34
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
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.
 
Old 05-23-2007, 05:01 PM   #35
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
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.
 
Old 05-23-2007, 11:34 PM   #36
transparent9
LQ Newbie
 
Registered: May 2007
Posts: 14

Original Poster
Rep: Reputation: 0
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.
 
Old 05-24-2007, 12:01 AM   #37
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
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.
 
Old 05-24-2007, 12:13 AM   #38
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 115Reputation: 115
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.
 
Old 05-24-2007, 12:44 AM   #39
transparent9
LQ Newbie
 
Registered: May 2007
Posts: 14

Original Poster
Rep: Reputation: 0
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.
 
Old 05-24-2007, 04:52 AM   #40
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
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
 
Old 05-24-2007, 08:18 AM   #41
transparent9
LQ Newbie
 
Registered: May 2007
Posts: 14

Original Poster
Rep: Reputation: 0
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.
 
Old 11-28-2016, 01:25 PM   #42
techboy317
LQ Newbie
 
Registered: Oct 2016
Posts: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by transparent9 View Post
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 .
 
Old 11-28-2016, 03:33 PM   #43
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,177

Rep: Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946
I would doubt (over 9 years later) the OP cares anymore.
Try to avoid resurrecting long-dead threads.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mount partition from copied block device cs-cam Linux - General 0 09-23-2006 07:41 PM
Reinstalling GRUB on a copied partition Exasperated Linux - General 3 02-05-2005 05:02 PM
Windows files copied to my linux partition are locked when logged in as a normal user necbrownie Slackware 8 10-15-2004 08:11 AM
What is the code to copy a file from my windows partition to my linux partition? THEBIGFISH Linux - Newbie 3 03-15-2004 10:14 PM
Windows XP hogs entire 40 GB Hard Drive with one Partition jedi_zach Linux - General 2 02-09-2004 12:29 AM


All times are GMT -5. The time now is 07:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration